-
Hi I am trying to develop a code in order to calculate a mix enthalpy in java. This is my enthalpy calculation code:
Then when I execute it on main file:
However the enthalpy returned in NaN and if I print the values of h2 or h1 they are infinite. What could be the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi. Try modifying the code a bit: The first modification is setting that your fluid will only be single phase gas:
and after setting temperature and pressure you need to call the initThermoProperties method to calculate the entahlpies at this condition:
|
Beta Was this translation helpful? Give feedback.
-
In the more general case where your fluid could split in to more phases (eg. a mixture of methane and n-heptane) the code could be something like this:
and
|
Beta Was this translation helpful? Give feedback.
-
Also this python example might be useful: |
Beta Was this translation helpful? Give feedback.
Also this python example might be useful:
https://colab.research.google.com/github/EvenSol/NeqSim-Colab/blob/master/notebooks/howtouseneqsim.ipynb#scrollTo=rT10YNDjfJXL