Giter Club home page Giter Club logo

Comments (13)

tyjchen avatar tyjchen commented on May 27, 2024

you could try to replace PSV's with PRV's and rerun the simulation, ensuring all the same rules are carried over

from wntr.

emmaliulu avatar emmaliulu commented on May 27, 2024

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.

tyjchen avatar tyjchen commented on May 27, 2024

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.

emmaliulu avatar emmaliulu commented on May 27, 2024

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.

kaklise avatar kaklise commented on May 27, 2024

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.

emmaliulu avatar emmaliulu commented on May 27, 2024

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.

kaklise avatar kaklise commented on May 27, 2024

To model a leak using the EpanetSimulator, you could adjust demands or use emitters.

from wntr.

emmaliulu avatar emmaliulu commented on May 27, 2024

Thank you. I will test it out.

from wntr.

emmaliulu avatar emmaliulu commented on May 27, 2024

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.

michaelbynum avatar michaelbynum commented on May 27, 2024

We will have support for PSV's in about a week if that helps.

from wntr.

emmaliulu avatar emmaliulu commented on May 27, 2024

That's great to know! Thank you.

from wntr.

emmaliulu avatar emmaliulu commented on May 27, 2024

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.

michaelbynum avatar michaelbynum commented on May 27, 2024

@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)

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.