tomlxxvi / python-hvac Goto Github PK
View Code? Open in Web Editor NEWA multi-package for HVAC engineering written in Python.
License: MIT License
A multi-package for HVAC engineering written in Python.
License: MIT License
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.
Hey, I noticed you have a number of repositories with duplicated content - is there any in particular you recommend using/not using?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.