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_lime or excess_lime or single_stage_lime_soda or excess_lime_soda

  • Silica removal: True or False

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}\)

single_stage_lime

\(\> 0.04\)

>= Total hardness

excess_lime

\(<= 0.04\)

<= Total hardness

single_stage_lime_soda

\(\> 0.04\)

<= Total hardness

excess_lime_soda

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

properties_in[0].flow_mass_phase_comp['Liq','H2O']

\(Q_{feed}\)

\(\text{m}^3\text{/s}\)

Feed composition

properties_in[0].flow_mass_phase_comp['Liq','Ca_2+']

\(m_{Ca^{2+}}\)

\(\text{g/}\text{L}\)

Feed composition

properties_in[0].flow_mass_phase_comp['Liq','Mg_2+']

\(m_{Mg^{2+}}\)

\(\text{g/}\text{L}\)

Feed composition

properties_in[0].flow_mass_phase_comp['Liq','Alkalinity_2-']

\(m_{alk}\)

\(\text{g/}\text{L}\)

Feed temperature

feed_props.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”

ca_eff_target

\(C_{out, Ca}\)

\(\text{g/}\text{L}\)

\(\text{Mg}^{2+}\) “effluent target”

mg_eff_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

number_mixers

\(n_{mixer}\)

>=1

\(\text{dimensionless}\)

Number of flocculators

number_floc

\(n_{floc}\)

>=1

\(\text{dimensionless}\)

Retention time of mixer

retention_time_mixer

\(RT_{mixer}\)

0.1-5

\(\text{min}\)

Retention time of flocculator

retention_time_floc

\(RT_{floc}\)

10-45

\(\text{min}\)

Retention time of sedimentation basin

retention_time_sed

\(RT_{sed}\)

120-240

\(\text{min}\)

Retention time of recarbonation basin

retention_time_recarb

\(RT_{recarb}\)

15-30

\(\text{min}\)

Fractional recovery of water on mass basis

frac_mass_water_recovery

\(X_{wr}\)

0-1

\(\text{dimensionless}\)

Removal efficiency of components (except Ca2+ and Mg2+)

removal_efficiency

\(X_j\)

0-1

\(\text{dimensionless}\)

CO2 dose in CaCO3 equivalents

CO2_CaCO3

\(CO_{2,CaCO_{3}-hardness}\)

>0

\(\text{g/}\text{L}\)

Velocity gradient in mixer

vel_gradient_mix

\(U_{mixer}\)

300-1000

\(\text{s}^{-1}\)

Velocity gradient in flocculator

vel_gradient_floc

\(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

excess_CaO

\(CaO\)

\(\text{g/}\text{L}\)

Soda ash

single_stage_lime_soda, excess_lime_soda

Na2CO3_dosing

\(Na_{2}CO_{3}\)

\(\text{g/}\text{L}\)

CO2 dose in second basin

excess_lime_soda

CO2_second_basin

\(CO_{2,second-basin}\)

\(\text{g/}\text{L}\)

MgCl2

Silica removal

MgCl2_dosing

\(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}\)

MgCl2_SiO2_ratio

\(X_{Mg/Si}\)

Sludge produced per kg Ca in \(\text{CaCO}_{3}\) hardness

Ca_hardness_CaCO3_sludge_factor

\(\text{Ca-SF}_{CaCO_{3}-hardness}\)

Sludge produced per kg Mg in \(\text{CaCO}_{3}\) hardness

Mg_hardness_CaCO3_sludge_factor

\(\text{Mg-SF}_{CaCO_{3}-hardness}\)

Sludge produced per kg Mg in non-\(\text{CaCO}_{3}\) hardness

Mg_hardness_nonCaCO3_sludge_factor

\(\text{Mg-SF}_{non-CaCO_{3}-hardness}\)

Multiplication factor to calculate excess \(\text{CaCO}\)

excess_CaO_coeff

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].

Single Stage Lime

Description

Equation

Lime dose

Carbonic acid concentration + Alkalinity + Magnesium hardness

Soda ash dose

None

Carbon dioxide first stage

Alkalinity - Calcium hardness + Residual calcium hardness

Excess Lime

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

Single Stage Lime-Soda Ash

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

Excess Lime-Soda Ash

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)

mgcl2_dosing

\(MgCl_{2}\)

\(X_{Mg/Si} \times SiO_{2}\)

Sludge produced

sludge_prod

\(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

volume_mixer

\(V_{mixer}\)

\(Q_{feed} RT_{mixer} n_{mixer}\)

Volume of flocculator

volume_floc

\(V_{floc}\)

\(Q_{feed} RT_{floc} n_{floc}\)

Volume of sedimentation basin

volume_sed

\(V_{sed}\)

\(Q_{feed} RT_{sed}\)

Volume of recarbonation basin

volume_recarb

\(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

_constant

_coeff/_coeff_1

_coeff_2

_coeff_3

_exp/_exp_1

_exp_2

Capital

Mixer

mix_tank_capital

28584

0.0002

22.776

2

Flocculator

floc_tank_capital

217222

673894

Sedimentation basin

sed_basin_capital

182801

-0.0005

86.89

2

Recarbonation basin

recarb_basin_capital

19287

4e-9

-0.0002

10.027

3

2

Recarbonation basin source

recarb_basin_source_capital

130812

9e-8

-0.001

42.578

2

Lime feed system

lime_feed_system_capital

193268

20.065

Administrative capital

admin_capital

69195

0.5523

Operating

Mixer

mix_tank_op

22588

-3e-8

0.0008

2.8375

3

2

Flocculator

floc_tank_op

6040

3e-13

-4e-7

0.318

3

2

Sedimentation basin

sed_basin_op

6872

7e-10

-0.00005

1.5908

3

2

Recarbonation basin

recarb_basin_op

10265

1e-8

-0.0004

6.19

3

2

Lime feed system

lime_feed_system_op

4616.7

0.4589

Lime sludge management system

sludge_disposal_cost

35

Administrative Operational

admin_op

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

[1] Crittenden, J. C., & Montgomery Watson Harza (Firm). (2012).
Water treatment principles and design. Hoboken, N.J: J.Wiley.
[2] Davis, M. L. (2010).
Water and wastewater engineering: Design principles and practice.
[3] Baruth. (2005). Water treatment plant design
American Water Works Association, American Society of Civil Engineers
Edward E. Baruth, technical editor. (Fourth edition.). McGraw-Hill.
[4] Edzwald, J. K., & American Water Works Association. (2011).
Water quality & treatment: A handbook on drinking water. New York: McGraw-Hill.
[5] R.O. Mines Environmental Engineering: Principles and Practice, 1st Ed, John Wiley & Sons
[6] Lee, C. C., & Lin, S. D. (2007).
Handbook of environmental engineering calculations. New York: McGraw Hill.
[7] Sharma, J.R. (2010).
Development Of a Preliminary Cost Estimation Method for Water Treatment Plants

[8] McGivney, W. T. & Kawamura, S. (2008) | Cost Estimating Manual for Water Treatment Facilities. | John Wiley & Sons, Inc., Hoboken, NJ, USA.