Trying to use the Monochloramine Decomposition multi species analysis setup that was imported from the engineering library, but I keep getting an error that reads "Could not solve reaction equilibrium expressions". What am I setting up wrong in my Model Configuration?
Multi Species Analysis Setup
[TITLE] Monochloramine Decomposition ; MSX sample, see MSX manual Page 64 ff. ; This example illustrates a complex chemical reaction system involving ; both kinetic rate expressions and nonlinear equilibrium relationships. ; The system being studied is the auto-decomposition of monochloramine ; to ammonia in the presence of natural organic matter (NOM). ; When chloramines are used as a secondary disinfectant care must be ; taken to avoid producing excessive amounts of free ammonia that can ; contribute to biological nitrification episodes within the ; distribution system.
[OPTIONS] RATE_UNITS HR SOLVER ROS2 COUPLING NONE TIMESTEP 300 RTOL 0.0001 ATOL 1.0e-8
[SPECIES] BULK HOCL MOLES ;hypochlorous acid BULK NH3 MOLES ;ammonia BULK NH2CL MOLES ;monochloramine BULK NHCL2 MOLES ;dichloramine BULK I MOLES ;unknown intermediate BULK OCL MOLES ;hypochlorite ion BULK NH4 MOLES ;ammonium ion BULK ALK MOLES ;total alkalinity BULK TOC MOLES ;total organic carbon BULK H MOLES ;hydrogen ion BULK OH MOLES ;hydroxide ion BULK CO3 MOLES ;carbonate ion BULK HCO3 MOLES ;bicarbonate ion BULK H2CO3 MOLES ;dissolved carbon dioxide
[COEFFICIENTS] PARAMETER k1 1.5e10 PARAMETER k2 7.6e-2 PARAMETER k3 1.0e6 PARAMETER k4 2.3e-3 PARAMETER k6 2.2e8 PARAMETER k7 4.0e5 PARAMETER k8 1.0e8 PARAMETER k9 3.0e7 PARAMETER k10 55.0 PARAMETER k11 3.0E4 PARAMETER k12 6.5E5 CONSTANT S1 0.02 CONSTANT S2 0.50
[TERMS] k5 (2.5e7*H) + (4.0e4*H2CO3) + (800*HCO3) a1 k1*HOCL*NH3 a2 k2*NH2CL a3 k3*HOCL*NH2CL a4 k4*NHCL2 a5 k5*NH2CL*NH2CL a6 k6*NHCL2*NH3*H a7 k7*NHCL2*OH a8 k8*I*NHCL2 a9 k9*I*NH2CL a10 k10*NH2CL*NHCL2 a11 k11*S1*TOC*NH2CL a12 k12*S2*TOC*HOCL
[PIPES] RATE HOCL -a1 + a2 - a3 + a4 + a8 – a12 RATE NH3 -a1 + a2 + a5 - a6 + a11 RATE NH2CL a1 - a2 - a3 + a4 - a5 + a6 - a9 - a10 – a11 RATE NHCL2 a3 - a4 + a5 - a6 - a7 - a8 - a10 RATE I a7 - a8 - a9 RATE H 0 RATE ALK 0 RATE TOC 0 EQUIL OCL H*OCL - 3.16E-8*HOCL EQUIL NH4 H*NH3 - 5.01E-10*NH4 EQUIL CO3 H*CO3 - 5.01E-11*HCO3 EQUIL H2CO3 H*HCO3 - 5.01E-7*H2CO3 EQUIL HCO3 ALK - HCO3 - 2*CO3 - OH + H EQUIL OH H*OH - 1.0E-14
[SOURCES]SETPOINT 534 NH2CL 6E-5
[QUALITY]GLOBAL ALK 0.004GLOBAL H 2.818E-8
Could you please upload your model files for our review?
Sharing model files
Bentley Technical Suppport
I could not reproduce the issue you are having.
Here are the steps I completed in attempt to reproduce
I will note that the error you are receiving "Could not solve reaction equilibrium expressions" is mentioned in the "EPANET Multi-Species Extension User's Manual" on page 112.
Error 514: could not solve reaction equilibrium expressions.The nonlinear equation solver employed by EPANET-MSX could not successfully solve the system’s set of equilibrium equations at the current simulation time. Users must insure that the initial conditions set throughout the pipe network are sufficient and consistent so that a solution exists for the governing set of equilibrium equations.
Do you receive any user notifications if you set the calculation options Calculation Type to "Hydraulics Only"?What product and version are you using?As Sushma requested, please provide your model files so we can provide specific suggestions.
Bentley Technical Support
Thank you for your response. The requested file is uploaded. THere are no user notifications when using a "hydraulics Only" Calculation Type. I am using WaterCAD CONNECT Eddition Update 1.
Hi Steven, I wanted to let you know that we are still actively looking into this and will keep you updated as soon as we have a solution. Thanks for your patience.
Jesse DringoliTechnical Support Manager, OpenFlowsBentley Communities Site AdministratorBentley Systems, Inc.
The issue is related to the tank inflow being applied with negative demand at a junction.
Try the following:1. Apply half of the negative demands applied at junctions "_FortWorthSupply" and "_DallasSupply" directly to the respective adjacent tanks.2. Delete those junctions.3. The model should run without an error.
Note: The model will compute slowly (it took me 11min 30 sec). We are currently looking into the cause of that [Reference #: 866057].
If you want the model to compute faster, you may want to consider modeling the hydraulically close tanks, with rapid flow oscillation, as a single equivalent tank as explained in the following article.
Rapid flow oscillation between hydraulically close tanks
For example:1. Increase the diameter of tank "East_GST-2" from 141.5ft to 200.11ft[2*PI*(141.5/2)^2=PI(D/2)^2 -> D=200.11ft]2. Delete tank "East_GST-1"3. Increase the diameter of tank "West_GST-1" from 141.5 to 200.11ft4. Delete tank "West_GST-2"
After I made these changes the model computed in 4min 21 sec.
Answer Verified By: Sushma Choure