Buildings.Experimental.DHC.Loads.Steam.BaseClasses.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.Experimental.DHC.Loads.Steam.BaseClasses.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ControlVolumeCondensation ControlVolumeCondensation Example model for heat transfer with the condensation control volume
Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.SteamTrap SteamTrap Example model to demonstrate the steam trap
Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ValveSelfActing ValveSelfActing Example model for self-acting steam valve with a noisy inlet pressure input

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ControlVolumeCondensation Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ControlVolumeCondensation

Example model for heat transfer with the condensation control volume

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ControlVolumeCondensation

Information

This model demonstrates the use of the control volume with condensation. The dynamic volume includes heat conduction to the ambient while the steady volume heat balance is only dependent on the mass flow rate.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ControlVolumeCondensation "Example model for heat transfer with the condensation control volume" extends Modelica.Icons.Example; package MediumSte = Buildings.Media.Steam ( T_default=273.15+180, p_default=1e6) "Steam medium - Medium model for port_a (inlet)"; package MediumWat = Buildings.Media.Specialized.Water.TemperatureDependentDensity "Water medium - Medium model for port_b (outlet)"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.ControlVolumeCondensation volDyn( V=1, redeclare package MediumWat = MediumWat, redeclare package MediumSte = MediumSte, m_flow_nominal=0.01, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, allowFlowReversal=true) "Dynamic volume"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.ControlVolumeCondensation volSte( V=1, redeclare package MediumWat = MediumWat, redeclare package MediumSte = MediumSte, m_flow_nominal=0.01, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, allowFlowReversal=true) "Steady volume"; Modelica.Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = MediumSte, use_m_flow_in=true, T=453.15, nPorts=1) "Flow source"; Modelica.Fluid.Sources.MassFlowSource_T sou1( redeclare package Medium = MediumSte, use_m_flow_in=true, T=453.15, nPorts=1) "Flow source"; Modelica.Fluid.Sources.FixedBoundary bou( redeclare package Medium = MediumWat, p=volDyn.p_start, T=293.15, nPorts=2) "Boundary condition"; Modelica.Blocks.Sources.Ramp ramp( duration=1, offset=2, height=-1) "Ramp signal"; Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo "Heat flow sensor"; Modelica.Blocks.Sources.Constant const(k=-10000) "Heat loss"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo "Prescribed heat flow rate"; equation connect(sou.ports[1], volDyn.port_a); connect(volDyn.port_b, bou.ports[1]); connect(preHeaFlo.port,heaFlo. port_a); connect(preHeaFlo.Q_flow,const. y); connect(heaFlo.port_b, volDyn.heatPort); connect(sou1.ports[1], volSte.port_a); connect(ramp.y, sou.m_flow_in); connect(ramp.y, sou1.m_flow_in); connect(volSte.port_b, bou.ports[2]); end ControlVolumeCondensation;

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.SteamTrap Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.SteamTrap

Example model to demonstrate the steam trap

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.SteamTrap

Information

This example model demonstrates the performance of the steam trap with a ramped mass flow rate.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureTSatHig273.15 + 110High pressure saturation temperature [K]
TemperatureTSatLow273.15 + 100Low pressure saturation temperature [K]
AbsolutePressurepSat143380Saturation pressure [Pa]
PressureDifferencedppSat - 101325Prescribed pressure change [Pa]
MassFlowRatem_flow_nominal10Nominal mass flow rate [kg/s]

Modelica definition

