.TransiEnt.Components.Gas.VolumesValvesFittings.Base.VolumeRealGas_L4

Information

1. Purpose of model

A 1D tube-shaped control volume considering one-phase and two-phase heat transfer and Pressure Loss in a straight pipe with static momentum balance and simple energy balance. It is a modified version of the model ClaRa.Basics.ControlVolumes.FluidVolumes.VolumeVLE_L4 from ClaRa version 1.3.0.

2. Level of detail, physical effects considered, and physical insight

The pipe can be discretized in the length direction (L4). It uses real gas mixtures (VLEFluids).

It can be chosen if changes in the composition shall be considered or not. In the first case, it considers the time delay of the change of the mass fraction from inlet to outlet.

Compared to the ClaRa version, the simCenter, media model and connectors were exchanged for TransiEnt instances. The two-phase region is deactivated and a xi_nom as well as an m_flow_start is added. Also, different mass balance equations are added. You can choose a quasi-stationary and three different dynamic implementations, see below. 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.

3. Limits of validity

(no remarks)

4. Interfaces

RealGasPorts

5. Nomenclature

(no remarks)

6. Governing Equations

Velocity at inlet and outlet:

w_inlet=m_flow/(A_cross_FM*rho_inlet)

w_outlet=m_flow/(A_cross_FM*rho_outlet)

flow velocity in energy cells:

w[i]=(m_flow[i]+m_flow[i+1])/(2*rho*A_cross), for i in 1:N_cv (number of control volumes)

Density in flow model:

rho_FM[i]=(rho[i]+rho[i-1])/2,for i in 2:N_cv

and the density in the first and last momentum cell:

rho_FM[1]=(rho_in+rho[1])/2

rho_FM[N_cv+1]=(rho_out+rho[N_cv])/2

Pressure drop due to friction and gravity:


Delta_p_grav[i] =(rho[i]*Delta_x[i] +rho[i-1]*Delta_x[i - 1])/(Delta_x[i - 1] + Delta_x[i])*g_n*(z[i] - z[i - 1]), for i in 3: N_cv-1

If there is friction at the inlet:


Delta_p_grav[1] =rho[1]*g_n*(z[1] - z_in)



Delta_p_grav[2] =(rho[1]*Delta_x[1] + rho[2]*Delta_x[2])/(Delta_x[2] +Delta_x[1])*g_n*(.z[2] - z[1])

If there is no friction at the inlet:


Delta_p_grav[1] = 0

Delta_p_grav[2] =(rho[1]*Delta_x[1] + rho[2]*Delta_x[2]/2)/(Delta_x[2]/2 +Delta_x[1])*g_n*(z[2] - z_in)

If there is friction at the outlet:


 Delta_p_grav[N_cv+1] =rho[N_cv]*g_n*(z_out - z[N_cv])

Delta_p_grav[N_cv] =(rho[N_cv-1]*Delta_x[N_cv - 1] +rho[N_cv]*Delta_x[N_cv])/(Delta_x[N_cv - 1] +.Delta_x[N_cv])*g_n*(.z[N_cv] - z[N_cv - 1])

If there is no friction at the outlet:

Delta_p_grav[N_cv+1] = 0


Delta_p_grav[N_cv] =(rho[N_cv-1]*Delta_x[N_cv - 1]/2 + rho[N_cv]*Delta_x[N_cv])/(Delta_x[N_cv - 1]/2 + Delta_x[N_cv])*g_n*(z_out - z[N_cv - 1])

Fluid mass:

m = V* rho_mix

Equations for calculating the cell states:

The model differentiates between four different kind of mass balances and a constant or variable composition.

Quasi-stationary:

0=der(rho[i]), for i in 1:N_cv

0=m_flow[i]-m_flow[i+1], for i in 1:N_cv

Dynamic:

Here, you can pick three different mathematically identical equations which are treated differently numerically. In the following, only the mathematical notation of the general equations is shown.

der(rho[i])*V[i]=m_flow[i]-m_flow[i+1], for i in 1:N_cv

For all components considered fully variable:

der(xi[i, j]) = 1/m[i]*((Xi_flow[i, j] - m_flow[i]*xi[i, j]) - (Xi_flow[i + 1, j] - m_flow[i + 1]*xi[i, j])), for i in 1:N_cv and for j in 1:nc-1 (number of components -1)

For the components which are dependent on other components:

xi[i, j] = (1 - (sum(xi[i, k] for k in variableCompositionEntries[1:end - 1]) + xi_end[i]))/(1 - (sum(xi_nom[k] for k in variableCompositionEntries[1:end - 1]) + 1 - sum(xi_nom)))*xi_nom[j], for j in dependentCompositionEntries[1:end - 1] and for i in 1:geo.N_cv

For constant composition:

xi[i, j] = xi[j,nom], for i in 1:N_cv and for j in 1:nc-1

Static momentum balance in the momentum cells:

 0 = p[i - 1] - p[i] - Delta_p_fric[i] - Delta_p_grav[i] , for i in 2:N_cv

and for the first and last momentum cell


0 =p_in - p[1] - Delta_p_fric[1] - Delta_p_grav[1]


0 = p[N_cv] - p_out - Delta_p_fric[N_cv + 1] - Delta_p_grav[N_cv + 1]


7. Remarks for Usage

Use of certain heat transfer models can lead to warnings like "Differentiating (if pipe_xy.iCom.m_flow_in[1] > 0.0 then junction_beforePipe.gasBulk.xi[1] else junction_beforePipe.gasBulk.xi[1]) under the assumption that it is continuous at switching.". This can be ignored as long as the composition is set to the same value in every component (even in sinks etc.).

8. Validation

(no remarks)

9. References

copied and changed from ClaRa.Basics.ControlVolumes.FluidVolumes.VolumeVLE_L4, v1.3.0

10. Version History

Model created by Tom Lindemann (tom.lindemann@tuhh.de), Jun 2015

Modified by Carsten Bode (c.bode@tuhh.de), Okt 2015

Modified by Lisa Andresen (andresen@tuhh.de), May 2016

Revised by Carsten Bode (c.bode@tuhh.de), Apr 2018 (updated to ClaRa 1.3.0)

Modified by Carsten Bode (c.bode@tuhh.de), Feb 2019 (added temperature start value)

Modified by Carsten Bode (c.bode@tuhh.de), Sep 2019 (merged constXi and varXi models)

Modified by Carsten Bode (c.bode@tuhh.de), May 2020 (added quasi-stationary equations and simplified equations for only dependent mass fractions)

Modified by Robert Flesch (flesch@xrg-simulation.de), Sep 2020 (included new ICom, exchanged ph fluid models to pT, turned of density derivative calculation)

Contents

NameDescription
 Outline
 Wall_L4
 Inlet
 Outlet
 Fluid
 Summary
 PressureLossPressure loss model at the tubes side
 HeatTransferHeat transfer mode at the tubes side
 GeometryPipe geometry
 MechanicalEquilibriumMechanical equilibrium model

Generated at 2024-11-21T19:25:40Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos