Giter VIP home page Giter VIP logo

python-hvac's People

Contributors

tomlxxvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

python-hvac's Issues

PumpCurve has poor fit for smaller pumps

This is a regression from pypeflow - which used a different curve fitting algorithm. PumpCurve fails to fit a good curve for the following.

pump_curve = PumpCurve.curve_fitting(
    coordinates=[
        (Q_(0.00, "m^3/h"), Q_(640.0, "cmH2O")),
        (Q_(0.60, "m^3/h"), Q_(635.0, "cmH2O")),
        (Q_(1.05, "m^3/h"), Q_(630.0, "cmH2O")),
        (Q_(1.70, "m^3/h"), Q_(500.0, "cmH2O")),
        (Q_(2.40, "m^3/h"), Q_(370.0, "cmH2O")),
        (Q_(3.60, "m^3/h"), Q_(200.0, "cmH2O")),
    ],
)

coeffs = pump_curve.coefficients
print(pump_curve.coefficients)

The underlying scipy curve fit doesn't deal well with small numbers. A quick fix for me locally was to rescale the variables before passing them to scipy:

    def curve_fitting(cls, coordinates: List[Tuple[Quantity, Quantity]], name: str = '') -> 'PumpCurve':
        V_ax = []
        dP_ax = []
        for V, dP in coordinates:
            V_ax.append(V.to('m ** 3 / hr').magnitude) # < modified on input and throughout pump_curve.py
            dP_ax.append(dP.to('Pa').magnitude)
        def objective(x, a, b, c):
            return a * x + b * x ** 2 + c

Probably the permanent solution is to detect the rough order of the inputs and rescale accordingly.

Which repo?

Hey, I noticed you have a number of repositories with duplicated content - is there any in particular you recommend using/not using?

Error using the import 'Quantity' from 'hvac'

Hi,
I cloned your repo and installed all the necessary packages via pip but the error:
cannot import name 'Quantity' from 'hvac'' continues to appear.
Is there a way to fix it.
Thanks in Advance.

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.