model SteamTrap "Example model to demonstrate the steam trap" extends Modelica.Icons.Example; package MediumWat = Buildings.Media.Water "Water medium"; parameter Modelica.Units.SI.Temperature TSatHig=273.15+110 "High pressure saturation temperature"; parameter Modelica.Units.SI.Temperature TSatLow=273.15+100 "Low pressure saturation temperature"; parameter Modelica.Units.SI.AbsolutePressure pSat=143380 "Saturation pressure"; parameter Modelica.Units.SI.PressureDifference dp=pSat-101325 "Prescribed pressure change"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=10 "Nominal mass flow rate"; Modelica.Blocks.Sources.Ramp ram( height=m_flow_nominal, duration(displayUnit="min") = 60, startTime(displayUnit="min") = 60) "Ramp"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = MediumWat, p=pSat, T=TSatHig, nPorts=1) "Source"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = MediumWat, p=pSat - dp, T=TSatLow, nPorts=1) "Sink"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.SteamTrap steTra( redeclare package Medium = MediumWat, m_flow_nominal=m_flow_nominal, show_T=true) "Steam trap"; Buildings.Fluid.Movers.FlowControlled_m_flow pum( redeclare package Medium = MediumWat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=m_flow_nominal, nominalValuesDefineDefaultPressureCurve=true) "Pump"; Fluid.Sensors.SpecificEnthalpyTwoPort hIn( redeclare package Medium = MediumWat, m_flow_nominal=m_flow_nominal) "Inflowing specific enthalpy"; Fluid.Sensors.SpecificEnthalpyTwoPort hOut( redeclare package Medium = MediumWat, m_flow_nominal=m_flow_nominal) "Outflowing specific enthalpy"; equation connect(pum.port_b, sin.ports[1]); connect(ram.y, pum.m_flow_in); connect(sou.ports[1], hIn.port_a); connect(hIn.port_b, steTra.port_a); connect(steTra.port_b, hOut.port_a); connect(hOut.port_b, pum.port_a); end SteamTrap;

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ValveSelfActing Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ValveSelfActing

Example model for self-acting steam valve with a noisy inlet pressure input

Buildings.Experimental.DHC.Loads.Steam.BaseClasses.Examples.ValveSelfActing

Information

This example model demonstrates the performance of self-acting steam pressure regulator with a noisy/varying inlet pressure signal. The inlet pressure conditions are selected to demonstrate how the downstream pressure is maintained at the setpoint, unless the inlet pressure drops below the setpoint (pressure drop is then zero).

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal1Nominal mass flow rate [kg/s]

Modelica definition

model ValveSelfActing "Example model for self-acting steam valve with a noisy inlet pressure input" extends Modelica.Icons.Example; package MediumSte = Buildings.Media.Steam(p_default=400000, T_default=273.15+143.61, h_default=2738100) "Medium model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1 "Nominal mass flow rate"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.ValveSelfActing prv( redeclare final package Medium = MediumSte, m_flow_nominal=m_flow_nominal, show_T=true, pb_nominal=300000, dp_start(displayUnit="Pa")) "Self acting pressure reducing valve"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare final package Medium = MediumSte, use_p_in=true, p(displayUnit="Pa"), T(displayUnit="K") = MediumSte.saturationTemperature(sou.p), nPorts=1) "Source"; Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort speEntIn( redeclare final package Medium = MediumSte, m_flow_nominal=m_flow_nominal) "Upstream specific enthalpy"; Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort speEntOut( redeclare final package Medium = MediumSte, m_flow_nominal=m_flow_nominal) "Downstream specific enthalpy"; Modelica.Blocks.Noise.UniformNoise pInSig( samplePeriod(displayUnit="s") = 1, y_min=500000 + 200000, y_max=500000 - 200000) "Noisy signal for inlet pressure"; Fluid.Sources.Boundary_pT sin( redeclare final package Medium = MediumSte, p=200000, T=MediumSte.saturationTemperature(sin.p), nPorts=1) "Sink"; Fluid.FixedResistances.PressureDrop res( redeclare final package Medium = MediumSte, m_flow_nominal=m_flow_nominal, dp_nominal=1000) "Pressure drop"; inner Modelica.Blocks.Noise.GlobalSeed globalSeed "Setting for sublibrary noise"; equation connect(sou.ports[1], speEntIn.port_a); connect(speEntIn.port_b, prv.port_a); connect(prv.port_b, speEntOut.port_a); connect(pInSig.y, sou.p_in); connect(sin.ports[1], res.port_b); connect(res.port_a, speEntOut.port_b); end ValveSelfActing;