Chemical Softening
from watertap_contrib.reflo.unit_models import ChemicalSoftening
This chemical softening model includes the units mixer, flocculator, sedimentation basin and recarbonation basin. The model calculates the chemical dose required for target removal of hardness causing components and calculates the size of the mixer, flocculator, sedimentation basin and the recarbonation basin. This chemical softening model:
supports steady-state only
predicts the outlet concentration of \(\text{Ca}^{2+}\), \(\text{Mg}^{2+}\) and \(\text{Alkalinity}^{2-}\)
is verified against literature data
Model Structure
The MCAS property package is used for this chemical softening model and requires an input solute list from the user. Components that must be included are shown in the code below. Additional components can be included by the user such as TDS.
component_list = ["Ca_2+", "Mg_2+", "Alkalinity_2-"]
There are 3 StateBlocks (as 3 Ports in parenthesis below).
Inlet (
inlet)Outlet (
outlet)Waste (
waste)
The softening procedure type and whether or not silica removal is desired is set up in the configuration of the unit block.
Configuration Inputs
The model requires 2 configuration inputs:
Softening procedure:
single_stage_limeorexcess_limeorsingle_stage_lime_sodaorexcess_lime_sodaSilica removal:
TrueorFalse
The softening procedure is determined by the feed inlet conditions and users should take guidance from this table.
\([\text{Mg}^{2+}] \frac{g}{L} \text{ as CaCO}_{3}\) |
\([\text{Alkalinity}^{2-}] \frac{g}{L} \text{ as CaCO}_{3}\) |
Softening Procedure |
|---|---|---|
\(<= 0.04\) |
\([\text{Ca}^{2+}] \frac{g}{L} \text{ as CaCO}_{3}\) |
|
\(\> 0.04\) |
>= Total hardness |
|
\(<= 0.04\) |
<= Total hardness |
|
\(\> 0.04\) |
<= Total hardness |
|
Sets
The components \(\text{Ca}^{2+}\), \(\text{Mg}^{2+}\) and \(\text{Alkalinity}^{2-}\) must be included in the components.
Description |
Symbol |
Indices |
|---|---|---|
Time |
\(t\) |
[0] |
Phases |
\(p\) |
[‘Liq’, ‘Vap’] |
Components |
\(j\) |
[‘H2O’, ‘Ca_2+’, ‘ Mg_2+’, ‘Alkalinity_2-‘] |
Degrees of Freedom & Variables
The chemical softening model has 18 degrees of freedom that should be fixed for the unit to be fully specified. Additionally, depending on the chemical softening process selected, chemical dosing may or may not be required to be fixed.
Typically, the following 7 variables define the input feed.
Variables |
Variable Name |
Symbol |
Units |
|---|---|---|---|
Feed volume flow rate |
|
\(Q_{feed}\) |
\(\text{m}^3\text{/s}\) |
Feed composition |
|
\(m_{Ca^{2+}}\) |
\(\text{g/}\text{L}\) |
Feed composition |
|
\(m_{Mg^{2+}}\) |
\(\text{g/}\text{L}\) |
Feed composition |
|
\(m_{alk}\) |
\(\text{g/}\text{L}\) |
Feed temperature |
|
\(T\) |
\(^o\text{C}\) |
The user must directly set the effluent targets for \(\text{Ca}^{2+}\) and \(\text{Mg}^{2+}\).
Variables |
Variable Name |
Symbol |
Units |
|---|---|---|---|
\(\text{Ca}^{2+}\) “effluent target” |
|
\(C_{out, Ca}\) |
\(\text{g/}\text{L}\) |
\(\text{Mg}^{2+}\) “effluent target” |
|
\(C_{out, Mg}\) |
\(\text{g/}\text{L}\) |
The following 11 variables define the system design.
Variables |
Variable Name |
Symbol |
Valid Range |
Unit |
|---|---|---|---|---|
Number of mixers |
|
\(n_{mixer}\) |
>=1 |
\(\text{dimensionless}\) |
Number of flocculators |
|
\(n_{floc}\) |
>=1 |
\(\text{dimensionless}\) |
Retention time of mixer |
|
\(RT_{mixer}\) |
0.1-5 |
\(\text{min}\) |
Retention time of flocculator |
|
\(RT_{floc}\) |
10-45 |
\(\text{min}\) |
Retention time of sedimentation basin |
|
\(RT_{sed}\) |
120-240 |
\(\text{min}\) |
Retention time of recarbonation basin |
|
\(RT_{recarb}\) |
15-30 |
\(\text{min}\) |
Fractional recovery of water on mass basis |
|
\(X_{wr}\) |
0-1 |
\(\text{dimensionless}\) |
Removal efficiency of components (except Ca2+ and Mg2+) |
|
\(X_j\) |
0-1 |
\(\text{dimensionless}\) |
CO2 dose in CaCO3 equivalents |
|
\(CO_{2,CaCO_{3}-hardness}\) |
>0 |
\(\text{g/}\text{L}\) |
Velocity gradient in mixer |
|
\(U_{mixer}\) |
300-1000 |
\(\text{s}^{-1}\) |
Velocity gradient in flocculator |
|
\(U_{floc}\) |
20-80 |
\(\text{s}^{-1}\) |
The following variables should be fixed to 0 if their dose is not calculated in the softening procedure for the model to be fully specified. The softening procedure where the doses are calculated in are listed in the table.
Variables |
Softening procedure |
Variable Name |
Symbol |
Unit |
|---|---|---|---|---|
Excess lime |
excess_lime, excess_lime_soda |
|
\(CaO\) |
\(\text{g/}\text{L}\) |
Soda ash |
single_stage_lime_soda, excess_lime_soda |
|
\(Na_{2}CO_{3}\) |
\(\text{g/}\text{L}\) |
CO2 dose in second basin |
excess_lime_soda |
|
\(CO_{2,second-basin}\) |
\(\text{g/}\text{L}\) |
MgCl2 |
Silica removal |
|
\(MgCl_{2}\) |
\(\text{g/}\text{L}\) |
A default removal efficiency is assumed for components other than \(\text{Ca}^{2+}\) and \(\text{Mg}^{2+}\).
Users can update the removal efficiencies for specific components by fixing the removal_efficiency variable indexed to that component.
removal_efficiency['Cl_-'].fix(0.8)
Parameters
The following parameters are used as default values and are not mutable.
Description |
Parameter Name |
Symbol |
|---|---|---|
Ratio of \(\text{MgCl}_{2}\) to \(\text{SiO}_{2}\) |
|
\(X_{Mg/Si}\) |
Sludge produced per kg Ca in \(\text{CaCO}_{3}\) hardness |
|
\(\text{Ca-SF}_{CaCO_{3}-hardness}\) |
Sludge produced per kg Mg in \(\text{CaCO}_{3}\) hardness |
|
\(\text{Mg-SF}_{CaCO_{3}-hardness}\) |
Sludge produced per kg Mg in non-\(\text{CaCO}_{3}\) hardness |
|
\(\text{Mg-SF}_{non-CaCO_{3}-hardness}\) |
Multiplication factor to calculate excess \(\text{CaCO}\) |
|
Equations
The chemical dose is calculated based on the type of softening procedure selected in the configuration of the flowsheet. The following tables summarize the equations used to calculate the lime, soda ash and carbon dioxide dose for each softening procedure [1,2,3].
Description |
Equation |
|---|---|
Lime dose |
Carbonic acid concentration + Alkalinity + Magnesium hardness |
Soda ash dose |
None |
Carbon dioxide first stage |
Alkalinity - Calcium hardness + Residual calcium hardness |
Description |
Equation |
|---|---|
Lime dose |
Carbonic acid concentration + Total alkalinity + Magnesium hardness + Excess lime dose |
Excess lime dose |
Excess lime coefficient * (Carbonic acid concentration + Total alkalinity + Magnesium hardness) |
Soda ash dose |
None |
Carbon dioxide first stage |
Alkalinity - Total hardness + Excess lime dose + Residual total hardness |
Description |
Equation |
|---|---|
Lime dose |
Carbonic acid concentration + Alkalinity + Magnesium hardness |
Soda ash dose |
Non-carbonate hardness |
Carbon dioxide first stage |
Alkalinity + Non-carbonate hardness - Calcium hardness + Residual calcium hardness |
Description |
Equation |
|---|---|
Lime dose |
Carbonic acid concentration + Alkalinity + Magnesium hardness + Excess lime |
Excess lime dose |
Excess lime coefficient * (Carbonic acid concentration + Alkalinity + Magnesium hardness) |
Soda ash dose |
Non-carbonate hardness |
Carbon dioxide first stage |
Excess lime dose + Residual magnesium hardness |
Carbon dioxide second stage |
Alkalinity + Non-carbonate hardness - Source total hardness + Residual hardness |
The following equations are independent of the softening procedure selected but depend on the feed composition.
Description |
Variable Name |
Symbol |
Equation |
|---|---|---|---|
\(\text{MgCl}_{2}\) dose (if silica removal is selected) |
|
\(MgCl_{2}\) |
\(X_{Mg/Si} \times SiO_{2}\) |
Sludge produced |
|
\(m_{sludge}\) |
\(Q_{feed} (\text{Ca-SF}_{CaCO_{3}-hardness} \times Ca_{CaCO_{3}-hardness} + \text{Mg-SF}_{CaCO_{3}-hardness} \times Mg_{CaCO_{3}-hardness} + Ca_{non-CaCO_{3}-hardness} + \text{Mg-SF}_{non-CaCO_{3}-hardness} \times Mg_{non-CaCO_{3}-hardness} + \text{Excess CaO} + TSS + MgCl_{2})\) |
Volume of mixer |
|
\(V_{mixer}\) |
\(Q_{feed} RT_{mixer} n_{mixer}\) |
Volume of flocculator |
|
\(V_{floc}\) |
\(Q_{feed} RT_{floc} n_{floc}\) |
Volume of sedimentation basin |
|
\(V_{sed}\) |
\(Q_{feed} RT_{sed}\) |
Volume of recarbonation basin |
|
\(V_{recarb}\) |
\(Q_{feed} RT_{recarb}\) |
Costing
The following table lists out the coefficients used in the cost equations to calculate the capital and operating costs for the mixer, flocculator, sedimentation basin and recarbonation basin [7,8]. The coefficients are assigned as mutable Parameters.
Unit |
Variable Name |
|
|
|
|
|
|
|---|---|---|---|---|---|---|---|
Capital |
|||||||
Mixer |
|
28584 |
0.0002 |
22.776 |
2 |
||
Flocculator |
|
217222 |
673894 |
||||
Sedimentation basin |
|
182801 |
-0.0005 |
86.89 |
2 |
||
Recarbonation basin |
|
19287 |
4e-9 |
-0.0002 |
10.027 |
3 |
2 |
Recarbonation basin source |
|
130812 |
9e-8 |
-0.001 |
42.578 |
2 |
|
Lime feed system |
|
193268 |
20.065 |
||||
Administrative capital |
|
69195 |
0.5523 |
||||
Operating |
|||||||
Mixer |
|
22588 |
-3e-8 |
0.0008 |
2.8375 |
3 |
2 |
Flocculator |
|
6040 |
3e-13 |
-4e-7 |
0.318 |
3 |
2 |
Sedimentation basin |
|
6872 |
7e-10 |
-0.00005 |
1.5908 |
3 |
2 |
Recarbonation basin |
|
10265 |
1e-8 |
-0.0004 |
6.19 |
3 |
2 |
Lime feed system |
|
4616.7 |
0.4589 |
||||
Lime sludge management system |
|
35 |
|||||
Administrative Operational |
|
88589 |
0.4589 |
The following equations are used to calculate the components of the capital costs for the mixer, flocculator, sedimentation basin and recarbonation basin units and other costs.
Unit |
Equation |
|---|---|
Mixer |
\(\text{Capital Cost}_{mixer} = (0.0002 * V_{mixer})^{2} + (22.776 * V_{mixer}) + 28584\) |
Flocculator |
\(\text{Capital Cost}_{floc} = (673894 * V_{floc}) + (C_2 * V_{floc}) + 217222\) |
Sedimentation basin |
\(\text{Capital Cost}_{sed} = (-0.0005 * V_{sed}/Depth_{sed})^{2} + (86.89 * V_{mixer}/Depth_{sed}) + 182801\) |
Recarbonation basin |
\(\text{Capital Cost}_{recarb} = (4e-9 * V_{recarb})^{3} + (-0.0002 * V_{recarb})^{2} + (10.027 * V_{recarb}) + 19287\) |
Recarbonation source basin |
\(\text{Capital Cost}_{recarb_source} = (9e-8 * (CO_{2,first-basin} + CO_{2,second-basin})) + (-0.001 * (CO_{2,first-basin} + CO_{2,second-basin})){2} + (42.578 * (CO_{2,first-basin} + CO_{2,second-basin})) + 130812\) |
Lime feed system |
\(\text{Capital Cost}_{lime} = (20.065 * CaO) + 193268\) |
Administrative |
\(\text{Capital Cost}_{admin} = (69195 * Q_{feed})^{0.5523}\) |
The following equations are used to calculate the components of the operating costs for the mixer, flocculator, sedimentation basin and recarbonation basin units and other costs.
Unit |
Equation |
|---|---|
Mixer |
\(\text{Operating Cost}_{mixer} = (-3e-8 * V_{mixer})^{3} + (0.0008* V_{mixer})^{2} + (2.8375 * V_{mixer}) + 22588\) |
Flocculator |
\(\text{Operating Cost}_{floc} = (3e-13 * V_{floc})^{3} + (-4e-7 * V_{floc})^{2} + (0.318 * V_{floc}) + 6040\) |
Sedimentation basin |
\(\text{Operating Cost}_{sed} = (7e-10 * V_{sed}/Depth_{sed})^{3} + (-0.00005 * V_{mixer}/Depth_{sed})^{2} + (1.5908 * V_{mixer}/Depth_{sed}) + 6872\) |
Recarbonation basin |
\(\text{Operating Cost}_{recarb} = (1e-8* V_{recarb})^{3} + (-0.0004 * V_{recarb})^{2} + (6.19 * V_{recarb}) + 10265\) |
Lime feed system |
\(\text{Operating Cost}_{lime} = (4616.7 * CaO)^{0.4589}\) |
Lime sludge management |
\(\text{Operating Cost}_{lime-sludge} = (35 * m_{sludge})\) |
Administrative |
\(\text{Operating Cost}_{admin} = (88589 * Q_{feed})^{0.4589}\) |
The following equations are used to calculate the power consumption by the mixer and the flocculator used to calculate total electricity consumption.
Unit |
Equation |
|---|---|
Mixer |
\(P_{mix} = U_{mixer}^{2} * V_{mixer} * viscosity\) |
Flocculator |
\(P_{floc} = U_{floc}^{2} * V_{floc} * viscosity\) |
References
[8] McGivney, W. T. & Kawamura, S. (2008) | Cost Estimating Manual for Water Treatment Facilities. | John Wiley & Sons, Inc., Hoboken, NJ, USA.