Buildings.Fluids.Actuators.Examples

Collection of models that illustrate model use and test models

Information


This package contains examples for the use of models
that can be found in 
Buildings.Fluids.Actuators.

Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).

Package Content

NameDescription
Damper  
OAMixingBoxMinimumDamper  
ThreeWayValves  
TwoWayValves  
TwoWayValvesMotor  
ValveParameterization Model to test and illustrate different parameterization for valves
VAVBoxExponential  


Buildings.Fluids.Actuators.Examples.Damper

Buildings.Fluids.Actuators.Examples.Damper

Modelica definition

model Damper


 package Medium = Buildings.Media.IdealGases.SimpleAir;

  Buildings.Fluids.Actuators.Dampers.Exponential res(
    A=1,
    redeclare package Medium = Medium,
    m0_flow=1);
    Modelica.Blocks.Sources.Ramp yRam(
    duration=0.3,
    height=1,
    offset=0,
    startTime=0.2);
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      = Medium,
    use_p_in=true,
    nPorts=1,
    T=293.15);
  Modelica_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.Fluids.Actuators.Dampers.Exponential res1(
    A=1,
    redeclare package Medium = Medium,
    m0_flow=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);
  Modelica_Fluid.Sources.Boundary_pT sou1(          redeclare package Medium = 
        Medium,
    use_p_in=true,
    nPorts=1,
    T=293.15);
  Modelica_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;
equation 
  connect(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;

Buildings.Fluids.Actuators.Examples.OAMixingBoxMinimumDamper

Buildings.Fluids.Actuators.Examples.OAMixingBoxMinimumDamper

Modelica definition

model OAMixingBoxMinimumDamper


 package Medium = Buildings.Media.GasesPTDecoupled.SimpleAir 
    "Medium in the component";

  Buildings.Fluids.Actuators.Dampers.OAMixingBoxMinimumDamper mixBox(
    AOutMin=0.3,
    AOut=0.7,
    AExh=1,
    ARec=1,
    m0OutMin_flow=0.3,
    dp0OutMin=20,
    m0Out_flow=1,
    dp0Out=20,
    m0Rec_flow=1,
    dp0Rec=20,
    m0Exh_flow=1,
    dp0Exh=20,
    redeclare package Medium = Medium) "mixing box";
    Modelica_Fluid.Sources.Boundary_pT bouIn(             redeclare package
      Medium = Medium, T=273.15 + 10,
    use_p_in=true,
    nPorts=3);
    Modelica_Fluid.Sources.Boundary_pT bouSup(             redeclare package
      Medium = Medium, T=273.15 + 26,
    use_p_in=true,
    nPorts=1);
    Modelica_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;
equation 
  connect(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 OAMixingBoxMinimumDamper;

Buildings.Fluids.Actuators.Examples.ThreeWayValves

Buildings.Fluids.Actuators.Examples.ThreeWayValves

Information


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.



Modelica definition

model ThreeWayValves


 package Medium = Buildings.Media.ConstantPropertyLiquidWater 
    "Medium in the component";

  Buildings.Fluids.Actuators.Valves.ThreeWayLinear valLin(
    redeclare package Medium = Medium,
    l={0.05,0.05},
    m0_flow=2) "Valve model, linear opening characteristics";
    Modelica.Blocks.Sources.Ramp y(
    height=1,
    duration=1,
    offset=0) "Control signal";
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      = Medium,
    nPorts=2,
    use_p_in=true,
    T=313.15);
  Modelica_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,
    m0_flow=2);
  Modelica_Fluid.Sources.Boundary_pT ret(
    redeclare package Medium = Medium,
    nPorts=2,
    use_p_in=true,
    T=303.15);
  inner Modelica_Fluid.System system;
equation 
  connect(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;

Buildings.Fluids.Actuators.Examples.TwoWayValves

Buildings.Fluids.Actuators.Examples.TwoWayValves

Information


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.



Modelica definition

model TwoWayValves


 package Medium = Buildings.Media.ConstantPropertyLiquidWater;

  Buildings.Fluids.Actuators.Valves.TwoWayLinear valLin(
    redeclare package Medium = Medium,
    l=0.05,
    m0_flow=2) "Valve model, linear opening characteristics";
    Modelica.Blocks.Sources.Ramp y(
    height=1,
    duration=1,
    offset=0) "Control signal";
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      = Medium,
    use_p_in=true,
    nPorts=3,
    T=293.15);
  Modelica_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.Fluids.Actuators.Valves.TwoWayQuickOpening valQui(
    redeclare package Medium = Medium,
    l=0.05,
    m0_flow=2) "Valve model, quick opening characteristics";
  Buildings.Fluids.Actuators.Valves.TwoWayEqualPercentage valEqu(
    redeclare package Medium = Medium,
    l=0.05,
    R=10,
    delta0=0.1,
    m0_flow=2) "Valve model, equal percentage opening characteristics";
  inner Modelica_Fluid.System system;
