This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to include Mass Transfer Coefficient into MSX

Hi Everyone,

We're currently working on developing an MSX model for Chlorine Decay that can account for wall decay as a factor of Biofilm growth (thus removing the need to specify wall decay for specific pipes throughout the network).

Unfortunately the equation for this relies on the mass transfer coefficient, which is dependent on the type of flow, as explained here: https://docs.bentley.com/LiveContent/web/Bentley%20WaterGEMS%20SS6-v1/en/GUID-D7D70292-50F6-4066-A30E-3B98BBB2BF7B.html.

This is built into the WaterGEMS standard pipe wall reaction calculations, however I need to know whether we can reference this coefficient in MSX, does anyone know whether this is possible? My understanding is that EPANET is capable of this so I assume WaterGEMS is capable as well, I just don’t know how.

For anyone wondering, the equations for Bulk decay are very simple. Below is a copy of what we use currently (no wall decay):

The Wall Decay equations are derived as follows (A&B are constants to be determined by trial and error, kw is what we need from WaterGEMS)

Thank you,

 Ryan

Parents
  • Hi Ryan,

    It seems that this is possible to do with MSX using the "TERMS" feature.

    Terms can be defined to make writing the various water quality equations easier, by breaking equations up into manageable pieces.

    One of the benefits of this feature is that one is able to use various pre-defined variables such as D for pipe diameter, Q for flow and Re for Reynolds number.

    The MSX user guide provides the following example for calculating a mass transfer coefficient.

    [TERMS]

    Kf    1.2e-4*Re^0.88/D

    You can then use this value Kf directly in your reaction formulae.

    I'm not sure if the example above is directly portable to your case (i.e., without alteration), however, you should be able to do what you need. I encourage you to grab a copy of the EPANET MSX user manual (v1.1) if you don't already have it. WaterGEMS is running a version of MSX that is pretty close to the original US EPA version and thus the vast majority of the help content there should be directly applicable to WaterGEMS also.

    I hope this helps.

    Regards,

    Wayne.



  • Ryan, what kind of real world system are you dealing with? For pretty much any water distribution system, you  never get into laminar flow. Plus with bends, partly open valves, crosses, tee, etc., you may still be in turbulent flow at low Reynolds numbers.

    Bulk reaction rates are usually higher than wall reactions and if wall reactions are that high, it may be that. pipes are very rough and turbulent.

    And there is so much uncertainty in wall reaction rates to start with.

    What is the practical use case where this really matters?

  • Re: "It would also be great if pipe material and age were terms that could also be referenced in MSX,"

    Pipe material is not possible right now, but Age is. You could do this by modeling age as a species that does not grow or decay.

    [SPECIES]
    ; Age
    BULK Age MG

    [PIPES]
    RATE Age 1.0

    [TANKS]
    ;Age
    RATE Age 1.0

    [QUALITY]
    GLOBAL Age 24.0

    (The last part is just if you want to use an initial age... you can do that globally or by element).

    The units are just a label and can be ignored, especially if the purpose is just to calculate some other dependent value.

    In my test model this seems to have the desired outcome.

    Hope this helps.

    Regards,

    Wayne.



  • Ryan, it's admirable to try to apply MSX to your situation but I prefer to approach things incrementally. I believe it was Einstein who said, "A model should be as simple as possible but no simpler." That applies here.

    Before I would even start modeling, I would collect tons of field Cl data (with corresponding demands and boundary conditions) and analyze it to determine the nature of the  problem and range of solutions. I assume you've done this.

    Then I would ensure that my EPS model is very well calibrated. If it's not almost perfect, then why bother with something like MSX?

    Then I would try to model my chlorine data using the standard WaterGEMS constituent model (not MSX) by adjusting my wall decay rates (increasing them in areas where  flows are very low). This may be good enough for what you need and it is much easier than MSX.

    If you are certain that everything in your model is correct, except that the WaterGEMS constituent model is not adequate, only then would I take Wayne's advice and dive into MSX.

    I'm aware of Fisher's work and its' quite good.

    If you would like to discuss more off line, send me an email and we can call (tom.walski@bentley.com).

    I'll leave you with one more famous saying. Mathematician George Box once said something like, "All models are wrong. Some are useful anyway."

    Best wishes,

    Tom

  • G’day Tom,

     Firstly I would like to start by saying I’m aware of the limitations of Chlorine Decay Modelling and I understand it's questionable whether this process is worth the effort given the limitations of the model.

    An easier method would be to simply;

    • Analyse the Chlorine consumption of the treated water to develop an understanding of its rate of decay,
    • Run a water age analysis of the model, highlighting age since the last chlorine boost across the system (not just total age)
    • Use this knowledge of initial and chlorine boosts, combined with chlorine bulk decay and water age (total and since last boost) to identify at risk areas and locations that could potentially be dosed less or may need to be dosed more.
    • Run a trial and error dosing adjustment program where doses are slowly adjusted while key points in the system are monitored for chlorine residuals.

    I agree with the benefits of tons of field Cl field data, we don't have a lot but we do have a reasonable amount.

    We will be re-building our EPS model in the near future, in order to improve our calibration of this we’ve installed 20 pressure loggers across the system in addition to all the existing pressure and flow loggers.

    Up to the comment on using the constituent model I agree with everything. But I have to argue strongly against using the WaterGEMS constituent model. We have used this previously and it is incredibly inaccurate. If you’re aware of Fishers work you’ll understand exactly how inaccurate first order decay is for networks with several day’s water age and multiple chlorine boosting stations. I would argue that it can be dangerous to use this because if someone were to use that method and think that it has some degree of accuracy; it could potentially lead to decisions being made that may have significant consequences.

     I like your modeling Quote from George Box, and that’s exactly what I’m trying to achieve.. A useful Chlorine decay model.

    As a side note:

    While many reticulation networks have limited continuous monitoring for pressure, flow and chlorine, as the years go by, the amount of monitoring that occurs across Australia is increasing. Additionally academics are constantly researching and developing new and improved equations to represent the way chemicals interact throughout these systems. With these developments, in conjunction with continual improvements in computer processing power, it's only a matter of time before everything necessary to run accurate and reliable chlorine decay models exists... and all we would need then is the software to do so :)

Reply Children
No Data