Comments (13)
you could try to replace PSV's with PRV's and rerun the simulation, ensuring all the same rules are carried over
from wntr.
I replaced all PSV with PRV and rerun the simulation. I got this error message.
"RuntimeError: Simulation did not converge. Jacobian is singular at iteration 0"
from wntr.
hmm, it's implying that the initial hydraulics setting does not converge, you could try let the optimization just give you non-converged solutions and see how that looks like. rum.sim(convergence_error=False). or let it use a different solution method: rum.sim(solver_options={'BACKTRACKING' = False}) and see what happens. hope it helps-
from wntr.
When I tried with "results_0 = sim_0.run_sim(solver_options={'BACKTRACKING'== False})", it gave me this error message "RuntimeError: Simulation did not converge. Jacobian is singular at iteration 0".
When I tried with "results_0 = sim_0.run_sim(convergence_error=False)", it didn't show any errors, but the result data frame is empty.
I wonder if there is a way to solve the initial problem of "ValueError: Currently only PRVs, FCVs, and TCVs are supported." Could we model minor loss for PSV valve?
This is how WNTR simulate minor loss for other types of valves.
if link_id in self._tcv_ids:
"""
The minor loss on a TCV is used when the valve is open; The setting is used when it is active.
The setting on a TCV appears to work just as the minor loss on a pipe. TCVs do allow reverse flow.
Thus, they act just like a pipe, but with only a minor loss - no Hazen-Williams, DW, CM.
"""
self.pipe_resistance_coefficients[link_id] = 8.0link.setting/(self._gmath.pi2*link.diameter4)
elif link_id in self._prv_ids:
self.pipe_resistance_coefficients[link_id] = 0.0
elif link_id in self._fcv_ids:
self.pipe_resistance_coefficients[link_id] = 0.0
else:
raise ValueError('Currently only PRVs, FCVs, and TCVs are supported.')
from wntr.
You can find a list of network options that are not currently supported by the WNTRSimulator at https://wntr.readthedocs.io/en/latest/framework.html#limitations. We are working on software updates that will address these limitations and PSV is high on our list of priorities. If you don't expect the system to be pressure deficient, you could use the EpanetSimulator, at least as a starting point.
from wntr.
That's good to know. I wanted to use WNTRSimulator because I would like to use the Leak Model. If PSV is not yet simulated in WNTR, I suppose there are alternative ways to simulate leakage with EpanetSimulator?
from wntr.
To model a leak using the EpanetSimulator, you could adjust demands or use emitters.
from wntr.
Thank you. I will test it out.
from wntr.
Hi again. I tried EpanetSimulator with emitter to simulate leakage and it worked well. I wonder if there is any way to capture demand deficit without WNTR pressure driven simulation. Or is there a way to represent pressure driven with EpanetSimulator?
from wntr.
We will have support for PSV's in about a week if that helps.
from wntr.
That's great to know! Thank you.
from wntr.
Hi, I'd like to follow up on the support for PSV. Is the new version of WNTR with PSV capability ready for use? Many thanks.
from wntr.
@emmaliulu Sorry for the delay. Support for PSVs have now been added in a branch called "psv_support" on my fork. Unfortunately, we will not be able to merge this branch into the main repository for a while.
from wntr.
Related Issues (20)
- Smaller and variable step-size for solver HOT 9
- How to Avoid 'Reached maximum number of iterations' HOT 1
- Choose location for temp files en***** HOT 1
- How to get a list of pipes names from a list of start , end nodes (tuple) HOT 1
- Adding a list of actions to rules HOT 2
- ENsetlinkvalue unexpectedly fails to change attributes HOT 2
- new added control does not work HOT 2
- Epaneet dylib not available for Darwin HOT 2
- wntr.network.io.from_gis does not capture vertices
- `network_animation` does not behave as intended in Jupyter Notebooks HOT 1
- POSSIBILITY OF NEGATIVE PRESSURE HOT 5
- Questions about optimal scheduling of pumping stations HOT 1
- runnin the program HOT 3
- wntr.network.options has some abnormal annotation contents HOT 1
- Writing an inp file 'self' argument error message HOT 2
- Create a control object or rule object from text input HOT 5
- Get the reactions tab in the inp file from a water network instance HOT 1
- Add PBV support to [VALVES] section
- Generating Interactive leaflet networks HOT 7
- Pipe status problem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wntr.