Hi, I'm having an issue on my main flowsheet that is summarized in the attached simulation.
I enter a flow of water at 298.15 K / 101325 Pa in the Python block and try to transfer the same to the output. Output temp and pressure are "hard coded" but they are the same as the input.
For an unexpected reason the output stream is 775 K above the input ?!? 1073.15 K while I'm forcing it to a certain temperature.
Any thought on what I'm doing wrong?
Thanks,
Vincent
Calculate() should suffice but, in this case, there is only one compound in the mixture (mole frac = 1) so DWSIM needs the enthalpy to calculate the equilibrium state. In your case, it tried to calculate a PH flash with H = 0 (because you didn't set it), that's why the calculated temperature was so high.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm having an issue on my main flowsheet that is summarized in the attached simulation.
I enter a flow of water at 298.15 K / 101325 Pa in the Python block and try to transfer the same to the output. Output temp and pressure are "hard coded" but they are the same as the input.
For an unexpected reason the output stream is 775 K above the input ?!? 1073.15 K while I'm forcing it to a certain temperature.
Any thought on what I'm doing wrong?
Thanks,
Vincent
Vincent,
try inserting
virtuel_hum_out.CalcEquilibrium("PT", None)
before virtuel_hum_out.Calculate().
This should fix the problem.
Luca
Thank you Luca for the advice. It did indeed fix the problem.
Thanks again,
Vincent
Calculate() should suffice but, in this case, there is only one compound in the mixture (mole frac = 1) so DWSIM needs the enthalpy to calculate the equilibrium state. In your case, it tried to calculate a PH flash with H = 0 (because you didn't set it), that's why the calculated temperature was so high.