modelThermostatic3WayValve
Extends from BaseClasses.Partial3WayValve (Partial for 3-way valves).
Information
This model provides an ideal implementation of a thermostatic three way valve. The mass flow rates are adjusted so that the desired temperature is reached as close as possible. Pressure drops are not considered.
Main equations
Water with enthalpy h needs to be mixed such that:
h_out = k * h_in1 + (1-k) * h_in2
this equation defines the mass flow rates:
m_flow_in1 = k * m_flow_out
m_flow_in2 = (1-k) * m_flow_out
Assumptions and limitations
No pressure drops are calculated by this model!
Ideally h_out equals h_set, the enthalpy corresponding to the temperature setpoint. However, if the desired temperature can not be reached through mixing then water from only one stream is used: the stream with the temperature closest to the desired temperature.
The model is not exact around h_in1 = h_in2. Regularization functions are used to ensure smooth behaviour through this transition and to avoid chattering.
Typical use and important parameters
- The parameter m sets the mass of the fluid contained by the valve.
- Parameter dT_nominal sets the nominal temperature difference of the inlet ports. It provides an estimate for when to start regularization: when the temperature difference across the inlet ports is smaller than dT/10. Small dT_nominal values may lead to convergence errors, large dT_nominal values cause a greater error when the inlet temperatures are almost equal.
Options
- Typical options inherited through lumpedVolumeDeclarations can be used.
- A delayed valve opening can be simulated by setting dynamicValve tot true.
- The minimum and maximum valve opening can be adjusted.
Validation
Only verification was performed.
Examples of this model can be found in IDEAS.Thermal.Components.Examples.TempMixingTester and IDEAS.Thermal.Components.Examples.RadiatorWithMixingValve
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | l (from Partial3WayValve) | 0.001 | Valve leakage, minimum fraction of flow rate passing through ports a |
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from Partial3WayValve) | Nominal mass flow rate | |
| Boolean | allowFlowReversal (from Partial3WayValve) | true | = true to allow flow reversal |
| Modelica.Units.SI.Mass | m (from Partial3WayValve) | m_flow_nominal*tau | Fluid content of the mixing valve |
| Modelica.Units.SI.TemperatureDifference | dT_nominal | 50 | Nominal/maximum temperature difference between inlet ports, used for regularization |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from LumpedVolumeDeclarations) | fill(0, Medium.nC) | Start value of trace substances |
| Medium.ExtraProperty[Medium.nC] | C_nominal (from LumpedVolumeDeclarations) | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Dynamics | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Dynamics › Filter | |||
| Real | tau (from Partial3WayValve) | 1 | Thermal time constant |
| Boolean | dynamicValve | false | Set to true to simulate a valve opening delay: typically slower but more robust |
| Real | y_start | 0 | Initial valve opening |
| Advanced | |||
| Real | y_min | 0.001 | Minimum valve opening/leakage |
| Real | y_max | 0.999 | Maximum valve opening/leakage |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a1 (from Partial3WayValve) | First fluid inlet | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a2 (from Partial3WayValve) | Second fluid inlet | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from Partial3WayValve) | Fluid outlet | |
| Modelica.Blocks.Interfaces.RealInput | TMixedSet | Mixed outlet temperature setpoint |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| IDEAS.Fluid.MixingVolumes.MixingVolume | vol (from Partial3WayValve) | ||
| IDEAS.Fluid.Interfaces.IdealSource | idealSource (from Partial3WayValve) | ||
| Modelica.Blocks.Sources.RealExpression | realExpression | Fraction of nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m_flow_a2 | mass flowrate of part_a2 to the mixing point |
Revisions
-
November 7, 20024, by Jelger Jansen:
Change unit of parameterdT_nominaltoModelica.Units.SI.TemperatureDifference. See #1390. -
May 15, 2018, by Filip Jorissen:
Changes for setting unique initial conditions. -
October 2014, by Filip Jorissen:
Added parameter for regularization range. - October 2014, by Filip Jorissen:
Regularized implementation and documentation. -
May, 2014, by Filip Jorissen:
Both legs can be hot or cold. -
March, 2014, by Filip Jorissen:
Annex60 compatibility. -
May, 2013, by Roel De Coninck:
Documentation. -
March, 2013, by Ruben Baetens:
Graphics. -
2010, by Roel De Coninck:
First version.