**3. Modeling of Nanofiltration**

#### *3.1. Theory of the Utilized Model*

In order to describe the ion transport through the NF ceramic membrane, the comprehensively described DSPM (ddDSPM) was proposed. The ddDSPM is based on the eN-P equation, extensively utilized by Bowen and co-authors [25,30,33,44]. Description of solute fluxes in the DSPM considers convection, di ffusion, and electromigration mechanism. Convection occurs due to the applied pressure di fference over the membrane, di ffusion due to the concentration gradient across the membrane and finally charge e ffects related to electrostatic repulsion between the charged membrane and a charged organic compound [53]. The proposed ddDSPM explicitly takes all ions, solutes, and solvent into account. The whole ddDSPM model used in this work consists of Equations (2)-(19) set. Equation (2) describes the solvent velocity ( *V*), which depends on membrane properties such as pore size (*rp*), porosity ( *Ak*) and thickness of active layer ( Δ*x*), properties of separated solutions—i.e., osmotic pressures ( Δ π) and feed viscosity (η)—and process parameter such as transmembrane pressure ( Δ *P*). Di fference of osmotic pressures defined by Equation (3) is calculated according to Equations (6) and (7) which are based on feed (*xf,i*) and permeate (*xp,i*) molar fractions (Equations (4) and (5)). Equation (8) defines ratio of solute (*rs,i*) to pore radius, which is used along with Equation (9) to compute di ffusive ( *Kd,i*) and convective ( *Kc,i*) hindrance factors for each component *i* present in the mixture. The main equations of the ddDSPM model describe the gradient of individual ion concentration (*cm,i*) expressed by Equation (12) and electric potential gradient ( ψ) across the membrane active layer thickness presented by Equation (13). The equations described above are solved under the condition that the membrane poses effective membrane charge density *Xd*, which is present in Equation (14), and that the separated mixture is electroneutral (Equation (15)). The presented model is constructed under the assumption of the Donnan exclusion mechanism on the feed-membrane interface which is expressed in the form of Equation (16). The components retentions are expressed by Equation (17). In order to solve the model equations set discussed above, there is a need to define a set of boundary conditions representing component concentrations at the membrane feed (*cm*(0+),*i*) and permeate (*cp,i*) sides; the boundary conditions are presented by Equations (18) and (19). In summary, the ddDSPM consists of 17 + 14*NC* variables (listed in Table 2) in 7 + 11*NC* equations which were provided with appropriate descriptions in Table 3.

$$V = \frac{r\_p^2(\Delta P - \Delta \pi)A\_k}{8\eta\_\beta \Delta x} \tag{2}$$

$$
\Delta \pi = \pi\_{fend} - \pi\_{\text{permutate}} \tag{3}
$$

$$\mathbf{x}\_{f,i} = \frac{\mathbf{C}\_{f,i}}{\mathbf{\tilde{\mathbf{\color{red}{NaComp}}}} \mathbf{C}\_{f,i} + \mathbf{C}\_{f,H\_2O}} \tag{4}$$

$$\chi\_{p,i} = \frac{\mathbb{C}\_{p,i}}{\sum\_{i=1}^{\text{NoCom}} \mathbb{C}\_{p,i} + \left(\overset{\sim}{V}\_{\text{w}}\right)^{-1}} \tag{5}$$

$$
\pi\_{feed} = \frac{RT}{\tilde{V}\_w} \sum\_{i=1}^{NoComp} x\_{f,i} \tag{6}
$$

$$
\pi\_{\text{permutate}} = \frac{RT}{\check{V}\_{\text{uv}}} \sum\_{i=1}^{\text{No\\_comp}} x\_{p,i} \tag{7}
$$

$$
\lambda\_i = \frac{r\_{s,i}}{r\_p} \tag{8}
$$

$$\phi\_i = \left(1 - \lambda\_i\right)^2\tag{9}$$

$$K\_{d,i} = 1 - 2.3\lambda\_i + 1.154\lambda\_i^2 + 0.224\lambda\_i^3 \tag{10}$$

$$K\_{\mathbf{c},i} = (2 - \phi\_{\bar{i}}) \left( 1 + 0.054\lambda\_{\bar{i}} - 0.988\lambda\_{\bar{i}}^2 + 0.441\lambda\_{\bar{i}}^3 \right) \tag{11}$$

$$\frac{dc\_{m,i}}{dx} = \frac{V}{K\_{d,i}D\_i} \left(\mathcal{K}\_{c,i}c\_{m,i} - \mathcal{C}\_{p,i}\right) - \frac{F}{RT}z\_1c\_{m,i}\frac{d\psi}{dx} \tag{12}$$

$$\frac{\psi\_{\mathbf{x}=0} - \psi\_{\mathbf{x}=\delta}}{\delta} = \left. \frac{d\psi}{dx} \right|\_{\mathbf{x}=0} = \frac{\sum\_{i=1}^{\mathrm{No\,Camp}} \left( \frac{z\_i V}{D\_i} (\mathcal{K}\_{c,i} c\_{m(0^+),i} - \mathcal{C}\_{p,i}) \right)}{\frac{\mathrm{No\,Camp}}{\mathrm{R}\mathrm{T}} \sum\_{i=1}^{\mathrm{No\,Camp}} \left( z\_i^2 c\_{m,i} \right)} \tag{13}$$

$$\sum\_{i=1}^{\text{NoComp}} \mathbf{c}\_{m(0^+),i} z\_i = -\mathbf{X}\_d \tag{14}$$

$$\sum\_{i=1}^{\text{NoConup}} \mathcal{C}\_{p,i} z\_i = 0 \tag{15}$$

