modelPartialDistributedVolume

Base class for distributed volume models

Information

Interface and base class for n ideally mixed fluid volumes with the ability to store mass and energy. It is intended to model a one-dimensional spatial discretization of fluid flow according to the finite volume method. The following boundary flow and source terms are part of the energy balance and must be specified in an extending class:

  • Qb_flows[n], heat flow term, e.g., conductive heat flows across segment boundaries, and
  • Wb_flows[n], work term.

The component volumes fluidVolumes[n] are an input that needs to be set in an extending class to complete the model.

Further source terms must be defined by an extending class for fluid flow across the segment boundary:

  • Hb_flows[n], enthalpy flow,
  • mb_flows[n], mass flow,
  • mbXi_flows[n], substance mass flow, and
  • mbC_flows[n], trace substance mass flow.

Parameters

TypeNameDefaultDescription
Integern2Number of discrete volumes
Medium.AbsolutePressureps_startif n > 1 then linspace(p_a_start, p_b_start, n) else {(p_a_start + p_b_start)/2}Start value of pressure
Assumptions › Dynamics
Types.DynamicsenergyDynamicssystem.energyDynamicsFormulation of energy balances
Types.DynamicsmassDynamicssystem.massDynamicsFormulation of mass balances
Types.DynamicssubstanceDynamicsmassDynamicsFormulation of substance balances
Types.DynamicstraceDynamicsmassDynamicsFormulation of trace substance balances
Initialization
Medium.AbsolutePressurep_a_startsystem.p_startStart value of pressure at port a
Medium.AbsolutePressurep_b_startp_a_startStart value of pressure at port b
Booleanuse_T_starttrueUse T_start if true, otherwise h_start
Medium.TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX((p_a_start + p_b_start)/2, h_start, X_start)Start value of temperature
Medium.SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX((p_a_start + p_b_start)/2, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
Medium.MassFraction[Medium.nX]X_startMedium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_startMedium.C_defaultStart value of trace substances

Components

TypeNameDefaultDescription
Modelica.Fluid.SystemsystemSystem properties
SI.VolumefluidVolumesDiscretized volume, determine in inheriting class
SI.EnergyUsInternal energy of fluid
SI.MassmsFluid mass
SI.MassmXisSubstance mass
SI.MassmCsTrace substance mass
SI.MassmCs_scaledScaled trace substance mass
Medium.ExtraProperty[n,Medium.nC]CsTrace substance mixture content
Medium.BasePropertiesmediums
Medium.MassFlowRatemb_flowsMass flow rate, source or sink
Medium.MassFlowRatembXi_flowsIndependent mass flow rates, source or sink
Medium.ExtraPropertyFlowRatembC_flowsTrace substance mass flow rates, source or sink
SI.EnthalpyFlowRateHb_flowsEnthalpy flow rate, source or sink
SI.HeatFlowRateQb_flowsHeat flow rate, source or sink
SI.PowerWb_flowsMechanical power, p*der(V) etc.

Contents

NameDescription
MediumMedium in the component