Name | Description |
---|---|
FlowMachine_ZeroFlow | Base class to test flow machines with zero flow rate |
ControlledFlowMachine |
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | 500 | Nominal pressure difference [Pa] |
PartialFlowMachine | floMacSta | redeclare Buildings.Fluid.Mo... | Static model of a flow machine |
PartialFlowMachine | floMacDyn | redeclare Buildings.Fluid.Mo... | Dynamic model of a flow machine |
partial model FlowMachine_ZeroFlow "Base class to test flow machines with zero flow rate" import Buildings; package Medium = Buildings.Media.GasesPTDecoupled.MoistAirUnsaturated;inner Modelica.Fluid.System system; parameter Modelica.SIunits.MassFlowRate m_flow_nominal= 1 "Nominal mass flow rate"; parameter Modelica.SIunits.Pressure dp_nominal = 500 "Nominal pressure difference";Modelica.Blocks.Sources.Ramp y( offset=1, duration=0.5, startTime=0.25, height=-1) "Input signal"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=false, p=system.p_ambient, T=293.15, nPorts=4); Buildings.Fluid.FixedResistances.FixedResistanceDpM dpSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal) "Pressure drop"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine floMacSta( redeclare package Medium = Medium, dynamicBalance=false, m_flow_nominal=1) constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine "Static model of a flow machine"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine floMacDyn( redeclare package Medium = Medium, m_flow_nominal=1, dynamicBalance=true) constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine "Dynamic model of a flow machine"; Buildings.Fluid.FixedResistances.FixedResistanceDpM dpDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal) "Pressure drop"; Modelica.Blocks.Math.Gain gain "Gain for input signal"; equationconnect(floMacSta.port_b, dpSta.port_a); connect(y.y, gain.u); connect(sou.ports[1], floMacSta.port_a); connect(dpSta.port_b, sou.ports[2]); connect(sou.ports[3], floMacDyn.port_a); connect(floMacDyn.port_b, dpDyn.port_a); connect(dpDyn.port_b, sou.ports[4]); end FlowMachine_ZeroFlow;
model ControlledFlowMachine import Buildings; package Medium = Buildings.Media.IdealGases.SimpleAir;Modelica.Blocks.Sources.Trapezoid y( rising=0.1, width=0.1, falling=0.1, period=0.5, startTime=0, offset=0, amplitude=1); Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=false, p=system.p_ambient, T=293.15, nPorts=4); 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}), m_flow_nominal=6000/3600*1.2, dynamicBalance=false); FixedResistances.FixedResistanceDpM dp1( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; FixedResistances.FixedResistanceDpM dp2( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; Buildings.Fluid.Sensors.MassFlowRate masFloRat2(redeclare package Medium = Medium); FixedResistances.FixedResistanceDpM dp3( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; Buildings.Fluid.Sensors.MassFlowRate masFloRat3(redeclare package Medium = Medium); Buildings.Fluid.Movers.FlowMachine_dp fan3( redeclare package Medium = Medium, m_flow_nominal=6000/3600*1.2, dynamicBalance=false); Buildings.Fluid.Movers.FlowMachine_m_flow fan2( redeclare package Medium = Medium, m_flow_nominal=6000/3600*1.2, dynamicBalance=false); FixedResistances.FixedResistanceDpM dp4( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; Buildings.Fluid.Sensors.MassFlowRate masFloRat4(redeclare package Medium = Medium); Buildings.Fluid.Movers.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}), m_flow_nominal=6000/3600*1.2, dynamicBalance=false); Modelica.Blocks.Math.Gain gain(k=1500) "Converts y to nominal rpm"; FixedResistances.FixedResistanceDpM dp5( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; FixedResistances.FixedResistanceDpM dp6( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; FixedResistances.FixedResistanceDpM dp7( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; FixedResistances.FixedResistanceDpM dp8( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300) "Pressure drop"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_p_in=false, p=system.p_ambient, T=293.15, nPorts=4); Modelica.Blocks.Nonlinear.Limiter limiter(uMax=1, uMin=0); equationconnect(fan1.port_a, relPre.port_b); connect(fan1.port_b, relPre.port_a); connect(fan1.port_b, dp1.port_a); connect(fan2.port_b, dp2.port_a); connect(fan3.port_b, dp3.port_a); connect(fan4.port_b, dp4.port_a); connect(gain.y, fan4.Nrpm); connect(masFloRat1.m_flow, fan2.m_flow_in); connect(relPre.p_rel, fan3.dp_in); connect(sou.ports[1], masFloRat4.port_a); connect(sou.ports[2], masFloRat1.port_a); connect(sou.ports[3], masFloRat2.port_a); connect(sou.ports[4], masFloRat3.port_a); connect(dp4.port_b, sin.ports[1]); connect(dp1.port_b, sin.ports[2]); connect(dp2.port_b, sin.ports[3]); connect(dp3.port_b, sin.ports[4]); connect(masFloRat4.port_b, dp8.port_a); connect(dp8.port_b, fan4.port_a); connect(masFloRat1.port_b, dp5.port_a); connect(dp5.port_b, fan1.port_a); connect(masFloRat2.port_b, dp6.port_a); connect(dp6.port_b, fan2.port_a); connect(masFloRat3.port_b, dp7.port_a); connect(dp7.port_b, fan3.port_a); connect(y.y, limiter.u); connect(limiter.y, fan1.y); connect(limiter.y, gain.u); end ControlledFlowMachine;