OsmoticPressure is a class used to represent the calculation of osmotic pressure for Nanofiltration Unit. For the calculation of the energy consumption, first the Osmotic pressure for the three streams (feed, concentrate, permeate) need to be calculated. For this calculation, you need to use the ion concentration of the stream (*Ci_in*, *Cperm*, *Cconc*) and the Ions molar mass (*MW_values*). The class *returns the Osmotic pressure* of the solution.
3.1. Oveview
-------------
The following attributes are available within the OsmoticPressure class:
- `Ci_in`: (float) Concentration of ions in the solution (mol/L).
- `MW_values`: (float) ons molar mass in g/mol.
The OsmoticPressure class provides the following method:
.. code-block:: python
osmotic_pressure_calculation()
This method calculates the osmotic pressure of a solution based on the Gibbs equation:
.. math::
\pi = -\left( \frac{RT}{V} \right) \ln(a_w)
3.2. Create OsmoticPressure objectives and calculate Osmotic Pressure
-------------
.. code-block:: python
# Calculate Osmotic Pressure for the three streams
P_osmo_f = OsmoticPressure(Ci_in, MW_values).calculate_osmotic_pressure()
P_osmo_p = OsmoticPressure(Cperm, MW_values).calculate_osmotic_pressure()
P_osmo_c = OsmoticPressure(Cconc, MW_values).calculate_osmotic_pressure()
.. _use-nfenergy-class:
4. Use NfEnergy class
=======================================================================================
.. raw:: html
NfEnergy is a class used to represent the calculation of energy consumption and the specific energy consumption for Nanofiltration Unit. For this calculation, the Osmotic pressure for the three streams (feed, concentrate, permeate) is used. In addition, the NfEnergy takes as input the expected pressure drop in each stream (*dp, d_p_, d_in*) and the pump efficiency (*n*).
The class returns the Applied pressure, power for applied pressure, the total energy *consumption* and the *specific energy consumption per m\ :sup:`3` permeate* and *m\ :sup:`3` feed*.
4.1. Oveview
-------------
The following attributes are available within the NfEnergy class:
- `P_osmo_c`: (float) Osmotic pressure of concentrate stream (bar).
- `P_osmo_f`: (float) Osmotic pressure of feed stream (bar).
- `P_osmo_p`: (float) Osmotic pressure of permeate stream (bar).
- `dp`: (float) Pressure drop (bar).
- `d_p`: (float) Permeate stream density (kg/m³).
- `Qperm`: (float) Permeate flow rate (kg/h).
- `Qf`: (float) Concentrate flow rate (kg/h).
- `d_in`: (float) Feed stream density (kg/m³).
- `n`: (float) Pump efficiency (-).
The NfEnergy class provides the following method:
.. code-block:: python
calculate_energy_consumption()
This method calculates the Applied pressure, power for applied pressure, the total energy consumption, and the specific energy consumption per m\ :sup:`3` permeate and m\ :sup:`3` feed.
4.2. Create nf_energy objectives and calculate Energy Consumption
-------------
The following objective is created for energy consumption. Assumptions for pressure drop and pump efficiency need to be made.
.. code-block:: python
nf_energy=NfEnergy(P_osmo_c, P_osmo_f, P_osmo_p, dp=2, d_p, Qperm, Qf_nf, d_in,n=0.8) # dp: pressure drop (units: bar) and n: pump efficiency (units: -)
result=nf_energy.calculate_energy_consumption()
4.3. Assigned the results to output parameters
-------------
.. code-block:: python
E_el_nf = nf_energy.E_el_nf
4.4. Print results
-------------
You can print results from energy calculations. The specific energy consumption is also calculated so you can validate easier the results.
.. code-block:: python
for key, value in result.items():
print(f"{key}: {value}")
Applied pressure (Bar): 21.16
Power for pump (KW): 51.93
E_el_nf (KW): 64.92
Specific Energy Consumption (KWh/m3 of permeate): 0.73