-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default pressure does not obey units #29
Comments
Thanks for raising the question! You are missing something, but it is definitely not obvious. This is the second question I've gotten about the same issue in a week, which means I need to adjust the documentation to be more clear about this question. When you call a function with no arguments, the interface falls back to the default pressure and temperature values, which are >>> import pyromat as pm
>>> air = pm.get('ig.air')
>>> air.d()
array([1.18391419])
>>> pm.config['unit_pressure'] = 'Pa'
>>> air.d()
array([1.18391419e-05])
>>> pm.config['def_p'] = 101325.
>>> air.d()
array([1.18391419]) It is also worth noting that when you call |
Ah thank you very much! That makes things much clearer, and also explains why the enthalpy was in the correct (but changed) units. I changed the config.py to be consistent with the new units and it works as expected now. Cheers! |
No problem. Thanks for raising the question. I'm sure other people will find having it on record helpful. |
Hi, apologies in advance if this is not the correct place to ask this or if this is a stupid user error rather than an actual bug (I am very new to PyroMat).
I have modified my config.py file to set
unit_pressure = 'Pa'
rather than bar and this works well with one exception. If I run the pressure method with no arguments, e.g.air.p()
I get the result in bar still rather than Pascals:array([1.01325])
. Running it with named arguments, however,air.p(T=300, d=1.225)
returns Pascals as expected:array([105491.85213083])
. This does not seem to be the case for the default enthalpy when I change the energy units from kJ to J and it reports the enthalpy in J as expected.Am I missing something obvious?
Thanks!
The text was updated successfully, but these errors were encountered: