This package contains base classes that are used to construct the models in Buildings.Fluid.MixingVolumes.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
PartialMixingVolumeWaterPort | Partial mixing volume that allows adding or subtracting water vapor |
nP
ports and the ability
to store mass and energy. The volume is fixed.
This model represents the same physics as
Modelica.Fluid.Vessels.Volume but in addition,
it allows to connect signals for the water exchanged with the volume.
The model is partial in order to allow a submodel that can be used with media
that contain water as a substance, and a submodel that can be used with dry air.
Having separate models is required because calls to the medium property function
enthalpyOfLiquid
results in a linker error if a medium such as
Modelica.Media.Air.SimpleAir
is used that does not implement this function.
Extends from Buildings.Fluid.MixingVolumes.MixingVolume (Mixing volume with inlet and outlet ports (flow reversal is allowed)).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | V | Volume [m3] | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance |
Initialization | |||
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
ExtraProperty | C_nominal[Medium.nC] | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Boolean | homotopyInitialization | true | = true, use homotopy method |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal in medium, false restricts to design direction (ports[1] -> ports[2]). Used only if model has two ports. |
Heat transfer | |||
Boolean | prescribedHeatFlowRate | false | Set to true if the model has a prescribed heat flow at its heatPort |
Type | Name | Description |
---|---|---|
VesselFluidPorts_b | ports[nPorts] | Fluid inlets and outlets |
HeatPort_a | heatPort | Heat port connected to outflowing medium |
input RealInput | mWat_flow | Water flow rate added into the medium [kg/s] |
input RealInput | TWat | Temperature of liquid that is drained from or injected into volume [K] |
output RealOutput | X_w | Species composition of medium |
partial model PartialMixingVolumeWaterPort "Partial mixing volume that allows adding or subtracting water vapor" extends Buildings.Fluid.MixingVolumes.MixingVolume( steBal( sensibleOnly = false, final Q_flow = Q_flow + HWat_flow, final mXi_flow = mXi_flow), dynBal( final Q_flow = Q_flow + HWat_flow, final mXi_flow = mXi_flow)); // additional declarationsModelica.Blocks.Interfaces.RealInput mWat_flow(final quantity="MassFlowRate", final unit = "kg/s") "Water flow rate added into the medium"; Modelica.Blocks.Interfaces.RealInput TWat(final quantity="Temperature", final unit = "K", displayUnit = "degC", min=260) "Temperature of liquid that is drained from or injected into volume"; Modelica.Blocks.Interfaces.RealOutput X_w "Species composition of medium"; Medium.MassFlowRate mXi_flow[Medium.nXi] "Mass flow rates of independent substances added to the medium"; Modelica.SIunits.HeatFlowRate HWat_flow "Enthalpy flow rate of extracted water";end PartialMixingVolumeWaterPort;