modelRealGasJunction_L2_nPorts
Extends from TransiEnt.Basics.Icons.RealGasJunction_L2 (Icon for real gas junction).
Information
1. Purpose of model
This model represents a generalized junction for real gases with n ports. It is a modified version of the model TransiEnt.Components.Gas.VolumesValvesFittings.RealGasJunction_L2. The model is documented there and here only the changes are described: The three ports were replaced by one vector, summary, eye and fluid models at port were deleted. Linear pressure losses can be turned on by setting Delta_p_nom to a value unequal to zero for the desired port. You can choose a quasi-stationary or dynamic mass balance implementations. Additionally, the parameter variableCompositionEntries can be used in case that not all components are freely variable, e.g. when hydrogen is fed into natural gas.
2. Level of detail, physical effects considered, and physical insight
(no remarks)
3. Limits of validity
(no remarks)
4. Interfaces
gasPort[n_ports]: vector of inlets/outlets for gas
5. Nomenclature
(no elements)
6. Governing Equations
(no remarks)
7. Remarks for Usage
(no remarks)
8. Validation
(no remarks)
9. References
(no remarks)
10. Version History
Created by Carsten Bode (c.bode@tuhh.de), Mar 2019
Modified by Carsten Bode (c.bode@tuhh.de), May 2020 (added quasi-stationary equations and simplified equations for only dependent mass fractions)
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer[:] | dependentCompositionEntries | if variableCompositionEntries[1] == 0 then 1:medium.nc else TransiEnt.Basics.Functions.findSetDifference(1:medium.nc, variableCompositionEntries) | Entries of medium vector which are supposed to be dependent on the variable entries |
| Initial Values | |||
| Integer | initOption | 0 | Type of initialisation |
| Boolean | useHomotopy | simCenter.useHomotopy | True, if homotopy method is used during initialisation |
| ClaRa.Basics.Units.Pressure | p_start | simCenter.p_amb_const + simCenter.p_eff_2 | Initial value for gas pressure |
| ClaRa.Basics.Units.EnthalpyMassSpecific | h_start | TILMedia.Internals.VLEFluidConfigurations.FullyMixtureCompatible.VLEFluidFunctions.specificEnthalpy_pTxi(medium, p_start, T_start, xi_start) | Initial value for gas specific enthalpy |
| ClaRa.Basics.Units.MassFraction | xi_start | medium.xi_default | Initial value for mass fractions |
| ClaRa.Basics.Units.Temperature | T_start | simCenter.T_ground | Initial value for gas temperature (used in calculation of h_start) |
| Fundamental Definitions | |||
| TILMedia.VLEFluidTypes.BaseVLEFluid | medium | simCenter.gasModel1 | |
| Integer | n_ports | 3 | |
| ClaRa.Basics.Units.Volume | volume | 0.1 | Volume of the junction |
| Boolean | constantComposition | simCenter.useConstCompInGasComp | Use simplified equation for constant composition (xi_nom will be used) |
| SI.MassFraction[medium.nc - 1] | xi_nom | medium.xi_default | Constant composition |
| Integer[:] | variableCompositionEntries | {0} | Entries of medium vector which are supposed to be completely variable |
| Integer | massBalance | 1 | Mass balance and species balance fomulation |
| Boolean | showHeatPort | false | |
| SI.Pressure | p_min_assert | 0 | Minimum pressure in component below which the simulation terminates |
| SI.Pressure | p_max_assert | 1000e5 | Maximum pressure in component above which the simulation terminates |
| Modelica.Units.SI.MassFlowRate[n_ports] | m_flow_nom | ones(n_ports)*10 | Nominal mass flow rate |
| Modelica.Units.SI.PressureDifference[n_ports] | Delta_p_nom | zeros(n_ports) | Nominal pressure loss at m_flow_nom |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| TransiEnt.Basics.Interfaces.Gas.RealGasPortIn[n_ports] | gasPort | ||
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heat |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| TransiEnt.SimCenter | simCenter | ||
| TransiEnt.Components.Gas.VolumesValvesFittings.Base.Linear_inclZero[n_ports] | pressureLoss | ||
| TILMedia.Internals.VLEFluidConfigurations.FullyMixtureCompatible.VLEFluid_pT | gasBulk | ||
| ClaRa.Basics.Units.MassFraction[medium.nc - 1] | xi | ||
| Modelica.Units.SI.MassFraction | xi_end | 1 - sum(xi) | Last entry of mass fraction |
| Modelica.Units.SI.SpecificEnthalpy | h | Specific enthalpy | |
| ClaRa.Basics.Units.Pressure | p | ||
| ClaRa.Basics.Units.Mass | mass | Gas mass in control volume |