Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Define saturation temperature?

Define saturation temperature?

Hello everyone,
I am new in Dymola and I am having some problems to calculate some properties of my working fluid (methane), is there a way to define the saturation temperature, latent heat of vaporization, density, in function of the Pressure and Quality (Q=0 liquid, Q=1vapor) as in this example :

# Saturated vapor enthalpy of Water at 1 atm in J/kg
In [4]: H_V = PropsSI('H','P',101325,'Q',1,'Water'); print(H_V)
2675529.3255007486

# Saturated liquid enthalpy of Water at 1 atm in J/kg
In [5]: H_L = PropsSI('H','P',101325,'Q',0,'Water'); print(H_L)
419057.7330940691

Re: Define saturation temperature?

The saturation properties are independent of each phase fraction, so no need to use it.
You define a SaturationProperties record, that can be constructed from temperature or pressure, and you obtain the properties from it. For the latent heat of vaporization you need to do the substraction. For obtaining the saturation temperature and pressure it is not necessary to use the SaturationProperties record, they are obtained directly:

model SaturationProperties
  package Medium=Modelica.Media.Water.StandardWater;
  Medium.Temperature T;
  Medium.AbsolutePressure P;
  Medium.SaturationProperties sat1,sat2;
  Medium.SpecificEnthalpy Hl1,Hv1,Hl2,Hv2;
 
  Medium.AbsolutePressure Psat;
  Medium.Temperature Tsat;
equation
  T=390;
  sat1=Medium.setSat_T(T);
  Hl1=Medium.bubbleEnthalpy(sat1);
  Hv1=Medium.dewEnthalpy(sat1);
 
  P=0.5e5;
  sat2=Medium.setSat_p(P);
  Hl2=Medium.bubbleEnthalpy(sat2);
  Hv2=Medium.dewEnthalpy(sat2);
 
  Psat=Medium.saturationPressure(T);
  Tsat=Medium.saturationTemperature(P);
end SaturationProperties;

Re: Define saturation temperature?

Thanks a lot...

There are 0 guests and 0 other users also viewing this topic
You are here: