Function PhaseType in PengRobinson.vb returns a phase type of "L" for a gas composition I have.
The gas composition I have and its properties are in the attached screenshot files.
This should really be a gas composition in a gaseous state.
I tested this in a file where only an Input stream is defined; nothing else. And Peng Robinson is the EOS selected.
I believe the problem is originating from the following lines which compute the compressibility factor (as a very small number instead of 1.0003)
_zarray = CalcZ(T, P, Vx, VKij, VTc, VPc, Vw)
_mingz = ZtoMinG(_zarray.ToArray(), T, P, Vx, VKij, VTc, VPc, Vw)
Z = _zarray(_mingz(0))
This block of code is also used in ReturnParameters function and elsewhere too.
Because of that the CalcJouleThamsonCoefficient and CalcIsothermalCompressibility functions might be calculating incorrect values as well.
My OS is Windows 11 Pro
DWSIM version I am using is 8.8.2
Function PhaseType in PengRobinson.vb returns a phase type of "L" for a gas composition I have.
The gas composition I have and its properties are in the attached screenshot files.
This should really be a gas composition in a gaseous state.
I tested this in a file where only an Input stream is defined; nothing else. And Peng Robinson is the EOS selected.
I believe the problem is originating from the following lines which compute the compressibility factor (as a very small number instead of 1.0003)
_zarray = CalcZ(T, P, Vx, VKij, VTc, VPc, Vw)
_mingz = ZtoMinG(_zarray.ToArray(), T, P, Vx, VKij, VTc, VPc, Vw)
Z = _zarray(_mingz(0))
This block of code is also used in ReturnParameters function and elsewhere too.
Because of that the CalcJouleThamsonCoefficient and CalcIsothermalCompressibility functions might be calculating incorrect values as well.
My OS is Windows 11 Pro
DWSIM version I am using is 8.8.2