Buildings.Fluid.Movers.Validation.BaseClasses

Package with base classes for Buildings.Fluid.Movers.Validation

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.Movers.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.Movers.Validation.BaseClasses.ComparePower ComparePower Base class for validation models that compare power estimation methods
Buildings.Fluid.Movers.Validation.BaseClasses.ControlledFlowMachine ControlledFlowMachine  
Buildings.Fluid.Movers.Validation.BaseClasses.FlowMachine_ZeroFlow FlowMachine_ZeroFlow Base class to test flow machines with zero flow rate

Buildings.Fluid.Movers.Validation.BaseClasses.ComparePower

Base class for validation models that compare power estimation methods

Buildings.Fluid.Movers.Validation.BaseClasses.ComparePower

Information

This is the base class for a number of validation models that compare power computation of different mover model configurations.

Parameters

TypeNameDefaultDescription
Genericperredeclare parameter Building...Performance records
MassFlowRatem_flow_nominalper.peak.V_flow*rho_defaultNominal mass flow rate [kg/s]
PressureDifferencedp_nominalper.peak.dpNominal pressure drop [Pa]
PartialFlowMachinemov1redeclare Buildings.Fluid.Mo...Mover (fan or pump)
PartialFlowMachinemov2redeclare Buildings.Fluid.Mo...Mover (fan or pump)
PartialFlowMachinemov3redeclare Buildings.Fluid.Mo...Mover (fan or pump)

Modelica definition

model ComparePower "Base class for validation models that compare power estimation methods" package Medium = Buildings.Media.Water "Medium model"; replaceable parameter Buildings.Fluid.Movers.Data.Generic per constrainedby Buildings.Fluid.Movers.Data.Generic "Performance records"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal = per.peak.V_flow * rho_default "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal = per.peak.dp "Nominal pressure drop"; final parameter Modelica.Units.SI.Density rho_default= Medium.density_pTX( p=Medium.p_default, T=Medium.T_default, X=Medium.X_default) "Default medium density"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine mov1 constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine "Mover (fan or pump)"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine mov2 constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine "Mover (fan or pump)"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine mov3 constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine "Mover (fan or pump)"; Buildings.Fluid.Actuators.Dampers.Exponential damExp1( redeclare final package Medium = Medium, final m_flow_nominal=m_flow_nominal, use_strokeTime=false, final dpDamper_nominal=dp_nominal/2, y_start=1, final dpFixed_nominal=dp_nominal/2) "Damper"; Buildings.Fluid.Actuators.Dampers.Exponential damExp2( redeclare final package Medium = Medium, final m_flow_nominal=m_flow_nominal, use_strokeTime=false, final dpDamper_nominal=dp_nominal/2, y_start=1, final dpFixed_nominal=dp_nominal/2) "Damper"; Buildings.Fluid.Actuators.Dampers.Exponential damExp3( redeclare final package Medium = Medium, final m_flow_nominal=m_flow_nominal, use_strokeTime=false, final dpDamper_nominal=dp_nominal/2, y_start=1, final dpFixed_nominal=dp_nominal/2) "Damper"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare final package Medium = Medium, nPorts=3) "Source"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare final package Medium = Medium, nPorts=3) "Sink"; Modelica.Blocks.Sources.Ramp ramSpe( height=1, duration=60, startTime=20) "Ramp signal for mover speed"; Modelica.Blocks.Sources.Ramp ramDam( height=-1, duration=60, offset=1, startTime=120) "Ramp signal for damper position"; equation connect(sou.ports[1], mov1.port_a); connect(sou.ports[2], mov2.port_a); connect(sou.ports[3], mov3.port_a); connect(damExp1.port_b, sin.ports[1]); connect(ramDam.y, damExp1.y); connect(mov2.port_b, damExp2.port_a); connect(damExp2.port_b, sin.ports[2]); connect(mov3.port_b, damExp3.port_a); connect(damExp3.port_b, sin.ports[3]); connect(ramDam.y, damExp2.y); connect(ramDam.y, damExp3.y); connect(mov1.port_b, damExp1.port_a); end ComparePower;

Buildings.Fluid.Movers.Validation.BaseClasses.ControlledFlowMachine


Buildings.Fluid.Movers.Validation.BaseClasses.ControlledFlowMachine

Information

This example demonstrates the use of the flow model with four different configuration. At steady-state, all flow models have the same mass flow rate and pressure difference.

Parameters

