Buildings.Experimental.DHC.Loads.BaseClasses.Controls.Validation
Collection of validation models
Information
This package contains validation models for the classes in Buildings.Experimental.DHC.Loads.BaseClasses.Controls.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
MixingValveControl | Validation of mixing valve control in change-over mode |
Buildings.Experimental.DHC.Loads.BaseClasses.Controls.Validation.MixingValveControl
Validation of mixing valve control in change-over mode
Information
This model validates Buildings.Experimental.DHC.Loads.BaseClasses.Controls.MixingValveControl (as part of Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution) in change-over mode.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Mass flow rate at nominal conditions [kg/s] |
Modelica definition
model MixingValveControl
"Validation of mixing valve control in change-over mode"
extends Modelica.Icons.Example;
package Medium=Buildings.Media.Water
"Source side medium";
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
"Mass flow rate at nominal conditions";
Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFlo(
redeclare package Medium=Medium,
m_flow_nominal=m_flow_nominal,
typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChangeOver,
have_pum=true,
have_val=true,
dp_nominal=100000,
nPorts_a1=1,
nPorts_b1=1)
"Secondary distribution system";
Buildings.Fluid.Sources.Boundary_pT souPri(
redeclare package Medium=Medium,
use_T_in=true,
nPorts=1)
"Primary supply stream";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TPriHea(
k=313.15,
y(final unit="K",
displayUnit="degC"))
"Heating water primary supply temperature";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TPriChi(
k=280.15,
y(final unit="K",
displayUnit="degC"))
"Chilled water primary supply temperature";
Buildings.Controls.OBC.CDL.Continuous.Switch TPri(
y(final unit="K",
displayUnit="degC"))
"Actual primary supply temperature";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetSecHea(
k=303.15,
y(final unit="K",
displayUnit="degC"))
"Heating water secondary supply temperature set point";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetSecChi(
k=291.15)
"Chilled water secondary supply temperature set point";
Buildings.Controls.OBC.CDL.Continuous.Switch TSetSecAct(
y(final unit="K",
displayUnit="degC"))
"Actual secondary supply temperature set point";
Buildings.Fluid.Sources.MassFlowSource_T souSec(
use_m_flow_in=true,
redeclare package Medium=Medium,
use_T_in=true,
nPorts=1)
"Secondary return stream";
Buildings.Fluid.Sources.Boundary_pT sinSec(
redeclare package Medium=Medium,
nPorts=1)
"Sink for secondary stream";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant dTSecHea(
k=-5)
"Secondary temperature difference between supply and return";
Buildings.Fluid.Sensors.TemperatureTwoPort senTSecSup(
redeclare package Medium=Medium,
m_flow_nominal=m_flow_nominal)
"Secondary supply temperature (measured)";
Buildings.Fluid.Sensors.TemperatureTwoPort senTSecRet(
redeclare package Medium=Medium,
m_flow_nominal=m_flow_nominal)
"Secondary return temperature (measured)";
Buildings.Fluid.Sources.Boundary_pT sinPri(
redeclare package Medium=Medium,
nPorts=1)
"Sink for primary stream";
Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse mSec_flow(
amplitude=m_flow_nominal,
period=200,
offset=0)
"Secondary mass flow rate";
Buildings.Controls.OBC.CDL.Continuous.Add add
"Computation of secondary return temperature";
Buildings.Fluid.Sensors.TemperatureTwoPort senTPriSup(
redeclare package Medium=Medium,
m_flow_nominal=m_flow_nominal)
"Primary supply temperature (measured)";
Buildings.Controls.OBC.CDL.Continuous.Switch dTSec(
y(final unit="K",
displayUnit="degC"))
"Actual secondary delta T";
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant dTSecCoo(
k=5)
"Secondary temperature difference between supply and return";
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger modInd(
final integerTrue=1,
final integerFalse=2)
"Mode index, 1 for heating, 2 for cooling";
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse modCha(
period=1000)
"Boolean pulse for changing mode";
Buildings.Controls.OBC.CDL.Logical.Not mod
"Operating mode, true for heating, false for cooling";
equation
connect(TPri.y,souPri.T_in);
connect(TSetSecAct.y,disFlo.TSupSet);
connect(disFlo.ports_b1[1],senTSecSup.port_a);
connect(souSec.ports[1],senTSecRet.port_a);
connect(senTSecRet.port_b,disFlo.ports_a1[1]);
connect(disFlo.port_b,sinPri.ports[1]);
connect(senTSecSup.port_b,sinSec.ports[1]);
connect(mSec_flow.y,disFlo.mReq_flow[1]);
connect(mSec_flow.y,souSec.m_flow_in);
connect(add.y,souSec.T_in);
connect(souPri.ports[1],senTPriSup.port_a);
connect(senTPriSup.port_b,disFlo.port_a);
connect(TSetSecChi.y,TSetSecAct.u3);
connect(TSetSecHea.y,TSetSecAct.u1);
connect(TPriChi.y,TPri.u3);
connect(TPriHea.y,TPri.u1);
connect(TSetSecAct.y,add.u1);
connect(dTSec.y,add.u2);
connect(dTSecHea.y,dTSec.u1);
connect(dTSecCoo.y,dTSec.u3);
connect(modCha.y,mod.u);
connect(mod.y,TPri.u2);
connect(mod.y,TSetSecAct.u2);
connect(mod.y,modInd.u);
connect(modInd.y,disFlo.modChaOve);
connect(mod.y,dTSec.u2);
end MixingValveControl;