Buildings.Fluid.Movers.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.Fluid.Movers.

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

Package Content

NameDescription
ControlledFlowMachine  
FlowMachine  


Buildings.Fluid.Movers.Examples.ControlledFlowMachine

Buildings.Fluid.Movers.Examples.ControlledFlowMachine

Information


This example demonstrates the use of the flow model with four different configuration.
All flow models have the same mass flow rate and pressure difference.

Modelica definition

model ControlledFlowMachine
  import Buildings;

  package Medium = Buildings.Media.IdealGases.SimpleAir;

  Modelica.Blocks.Sources.Ramp y(
    duration=1,
    offset=1,
    height=-0.6);
  Buildings.Fluid.Sources.Boundary_pT sou(
    redeclare package Medium = Medium,
    nPorts=8,
    use_p_in=false,
    p=system.p_ambient,
    T=293.15);
  inner Modelica.Fluid.System system;
  Buildings.Fluid.Sensors.MassFlowRate masFloRat1(redeclare package Medium = 
        Medium);
  Buildings.Fluid.Sensors.RelativePressure relPre(redeclare package Medium = 
        Medium);
  Buildings.Fluid.Movers.FlowMachine_y fan1(
    redeclare package Medium = Medium,
    redeclare function flowCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow (
          V_flow_nominal={0,1.8,3}, dp_nominal={1000,600,0}),
    redeclare function efficiencyCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency (
          eta_nominal=0.8),
    V=10,
    energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial);
  FixedResistances.FixedResistanceDpM dp1(
    m_flow_nominal=6000/3600*1.2,
    dp_nominal=600,
    redeclare package Medium = Medium) "Pressure drop";
  FixedResistances.FixedResistanceDpM dp2(
    m_flow_nominal=6000/3600*1.2,
    dp_nominal=600,
    redeclare package Medium = Medium) "Pressure drop";
  Buildings.Fluid.Sensors.MassFlowRate masFloRat2(redeclare package Medium = 
        Medium);
  FixedResistances.FixedResistanceDpM dp3(
    m_flow_nominal=6000/3600*1.2,
    dp_nominal=600,
    redeclare package Medium = Medium) "Pressure drop";
  Buildings.Fluid.Sensors.MassFlowRate masFloRat3(redeclare package Medium = 
        Medium);
  FlowMachine_dp fan3(
    redeclare package Medium = Medium,
    redeclare function flowCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow (
          V_flow_nominal={0,1.8,3}, dp_nominal={1000,600,0}),
    redeclare function efficiencyCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency (
          eta_nominal=0.8),
    m_flow_nominal=6000/3600*1.2,
    V=10,
    energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial);
  FlowMachine_m_flow fan2(
    redeclare package Medium = Medium,
    redeclare function flowCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow (
          V_flow_nominal={0,1.8,3}, dp_nominal={1000,600,0}),
    redeclare function efficiencyCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency (
          eta_nominal=0.8),
    m_flow_nominal=6000/3600*1.2,
    V=10,
    energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial);
  FixedResistances.FixedResistanceDpM dp4(
    m_flow_nominal=6000/3600*1.2,
    dp_nominal=600,
    redeclare package Medium = Medium) "Pressure drop";
  Buildings.Fluid.Sensors.MassFlowRate masFloRat4(redeclare package Medium = 
        Medium);
  FlowMachine_Nrpm fan4(
    redeclare package Medium = Medium,
    redeclare function flowCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow (
          V_flow_nominal={0,1.8,3}, dp_nominal={1000,600,0}),
    redeclare function efficiencyCharacteristic = 
        Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency (
          eta_nominal=0.8),
    V=10,
    energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial);
  Modelica.Blocks.Math.Gain gain(k=1500) "Converts y to nominal rpm";
  Buildings.Utilities.Diagnostics.AssertEquality assEqu(startTime=0.01) 
    "Asserts the equality of the input signals";
  Buildings.Utilities.Diagnostics.AssertEquality assEqu1(startTime=0.01) 
    "Asserts the equality of the input signals";
  Buildings.Utilities.Diagnostics.AssertEquality assEqu2(startTime=0.01) 
    "Asserts the equality of the input signals";
