diff --git a/docs/technical_reference/property_models/ADM1.rst b/docs/technical_reference/property_models/ADM1.rst index 666b61f6f5..4c21a0e32b 100644 --- a/docs/technical_reference/property_models/ADM1.rst +++ b/docs/technical_reference/property_models/ADM1.rst @@ -59,10 +59,12 @@ State variables "Total volumetric flowrate", ":math:`Q`", "flow_vol", "None", ":math:`\text{m}^3\text{/s}`" "Temperature", ":math:`T`", "temperature", "None", ":math:`\text{K}`" "Pressure", ":math:`P`", "pressure", "None", ":math:`\text{Pa}`" - "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[p]", ":math:`\text{kg/}\text{m}^3`" + "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[j]", ":math:`\text{kg/}\text{m}^3`" "Anions in molar concentrations", ":math:`M_a`", "anions", "None", ":math:`\text{kmol/}\text{m}^3`" "Cations in molar concentrations", ":math:`M_c`", "cations", "None", ":math:`\text{kmol/}\text{m}^3`" - "Component pressure", ":math:`P_{j,sat}`", "pressure_sat", "[p]", ":math:`\text{Pa}`" + "Component pressure", ":math:`P_{j,sat}`", "pressure_sat", "[j]", ":math:`\text{Pa}`" + "Reference temperature", ":math:`T_{ref}`", "temperature_ref", "None", ":math:`\text{K}`" + "Reference component mass concentrations", ":math:`C_{j,ref}`", "conc_mass_comp_ref", "[j]", ":math:`\text{kg/}\text{m}^3`" Stoichiometric Parameters ------------------------- @@ -137,7 +139,7 @@ Kinetic Parameters "First-order decay rate for X_pro, k_dec_X_pro", ":math:`k_{dec,X_{pro}}`", "k_dec_X_pro", 0.02, ":math:`\text{d}^{-1}`" "First-order decay rate for X_ac, k_dec_X_ac", ":math:`k_{dec,X_{ac}}`", "k_dec_X_ac", 0.02, ":math:`\text{d}^{-1}`" "First-order decay rate for X_h2, k_dec_X_h2", ":math:`k_{dec,X_{h2}}`", "k_dec_X_h2", 0.02, ":math:`\text{d}^{-1}`" - "Dissociation constant, KW", ":math:`KW`", "KW", 2.08e-14, ":math:`(\text{kmol/}\text{m}^3)^2`" + "Water dissociation constant, KW", ":math:`KW`", "KW", 2.08e-14, ":math:`(\text{kmol/}\text{m}^3)^2`" "Valerate acid-base equilibrium constant, K_a_va", ":math:`K_{a,va}`", "K_a_va", 1.38e-5, ":math:`\text{kmol/}\text{m}^3`" "Butyrate acid-base equilibrium constant, K_a_bu", ":math:`K_{a,bu}`", "K_a_bu", 1.5e-5, ":math:`\text{kmol/}\text{m}^3`" "Propionate acid-base equilibrium constant, K_a_pro", ":math:`K_{a,pro}`", "K_a_bu", 1.32e-5, ":math:`\text{kmol/}\text{m}^3`" @@ -178,31 +180,73 @@ Process Rate Equations "Decay of X_ac", ":math:`\rho_{18} = k_{dec, X_{ac}} C_{X_{ac}}`" "Decay of X_h2", ":math:`\rho_{19} = k_{dec, X_{h2}} C_{X_{h2}}`" +Additional Variables +-------------------- +.. csv-table:: + :header: "Description", "Symbol", "Parameter", "Value at 20 C", "Units" + + "Molar concentration of hydrogen, S_H", ":math:`S_{H}`", "S_H", 3.4e-8, ":math:`\text{kmol/}\text{m}^3`" + "Molar concentration of hydroxide, S_OH", ":math:`S_{OH}`", "S_OH", 3.4e-8, ":math:`\text{kmol/}\text{m}^3`" + +Additional Constraints +---------------------- +.. csv-table:: + :header: "Description", "Equation" + + "Water dissociation constant constraint", ":math:`KW = 10^{-14} exp{(\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "CO2 acid-base equilibrium constraint", ":math:`K_{a,co2} = 10^{-6.35} exp{(\frac{7646}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "Nitrogen acid-base equilibrium constraint", ":math:`K_{a,IN} = 10^{-9.25} exp{(\frac{51965}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "Mass concentration of valerate, va-", ":math:`C_{va} = \frac{K_{a,va} * C_{va,ref}}{K_{a,va} + S_{H}}`" + "Mass concentration of butyrate, bu-", ":math:`C_{bu} = \frac{K_{a,bu} * C_{bu,ref}}{K_{a,bu} + S_{H}}`" + "Mass concentration of propionate, pro-", ":math:`C_{pro} = \frac{K_{a,pro} * C_{pro,ref}}{K_{a,pro} + S_{H}}`" + "Mass concentration of acetate, ac-", ":math:`C_{ac} = \frac{K_{a,ac} * C_{ac,ref}}{K_{a,ac} + S_{H}}`" + "Molar concentration of bicarbonate, HCO3", ":math:`M_{hco3} = \frac{K_{a,co2} * \frac{C_{S_{IC},ref}}{12}}{K_{a,co2} + S_{H}}`" + "Molar concentration of ammonia, NH3", ":math:`M_{nh3} = \frac{K_{a,IN} * \frac{C_{S_{IN},ref}}{14}}{K_{a,IN} + S_{H}}`" + "Molar concentration of carbon dioxide, CO2", ":math:`M_{co2} = \frac{C_{S_{IC},ref}}{12} - M_{hco3}`" + "Molar concentration of ammonium, NH4+", ":math:`M_{nh4} = \frac{C_{S_{IN},ref}}{14} - M_{nh3}`" + "Molar concentration of hydrogen, H+", ":math:`S_{H} = M_{hco3} + \frac{C_{ac}}{64} + \frac{C_{pro}}{112} + \frac{C_{bu}}{160} + \frac{C_{va}}{208} + S_{OH} + M_{a} - M_{c} - M_{nh4}`" + "Molar concentration of hydroxide, OH-", ":math:`S_{OH} = \frac{KW}{S_{H}}`" + "pH of solution", ":math:`pH = -log_{10}(S_{H})`" + The rules for pH inhibition of amino-acid-utilizing microorganisms (:math:`I_{pH,aa}`), acetate-utilizing microorganisms (:math:`I_{pH,ac}`), and hydrogen-utilizing microorganisms (:math:`I_{pH,h2}`) are: .. math:: I_{pH,aa}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,aa}}{pH_{UL,aa} - pH_{LL,aa}})^2} & \text{for } pH \le pH_{UL,aa}\\ + \exp{(-3 (\frac{pH - pH_{UL,aa}}{pH_{UL,aa} - pH_{LL,aa}})^2)} & \text{for } pH \le pH_{UL,aa}\\ 1 & \text{for } pH > pH_{UL,aa} \end{cases} I_{pH,ac}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,ac}}{pH_{UL,ac} - pH_{LL,ac}})^2} & \text{for } pH \le pH_{UL,ac}\\ + \exp{(-3 (\frac{pH - pH_{UL,ac}}{pH_{UL,ac} - pH_{LL,ac}})^2)} & \text{for } pH \le pH_{UL,ac}\\ 1 & \text{for } pH > pH_{UL,ac} \end{cases} - I_{pH,aa}= + I_{pH,h2}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,h2}}{pH_{UL,h2} - pH_{LL,h2}})^2} & \text{for } pH \le pH_{UL,h2}\\ + \exp{(-3 (\frac{pH - pH_{UL,h2}}{pH_{UL,h2} - pH_{LL,h2}})^2)} & \text{for } pH \le pH_{UL,h2}\\ 1 & \text{for } pH > pH_{UL,h2} \end{cases} +The rules for inhibition related to secondary substrate (:math:`I_{IN,lim}`), hydrogen inhibition attributed to long chain fatty acids (:math:`I_{h2,fa}`), hydrogen inhibition attributed to valerate and butyrate uptake (:math:`I_{h2,c4}`), hydrogen inhibition attributed to propionate uptake (:math:`I_{h2,pro}`), ammonia inibition attributed to acetate uptake (:math:`I_{nh3}`), are: + + .. math:: + + I_{IN,lim} = \frac{1}{1 + \frac{K_{S_{IN}}}{C_{S_{IN}}/14}} + + I_{h2, fa}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,fa}}} + + I_{h2, c4}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,c4}}} + + I_{h2, pro}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,pro}}} + + I_{nh3}= \frac{1}{1 + \frac{M_{nh3}}{K_{I,nh3}}} + -Classes -------- +Class Documentation +------------------- .. currentmodule:: watertap.property_models.anaerobic_digestion.adm1_properties .. autoclass:: ADM1ParameterBlock diff --git a/docs/technical_reference/property_models/ASM1.rst b/docs/technical_reference/property_models/ASM1.rst index 68c4a275a3..4507c61bb5 100644 --- a/docs/technical_reference/property_models/ASM1.rst +++ b/docs/technical_reference/property_models/ASM1.rst @@ -42,8 +42,8 @@ State variables "Total volumetric flowrate", ":math:`Q`", "flow_vol", "None", ":math:`\text{m}^3\text{/s}`" "Temperature", ":math:`T`", "temperature", "None", ":math:`\text{K}`" "Pressure", ":math:`P`", "pressure", "None", ":math:`\text{Pa}`" - "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[p]", ":math:`\text{kg/}\text{m}^3`" - "Alkalinity in molar concentration", ":math:`A`", "alkalinity", "[p]", ":math:`\text{kmol HCO}_{3}^{-}\text{/m}^{3}`" + "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[j]", ":math:`\text{kg/}\text{m}^3`" + "Alkalinity in molar concentration", ":math:`A`", "alkalinity", "None", ":math:`\text{kmol HCO}_{3}^{-}\text{/m}^{3}`" Stoichiometric Parameters ------------------------- @@ -103,6 +103,44 @@ Scaling ------- Scaling for the ASM1 property package has yet to be implemented. +Class Documentation +------------------- +.. currentmodule:: watertap.property_models.activated_sludge.asm1_properties + +.. autoclass:: ASM1ParameterBlock + :members: + :noindex: + +.. autoclass:: ASM1ParameterData + :members: + :noindex: + +.. autoclass:: _ASM1StateBlock + :members: + :noindex: + +.. autoclass:: ASM1StateBlockData + :members: + :noindex: + +.. currentmodule:: watertap.property_models.activated_sludge.asm1_reactions + +.. autoclass:: ASM1ReactionParameterBlock + :members: + :noindex: + +.. autoclass:: ASM1ReactionParameterData + :members: + :noindex: + +.. autoclass:: _ASM1ReactionBlock + :members: + :noindex: + +.. autoclass:: ASM1ReactionBlockData + :members: + :noindex: + References ---------- diff --git a/docs/technical_reference/property_models/ASM2D.rst b/docs/technical_reference/property_models/ASM2D.rst index 1dea27fef4..e9d2e77261 100644 --- a/docs/technical_reference/property_models/ASM2D.rst +++ b/docs/technical_reference/property_models/ASM2D.rst @@ -57,8 +57,8 @@ State variables "Total volumetric flowrate", ":math:`Q`", "flow_vol", "None", ":math:`\text{m}^3\text{/s}`" "Temperature", ":math:`T`", "temperature", "None", ":math:`\text{K}`" "Pressure", ":math:`P`", "pressure", "None", ":math:`\text{Pa}`" - "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[p]", ":math:`\text{kg/}\text{m}^3`" - "Molar alkalinity", ":math:`A`", "alkalinity", "[p]", ":math:`\text{kmol HCO}_{3}^{-}\text{/m}^{3}`" + "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[j]", ":math:`\text{kg/}\text{m}^3`" + "Molar alkalinity", ":math:`A`", "alkalinity", "None", ":math:`\text{kmol HCO}_{3}^{-}\text{/m}^{3}`" Stoichiometric Coefficients --------------------------- @@ -164,6 +164,43 @@ Scaling ------- A thorough scaling routine for the ASM2D property package has yet to be implemented. +Class Documentation +------------------- +.. currentmodule:: watertap.property_models.activated_sludge.asm2d_properties + +.. autoclass:: ASM2dParameterBlock + :members: + :noindex: + +.. autoclass:: ASM2dParameterData + :members: + :noindex: + +.. autoclass:: _ASM2dStateBlock + :members: + :noindex: + +.. autoclass:: ASM2dStateBlockData + :members: + :noindex: + +.. currentmodule:: watertap.property_models.activated_sludge.asm2d_reactions + +.. autoclass:: ASM2dReactionParameterBlock + :members: + :noindex: + +.. autoclass:: ASM2dReactionParameterData + :members: + :noindex: + +.. autoclass:: _ASM2dReactionBlock + :members: + :noindex: + +.. autoclass:: ASM2dReactionBlockData + :members: + :noindex: References ---------- diff --git a/docs/technical_reference/property_models/modified_ADM1.rst b/docs/technical_reference/property_models/modified_ADM1.rst index f922ed9488..ff59e2824a 100644 --- a/docs/technical_reference/property_models/modified_ADM1.rst +++ b/docs/technical_reference/property_models/modified_ADM1.rst @@ -86,10 +86,12 @@ State variables "Total volumetric flowrate", ":math:`Q`", "flow_vol", "None", ":math:`\text{m}^3\text{/s}`" "Temperature", ":math:`T`", "temperature", "None", ":math:`\text{K}`" "Pressure", ":math:`P`", "pressure", "None", ":math:`\text{Pa}`" - "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[p]", ":math:`\text{kg/}\text{m}^3`" + "Component mass concentrations", ":math:`C_j`", "conc_mass_comp", "[j]", ":math:`\text{kg/}\text{m}^3`" "Anions in molar concentrations", ":math:`M_a`", "anions", "None", ":math:`\text{kmol/}\text{m}^3`" "Cations in molar concentrations", ":math:`M_c`", "cations", "None", ":math:`\text{kmol/}\text{m}^3`" - "Component pressure", ":math:`P_{j,sat}`", "pressure_sat", "[p]", ":math:`\text{Pa}`" + "Component pressure", ":math:`P_{j,sat}`", "pressure_sat", "[j]", ":math:`\text{Pa}`" + "Reference temperature", ":math:`T_{ref}`", "temperature_ref", "None", ":math:`\text{K}`" + "Reference component mass concentrations", ":math:`C_{j,ref}`", "conc_mass_comp_ref", "[j]", ":math:`\text{kg/}\text{m}^3`" Stoichiometric Parameters ------------------------- @@ -174,7 +176,7 @@ Kinetic Parameters "First-order decay rate for X_pro, k_dec_X_pro", ":math:`k_{dec,X_{pro}}`", "k_dec_X_pro", 0.02, ":math:`\text{d}^{-1}`" "First-order decay rate for X_ac, k_dec_X_ac", ":math:`k_{dec,X_{ac}}`", "k_dec_X_ac", 0.02, ":math:`\text{d}^{-1}`" "First-order decay rate for X_h2, k_dec_X_h2", ":math:`k_{dec,X_{h2}}`", "k_dec_X_h2", 0.02, ":math:`\text{d}^{-1}`" - "Dissociation constant, KW", ":math:`KW`", "KW", 2.08e-14, ":math:`(\text{kmol/}\text{m}^3)^2`" + "Water dissociation constant, KW", ":math:`KW`", "KW", 2.08e-14, ":math:`(\text{kmol/}\text{m}^3)^2`" "Valerate acid-base equilibrium constant, K_a_va", ":math:`K_{a,va}`", "K_a_va", 1.38e-5, ":math:`\text{kmol/}\text{m}^3`" "Butyrate acid-base equilibrium constant, K_a_bu", ":math:`K_{a,bu}`", "K_a_bu", 1.5e-5, ":math:`\text{kmol/}\text{m}^3`" "Propionate acid-base equilibrium constant, K_a_pro", ":math:`K_{a,pro}`", "K_a_bu", 1.32e-5, ":math:`\text{kmol/}\text{m}^3`" @@ -242,30 +244,76 @@ Process Rate Equations ":lime:`Lysis of X_PP`", ":math:`\rho_{24} = b_{PP} C_{X_{PP}}`" ":lime:`Lysis of X_PHA`", ":math:`\rho_{25} = b_{PHA} C_{X_{PHA}}`" +Additional Variables +-------------------- +.. csv-table:: + :header: "Description", "Symbol", "Parameter", "Value at 20 C", "Units" -The rules for pH inhibition of amino-acid-utilizing microorganisms (:math:`I_{pH,aa}`), acetate-utilizing microorganisms (:math:`I_{pH,ac}`), hydrogen-utilizing microorganisms (:math:`I_{pH,h2}`) are: + "Molar concentration of hydrogen, S_H", ":math:`S_{H}`", "S_H", 3.4e-8, ":math:`\text{kmol/}\text{m}^3`" + "Molar concentration of hydroxide, S_OH", ":math:`S_{OH}`", "S_OH", 3.4e-8, ":math:`\text{kmol/}\text{m}^3`" + +Additional Constraints +---------------------- +:lime:`Lime` text indicates the equation has been added, and :blue:`blue` text indicates the equation has been modified from its base ADM1 implementation. + +.. csv-table:: + :header: "Description", "Equation" + + "Water dissociation constant constraint", ":math:`KW = 10^{-14} exp{(\frac{55900}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "CO2 acid-base equilibrium constraint", ":math:`K_{a,co2} = 10^{-6.35} exp{(\frac{7646}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "Nitrogen acid-base equilibrium constraint", ":math:`K_{a,IN} = 10^{-9.25} exp{(\frac{51965}{R} * (\frac{1}{T_{ref}} - \frac{1}{T}))}`" + "Mass concentration of valerate, va-", ":math:`C_{va} = \frac{K_{a,va} * C_{va,ref}}{K_{a,va} + S_{H}}`" + "Mass concentration of butyrate, bu-", ":math:`C_{bu} = \frac{K_{a,bu} * C_{bu,ref}}{K_{a,bu} + S_{H}}`" + "Mass concentration of propionate, pro-", ":math:`C_{pro} = \frac{K_{a,pro} * C_{pro,ref}}{K_{a,pro} + S_{H}}`" + "Mass concentration of acetate, ac-", ":math:`C_{ac} = \frac{K_{a,ac} * C_{ac,ref}}{K_{a,ac} + S_{H}}`" + "Molar concentration of bicarbonate, HCO3", ":math:`M_{hco3} = \frac{K_{a,co2} * \frac{C_{S_{IC},ref}}{12}}{K_{a,co2} + S_{H}}`" + "Molar concentration of ammonia, NH3", ":math:`M_{nh3} = \frac{K_{a,IN} * \frac{C_{S_{IN},ref}}{14}}{K_{a,IN} + S_{H}}`" + "Molar concentration of carbon dioxide, CO2", ":math:`M_{co2} = \frac{C_{S_{IC},ref}}{12} - M_{hco3}`" + "Molar concentration of ammonium, NH4+", ":math:`M_{nh4} = \frac{C_{S_{IN},ref}}{14} - M_{nh3}`" + ":lime:`Molar concentration of magnesium, Mg`", ":math:`M_{Mg} = \frac{C_{X_{PP},ref}}{300.41}`" + ":lime:`Molar concentration of potassium, K`", ":math:`M_{K} = \frac{C_{X_{PP},ref}}{300.41}`" + ":blue:`Molar concentration of hydrogen, H+`", ":math:`S_{H} = M_{hco3} + \frac{C_{ac}}{64} + \frac{C_{pro}}{112} + \frac{C_{bu}}{160} + \frac{C_{va}}{208} + S_{OH} + M_{a} - M_{c} - M_{nh4} - M_{Mg} - M_{K}`" + "Molar concentration of hydroxide, OH-", ":math:`S_{OH} = \frac{KW}{S_{H}}`" + "pH of solution", ":math:`pH = -log_{10}(S_{H})`" + +The rules for inhibition of amino-acid-utilizing microorganisms (:math:`I_{pH,aa}`), acetate-utilizing microorganisms (:math:`I_{pH,ac}`), hydrogen-utilizing microorganisms (:math:`I_{pH,h2}`) are: .. math:: I_{pH,aa}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,aa}}{pH_{UL,aa} - pH_{LL,aa}})^2} & \text{for } pH \le pH_{UL,aa}\\ + \exp{(-3 (\frac{pH - pH_{UL,aa}}{pH_{UL,aa} - pH_{LL,aa}})^2)} & \text{for } pH \le pH_{UL,aa}\\ 1 & \text{for } pH > pH_{UL,aa} \end{cases} I_{pH,ac}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,ac}}{pH_{UL,ac} - pH_{LL,ac}})^2} & \text{for } pH \le pH_{UL,ac}\\ + \exp{(-3 (\frac{pH - pH_{UL,ac}}{pH_{UL,ac} - pH_{LL,ac}})^2)} & \text{for } pH \le pH_{UL,ac}\\ 1 & \text{for } pH > pH_{UL,ac} \end{cases} - I_{pH,aa}= + I_{pH,h2}= \begin{cases} - \exp{-3 (\frac{pH - pH_{UL,h2}}{pH_{UL,h2} - pH_{LL,h2}})^2} & \text{for } pH \le pH_{UL,h2}\\ + \exp{(-3 (\frac{pH - pH_{UL,h2}}{pH_{UL,h2} - pH_{LL,h2}})^2)} & \text{for } pH \le pH_{UL,h2}\\ 1 & \text{for } pH > pH_{UL,h2} \end{cases} -The rules for hydrogen sulfide inhibition factors are shown below; however, since :math:`Z_{h2s}` is assumed to be 0, all of these inhibition factors are negligible + +The rules for inhibition related to secondary substrate (:math:`I_{IN,lim}`), hydrogen inhibition attributed to long chain fatty acids (:math:`I_{h2,fa}`), hydrogen inhibition attributed to valerate and butyrate uptake (:math:`I_{h2,c4}`), hydrogen inhibition attributed to propionate uptake (:math:`I_{h2,pro}`), ammonia inibition attributed to acetate uptake (:math:`I_{nh3}`), are: + + .. math:: + + I_{IN,lim} = \frac{1}{1 + \frac{K_{S_{IN}}}{C_{S_{IN}}/14}} + + I_{h2, fa}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,fa}}} + + I_{h2, c4}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,c4}}} + + I_{h2, pro}= \frac{1}{1 + \frac{C_{S_{h2}}}{K_{I,h2,pro}}} + + I_{nh3}= \frac{1}{1 + \frac{M_{nh3}}{K_{I,nh3}}} + +:lime:`The rules for hydrogen sulfide inhibition factors are shown below; however, since` :math:`Z_{h2s}` :lime:`is assumed to be 0, all of these inhibition factors are negligible.` .. math:: @@ -277,8 +325,8 @@ The rules for hydrogen sulfide inhibition factors are shown below; however, sinc I_{h2s, pro}= \frac{1}{1 + \frac{Z_{h2s}}{K_{I,h2s,pro}}} -Classes -------- +Class Documentation +------------------- .. currentmodule:: watertap.property_models.anaerobic_digestion.modified_adm1_properties .. autoclass:: ModifiedADM1ParameterBlock diff --git a/watertap/property_models/activated_sludge/asm1_properties.py b/watertap/property_models/activated_sludge/asm1_properties.py index a25e3560db..a41777dc5d 100644 --- a/watertap/property_models/activated_sludge/asm1_properties.py +++ b/watertap/property_models/activated_sludge/asm1_properties.py @@ -154,27 +154,22 @@ def initialize( Initialization routine for property package. Keyword Arguments: - state_args : Dictionary with initial guesses for the state vars - chosen. Note that if this method is triggered - through the control volume, and if initial guesses - were not provied at the unit model level, the - control volume passes the inlet values as initial - guess.The keys for the state_args dictionary are: - - flow_mol_comp : value at which to initialize component - flows (default=None) - pressure : value at which to initialize pressure - (default=None) - temperature : value at which to initialize temperature - (default=None) + state_args : Dictionary with initial guesses for the state vars + chosen. Note that if this method is triggered + through the control volume, and if initial guesses + were not provided at the unit model level, the + control volume passes the inlet values as initial + guess.The keys for the state_args dictionary are: + flow_mol_comp : value at which to initialize component flows (default=None) + pressure : value at which to initialize pressure (default=None) + temperature : value at which to initialize temperature (default=None) outlvl : sets output level of initialization routine - state_vars_fixed: Flag to denote if state vars have already been - fixed. - - True - states have already been fixed and - initialization does not need to worry - about fixing and unfixing variables. - - False - states have not been fixed. The state - block will deal with fixing/unfixing. + state_vars_fixed: Flag to denote if state vars have already been fixed. + True - states have already been fixed and + initialization does not need to worry + about fixing and unfixing variables. + False - states have not been fixed. The state + block will deal with fixing/unfixing. optarg : solver options dictionary object (default=None, use default solver options) solver : str indicating which solver to use during @@ -182,13 +177,11 @@ def initialize( hold_state : flag indicating whether the initialization routine should unfix any state variables fixed during initialization (default=False). - - True - states varaibles are not unfixed, and - a dict of returned containing flags for - which states were fixed during - initialization. - - False - state variables are unfixed after - initialization by calling the - relase_state method + True - states variables are not unfixed, and + a dict of returned containing flags for + which states were fixed during initialization. + False - state variables are unfixed after + initialization by calling the release_state method. Returns: If hold_states is True, returns a dict containing flags for diff --git a/watertap/property_models/activated_sludge/asm2d_properties.py b/watertap/property_models/activated_sludge/asm2d_properties.py index 2c0700adac..69c8390cd1 100644 --- a/watertap/property_models/activated_sludge/asm2d_properties.py +++ b/watertap/property_models/activated_sludge/asm2d_properties.py @@ -179,27 +179,22 @@ def initialize( Initialization routine for property package. Keyword Arguments: - state_args : Dictionary with initial guesses for the state vars - chosen. Note that if this method is triggered - through the control volume, and if initial guesses - were not provied at the unit model level, the - control volume passes the inlet values as initial - guess.The keys for the state_args dictionary are: - - flow_mol_comp : value at which to initialize component - flows (default=None) - pressure : value at which to initialize pressure - (default=None) - temperature : value at which to initialize temperature - (default=None) + state_args : Dictionary with initial guesses for the state vars + chosen. Note that if this method is triggered + through the control volume, and if initial guesses + were not provided at the unit model level, the + control volume passes the inlet values as initial + guess.The keys for the state_args dictionary are: + flow_mol_comp : value at which to initialize component flows (default=None) + pressure : value at which to initialize pressure (default=None) + temperature : value at which to initialize temperature (default=None) outlvl : sets output level of initialization routine - state_vars_fixed: Flag to denote if state vars have already been - fixed. - - True - states have already been fixed and - initialization does not need to worry - about fixing and unfixing variables. - - False - states have not been fixed. The state - block will deal with fixing/unfixing. + state_vars_fixed: Flag to denote if state vars have already been fixed. + True - states have already been fixed and + initialization does not need to worry + about fixing and unfixing variables. + False - states have not been fixed. The state + block will deal with fixing/unfixing. optarg : solver options dictionary object (default=None, use default solver options) solver : str indicating which solver to use during @@ -207,13 +202,11 @@ def initialize( hold_state : flag indicating whether the initialization routine should unfix any state variables fixed during initialization (default=False). - - True - states varaibles are not unfixed, and - a dict of returned containing flags for - which states were fixed during - initialization. - - False - state variables are unfixed after - initialization by calling the - relase_state method + True - states variables are not unfixed, and + a dict of returned containing flags for + which states were fixed during initialization. + False - state variables are unfixed after + initialization by calling the release_state method. Returns: If hold_states is True, returns a dict containing flags for diff --git a/watertap/property_models/anaerobic_digestion/adm1_reactions.py b/watertap/property_models/anaerobic_digestion/adm1_reactions.py index ce53ff7933..1f82638fef 100644 --- a/watertap/property_models/anaerobic_digestion/adm1_reactions.py +++ b/watertap/property_models/anaerobic_digestion/adm1_reactions.py @@ -1241,25 +1241,25 @@ def _rxn_rate(self): self.conc_mass_va = pyo.Var( initialize=0.01159624, domain=pyo.NonNegativeReals, - doc="molar concentration of va-", + doc="mass concentration of va-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_bu = pyo.Var( initialize=0.0132208, domain=pyo.NonNegativeReals, - doc="molar concentration of bu-", + doc="mass concentration of bu-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_pro = pyo.Var( initialize=0.015742, domain=pyo.NonNegativeReals, - doc="molar concentration of pro-", + doc="mass concentration of pro-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_ac = pyo.Var( initialize=0.1972, domain=pyo.NonNegativeReals, - doc="molar concentration of ac-", + doc="mass concentration of ac-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mol_hco3 = pyo.Var( @@ -1319,7 +1319,7 @@ def Dissociation_rule(self, t): self.Dissociation = pyo.Constraint( rule=Dissociation_rule, - doc="Dissociation constant constraint", + doc="Water dissociation constant constraint", ) # Equation from [2] @@ -1454,7 +1454,7 @@ def concentration_of_nh4_rule(self): self.concentration_of_nh4 = pyo.Constraint( rule=concentration_of_nh4_rule, - doc="constraint concentration of pro-", + doc="constraint concentration of nh4", ) def S_OH_rule(self): @@ -1482,7 +1482,7 @@ def S_H_rule(self): self.S_H_cons = pyo.Constraint( rule=S_H_rule, - doc="constraint concentration of pro-", + doc="constraint concentration of H", ) def rule_pH(self): diff --git a/watertap/property_models/anaerobic_digestion/modified_adm1_reactions.py b/watertap/property_models/anaerobic_digestion/modified_adm1_reactions.py index 73e56be519..845a808990 100644 --- a/watertap/property_models/anaerobic_digestion/modified_adm1_reactions.py +++ b/watertap/property_models/anaerobic_digestion/modified_adm1_reactions.py @@ -1812,25 +1812,25 @@ def _rxn_rate(self): self.conc_mass_va = pyo.Var( initialize=0.01159624, domain=pyo.NonNegativeReals, - doc="molar concentration of va-", + doc="mass concentration of va-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_bu = pyo.Var( initialize=0.0132208, domain=pyo.NonNegativeReals, - doc="molar concentration of bu-", + doc="mass concentration of bu-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_pro = pyo.Var( initialize=0.015742, domain=pyo.NonNegativeReals, - doc="molar concentration of pro-", + doc="mass concentration of pro-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mass_ac = pyo.Var( initialize=0.1972, domain=pyo.NonNegativeReals, - doc="molar concentration of ac-", + doc="mass concentration of ac-", units=pyo.units.kg / pyo.units.m**3, ) self.conc_mol_hco3 = pyo.Var( @@ -1901,7 +1901,7 @@ def Dissociation_rule(self, t): self.Dissociation = pyo.Constraint( rule=Dissociation_rule, - doc="Dissociation constant constraint", + doc="Water dissociation constant constraint", ) def CO2_acid_base_equilibrium_rule(self, t):