This model represents an instantaneously mixed volume. Potential
and kinetic energy at the port are neglected, and there is no
pressure drop at the ports. The volume can exchange heat through
its heatPort
.
The volume can be parameterized as a steady-state model or as dynamic model.
To increase the numerical robustness of the model, the constant
prescribedHeatFlowRate
can be set by the user. This
constant only has an effect if the model has exactly two fluid
ports connected, and if it is used as a steady-state model. Use the
following settings:
prescribedHeatFlowRate=true
if the only
means of heat transfer at the heatPort
is a prescribed
heat flow rate that is not a function of the temperature
difference between the medium and an ambient temperature. Examples
include an ideal electrical heater, a pump that rejects heat into
the fluid stream, or a chiller that removes heat based on a
performance curve. If the heatPort
is not connected,
then set prescribedHeatFlowRate=true
as in this case,
heatPort.Q_flow=0
.prescribedHeatFlowRate=false
if there is heat
flow at the heatPort
computed as K *
(T-heatPort.T), for some temperature T and some
conductance K, which may itself be a function of temperature
or mass flow rate.prescribedHeatFlowRate=false
.The parameter mSenFac
can be used to increase the
thermal mass of this model without increasing its volume. This way,
species concentrations are still calculated correctly even though
the thermal mass increases. The additional thermal mass is
calculated based on the density and the value of the function
HeatCapacityCp
of the medium state
state_default
.
This parameter can for instance be useful in a pipe model when the
developer wants to lump the pipe thermal mass to the fluid volume.
By default mSenFac = 1
, hence the mass is unchanged.
For higher values of mSenFac
, the mass will be scaled
proportionally.
Set the parameter use_C_flow = true
to enable an
input connector for the trace substance flow rate. This allows to
directly add or subtract trace substances such as CO2 to the
volume. See Buildings.Fluid.Sensors.Examples.PPM
for an example.
If the model is operated in steady-state and has two fluid ports
connected, then the same energy and mass balance implementation is
used as in steady-state component models, i.e., the use of
actualStream
is not used for the properties at the
port.
The implementation of these balance equations is done in the
instances dynBal
for the dynamic balance and
steBal
for the steady-state balance. Both models use
the same input variables:
Q_flow
is used to add sensible
and latent heat to the fluid. For example,
Q_flow
participates in the steady-state energy balance
port_b.h_outflow = inStream(port_a.h_outflow) + Q_flow * m_flowInv;where
m_flowInv
approximates the expression
1/m_flow
.mXi_flow
is used to add a species
mass flow rate to the fluid.For the rationale of selecting different energy and mass
balances, and for the use of prescribedHeatFlowRate
,
see the documentation of
Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolume.
For simple models that uses this model, see Buildings.Fluid.HeatExchangers.HeaterCooler_u and Buildings.Fluid.Humidifiers.Humidifier_u.
initialize_p
to final
so that it does
not appear as a user-selectable parameter. This is done because
initialize_p
has been changed from a
constant
to a parameter
for Buildings,
issue 1013.QSen_flow
and
QLat_flow
.protected
block masExc
as this
revision introduces a conditional connector for the moisture flow
rate in the energy and mass balance models. This change was done to
use the same modeling concept for the moisture input as is used for
the trace substance input.C_flow
.final
keyword for masExc(final k=0)
.
This addresses issue
230.Buildings.Fluid.Interfaces
.medium
as this is already used in
dynBal
. Removing the base properties led to 30% faster
computing time for a solar thermal system that contains many fluid
volumes.medium
the parameter
assignment preferredMediumStates=true
to
preferredMediumStates= not (energyDynamics ==
Modelica.Fluid.Types.Dynamics.SteadyState)
. Otherwise, for a
steady-state model, Dymola 2012 may differentiate the model to
obtain T
as a state. See ticket Dynasim #13596.actualStream(...)
, the
inStream(...)
formulation is used. This changed
required the introduction of a new parameter
m_flow_nominal
which is used for smoothing in the
steady-state balance equations of the model with two fluid
ports.use_HeatTransfer
as there is no noticeable overhead in
always having the heatPort
connector present.mC
to avoid wrong trajectory
when concentration is around 1E-7. See also https://trac.modelica.org/Modelica/ticket/393.PartialLumpedVessel
.