equation 

  connect(y.y, fan1.y_in);
  connect(dp2.port_b, sou.ports[1]);
  connect(fan1.port_a, relPre.port_b);
  connect(fan1.port_b, relPre.port_a);
  connect(dp3.port_b, sou.ports[2]);
  connect(relPre.p_rel, fan3.dp_set);
  connect(masFloRat1.port_b, fan1.port_a);
  connect(masFloRat1.port_a, sou.ports[3]);
  connect(fan1.port_b, dp1.port_a);
  connect(fan2.port_b, dp2.port_a);
  connect(fan3.port_b, dp3.port_a);
  connect(fan3.port_a, masFloRat3.port_b);
  connect(fan2.port_a, masFloRat2.port_b);
  connect(masFloRat2.port_a, sou.ports[4]);
  connect(masFloRat3.port_a, sou.ports[5]);
  connect(masFloRat1.m_flow, fan2.m_flow_set);
  connect(dp1.port_b, sou.ports[6]);
  connect(masFloRat4.port_a, sou.ports[7]);
  connect(masFloRat4.port_b, fan4.port_a);
  connect(fan4.port_b, dp4.port_a);
  connect(dp4.port_b, sou.ports[8]);
  connect(gain.y, fan4.N_in);
  connect(gain.u, y.y);
  connect(assEqu.u1, masFloRat4.m_flow);
  connect(masFloRat1.m_flow, assEqu.u2);
  connect(assEqu1.u1, masFloRat1.m_flow);
  connect(assEqu1.u2, masFloRat2.m_flow);
  connect(assEqu2.u1, masFloRat2.m_flow);
  connect(assEqu2.u2, masFloRat3.m_flow);
end ControlledFlowMachine;

Buildings.Fluid.Movers.Examples.FlowMachine

Buildings.Fluid.Movers.Examples.FlowMachine

Modelica definition

model FlowMachine
  import Buildings;

   package Medium = Buildings.Media.IdealGases.SimpleAir;
  //  package Medium =  Buildings.Media.PerfectGases.MoistAir;
  //package Medium = Modelica.Media.Air.SimpleAir;
    Modelica.Blocks.Sources.Ramp P(
    height=-1500,
    offset=101325,
    duration=1.5);
  Buildings.Fluid.Movers.FlowMachinePolynomial fan(
    D=0.6858,
    a={4.2904,-1.387,4.2293,-3.92920,0.8534},
    b={0.1162,1.5404,-1.4825,0.7664,-0.1971},
    mNorMin_flow=1,
    mNorMax_flow=2,
    redeclare package Medium = Medium,
    m_flow_nominal=10);
  Modelica.Blocks.Sources.Constant N(k=22.3333);
  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.Utilities.Reports.Printer printer(
    nin=6,
    header="time dp dpNorm mNorm m_flow power");
  Modelica.Blocks.Sources.RealExpression fan_mFlow(y=fan.m_flow);
  Modelica.Blocks.Sources.RealExpression simTim2(y=time);
  Modelica.Blocks.Sources.RealExpression fan_dp(y=fan.dp);
  Modelica.Blocks.Sources.RealExpression fan_dpNor(y=fan.pNor);
  Modelica.Blocks.Sources.RealExpression fan_mNor(y=fan.mNor_flow);
  Modelica.Blocks.Sources.RealExpression fan_PSha(y=fan.PSha);
  inner Modelica.Fluid.System system;
  Buildings.Fluid.Sensors.Temperature TIn(redeclare package Medium = Medium);
  Buildings.Fluid.Sensors.Temperature TOut(redeclare package Medium = Medium);
  Buildings.Utilities.Diagnostics.AssertInequality assertInequality;
equation 

  connect(simTim2.y, printer.x[1]);
  connect(fan_dp.y, printer.x[2]);
  connect(fan_dpNor.y, printer.x[3]);
  connect(fan_mNor.y, printer.x[4]);
  connect(fan_PSha.y, printer.x[6]);
  connect(fan_mFlow.y, printer.x[5]);
  connect(N.y, fan.N_in);
  connect(P.y, sou.p_in);
  connect(PAtm.y, sin.p_in);
  connect(sou.ports[1], fan.port_a);
  connect(fan.port_b, sin.ports[1]);
  connect(fan.port_a, TIn.port);
  connect(fan.port_b, TOut.port);
  connect(TOut.T, assertInequality.u1);
  connect(TIn.T, assertInequality.u2);
end FlowMachine;

HTML-documentation generated by Dymola Sat Feb 6 17:35:54 2010.