Closed BenPortner closed 1 year ago
@BenPortner, the code is working on my end:
>>> import biosteam as bst
>>> bst.settings.set_thermo(["H2"])
>>> feed = bst.Stream(H2=1, T=25 + 273.15, P=20e5, phase='g')
>>> K = bst.units.PolytropicCompressor(ins=feed, P=350e5, eta=1.0, method="hundseid")
>>> K.simulate()
>>> print(K.power_utility.rate)
156.99854330297322
I updated the thermosteam repo but forgot to update the thermosteam submodule in biosteam. So I think you might have just pulled biosteam and not thermosteam. To pull thermosteam specifically (regardless of whether the thermosteam submodule is up to date), you can go within the thermosteam folder and git pull origin master
.
Thanks,
@yoelcortes 157 is the wrong result.
@BenPortner, got it. I introduced a different bug in my last commit. It is fixed now with a new test to make sure it doesn't repeat.
Thanks!
Commit https://github.com/BioSTEAMDevelopmentGroup/thermosteam/commit/81ba05ed68e4891072415a5634dcf18da126b94a breaks method
biosteam.units._compressor.PolytropicCompressor._hundseid
:Since the custom caching seems to be quite complex: Have you considered Python's native
@lru_cache
decorator?