Closed AloisPrimes closed 3 years ago
Hi @razor1995,
Thank you for posting this issue. Dealing with thermal energy units like you have described is something that I am motivated to have work properly. Thank you also for supplying your JSON file.
I will play with this over the next day or so and come up with a solution.
Hi @razor1995,
Thank you for posting this issue. Dealing with thermal energy units like you have described is something that I am motivated to have work properly. Thank you also for supplying your JSON file.
I will play with this over the next day or so and come up with a solution.
Amazing, thank you!
Hi @razor1995,
Apologies for the delay. I have found the problem. I am working on posting the patch right now but found that the change caused an unexpected behaviour in some of my tests. I will post again when I have the patched version uploaded to PyPI.
Hi @razor1995,
Thank you for your patience. It is now patched. You should be able to update your installation via pip to v2.0.2.
To fix your issue, on the variable described above, use the .prefix()
method with "unity"
as the prefix argument: lambda_C02_1.prefix('unity')
. This will force the representation to not use the auto-prefixing that is causing it to show as mW*m-1*K
.
Regarding your defined units:
bar
should also have a "Factor": "1e-5"
"kg_kmol"
and "g_mol"
defined as you do because they are the exact same unit with same dimension and same factor. Because "g_mol"
is defined second, that is the definition that will remain in the dictionary."Value"
for "uPas"
needs to be a float, e.g. 1e-6
instead of "1/1000000"
They should work great now! Let me know on this thread if you find any other issues.
Hi, I really like handcalcs + forallpeople so far and I want to use it for master thesis calculations. Unfortunately, there is no support for thermodynamic calculations so I'm working on JSON file that have these units defined. The issue is when I try to specify output units, it doesn't work. I use my own environment (link here: https://textbin.cc/QfQSGFtRnb). It doesn't matter what I do, the result is still in mW/m/K and I can't force it make a result in W/m/K. Can you help me with this issue, please?
PS: conductivity('CO2', 293.15, 1.01325) is my function that takes result from CoolProp module and make the syntax a little bit easier.
Imported modules and settings