Different chemical reactions between Epanet 2.00.12 and latest Epanet 2.2

Hi everyone!

In the previous version of EMT and Epanet 2.00.12, I could eliminate the chemical concentration (react all) by conducing the flow through a pipe with a high kb (about -2000) coefficient (this coefficient is only assigned at certain pipes). However, I updated the EMT to 2.2 version and now the concentration is no longer decreasing like it used to :frowning:. (please see image reference) THIS ALSO OCCUR IN THE EPANET 2.2 INSTALLATION PROGRAM, DESK OR GUI (I don’t know how to translate it :stuck_out_tongue_winking_eye:)

Could you help me with any of the following two options?

1.- Could you provide me with EMT previous version 2.00.12 to decrease again the chemical in this way?

2.- Can you suggest another way to eliminate (reduce) the chemical when the flow passes only in some pipes in this latest 2.2 version?

(This is a bug?) :thinking:

Thank you

Can you please post your network file (or a simplified version that displays the same behavior) so we can investigate what is causing the difference. Thanks.

Hello LRossman!:

Thanks for your reply! I would like to briefly explain the need to apply these coefficients in an investigation that I am carrying out (INTRODUCTION). Or more directly, you can go to the section: VERIFY PLEASE where I attach and describe an example network file .INP in which you can verify this fact.

Crucero.inp (32.9 KB)

INTRODUCTION

I am currently working on an investigation: “ Incomplete mixing at cross junctions ”. To control the concentration at the cross outlets, setpoint boosters are set at each cross pipe. In some cases, I need to “ reduce ” the chemical concentrate upstream because it could interfere with the concentrate dosage that I need to assign by the boosters.

I coded an algorithm in MATLAB that finds the crosses in the network trace and “modifies” them by adding bypasses at the four cross pipes. These bypasses have a very high kb reaction coefficient (it can also be kw ) and when the flow passes through them, it eliminates (reacts) all the concentrate they were carrying. With this, I manage to assign the incomplete mix that I calculate in my research to the boosters.

THE PROBLEM

With the previous version of the EMT (2.00.12) and when it assigned a relatively large kb (kb = 2000) at some pipes, the concentration decreased easily to zero . However, I updated at EMT to the latest version (2.2) and now the concentrations in the same cross pipes with these high coefficients no longer react . This also occurs in the EPANET 2.2 desktop program.

VERIFY PLEASE

I attach a simplified network with a single cross. You can zoom in the central part to verify the operation of the ByPasses and please test it in both versions (2.00.12 and 2.2).

image.png

Similarly, I tested this in the example network Net2.net and I applied a kb / kw coefficient about -500 at one pipe (‘22’). It works perfectly !! (all concentration reacted!!). Probably in my application, incorporating ByPasses connected with closed pipes could cause problems in the lagrangian transport processes in this new version, I guess [:stuck_out_tongue_winking_eye:]. However, this did not occur in the previous version.

Thanks a lot and best regards!

Crucero.inp (32.9 KB)

Here another example about Net3.inp, each cross have bypasses a the center of them. You can manipulate the pipe junctions hold them to other map places.

Net3ScnCINCOMPLETA.inp (312.6 KB)

Daniel,

The issue is due to the very short pipes (0.005 m) where you apply the high decay coefficient combined with the change in the water quality routing routine in v2.2. The change was made to reduce mass balance errors. For example, the mass balance error for Crucero.inp using v2.0.012 is 50% while it is 0 for v2.2.

I won’t go into detail here explaining why the large decay rate doesn’t show up in the short pipes (like TBPC-2b) for v2.2 while it does for v2.0.012. But I will note that by switching when the reaction loss is computed for a pipe in the v2.2 code (from reacting all pipes before the transport step begins to reacting at the same time that transport through a pipe is computed) v2.2 can eliminate the chemical in the short pipes with the large decay coefficient, without introducing any mass balance error. So that is something to consider for a future code update.

After some more thought, the suggestion I made in my previous post is not a good one since it results in subjecting water parcels that enter a pipe from its upstream node to a second period of reaction after they had already been reacted while being transported through pipes that convey water into the node, thus producing to much overall reaction.

The issue with the short pipes with the high decay coefficient in the Crucero network not being able to eliminate the chemical makes sense when we consider that the travel time through these pipes is 0.01 seconds while the water quality time step is 5 minutes. If we were able to use a quality time step of 0.01 seconds (EPANET limits the smallest time step to 1 second), the amount of chemical loss that occurs over this time period under a decay constant of 2000/day (0.023/sec) is only 0.023%.

Tanks!

Now I understand, I need to delve further into the water quality calculations in this new 2.2 version. The main reason I considered too short pipe lengths (0.01m or 0.005m) is because I want to take the cross inlet variables as close to it as possible. It also sought not to modify the network operability at all with the addition of these bypasses.

Now I will focus on finding the best pipe lengths and shortest quality time steps to achieve these goals. In a part of my algorithm, I simulate the same network up to 240-300hrs of total time (this helps me to find the most representative initial qualities, as a numerical method). In another work what I am starting, I analyse the optimization of the use of chlorine through booster stations using Genetic Algorithms (quite a few simulations). I will try the suggestions you provided me.

Thank you very much LRossman.

-Daniel