Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).
Name | Description |
---|---|
Damper | |
ThreeWayValves | |
TwoWayValves | |
TwoWayValvesMotor | |
ValveParameterization | Model to test and illustrate different parameterization for valves |
VAVBoxExponential | |
MixingBox | |
MixingBoxMinimumFlow |
model Damper package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.Actuators.Dampers.Exponential res( A=1, redeclare package Medium = Medium, m_flow_nominal=1); Modelica.Blocks.Sources.Ramp yRam( duration=0.3, offset=0, startTime=0.2, height=1); Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=true, nPorts=1, T=293.15); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_p_in=true, nPorts=1, T=293.15); Modelica.Blocks.Sources.Constant PAtm(k=101325); Buildings.Fluid.Actuators.Dampers.Exponential res1( A=1, redeclare package Medium = Medium, m_flow_nominal=1); Modelica.Blocks.Sources.Ramp yRam1( duration=0.3, height=1, offset=0); Modelica.Blocks.Sources.Ramp P1( duration=0.5, startTime=0.5, height=-10, offset=101330); Buildings.Fluid.Sources.Boundary_pT sou1( redeclare package Medium = Medium, use_p_in=true, nPorts=1, T=293.15); Buildings.Fluid.Sources.Boundary_pT sin1( redeclare package Medium = Medium, use_p_in=true, nPorts=1, T=293.15); Modelica.Blocks.Sources.Constant PAtm1( k=101325); Modelica.Blocks.Sources.Constant PAtm0(k=101335); inner Modelica.Fluid.System system; equationconnect(yRam.y, res.y); connect(PAtm.y, sin.p_in); connect(yRam1.y, res1.y); connect(P1.y, sou1.p_in); connect(PAtm1.y, sin1.p_in); connect(PAtm0.y, sou.p_in); connect(sou.ports[1], res.port_a); connect(sin.ports[1], res.port_b); connect(sou1.ports[1], res1.port_a); connect(res1.port_b, sin1.ports[1]); end Damper;
Test model for three way valves. Note that the leakage flow rate has been set to a large value and the rangeability to a small value for better visualization of the valve characteristics. To use common values, use the default values.
model ThreeWayValves package Medium = Buildings.Media.ConstantPropertyLiquidWater "Medium in the component";Buildings.Fluid.Actuators.Valves.ThreeWayLinear valLin( redeclare package Medium = Medium, l={0.05,0.05}, m_flow_nominal=2) "Valve model, linear opening characteristics"; Modelica.Blocks.Sources.Ramp y( height=1, duration=1, offset=0) "Control signal"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, nPorts=2, use_p_in=true, T=313.15); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=2, use_p_in=true, T=313.15); Modelica.Blocks.Sources.Constant PSin(k=3E5); Modelica.Blocks.Sources.Constant PSou(k=306000); Actuators.Valves.ThreeWayEqualPercentageLinear valEquPerLin( l={0.05,0.05}, redeclare package Medium = Medium, R=10, m_flow_nominal=2); Buildings.Fluid.Sources.Boundary_pT ret( redeclare package Medium = Medium, nPorts=2, use_p_in=true, T=303.15); inner Modelica.Fluid.System system; equationconnect(y.y, valLin.y); connect(PSin.y, sin.p_in); connect(y.y, valEquPerLin.y); connect(sou.ports[1], valLin.port_1); connect(sou.ports[2], valEquPerLin.port_1); connect(valLin.port_2, sin.ports[1]); connect(valEquPerLin.port_2, sin.ports[2]); connect(PSou.y, ret.p_in); connect(ret.ports[1], valLin.port_3); connect(ret.ports[2], valEquPerLin.port_3); connect(PSou.y, sou.p_in); end ThreeWayValves;
Test model for two way valves. Note that the leakage flow rate has been set to a large value and the rangeability to a small value for better visualization of the valve characteristics. To use common values, use the default values.
model TwoWayValves package Medium = Buildings.Media.ConstantPropertyLiquidWater;Buildings.Fluid.Actuators.Valves.TwoWayLinear valLin( redeclare package Medium = Medium, l=0.05, m_flow_nominal=2) "Valve model, linear opening characteristics"; Modelica.Blocks.Sources.Ramp y( height=1, duration=1, offset=0) "Control signal"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=true, nPorts=3, T=293.15); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_p_in=true, nPorts=3, T=293.15); Modelica.Blocks.Sources.Constant PSin(k=3E5); Modelica.Blocks.Sources.Constant PSou(k=306000); Buildings.Fluid.Actuators.Valves.TwoWayQuickOpening valQui( redeclare package Medium = Medium, l=0.05, m_flow_nominal=2) "Valve model, quick opening characteristics"; Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage valEqu( redeclare package Medium = Medium, l=0.05, R=10, delta0=0.1, m_flow_nominal=2) "Valve model, equal percentage opening characteristics"; inner Modelica.Fluid.System system; equationconnect(y.y, valLin.y); connect(PSin.y, sin.p_in); connect(PSou.y, sou.p_in); connect(y.y, valQui.y); connect(y.y, valEqu.y); connect(sou.ports[1], valLin.port_a); connect(valQui.port_a, sou.ports[2]); connect(valEqu.port_a, sou.ports[3]); connect(valLin.port_b, sin.ports[1]); connect(valQui.port_b, sin.ports[2]); connect(valEqu.port_b, sin.ports[3]); end TwoWayValves;
Test model for two way valves. Note that the leakage flow rate has been set to a large value and the rangeability to a small value for better visualization of the valve characteristics. To use common values, use the default values.
model TwoWayValvesMotor package Medium = Buildings.Media.ConstantPropertyLiquidWater;Buildings.Fluid.Actuators.Valves.TwoWayLinear valLin( redeclare package Medium = Medium, l=0.05, m_flow_nominal=2) "Valve model, linear opening characteristics"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, nPorts=3, use_p_in=true, T=293.15); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=3, use_p_in=true, T=293.15); Modelica.Blocks.Sources.Constant PSin(k=3E5); Modelica.Blocks.Sources.Constant PSou(k=306000); Buildings.Fluid.Actuators.Valves.TwoWayQuickOpening valQui( redeclare package Medium = Medium, l=0.05, m_flow_nominal=2) "Valve model, quick opening characteristics"; Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage valEqu( redeclare package Medium = Medium, l=0.05, R=10, delta0=0.1, m_flow_nominal=2) "Valve model, equal percentage opening characteristics"; Modelica.Blocks.Sources.TimeTable ySet(table=[0,0; 60,0; 60,1; 120,1; 180,0.5; 240,0.5; 300,0; 360,0; 360,0.25; 420,0.25; 480,1; 540,1.5; 600,-0.25]) "Set point for actuator"; Actuators.Motors.IdealMotor mot( tOpe=60) "Motor model"; inner Modelica.Fluid.System system; equationconnect(PSin.y, sin.p_in); connect(PSou.y, sou.p_in); connect(ySet.y, mot.u); connect(mot.y, valEqu.y); connect(mot.y, valQui.y); connect(mot.y, valLin.y); connect(sou.ports[1], valLin.port_a); connect(sou.ports[2], valQui.port_a); connect(sou.ports[3], valEqu.port_a); connect(valLin.port_b, sin.ports[1]); connect(valQui.port_b, sin.ports[2]); connect(valEqu.port_b, sin.ports[3]); end TwoWayValvesMotor;
Test model for two way valves. This model tests the different parameterization of the valve model. The top and bottom two valves need to have the same flow rates.
model ValveParameterization "Model to test and illustrate different parameterization for valves" import Buildings; package Medium = Buildings.Media.ConstantPropertyLiquidWater;Buildings.Fluid.Actuators.Valves.TwoWayLinear valOPPoi( redeclare package Medium = Medium, m_flow_nominal=150/3600, CvData=Buildings.Fluid.Types.CvTypes.OpPoint, dp_nominal(displayUnit="kPa") = 4500) "Valve model, linear opening characteristics"; Modelica.Blocks.Sources.Constant y(k=1) "Control signal"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=true, nPorts=4, T=293.15); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=4, use_p_in=false, p=300000, T=293.15); Modelica.Blocks.Sources.Ramp PSou( duration=1, offset=3E5, height=1E5); Valves.TwoWayLinear valKv( redeclare package Medium = Medium, CvData=Buildings.Fluid.Types.CvTypes.Kv, m_flow_nominal=150/3600, Kv=0.73, dp_nominal=450000) "Valve model, linear opening characteristics"; inner Modelica.Fluid.System system; Valves.TwoWayLinear valCv( redeclare package Medium = Medium, m_flow_nominal=150/3600, CvData=Buildings.Fluid.Types.CvTypes.Cv, Cv=0.84, dp_nominal=450000) "Valve model, linear opening characteristics"; Buildings.Fluid.Sensors.MassFlowRate senM_flowOpPoi(redeclare package Medium = Medium); Buildings.Fluid.Sensors.MassFlowRate senM_flowKv(redeclare package Medium = Medium); Buildings.Fluid.Sensors.MassFlowRate senM_flowCv(redeclare package Medium = Medium); Modelica.Fluid.Valves.ValveIncompressible valFlu( redeclare package Medium = Medium, dp_nominal(displayUnit="Pa") = 4500, m_flow_nominal=0.0416, CvData=Modelica.Fluid.Types.CvTypes.Cv, Cv=0.84) "Valve model, linear opening characteristics"; Buildings.Fluid.Sensors.MassFlowRate senM_flowFlu( redeclare package Medium = Medium); Buildings.Utilities.Diagnostics.AssertEquality equ1(threShold=0.01); Buildings.Utilities.Diagnostics.AssertEquality equ2(threShold=0.01); equationconnect(y.y, valOPPoi.y); connect(PSou.y, sou.p_in); connect(y.y, valKv.y); connect(valKv.port_a, sou.ports[2]); connect(sou.ports[3], valCv.port_a); connect(y.y, valCv.y); connect(sou.ports[1], valOPPoi.port_a); connect(valOPPoi.port_b, senM_flowOpPoi.port_a); connect(valKv.port_b, senM_flowKv.port_a); connect(valCv.port_b, senM_flowCv.port_a); connect(senM_flowCv.port_b, sin.ports[3]); connect(senM_flowKv.port_b, sin.ports[2]); connect(senM_flowOpPoi.port_b, sin.ports[1]); connect(valFlu.port_b, senM_flowFlu.port_a); connect(sou.ports[4],valFlu. port_a); connect(senM_flowFlu.port_b, sin.ports[4]); connect(y.y,valFlu. opening); connect(senM_flowOpPoi.m_flow, equ1.u1); connect(senM_flowKv.m_flow, equ1.u2); connect(senM_flowCv.m_flow, equ2.u1); connect(senM_flowFlu.m_flow, equ2.u2); end ValveParameterization;
model VAVBoxExponential package Medium = Modelica.Media.Air.SimpleAir;Buildings.Fluid.Actuators.Dampers.Exponential dam( redeclare package Medium = Medium, A=1.8, m_flow_nominal=2); Modelica.Blocks.Sources.Ramp yRam( duration=0.4, height=-1, offset=1, startTime=0.6); Modelica.Blocks.Sources.Ramp P( duration=0.4, height=-10, offset=101330, startTime=0); Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, T=273.15 + 20, nPorts=2, use_p_in=true); Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, T=273.15 + 20, nPorts=2, use_p_in=true); Modelica.Blocks.Sources.Constant PAtm(k=101325); Buildings.Fluid.Actuators.Dampers.VAVBoxExponential vav( redeclare package Medium = Medium, dp_nominal=5, A=1.8, m_flow_nominal=2); Buildings.Fluid.FixedResistances.FixedResistanceDpM res( from_dp=true, m_flow_nominal=2, redeclare package Medium = Medium, dp_nominal=5 - 0.45*2^2/1.2/1.8^2/2); inner Modelica.Fluid.System system; equationconnect(yRam.y,dam. y); connect(P.y, sou.p_in); connect(PAtm.y, sin.p_in); connect(yRam.y, vav.y); connect(res.port_b, dam.port_a); connect(sou.ports[1], res.port_a); connect(sou.ports[2], vav.port_a); connect(dam.port_b, sin.ports[1]); connect(sin.ports[2], vav.port_b); end VAVBoxExponential;
model MixingBox package Medium = Buildings.Media.GasesConstantDensity.SimpleAir "Medium in the component";Dampers.MixingBox mixBox( AOut=0.7, AExh=1, ARec=1, mOut_flow_nominal=1, dpOut_nominal=20, mRec_flow_nominal=1, dpRec_nominal=20, mExh_flow_nominal=1, dpExh_nominal=20, redeclare package Medium = Medium) "mixing box"; Buildings.Fluid.Sources.Boundary_pT bouIn( redeclare package Medium = Medium, T=273.15 + 10, use_p_in=true, nPorts=2); Buildings.Fluid.Sources.Boundary_pT bouSup( redeclare package Medium = Medium, T=273.15 + 26, use_p_in=true, nPorts=1); Buildings.Fluid.Sources.Boundary_pT bouRet( redeclare package Medium = Medium, T=273.15 + 20, use_p_in=true, nPorts=1); Modelica.Blocks.Sources.Constant PAtm(k=101325); Modelica.Blocks.Sources.Ramp PSup( offset=101320, height=-10, startTime=0, duration=20); Modelica.Blocks.Sources.Ramp PRet( height=10, offset=101330, duration=20, startTime=20); Modelica.Blocks.Sources.Ramp yDam( startTime=40, height=1, offset=0, duration=10); inner Modelica.Fluid.System system; equationconnect(yDam.y, mixBox.y); connect(bouIn.p_in, PAtm.y); connect(PRet.y, bouRet.p_in); connect(bouSup.p_in, PSup.y); connect(bouIn.ports[1], mixBox.port_Out); connect(bouIn.ports[2], mixBox.port_Exh); connect(bouSup.ports[1], mixBox.port_Sup); connect(bouRet.ports[1], mixBox.port_Ret); end MixingBox;
model MixingBoxMinimumFlow package Medium = Buildings.Media.GasesConstantDensity.SimpleAir "Medium in the component";Buildings.Fluid.Actuators.Dampers.MixingBoxMinimumFlow mixBox( AOutMin=0.3, AOut=0.7, AExh=1, ARec=1, mOutMin_flow_nominal=0.3, dpOutMin_nominal=20, mOut_flow_nominal=1, dpOut_nominal=20, mRec_flow_nominal=1, dpRec_nominal=20, mExh_flow_nominal=1, dpExh_nominal=20, redeclare package Medium = Medium) "mixing box"; Buildings.Fluid.Sources.Boundary_pT bouIn( redeclare package Medium = Medium, T=273.15 + 10, use_p_in=true, nPorts=3); Buildings.Fluid.Sources.Boundary_pT bouSup( redeclare package Medium = Medium, T=273.15 + 26, use_p_in=true, nPorts=1); Buildings.Fluid.Sources.Boundary_pT bouRet( redeclare package Medium = Medium, T=273.15 + 20, use_p_in=true, nPorts=1); Modelica.Blocks.Sources.Constant PAtm(k=101325); Modelica.Blocks.Sources.Constant yDamMin(k=0.5); Modelica.Blocks.Sources.Ramp PSup( offset=101320, height=-10, startTime=0, duration=20); Modelica.Blocks.Sources.Ramp PRet( height=10, offset=101330, duration=20, startTime=20); Modelica.Blocks.Sources.Ramp yDam( duration=20, startTime=40, height=0.1, offset=0.45); inner Modelica.Fluid.System system; equationconnect(yDamMin.y, mixBox.yOutMin); connect(yDam.y, mixBox.y); connect(bouIn.p_in, PAtm.y); connect(PRet.y, bouRet.p_in); connect(bouSup.p_in, PSup.y); connect(bouIn.ports[1], mixBox.port_OutMin); connect(bouIn.ports[2], mixBox.port_Out); connect(bouIn.ports[3], mixBox.port_Exh); connect(bouSup.ports[1], mixBox.port_Sup); connect(bouRet.ports[1], mixBox.port_Ret); end MixingBoxMinimumFlow;