This package contains examples for the use of models that can be found in Buildings.Fluid.Movers.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
FlowMachine_y | |
FlowMachine_Nrpm | |
FlowMachine_dp | |
FlowMachine_m_flow | |
ControlledFlowMachineDynamic | |
ControlledFlowMachine | |
FlowMachine | |
BaseClasses | Package with base classes for Buildings.Fluid.Movers.Examples |
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow (Base class to test flow machines with zero flow rate).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | 500 | Nominal pressure difference [Pa] |
model FlowMachine_y import Buildings; extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow( gain(k=1), redeclare Buildings.Fluid.Movers.FlowMachine_y floMacSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, redeclare function flowCharacteristic = Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow ( V_flow_nominal={0,m_flow_nominal,2*m_flow_nominal}/1.2, dp_nominal={ 2*dp_nominal,dp_nominal,0})), redeclare Buildings.Fluid.Movers.FlowMachine_y floMacDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, redeclare function flowCharacteristic = Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow ( V_flow_nominal={0,m_flow_nominal,2*m_flow_nominal}/1.2, dp_nominal={ 2*dp_nominal,dp_nominal,0}))); equationconnect(gain.y, floMacDyn.y); connect(gain.y, floMacSta.y); end FlowMachine_y;
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow (Base class to test flow machines with zero flow rate).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | 500 | Nominal pressure difference [Pa] |
model FlowMachine_Nrpm import Buildings; extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow( gain(k=1500), redeclare Buildings.Fluid.Movers.FlowMachine_Nrpm floMacSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, redeclare function flowCharacteristic = Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow ( V_flow_nominal={0,m_flow_nominal,2*m_flow_nominal}/1.2, dp_nominal={ 2*dp_nominal,dp_nominal,0})), redeclare Buildings.Fluid.Movers.FlowMachine_Nrpm floMacDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, redeclare function flowCharacteristic = Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow ( V_flow_nominal={0,m_flow_nominal,2*m_flow_nominal}/1.2, dp_nominal={ 2*dp_nominal,dp_nominal,0}))); equationconnect(gain.y, floMacSta.Nrpm); connect(gain.y, floMacDyn.Nrpm); end FlowMachine_Nrpm;
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow (Base class to test flow machines with zero flow rate).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | 500 | Nominal pressure difference [Pa] |
model FlowMachine_dp import Buildings; extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow( gain(k=dp_nominal), redeclare Buildings.Fluid.Movers.FlowMachine_dp floMacSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal), redeclare Buildings.Fluid.Movers.FlowMachine_dp floMacDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal)); equationconnect(gain.y, floMacSta.dp_in); connect(gain.y, floMacDyn.dp_in); end FlowMachine_dp;
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow (Base class to test flow machines with zero flow rate).
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | 500 | Nominal pressure difference [Pa] |
model FlowMachine_m_flow import Buildings; extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.FlowMachine_ZeroFlow( gain(k=m_flow_nominal), redeclare Buildings.Fluid.Movers.FlowMachine_m_flow floMacSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal), redeclare Buildings.Fluid.Movers.FlowMachine_m_flow floMacDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal)); equationconnect(gain.y, floMacSta.m_flow_in); connect(gain.y, floMacDyn.m_flow_in); end FlowMachine_m_flow;
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.ControlledFlowMachine.
model ControlledFlowMachineDynamic extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.ControlledFlowMachine( fan4(dynamicBalance=true), fan1(dynamicBalance=true), fan2(dynamicBalance=true), fan3(dynamicBalance=true));end ControlledFlowMachineDynamic;
addPowerToMedium=false
since otherwise,
Dymola computes the enthalpy change of the component as a fraction (k*m_flow+P_internal)/m_flow
which leads to an error because of 0/0
at zero flow rate.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Movers.Examples.BaseClasses.ControlledFlowMachine.
model ControlledFlowMachine import Buildings; extends Modelica.Icons.Example; extends Buildings.Fluid.Movers.Examples.BaseClasses.ControlledFlowMachine( fan4(addPowerToMedium=false), fan1(addPowerToMedium=false), fan2(addPowerToMedium=false), fan3(addPowerToMedium=false));end ControlledFlowMachine;
model FlowMachine extends Modelica.Icons.Example; import Buildings; package Medium = Buildings.Media.IdealGases.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; equationconnect(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;