TypeNameDefaultDescription
SpeedControlled_yfan1fan1(redeclare package Mediu...Fan with normalized control input between 0 and 1
FlowControlled_dpfan3fan3(redeclare package Mediu...Fan with head as input
FlowControlled_m_flowfan2fan2(redeclare package Mediu...Fan with mass flow rate as input

Modelica definition

model ControlledFlowMachine package Medium = Buildings.Media.Air "Medium model"; Modelica.Blocks.Sources.Pulse y( startTime=0, offset=0, amplitude=1, period=120, width=50); Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, use_p_in=false, p=101325, T=293.15, nPorts=3); Buildings.Fluid.Sensors.MassFlowRate masFloRat1(redeclare package Medium = Medium); Buildings.Fluid.Sensors.RelativePressure relPre(redeclare package Medium = Medium); replaceable Buildings.Fluid.Movers.SpeedControlled_y fan1( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos32slash1to12 per) constrainedby Buildings.Fluid.Movers.SpeedControlled_y "Fan with normalized control input between 0 and 1"; Buildings.Fluid.FixedResistances.PressureDrop dp1( redeclare package Medium = Medium, from_dp=true, m_flow_nominal=0.006, dp_nominal=50000) "Pressure drop"; Buildings.Fluid.FixedResistances.PressureDrop dp2( redeclare package Medium = Medium, from_dp=true, m_flow_nominal=0.006, dp_nominal=50000) "Pressure drop"; Buildings.Fluid.Sensors.MassFlowRate masFloRat2( redeclare package Medium = Medium); Buildings.Fluid.FixedResistances.PressureDrop dp3( redeclare package Medium = Medium, from_dp=true, m_flow_nominal=0.006, dp_nominal=50000) "Pressure drop"; Buildings.Fluid.Sensors.MassFlowRate masFloRat3( redeclare package Medium = Medium); replaceable Buildings.Fluid.Movers.FlowControlled_dp fan3( redeclare package Medium = Medium, m_flow_nominal=6000/3600*1.2, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos32slash1to12 per) constrainedby Buildings.Fluid.Movers.FlowControlled_dp "Fan with head as input"; replaceable Buildings.Fluid.Movers.FlowControlled_m_flow fan2( redeclare package Medium = Medium, m_flow_nominal=6000/3600*1.2, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos32slash1to12 per) constrainedby Buildings.Fluid.Movers.FlowControlled_m_flow "Fan with mass flow rate as input"; Buildings.Fluid.FixedResistances.PressureDrop dp5( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300, from_dp=true) "Pressure drop"; Buildings.Fluid.FixedResistances.PressureDrop dp6( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300, from_dp=true) "Pressure drop"; Buildings.Fluid.FixedResistances.PressureDrop dp7( m_flow_nominal=6000/3600*1.2, redeclare package Medium = Medium, dp_nominal=300, from_dp=true) "Pressure drop"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_p_in=false, p=101325, T=293.15, nPorts=3); equation connect(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(masFloRat1.m_flow, fan2.m_flow_in); connect(relPre.p_rel, fan3.dp_in); connect(dp5.port_b, fan1.port_a); connect(dp6.port_b, fan2.port_a); connect(dp7.port_b, fan3.port_a); connect(y.y, fan1.y); connect(dp5.port_a, sou.ports[1]); connect(dp6.port_a, sou.ports[2]); connect(dp7.port_a, sou.ports[3]); connect(dp1.port_b, masFloRat1.port_a); connect(dp2.port_b, masFloRat2.port_a); connect(dp3.port_b, masFloRat3.port_a); connect(masFloRat1.port_b, sin.ports[1]); connect(masFloRat2.port_b, sin.ports[2]); connect(masFloRat3.port_b, sin.ports[3]); end ControlledFlowMachine;

Buildings.Fluid.Movers.Validation.BaseClasses.FlowMachine_ZeroFlow

Base class to test flow machines with zero flow rate

Buildings.Fluid.Movers.Validation.BaseClasses.FlowMachine_ZeroFlow

Information

This is the base class for examples that demonstrates the use of a flow machine whose flow rate transitions to zero.

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.AirMedium model
MassFlowRatem_flow_nominal1Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal500Nominal pressure difference [Pa]
PartialFlowMachinefloMacStaredeclare Buildings.Fluid.Mo...Static model of a flow machine
PartialFlowMachinefloMacDynredeclare Buildings.Fluid.Mo...Dynamic model of a flow machine

Connectors

TypeNameDescription
replaceable package MediumMedium model

Modelica definition

partial model FlowMachine_ZeroFlow "Base class to test flow machines with zero flow rate" replaceable package Medium = Buildings.Media.Air constrainedby Modelica.Media.Interfaces.PartialMedium "Medium model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1 "Nominal mass flow rate"; parameter Modelica.Units.SI.PressureDifference 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=101325, T=293.15, nPorts=4); Buildings.Fluid.FixedResistances.PressureDrop dpSta( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal/2) "Pressure drop"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine floMacSta constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Static model of a flow machine"; replaceable Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine floMacDyn constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Dynamic model of a flow machine"; Buildings.Fluid.FixedResistances.PressureDrop dpDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal/2) "Pressure drop"; Modelica.Blocks.Math.Gain gain "Gain for input signal"; Buildings.Fluid.FixedResistances.PressureDrop dpSta1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal/2) "Pressure drop"; Buildings.Fluid.FixedResistances.PressureDrop dpDyn1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=dp_nominal/2) "Pressure drop"; equation connect(floMacSta.port_b, dpSta.port_a); connect(y.y, gain.u); connect(floMacDyn.port_b, dpDyn.port_a); connect(dpSta1.port_b, floMacSta.port_a); connect(dpDyn1.port_b, floMacDyn.port_a); connect(dpSta1.port_a, sou.ports[1]); connect(dpDyn1.port_a, sou.ports[2]); connect(dpDyn.port_b, sou.ports[3]); connect(dpSta.port_b, sou.ports[4]); end FlowMachine_ZeroFlow;