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 |
ControlVolumeCondensation
|
Example model for heat transfer with the condensation control volume |
SteamTrap
|
Example model to demonstrate the steam trap |
ValveSelfActing
|
Example model for self-acting steam valve with a noisy inlet pressure input |
Example model for heat transfer with the condensation control volume
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
extends Modelica.Icons.Example;
package MediumSte =
Buildings.Media.Steam (
T_default=273.15+180,
p_default=1e6)
;
package MediumWat =
Buildings.Media.Specialized.Water.TemperatureDependentDensity
;
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) ;
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) ;
Modelica.Fluid.Sources.MassFlowSource_T sou(
redeclare package Medium = MediumSte,
use_m_flow_in=true,
T=453.15,
nPorts=1) ;
Modelica.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = MediumSte,
use_m_flow_in=true,
T=453.15,
nPorts=1) ;
Modelica.Fluid.Sources.FixedBoundary bou(
redeclare package Medium = MediumWat,
p=volDyn.p_start,
T=293.15,
nPorts=2) ;
Modelica.Blocks.Sources.Ramp ramp(
duration=1,
offset=2,
height=-1) ;
Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo
;
Modelica.Blocks.Sources.Constant const(k=-10000) ;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo
;
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;
Example model to demonstrate the steam trap
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
Type | Name | Default | Description |
Temperature | TSatHig | 273.15 + 110 | High pressure saturation temperature [K] |
Temperature | TSatLow | 273.15 + 100 | Low pressure saturation temperature [K] |
AbsolutePressure | pSat | 143380 | Saturation pressure [Pa] |
PressureDifference | dp | pSat - 101325 | Prescribed pressure change [Pa] |
MassFlowRate | m_flow_nominal | 10 | Nominal mass flow rate [kg/s] |
Modelica definition
model SteamTrap
extends Modelica.Icons.Example;
package MediumWat =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Temperature TSatHig=273.15+110
;
parameter Modelica.Units.SI.Temperature TSatLow=273.15+100
;
parameter Modelica.Units.SI.AbsolutePressure pSat=143380
;
parameter Modelica.Units.SI.PressureDifference dp=pSat-101325
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=10
;
Modelica.Blocks.Sources.Ramp ram(
height=m_flow_nominal,
duration(displayUnit="min") = 60,
startTime(displayUnit="min") = 60)
;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = MediumWat,
p=pSat,
T=TSatHig,
nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = MediumWat,
p=pSat - dp,
T=TSatLow,
nPorts=1)
;
Buildings.Experimental.DHC.Loads.Steam.BaseClasses.SteamTrap steTra(
redeclare package Medium = MediumWat,
m_flow_nominal=m_flow_nominal,
show_T=true)
;
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)
;
Fluid.Sensors.SpecificEnthalpyTwoPort hIn(
redeclare package Medium = MediumWat,
m_flow_nominal=m_flow_nominal)
;
Fluid.Sensors.SpecificEnthalpyTwoPort hOut(
redeclare package Medium = MediumWat,
m_flow_nominal=m_flow_nominal)
;
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;
Example model for self-acting steam valve with a noisy inlet pressure input
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
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Modelica definition
model ValveSelfActing
extends Modelica.Icons.Example;
package MediumSte =
Buildings.Media.Steam(p_default=400000,
T_default=273.15+143.61,
h_default=2738100) ;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
;
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"))
;
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) ;
Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort speEntIn(
redeclare final package Medium = MediumSte,
m_flow_nominal=m_flow_nominal)
;
Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort speEntOut(
redeclare final package Medium = MediumSte,
m_flow_nominal=m_flow_nominal)
;
Modelica.Blocks.Noise.UniformNoise pInSig(
samplePeriod(displayUnit="s") = 1,
y_min=500000 + 200000,
y_max=500000 - 200000) ;
Fluid.Sources.Boundary_pT sin(
redeclare final package Medium = MediumSte,
p=200000,
T=
MediumSte.saturationTemperature(sin.p),
nPorts=1) ;
Fluid.FixedResistances.PressureDrop res(
redeclare final package Medium = MediumSte,
m_flow_nominal=m_flow_nominal,
dp_nominal=1000) ;
inner Modelica.Blocks.Noise.GlobalSeed globalSeed
;
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;