Interface classes
Information
This package contains interface classes.
Extends from Modelica.Icons.InterfacesPackage (Icon for packages containing interfaces).
Package Content
Name |
Description |
PartialController
|
Interface class for AHU controller |
PartialControllerVAVMultizone
|
Interface class for multiple-zone VAV controller |
PartialHeatRecovery
|
Interface class for heat recovery |
PartialOutdoorReliefReturnSection
|
Interface class for outdoor/relief/return air section |
PartialOutdoorSection
|
Interface class for outdoor air section |
PartialOutdoorSectionDedicatedDampers
|
Base class for modeling separate dampers for ventilation and economizer |
PartialReliefReturnSection
|
Interface class for relief/return air section |
Interface class for AHU controller
Information
This partial class provides a standard interface for air handler controllers.
Parameters
Type | Name | Default | Description |
Integer | nZon | | Number of served zones |
Fan | typFanSup | | Type of supply fan |
Fan | typFanRel | | Type of relief fan |
Fan | typFanRet | | Type of return fan |
Integer | nFanSup | | Number of supply fans |
Integer | nFanRel | | Number of relief fans |
Integer | nFanRet | | Number of return fans |
PartialController | dat | dat(final typ=typ, final typ... | Design and operating parameters |
Configuration |
Controller | typ | | Type of controller |
Connectors
Type | Name | Description |
Bus | bus | AHU control bus |
Bus | busTer[nZon] | Terminal unit control bus |
Modelica definition
Interface class for multiple-zone VAV controller
Information
This partial class provides a standard interface for multiple-zone VAV controllers.
Extends from Buildings.Templates.AirHandlersFans.Components.Interfaces.PartialController (Interface class for AHU controller).
Parameters
Type | Name | Default | Description |
Integer | nZon | | Number of served zones |
Fan | typFanSup | | Type of supply fan |
Fan | typFanRel | | Type of relief fan |
Fan | typFanRet | | Type of return fan |
Integer | nFanSup | | Number of supply fans |
Integer | nFanRel | | Number of relief fans |
Integer | nFanRet | | Number of return fans |
Boolean | have_frePro | true | Set to true to include freeze protection |
FreezeStat | typFreSta | Buildings.Controls.OBC.ASHRA... | Option for low limit (freeze) protection |
Configuration |
Controller | typ | | Type of controller |
ControlFanReturn | typCtlFanRet | Buildings.Templates.AirHandl... | Return fan control type |
Boolean | have_CO2Sen | false | Set to true if there are zones with CO2 sensor |
Economizer |
ControlEconomizer | typCtlEco | Buildings.Controls.OBC.ASHRA... | Economizer control type |
Boolean | use_TMix | true | Set to true if mixed air temperature measurement is enabled |
Connectors
Type | Name | Description |
Bus | bus | AHU control bus |
Bus | busTer[nZon] | Terminal unit control bus |
Modelica definition
Interface class for heat recovery
Information
This class provides a standard interface for the
heat recovery unit of an air handler.
Parameters
Type | Name | Default | Description |
replaceable package MediumAir | Buildings.Media.Air | Air medium |
Configuration |
HeatRecovery | typ | | Equipment type |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
replaceable package MediumAir | Air medium |
Bus | bus | Control bus |
FluidPort_a | port_aOut | Outdoor air inlet |
FluidPort_b | port_bOut | Outdoor air outlet |
FluidPort_a | port_aRel | Relief/exhaust air inlet |
FluidPort_b | port_bRel | Relief/exhaust air outlet |
Modelica definition
partial model PartialHeatRecovery
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Buildings.Templates.AirHandlersFans.Types.HeatRecovery typ
;
parameter Boolean allowFlowReversal = true
;
Buildings.Templates.AirHandlersFans.Interfaces.Bus bus
if typ <> Buildings.Templates.AirHandlersFans.Types.HeatRecovery.None
;
Modelica.Fluid.Interfaces.FluidPort_a port_aOut(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.HeatRecovery.None
;
Modelica.Fluid.Interfaces.FluidPort_b port_bOut(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.HeatRecovery.None
;
Modelica.Fluid.Interfaces.FluidPort_a port_aRel(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.HeatRecovery.None
;
Modelica.Fluid.Interfaces.FluidPort_b port_bRel(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.HeatRecovery.None
;
end PartialHeatRecovery;
Interface class for outdoor/relief/return air section
Information
This class provides a standard interface for the outdoor/relief/return
air section of an air handler.
Typical components in that section include
-
shut off dampers,
-
the heat recovery unit,
-
the air economizer,
-
the relief or return fan.
Parameters
Type | Name | Default | Description |
replaceable package MediumAir | Buildings.Media.Air | Air medium |
Integer | nFanRet | | Number of return fans |
Integer | nFanRel | | Number of relief fans |
OutdoorReliefReturnSection | dat | dat(final typDamOut=typDamOu... | Design and operating parameters |
Configuration |
OutdoorReliefReturnSection | typ | | Outdoor/relief/return air section type |
OutdoorAirSection | typSecOut | | Outdoor air section type |
ReliefReturnSection | typSecRel | | Relief/return air section type |
Damper | typDamOut | | Outdoor air damper type |
Damper | typDamOutMin | | Minimum outdoor air damper type |
Damper | typDamRel | | Relief damper type |
Damper | typDamRet | | Return damper type |
Fan | typFanRel | | Relief fan type |
Fan | typFanRet | | Return fan type |
Boolean | have_eco | | Set to true in case of economizer function |
Boolean | have_recHea | false | Set to true in case of heat recovery |
ControlFanReturn | typCtlFanRet | Buildings.Templates.AirHandl... | Return fan control type |
ControlEconomizer | typCtlEco | Buildings.Controls.OBC.ASHRA... | Economizer control type |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
replaceable package MediumAir | Air medium |
FluidPort_b | port_Rel | Relief (exhaust) air |
FluidPort_a | port_Out | Outdoor air intake |
FluidPort_b | port_Sup | Supply air |
FluidPort_a | port_Ret | Return air |
FluidPort_b | port_bPre | Optional fluid connector for differential pressure sensor |
Bus | bus | Control bus |
Modelica definition
partial model PartialOutdoorReliefReturnSection
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Buildings.Templates.AirHandlersFans.Types.OutdoorReliefReturnSection
typ
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection typSecOut
;
parameter Buildings.Templates.AirHandlersFans.Types.ReliefReturnSection typSecRel
;
parameter Buildings.Templates.Components.Types.Damper typDamOut
;
parameter Buildings.Templates.Components.Types.Damper typDamOutMin
;
parameter Buildings.Templates.Components.Types.Damper typDamRel
;
parameter Buildings.Templates.Components.Types.Damper typDamRet
;
parameter Buildings.Templates.Components.Types.Fan typFanRel
;
parameter Buildings.Templates.Components.Types.Fan typFanRet
;
parameter Integer nFanRet(
start=
if typFanRet==Buildings.Templates.Components.Types.Fan.None
then 0
else 1)
;
parameter Integer nFanRel(
start=
if typFanRel==Buildings.Templates.Components.Types.Fan.None
then 0
else 1)
;
parameter Boolean have_eco
;
parameter Boolean have_recHea = false
;
parameter Buildings.Templates.AirHandlersFans.Types.ControlFanReturn typCtlFanRet=
Buildings.Templates.AirHandlersFans.Types.ControlFanReturn.AirflowMeasured
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer typCtlEco=
Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedDryBulb
;
parameter Buildings.Templates.AirHandlersFans.Components.Data.OutdoorReliefReturnSection
dat(
final typDamOut=typDamOut,
final typDamOutMin=typDamOutMin,
final typDamRet=typDamRet,
final typDamRel=typDamRel,
final typFanRel=typFanRel,
final typFanRet=typFanRet)
;
final parameter Modelica.Units.SI.MassFlowRate mAirSup_flow_nominal=
dat.damOut.m_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mAirRet_flow_nominal=
dat.damRet.m_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mOutMin_flow_nominal=
dat.mOutMin_flow_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpDamOut_nominal=
dat.damOut.dp_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpDamOutMin_nominal=
dat.damOutMin.dp_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpDamRel_nominal=
dat.damRel.dp_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpDamRet_nominal=
dat.damRet.dp_nominal
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=
Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
;
parameter Boolean allowFlowReversal = true
;
Modelica.Fluid.Interfaces.FluidPort_b port_Rel(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.OutdoorReliefReturnSection.MixedAirNoRelief
;
Modelica.Fluid.Interfaces.FluidPort_a port_Out(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_b port_Sup(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_a port_Ret(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_b port_bPre(
redeclare final package Medium =
MediumAir)
;
Buildings.Templates.AirHandlersFans.Interfaces.Bus bus ;
end PartialOutdoorReliefReturnSection;
Interface class for outdoor air section
Information
This class provides a standard interface for the outdoor
air section of an air handler.
Typical components in that section include
-
shut off OA dampers,
-
the OA side of the heat recovery unit,
-
the OA dampers of the air economizer.
Parameters
Type | Name | Default | Description |
replaceable package MediumAir | Buildings.Media.Air | Air medium |
Boolean | have_recHea | | Set to true in case of heat recovery |
ControlEconomizer | typCtlEco | | Economizer control type |
OutdoorReliefReturnSection | dat | | Design and operating parameters |
Configuration |
OutdoorAirSection | typ | | Outdoor air section type |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
replaceable package MediumAir | Air medium |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
FluidPort_a | port_aHeaRec | Optional fluid connector for heat recovery |
FluidPort_b | port_bHeaRec | Optional fluid connector for heat recovery |
Bus | bus | Control bus |
Modelica definition
partial model PartialOutdoorSection
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection typ
;
final parameter Buildings.Templates.Components.Types.Damper typDamOut=
if typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.SingleDamper
or typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
or typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
then Buildings.Templates.Components.Types.Damper.Modulating
else Buildings.Templates.Components.Types.Damper.None
;
final parameter Buildings.Templates.Components.Types.Damper typDamOutMin=
if typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.SingleDamper
then Buildings.Templates.Components.Types.Damper.None
elseif typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow
then Buildings.Templates.Components.Types.Damper.Modulating
elseif typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure
then Buildings.Templates.Components.Types.Damper.TwoPosition
else Buildings.Templates.Components.Types.Damper.None
;
parameter Boolean have_recHea
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer typCtlEco
;
parameter Buildings.Templates.AirHandlersFans.Components.Data.OutdoorReliefReturnSection
dat ;
final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=
dat.damOut.m_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mOutMin_flow_nominal=
dat.mOutMin_flow_nominal
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=
Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
;
parameter Boolean allowFlowReversal = true
;
Modelica.Fluid.Interfaces.FluidPort_a port_a(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_b port_b(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_a port_aHeaRec(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if have_recHea
;
Modelica.Fluid.Interfaces.FluidPort_b port_bHeaRec(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if have_recHea
;
Buildings.Templates.AirHandlersFans.Interfaces.Bus bus
;
end PartialOutdoorSection;
Base class for modeling separate dampers for ventilation and economizer
Information
This model represents a configuration with an air economizer and
minimum OA control with a separate minimum OA damper and airflow measurement.
Extends from Buildings.Templates.AirHandlersFans.Components.Interfaces.PartialOutdoorSection (Interface class for outdoor air section).
Parameters
Type | Name | Default | Description |
replaceable package MediumAir | Air | Air medium |
Boolean | have_recHea | | Set to true in case of heat recovery |
ControlEconomizer | typCtlEco | | Economizer control type |
OutdoorReliefReturnSection | dat | | Design and operating parameters |
Configuration |
OutdoorAirSection | typ | | Outdoor air section type |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
FluidPort_a | port_aHeaRec | Optional fluid connector for heat recovery |
FluidPort_b | port_bHeaRec | Optional fluid connector for heat recovery |
Bus | bus | Control bus |
Modelica definition
partial model PartialOutdoorSectionDedicatedDampers
extends Buildings.Templates.AirHandlersFans.Components.Interfaces.PartialOutdoorSection;
Buildings.Templates.Components.Actuators.Damper damOut(
redeclare final package Medium =
MediumAir,
final typ=typDamOut,
use_inputFilter=energyDynamics<>Modelica.Fluid.Types.Dynamics.SteadyState,
final allowFlowReversal=allowFlowReversal,
final dat=dat.damOut)
;
Buildings.Templates.Components.Actuators.Damper damOutMin(
redeclare final package Medium =
MediumAir,
final typ=typDamOutMin,
use_inputFilter=energyDynamics<>Modelica.Fluid.Types.Dynamics.SteadyState,
final allowFlowReversal=allowFlowReversal,
final dat=dat.damOutMin)
;
Buildings.Templates.Components.Sensors.Temperature TOut(
redeclare final package Medium =
MediumAir,
final allowFlowReversal=allowFlowReversal,
final have_sen=true,
final m_flow_nominal=mOutMin_flow_nominal)
;
Buildings.Templates.Components.Sensors.VolumeFlowRate VOutMin_flow(
redeclare final package Medium =
MediumAir,
final allowFlowReversal=allowFlowReversal,
final have_sen=typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersAirflow,
final m_flow_nominal=mOutMin_flow_nominal,
final typ=Buildings.Templates.Components.Types.SensorVolumeFlowRate.AFMS)
;
Buildings.Templates.Components.Sensors.SpecificEnthalpy hAirOut(
redeclare final package Medium =
MediumAir,
final allowFlowReversal=allowFlowReversal,
final have_sen=
typCtlEco==Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedEnthalpyWithFixedDryBulb
or
typCtlEco==Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialEnthalpyWithFixedDryBulb,
final m_flow_nominal=mOutMin_flow_nominal)
;
Buildings.Templates.Components.Sensors.DifferentialPressure dpAirOutMin(
redeclare final package Medium =
MediumAir,
final have_sen=typ==Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.DedicatedDampersPressure)
;
Buildings.Fluid.FixedResistances.Junction junInl(
redeclare final package Medium =
MediumAir,
final m_flow_nominal=m_flow_nominal*{1,-1,-1},
dp_nominal=
fill(0,3),
final energyDynamics=energyDynamics) ;
Fluid.FixedResistances.Junction junOut(
redeclare final package Medium =
MediumAir,
final m_flow_nominal=m_flow_nominal*{1,-1,1},
dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics) ;
equation
connect(damOut.bus, bus.damOut);
connect(damOutMin.bus, bus.damOutMin);
connect(TOut.y, bus.TOut);
connect(hAirOut.y, bus.hAirOut);
connect(VOutMin_flow.y, bus.VOutMin_flow);
connect(dpAirOutMin.y, bus.dpAirOutMin);
connect(TOut.port_b, VOutMin_flow.port_a);
connect(damOutMin.port_b, hAirOut.port_a);
connect(hAirOut.port_b, TOut.port_a);
connect(damOutMin.port_a, dpAirOutMin.port_a);
connect(dpAirOutMin.port_b, damOutMin.port_b);
connect(damOut.port_a, junInl.port_2);
connect(port_a, junInl.port_1);
connect(junInl.port_3, damOutMin.port_a);
connect(port_b, junOut.port_2);
connect(damOut.port_b, junOut.port_1);
connect(VOutMin_flow.port_b, junOut.port_3);
end PartialOutdoorSectionDedicatedDampers;
Interface class for relief/return air section
Information
This class provides a standard interface for the relief/return
air section of an air handler.
Typical components in that section include
-
shut off relief (or exhaust) air dampers,
-
the relief air side of the heat recovery unit,
-
the relief damper of the air economizer,
-
the relief or return fan.
Parameters
Type | Name | Default | Description |
replaceable package MediumAir | Buildings.Media.Air | Air medium |
Integer | nFanRet | | Number of return fans |
Integer | nFanRel | | Number of relief fans |
Boolean | have_recHea | | Set to true in case of heat recovery |
ControlFanReturn | typCtlFanRet | | Return fan control type |
ControlEconomizer | typCtlEco | | Economizer control type |
OutdoorReliefReturnSection | dat | | Design and operating parameters |
Configuration |
ReliefReturnSection | typ | | Relief/return air section type |
Damper | typDamRel | | Relief damper type |
Fan | typFanRel | | Relief fan type |
Fan | typFanRet | | Return fan type |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
replaceable package MediumAir | Air medium |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
FluidPort_a | port_aHeaRec | Optional fluid connector for heat recovery |
FluidPort_b | port_bHeaRec | Optional fluid connector for heat recovery |
FluidPort_b | port_bRet | Optional fluid connector for return branch |
FluidPort_b | port_bPre | Fluid connector for differential pressure sensor |
Bus | bus | Control bus |
Modelica definition
partial model PartialReliefReturnSection
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Buildings.Templates.AirHandlersFans.Types.ReliefReturnSection typ
;
parameter Buildings.Templates.Components.Types.Damper typDamRel
;
parameter Buildings.Templates.Components.Types.Fan typFanRel
;
parameter Buildings.Templates.Components.Types.Fan typFanRet
;
parameter Integer nFanRet(
start=
if typFanRet==Buildings.Templates.Components.Types.Fan.None
then 0
else 1)
;
parameter Integer nFanRel(
start=
if typFanRel==Buildings.Templates.Components.Types.Fan.None
then 0
else 1)
;
parameter Boolean have_recHea
;
parameter Buildings.Templates.AirHandlersFans.Types.ControlFanReturn typCtlFanRet
;
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer typCtlEco
;
parameter Buildings.Templates.AirHandlersFans.Components.Data.OutdoorReliefReturnSection
dat ;
final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=
if typFanRet <> Buildings.Templates.Components.Types.Fan.None
then dat.fanRet.m_flow_nominal
elseif typFanRel <> Buildings.Templates.Components.Types.Fan.None
then dat.fanRel.m_flow_nominal
elseif typDamRel <> Buildings.Templates.Components.Types.Damper.None
then dat.damRel.m_flow_nominal
else dat.damRet.m_flow_nominal
;
final parameter Modelica.Units.SI.PressureDifference dpFan_nominal=
if typFanRel <> Buildings.Templates.Components.Types.Fan.None
then
dat.fanRel.dp_nominal
elseif typFanRet <> Buildings.Templates.Components.Types.Fan.None
then
dat.fanRet.dp_nominal
else 0
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=
Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
;
parameter Boolean allowFlowReversal = true
;
Modelica.Fluid.Interfaces.FluidPort_a port_a(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
;
Modelica.Fluid.Interfaces.FluidPort_b port_b(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.ReliefReturnSection.NoRelief
;
Modelica.Fluid.Interfaces.FluidPort_a port_aHeaRec(
redeclare final package Medium =
MediumAir,
m_flow(min=
if allowFlowReversal
then -Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if have_recHea
;
Modelica.Fluid.Interfaces.FluidPort_b port_bHeaRec(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if have_recHea
;
Modelica.Fluid.Interfaces.FluidPort_b port_bRet(
redeclare final package Medium =
MediumAir,
m_flow(max=
if allowFlowReversal
then +Modelica.Constants.inf
else 0),
h_outflow(start=MediumAir.h_default, nominal=MediumAir.h_default))
if typ <> Buildings.Templates.AirHandlersFans.Types.ReliefReturnSection.NoReturn
;
Modelica.Fluid.Interfaces.FluidPort_b port_bPre(
redeclare final package Medium =
MediumAir)
;
Buildings.Templates.AirHandlersFans.Interfaces.Bus bus
;
Buildings.Fluid.FixedResistances.Junction splEco(
redeclare final package Medium =
MediumAir,
final m_flow_nominal={1,-1,-1}*m_flow_nominal,
final dp_nominal=
fill(0, 3),
final energyDynamics=energyDynamics,
final portFlowDirection_1=
if allowFlowReversal
then
Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Entering,
final portFlowDirection_2=
if allowFlowReversal
then
Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving,
final portFlowDirection_3=
if allowFlowReversal
then
Modelica.Fluid.Types.PortFlowDirection.Bidirectional
else Modelica.Fluid.Types.PortFlowDirection.Leaving)
;
Buildings.Templates.Components.Sensors.DifferentialPressure pAirRet_rel(
redeclare final package Medium =
MediumAir,
final have_sen=typFanRet<>Buildings.Templates.Components.Types.Fan.None
and
typCtlFanRet==Buildings.Templates.AirHandlersFans.Types.ControlFanReturn.BuildingPressure)
;
equation
connect(pAirRet_rel.y, bus.pAirRet_rel);
connect(splEco.port_3, port_bRet);
connect(pAirRet_rel.port_a, splEco.port_1);
connect(pAirRet_rel.port_b, port_bPre);
end PartialReliefReturnSection;