Buildings.Fluid.MixingVolumes.BaseClasses

Package with base classes for Buildings.Fluid.MixingVolumes

Information

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).

Package Content

NameDescription
Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolumeWaterPort PartialMixingVolumeWaterPort Partial mixing volume that allows adding or subtracting water vapor


Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolumeWaterPort Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolumeWaterPort

Partial mixing volume that allows adding or subtracting water vapor

Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolumeWaterPort

Information

Model for an ideally mixed fluid volume with 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)).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
VolumeV Volume [m3]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Assumptions
BooleanallowFlowReversalsystem.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
BooleanprescribedHeatFlowRatefalseSet to true if the model has a prescribed heat flow at its heatPort

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheatPortHeat port connected to outflowing medium
input RealInputmWat_flowWater flow rate added into the medium [kg/s]
input RealInputTWatTemperature of liquid that is drained from or injected into volume [K]
output RealOutputX_wSpecies composition of medium

Modelica definition

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 declarations
  Modelica.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;

Automatically generated Fri Nov 4 08:28:01 2011.