Giter Site home page Giter Site logo

Comments (15)

kaklise avatar kaklise commented on August 15, 2024

We decided to use SI units throughout WNTR to simplify the code base and avoid confusion about units. WNTR supports building models from EPANET inp files using all 10 EPANET systems of units (CFS, GPM, ect). However, if you are building a model from scratch, input values must be in SI units. This requires that input is converted each time add_* is called. We suggest using the Sympy package (or simple multiplier) to customize that process. The Results DataFrame can also be converted in a similar manner. It's possible that a limited set of these features could be embedded in WNTR. I suggest we keep the feature request open and get input from other users.

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

Hi, I'm having an issue with the units right now too. When I use the PDD, the results make sense (though I'm not sure what units the output is in). When I use the wntr demand driven approach, the node pressures are all negative (for the same exact network) and seem to be in pascals. I don't know how to check what units my results are in (this is the biggest issue). Can anyone help me with this?

I am using pressure units of meters per head to query my results, and so I'm also not sure if it should be in pascals instead. Any help is much appreciated!

from wntr.

michaelbynum avatar michaelbynum commented on August 15, 2024

I believe all pressures in WNTR have units of meters. The online documentation (http://wntr.readthedocs.io/en/latest/units.html) is a good resource for this. @kaklise However, I think this brings up an issue with the documentation on that page. "Water pressure" is correctly labeled as having units of meters. However, we also list "pressure" as having units of Pa. I could be mistaken, but I don't think we use Pa anywhere within WNTR. I also don't know of a reason to list "pressure" separate from "water pressure" since every pressure in WNTR is "water pressure".

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

Thank you so much for the quick response!

from wntr.

michaelbynum avatar michaelbynum commented on August 15, 2024

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

Yes, but I do still have to figure out why using wntr simulator is giving my pressures in the negative thousands for an intact network, but if I run the .inp file through epanet, the the pressures are alright.

from wntr.

michaelbynum avatar michaelbynum commented on August 15, 2024

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

The units are set to Ft, GPM and CFS, but when I save as .txt to upload to GitHub that section is cut off; just wanted to let you know. Also, the headless formula is set to Hazen Williams.

from wntr.

kaklise avatar kaklise commented on August 15, 2024

I ran the model with the EpanetSimulator and the WNTRSimulator (demand driven). The results are very similar and pressures are not negative. Are you using the latest version of WNTR (0.1.4)?

I'll update the documentation to remove Pa. All pressure data is in meter (water pressure).

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

from wntr.

michaelbynum avatar michaelbynum commented on August 15, 2024

PR #37 has updated documentation on units which should clear up the question about units of pressure. @N-abdel If you would like to continue the discussion of negative pressures with the WNTRSimulator, let's do so offline. We are getting off topic for this issue. You can email Kate at [email protected].

from wntr.

N-abdel avatar N-abdel commented on August 15, 2024

from wntr.

michaelbynum avatar michaelbynum commented on August 15, 2024

I'm glad to hear the demand driven simulation is working well. Can we continue the conversation about the pressure driven simulation via email? I think it will be easier that way, and I'm not sure this issue is the correct place for that conversation. You can reach @kaklise at [email protected]. She will then add me into the conversation.

from wntr.

Evelyn0123 avatar Evelyn0123 commented on August 15, 2024

Hi, I just wanted to update you that when I switched to v. 1.4, I get meters of head that do make sense, thank you! The simulations work fine for the demand driven wntr simulator, but for pressure driven demand, for the same network, I get the following error: "RuntimeWarning: divide by zero encountered in power last_segment = (-0.5)j_d/(nomP-minP)((P-minP)/(nomP-minP))(-0.5) /Users/noha/Downloads/WNTR-master/wntr/sim/hydraulics.py:722: RuntimeWarning: invalid value encountered in multiply last_segment = (-0.5)j_d/(nomP-minP)((P-minP)/(nomP-minP))(-0.5) /Users/noha/Downloads/WNTR-master/wntr/sim/hydraulics.py:1006: RuntimeWarning: invalid value encountered in sqrt last_segment = (Dact - j_d*((P-minP)/(nomP-minP))0.5) /Users/noha/Downloads/WNTR-master/wntr/sim/hydraulics.py:722: RuntimeWarning: invalid value encountered in power last_segment = (-0.5)j_d/(nomP-minP)((P-minP)/(nomP-minP))(-0.5) Traceback (most recent call last): File "", line 1, in results = sim.run_sim() File "/Users/noha/Downloads/WNTR-master/wntr/sim/core.py", line 239, in run_sim raise RuntimeError('Simulation did not converge!') RuntimeError: Simulation did not converge!" I am not sure what would cause this (especially for the in tact network)? To be able to run any fragility analyses I think I have to figure out a way to use the pressure driven simulator. I really appreciate your help! Thank you in advance,

On Mon, Jan 22, 2018 at 5:23 PM, Katherine Klise @.***> wrote: I ran the model with the EpanetSimulator and the WNTRSimulator (demand driven). The results are very similar and pressures are not negative. Are you using the latest version of WNTR (0.1.4)? I'll update the documentation to remove Pa. All pressure data is in meter (water pressure). — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#30 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/Af8inJxEpMT4qyly39SCWMT9c9vIRlhxks5tNQpZgaJpZM4PhuA1 .
-- -Noha

Hi, I also encountered this problem when using version 0.1.3 of WNTR for my water network model. It gives me the same RuntimeWarning, but I can still get results. Could anyone tell me why this is happening? Thank you.

from wntr.

kaklise avatar kaklise commented on August 15, 2024

I suggest that you update WNTR to the latest version (0.5.0). If you are still seeing this issue after updating the code, please open a new ticket related to the simulation RuntimeWarning.

from wntr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.