CalebBell / fluids

Fluid dynamics component of Chemical Engineering Design Library (ChEDL)
MIT License
350 stars 76 forks source link

Initiation error in Stream #37

Closed magnusbj closed 3 years ago

magnusbj commented 3 years ago

First time a Stream is initiated, there is something wrong with density calculations (s.rho) After first initiation, the calculations are correct. Example: p=883e5 t=443 flow=0 gas = 'methane' s = Stream(gas, m=flow, T=t, P=p) s.rho

252.6545813242718 s = Stream(gas, m=flow, T=t, P=p) s.rho 273.0034921582086 s = Stream(gas, m=flow, T=t, P=p) s.rho 273.0034921582086

CalebBell commented 3 years ago

Hi Magnus, I cannot reproduce what you are observing. Sincerely, Caleb

magnusbj commented 3 years ago

Hi Caleb, thanks for looking into this. I made a test for this, just running the code above, and it failed again and again. And now it don't fail anymore. No idea what happened, but it doesn't seem to be a problem anymore.

Thanks for a good library, I've been trying out the composition and friction calculations in pipe

CalebBell commented 3 years ago

Weird!