$$\mathbf{c}\_{m(0^{+}),i} = \mathbf{C}\_{f,i} \boldsymbol{\phi}\_{i} \exp\left(-\frac{z\_{i}F}{RT}\boldsymbol{\psi}\_{D}\right) \tag{16}$$

$$R\_i = 1 - \frac{C\_{p,i}}{C\_{f,i}} \tag{17}$$

and boundary conditions

$$\mathbf{x} = \mathbf{0}^{+} \to \mathfrak{c}\_{m,i} = \mathfrak{c}\_{m(0^{+}),i} \tag{18}$$

$$
\mathfrak{x} = \Delta \mathfrak{x} \to \mathfrak{c}\_{m,i} = \mathbb{C}\_{p,i} \tag{19}
$$

#### **Table 2.** Variables in the ddDSPM model (*NC*—number of separated components)


Although, the eN-P equations (Equations (12) and (13)) have been commonly used for the calculation of ion rejection by RO and NF membranes, they have rarely been applied to organic solutes [31]. Moreover, the ddDSPM model presented above in this work was not only used for process simulation but also for the estimation of parameter *Xd* which is present in Equation (14), i.e., the total volume membrane charge density across the membrane active layer. Thus, the estimated *Xd* is evaluated under the assumption of the constant surface charge and constant surface potential at the interface of pore entrance. In detail, the constant surface charge means that the pore wall surface charge density is identical to the free surface charge density, e.g., measured on particles. Whereas constant surface potential means that the pore wall surface potential at the pore entrance is identical to the free surface potential, which is related by some researchers [54] to the Donnan potential at the feed–membrane interface and therefore it is equal to the zeta potential ζ. Additionally, since *Xd* is present in electroneutrality condition (Equation (14)), it actually combines all electrochemical interactions in close membrane neighborhood, i.e., those between solutes, solvents, and membrane

material. Therefore, naming *Xd* as the total volume charge density across the membrane active layer is justified.


**Table 3.** List of equations in the ddDSPM model (*NC*—number of separated components).

#### *3.2. Determination of Total Volume Membrane Charge Density Values in Nanofiltration*

The degree of freedom (DOF) of the presented model is equal to 10 + 3*NC*, where *NC* stands for number of solutes present in the mixture. In order to solve the derived ddDSPM, the DOF must be equal to zero, therefore values of all parameters and known variables need to be provided. As already mentioned, during the parameter estimation in the ddDSPM, each ion existing in the solution is considered, even those originating from the sodium hydroxide or magnesium hydroxycarbonate, which were used for regulation of the pH of separated solutions. Values of di ffusion coe fficient *Di*, ions charge *zi* and radius of ions *ri,s* used in all calculations were presented in Table 4. Due to lack of the data, the Stokes–Einstein Equation (20) was used to determine the ionic radius of the succinate anion.

$$r\_{i,s} = \frac{k\_B T}{D\_i 6\pi\eta} \tag{20}$$

In Figure 2, the values of viscosities of investigated solutions were presented in comparison to pure water viscosities. It is important to notice that the di fference between viscosities of model solutions and water varied between 4% and 24%.

The modeling in this study is considering each ion presented in the system, even ions originating from solutions used to set the desired values of pH. Such detailed approach is innovative in modeling of NF processes. Until now, researchers dealing with modeling with the DSPM model, did not consider ions originating from solutions used for regulating pH or at least had not shown it explicitly. The solutes dissociate in aqueous solutions, then they deliver specific ionic forms to the separated feed. Authors are

convinced that the presence of additional ions (such as Na<sup>+</sup>, OH<sup>−</sup>, Mg<sup>2</sup>+, or CO3<sup>2</sup>−) may influence the total volume membrane charge density. It was also assumed in the ddDSPM, that the concentrations of the components in the feed are constant (i.e., steady state model), transmembrane pressure for the entire duration of the process is constant, pores are straight cylindrical in shape and of length equal to the effective membrane layer thickness. Due to the crossflow velocity and achieved Reynolds numbers within the membrane module in experiments equal to 2.3 m/s and 19,293, respectively, it was also assumed that concentration polarization effect and fouling phenomena are negligible. Additionally, as it is well known that the NF ceramic TiO2 membrane has a support layer (Al2O3), the influence of that layer was neglected in the view of ratio of ions radii to support layer pore radii and the assumption that support layer is uncharged (neutral).


**Table 4.** Characteristics of all ions present in the model solutions

**Figure 2.** Experimental viscosity values of model solutions (MS1, MS2, MS3) and reference water viscosity in relation to temperature. Data in labels are ordered according to temperature expressed in Kelvin and value of viscosity.

The parameter estimations were conducted in the gPROMS software, which employs a rigorous optimization-based approach for model validation by offering parameter estimation capabilities, i.e., fitting model parameters to experimental data. Parameter estimation in gPROMS is based on the maximum likelihood formulation which provides simultaneous estimation of parameters in the physical model of the process [60]. Assuming independent, normally distributed measurement errors, with zero means and standard deviations, that maximum likelihood goal can be achieved through the objective function presented by Equation (21) [60]. In cases discussed in this study, the parameters estimation problems had the following values of parameters following Equation (21): *NE* = 3, *NV* = 1, *NM* = 1, *N* = 3.

$$\Phi = \frac{N}{2}\ln(2\pi) + \frac{1}{2}\text{min}\_{\mathcal{X}\_d} \left\{ \sum\_{i=1}^{NE} \sum\_{j=1}^{NV\_i} \sum\_{k=1}^{NM\_{\bar{j}}} \left[ \ln\left(\sigma\_{ijk}^2\right) + \frac{\left(c\_{i\bar{k},\text{ms}} - c\_{i\bar{j}\bar{k}}\right)^2}{\sigma\_{ijk}^2} \right] \right\} \tag{21}$$