equation 
  connect(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;

Buildings.Fluids.Actuators.Examples.TwoWayValvesMotor

Buildings.Fluids.Actuators.Examples.TwoWayValvesMotor

Information


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.



Modelica definition

model TwoWayValvesMotor


 package Medium = Buildings.Media.ConstantPropertyLiquidWater;

  Buildings.Fluids.Actuators.Valves.TwoWayLinear valLin(
    redeclare package Medium = Medium,
    l=0.05,
    m0_flow=2) "Valve model, linear opening characteristics";
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      = Medium,
    nPorts=3,
    use_p_in=true,
    T=293.15);
  Modelica_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.Fluids.Actuators.Valves.TwoWayQuickOpening valQui(
    redeclare package Medium = Medium,
    l=0.05,
    m0_flow=2) "Valve model, quick opening characteristics";
  Buildings.Fluids.Actuators.Valves.TwoWayEqualPercentage valEqu(
    redeclare package Medium = Medium,
    l=0.05,
    R=10,
    delta0=0.1,
    m0_flow=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;
equation 
  connect(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;

Buildings.Fluids.Actuators.Examples.ValveParameterization

Model to test and illustrate different parameterization for valves

Buildings.Fluids.Actuators.Examples.ValveParameterization

Information


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.



Modelica definition

model ValveParameterization 
  "Model to test and illustrate different parameterization for valves"
  import Buildings;


 package Medium = Buildings.Media.ConstantPropertyLiquidWater;

  Buildings.Fluids.Actuators.Valves.TwoWayLinear valOPPoi(
    redeclare package Medium = Medium,
    m0_flow=150/3600,
    CvData=Buildings.Fluids.Types.CvTypes.OpPoint,
    dp0(displayUnit="kPa") = 4500) 
    "Valve model, linear opening characteristics";
    Modelica.Blocks.Sources.Constant y(k=1) "Control signal";
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      = Medium,
    use_p_in=true,
    nPorts=4,
    T=293.15);
  Modelica_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.Fluids.Types.CvTypes.Kv,
    m0_flow=150/3600,
    Kv=0.73,
    dp0=450000) "Valve model, linear opening characteristics";
  inner Modelica_Fluid.System system;
  Valves.TwoWayLinear valCv(
    redeclare package Medium = Medium,
    m0_flow=150/3600,
    CvData=Buildings.Fluids.Types.CvTypes.Cv,
    Cv=0.84,
    dp0=450000) "Valve model, linear opening characteristics";
  Modelica_Fluid.Sensors.MassFlowRate senM_flowOpPoi(redeclare package Medium
      = Medium);
  Modelica_Fluid.Sensors.MassFlowRate senM_flowKv(redeclare package Medium = 
        Medium);
  Modelica_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";
  Modelica_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);
equation 
  connect(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;

Buildings.Fluids.Actuators.Examples.VAVBoxExponential

Buildings.Fluids.Actuators.Examples.VAVBoxExponential

Modelica definition

model VAVBoxExponential

 package Medium = Modelica.Media.Air.SimpleAir;

  Buildings.Fluids.Actuators.Dampers.Exponential dam(
         redeclare package Medium = Medium, A=1.8,
    m0_flow=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);
  Modelica_Fluid.Sources.Boundary_pT sou(             redeclare package Medium
      =        Medium, T=273.15 + 20,
    nPorts=2,
    use_p_in=true);
  Modelica_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.Fluids.Actuators.Dampers.VAVBoxExponential vav(
    redeclare package Medium = Medium,
    dp0=5,
    A=1.8,
    m0_flow=2);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res(
    from_dp=true,
    m0_flow=2,
    redeclare package Medium = Medium,
    dp0=5 - 0.45*2^2/1.2/1.8^2/2);
  inner Modelica_Fluid.System system;
equation 
  connect(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;

HTML-documentation generated by Dymola Thu Feb 19 16:50:56 2009.