This package contains components models to compute set points for control systems.
This block computes the set point temperatures for the
supply and return water temperature.
The set point for the zone air temperature can be an input to the model.
It allows to use this model with systems that have night set back.
The figure below shows a typical usage for a hot water temperature reset
for a heating system.
The parameters of the block heaCur
are for a heating system with
60°C supply water temperature and
40°C return water temperature at
an outside temperature of
-10°C and a room temperature of
20°C. The offset for the temperature reset is
8 Kelvin, i.e., above
12°C outside temperature, there is no heating load.
The figure shows the computed supply and return water temperatures.
block SupplyReturnTemperatureReset
parameter Real m=1.3
;
parameter Real TSup_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TRet_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real TZon_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")=293.15
;
parameter Real TOut_nominal(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC")
;
parameter Real dTOutHeaBal(
final quantity="TemperatureDifference",
final unit="K",
displayUnit="K")=8
;
CDL.Interfaces.RealInput TSetZon(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealInput TOut(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealOutput TSup(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
CDL.Interfaces.RealOutput TRet(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=200)
;
protected
CDL.Reals.Sources.Constant dTOutHeaBal_nominal(
final k=dTOutHeaBal,
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Reals.Sources.Constant TSup_nom(
final k=TSup_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Sources.Constant TZon_nom(
final k=TZon_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Sources.Constant zer(
final k=1E-100)
;
CDL.Reals.Sources.Constant TRet_nom(
final k=TRet_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Sources.Constant TOut_nom(
final k=TOut_nominal,
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Sources.Constant expM(
final k=m)
;
CDL.Reals.Sources.Constant one(
final k=1)
;
CDL.Reals.Add TOutOffSet(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Subtract qRelDen(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Subtract qRelNum(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Divide qRel ;
CDL.Reals.Subtract dTFlu2_nom
;
CDL.Reals.Average TFluAve_nominal(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Subtract dTFluAve_nominal(
y(
final quantity="TemperatureDifference",
final unit="K"))
;
CDL.Reals.Divide mInv ;
CDL.Reals.Add TAve(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Add TSupCur(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Subtract TRetCur(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.Max qRel0
;
CDL.Reals.Multiply pro ;
CDL.Reals.Exp qRaiInvM
;
CDL.Reals.Log log1
;
CDL.Reals.Multiply dTQ(y(
final quantity="TemperatureDifference",
final unit="K")) ;
CDL.Reals.Multiply dTFlu(y(
final quantity="TemperatureDifference",
final unit="K")) ;
CDL.Reals.Add TOutOffSet_nominal(
y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC"))
;
CDL.Reals.MultiplyByParameter gai(
final k=0.5,
y(
final quantity="TemperatureDifference",
final unit="K")) ;
equation
connect(dTOutHeaBal_nominal.y,TOutOffSet.u1);
connect(TOut,TOutOffSet.u2);
connect(TZon_nom.y,qRelDen.u1);
connect(qRel.y,qRel0.u2);
connect(zer.y,qRel0.u1);
connect(dTFlu2_nom.u1,TSup_nom.y);
connect(dTFlu2_nom.u2,TRet_nom.y);
connect(TFluAve_nominal.u1,TSup_nom.y);
connect(TRet_nom.y,TFluAve_nominal.u2);
connect(dTFluAve_nominal.u2,TZon_nom.y);
connect(qRel0.y,log1.u);
connect(one.y,mInv.u1);
connect(expM.y,mInv.u2);
connect(log1.y,pro.u1);
connect(pro.u2,mInv.y);
connect(qRaiInvM.u,pro.y);
connect(dTQ.u1,dTFluAve_nominal.y);
connect(qRaiInvM.y,dTQ.u2);
connect(TSetZon,TAve.u1);
connect(TAve.u2,dTQ.y);
connect(qRel0.y,dTFlu.u2);
connect(TSupCur.u1,TAve.y);
connect(dTFlu.y,TSupCur.u2);
connect(TSupCur.y,TSup);
connect(TRetCur.u1,TAve.y);
connect(TRetCur.u2,dTFlu.y);
connect(TRetCur.y,TRet);
connect(qRel.u1,qRelNum.y);
connect(qRel.u2,qRelDen.y);
connect(TOutOffSet_nominal.u1,TOut_nom.y);
connect(dTOutHeaBal_nominal.y,TOutOffSet_nominal.u2);
connect(TOutOffSet_nominal.y,qRelDen.u2);
connect(TSetZon, qRelNum.u1);
connect(TOutOffSet.y, qRelNum.u2);
connect(dTFlu2_nom.y, gai.u);
connect(gai.y, dTFlu.u1);
connect(TFluAve_nominal.y, dTFluAve_nominal.u1);
end SupplyReturnTemperatureReset;