model Deaerator
replaceable package Medium=Modelica.Media.Water.StandardWater;
import SI = Modelica.SIunits;
Medium.SaturationProperties sat_p "saturation properties record";
SI.Pressure p "pressure of the deaerator";
SI.Pressure pvi "pressure of the bleed steam";
parameter Real B=1
"quasi-linear admittance of the bleed steam,'zhun xianxing daona' in Chinese";
parameter Real Kp=2e-3 "constant of pressure, this is a guess value!";
parameter Real Kec=1.2e-5 "dynamic evaporating parameter";
parameter Real Ka=9.5e-6 "water level constant";
SI.MassFlowRate Wvo
"exhaust steam mass flow rate of the deaerator,'paiqi liuliang' in Chinese";
SI.MassFlowRate Wcond
"condensate mass flow rate of the steam in the deaeratoring head";
SI.MassFlowRate Wevcd
"dynamic evaporate mass flow rate of the water in the deaerator water tank";
SI.MassFlowRate Wt
"steam mass flow rate in the deaeratoring head, i.e. steam mass flow rate inside the deaerator";
SI.MassFlowRate Wvi "bleed steam mass flow rate";
SI.SpecificEnthalpy hvi "bleed steam specific enthalpy";
SI.SpecificEnthalpy ha
"average specific enthalpy of the steam in the deaeratoring head";
SI.SpecificEnthalpy hs
"saturated steam specific enthalpy in the deaeratoring head";
SI.SpecificEnthalpy hc
"saturated water specific enthalpy in the deaeratoring head";
SI.Mass W "water mass in the deaerator water tank";
SI.MassFlowRate Wcw "condensate water mass flow rate, coming from LP heaters";
SI.SpecificEnthalpy hcw
"specific enthalpy of condensate water, coming from LP heaters";
SI.MassFlowRate Wdw "dewater mass flow rate, coming from HP heaters";
SI.SpecificEnthalpy hdw
"specific enthalpy of dewater, coming from HP heaters";
SI.MassFlowRate Wfw "feedwater mass flow rate, flowing out of the deaerator";
SI.SpecificEnthalpy hfw
"feedwate specific enthalpy, flowing out of the deaerator";
SI.SpecificEnthalpy hf
"the specific enthalpy of water in the deaerator water tank, this is different from hc,CAUTION! this also equals the feedwater spcific enthalpy, i.e. hfw";
SI.Length L "water level of the deaerator water tank";
/*computation of saturated properties in the deaeratoring head*/
sat_p=Medium.setSat_p(p);
hs=Medium.dewEnthalpy(sat_p);
hc=Medium.bubbleEnthalpy(sat_p);
/*parameters needed further consideration*/
Wvo=0; //exhaust steam mass flow rate is very small, ignored here?
der(p)=Kp*(B*(pvi-p)-Wvo-Wcond+Wevcd); //equation of deaerator pressure
/*steam side equations below*/
Wt=Wvi+Wevcd-Wcond-Wvo; //equation of steam mass balance; mass of steam in the deaeratoring head
Wt*ha=Wvi*hvi+Wevcd*hs-Wcond*ha-Wvo*hs; //equation of steam energy balance; average steam specific enthalpy ha is computed here
Wcond=Wcw*(hc-hcw)/(ha-hc); //equation of steam condensate mass flow rate
/*water side equations below*/
der(W)=Wcw+Wdw+Wcond-Wevcd-Wfw; //equation of water mass balance
Wevcd=Kec*(hf-hc); //computation of evaporating water mass flow rate
hfw=hf; //means that hf and hfw refers to the same specific enthaply
W*der(hf)=Wcond*(ha-hf)+Wcw*(hcw-hf)+Wdw*(hdw-hf)-Wevcd*(hs-hf); //equation of water energy balance
/*equations concerning water level*/
L=Ka*W; //very simple equation of the relation between water level and water mass
end Deaerator;