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, andWb_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, andmbC_flows[n], trace substance mass flow.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | 2 | Number of discrete volumes |
| Medium.AbsolutePressure | ps_start | if 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.Dynamics | energyDynamics | system.energyDynamics | Formulation of energy balances |
| Types.Dynamics | massDynamics | system.massDynamics | Formulation of mass balances |
| Types.Dynamics | substanceDynamics | massDynamics | Formulation of substance balances |
| Types.Dynamics | traceDynamics | massDynamics | Formulation of trace substance balances |
| Initialization | |||
| Medium.AbsolutePressure | p_a_start | system.p_start | Start value of pressure at port a |
| Medium.AbsolutePressure | p_b_start | p_a_start | Start value of pressure at port b |
| Boolean | use_T_start | true | Use T_start if true, otherwise h_start |
| Medium.Temperature | T_start | if 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.SpecificEnthalpy | h_start | if use_T_start then Medium.specificEnthalpy_pTX((p_a_start + p_b_start)/2, T_start, X_start) else Medium.h_default | Start value of specific enthalpy |
| Medium.MassFraction[Medium.nX] | X_start | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start | Medium.C_default | Start value of trace substances |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.System | system | System properties | |
| SI.Volume | fluidVolumes | Discretized volume, determine in inheriting class | |
| SI.Energy | Us | Internal energy of fluid | |
| SI.Mass | ms | Fluid mass | |
| SI.Mass | mXis | Substance mass | |
| SI.Mass | mCs | Trace substance mass | |
| SI.Mass | mCs_scaled | Scaled trace substance mass | |
| Medium.ExtraProperty[n,Medium.nC] | Cs | Trace substance mixture content | |
| Medium.BaseProperties | mediums | ||
| Medium.MassFlowRate | mb_flows | Mass flow rate, source or sink | |
| Medium.MassFlowRate | mbXi_flows | Independent mass flow rates, source or sink | |
| Medium.ExtraPropertyFlowRate | mbC_flows | Trace substance mass flow rates, source or sink | |
| SI.EnthalpyFlowRate | Hb_flows | Enthalpy flow rate, source or sink | |
| SI.HeatFlowRate | Qb_flows | Heat flow rate, source or sink | |
| SI.Power | Wb_flows | Mechanical power, p*der(V) etc. |
Contents
| Name | Description |
|---|---|
| Medium in the component |