Air Detailed Flow - MapleSim Help

Air Detailed Flow

Detailed flow calculation of Air

 Description The Air Detailed Flow component models a flow calculation which is for Laminar and Turbulent for the lumped thermal fluid simulation of Air. This component calculates mainly pressure difference and mass flow rate.

Equations

The calculation is changed based on parameter values of Type of pipe, and Dynamics of mass in the Air Settings component.

The definition of Inner hydraulic diameter and Flow area, Geometrical coefficient for laminar flow are explained in the following:

 Type of pipe = General Inner hydraulic diameter is defined with: $\mathrm{D__h_act}=\mathrm{D__h}$ Flow area is defined with: $\mathrm{A__act}=A$ Geometrical coefficient for Laminar flow is defined with:
 Type of pipe = Circular Inner hydraulic diameter is defined with: $\mathrm{D__h_act}=\mathrm{D__h}$ Flow area is defined with: $\mathrm{A__act}=\frac{\mathrm{π}\cdot {\mathrm{D__h}}^{2}}{4}$ Geometrical coefficient for laminar flow is defined with: $\mathrm{Geo__act}=1$
 Type of pipe = Rectangular Inner hydraulic diameter is defined with: $\mathrm{D__h_act}=\frac{2}{\frac{1}{\mathrm{a__rect}}+\frac{1}{\mathrm{b__rect}}}$ Flow area is defined with: $\mathrm{A__act}=\mathrm{a__rec}\cdot \mathrm{b__rec}$ Geometrical coefficient for laminar flow is defined with: $\mathrm{Geo__act}=\mathrm{MapleSim.Interpolate1D}\left(\mathrm{data},\frac{\mathrm{b__rect}}{\mathrm{a__rect}}\right)$ (*) $\mathrm{MapleSim.Interpolate1D}$ is the function of Lookup table of 1D. (*) data is specified with:      - If data_source = inline, parameter $\mathrm{table__rect}$.      - If data_source = attachment, an attached file (.csv and .xls, .xlsx) is used      - If data_source = file, need to specify the path of file (.csv and .xls, .xlsx).

Reynolds number is calculated with:

$\mathrm{Re__target}=\mathrm{max}\left(\frac{{\begin{array}{cc}\mathrm{ρ__a}& \mathrm{dp}\ge 0\\ \mathrm{ρ__b}& \mathrm{others}\end{array}\cdot \left|v\right|\cdot \mathrm{D__h_act}}{{\begin{array}{cc}\mathrm{μ__a}& \mathrm{dp}\ge 0\\ \mathrm{μ__b}& \mathrm{others}\end{array}},0.1\right)$

$\frac{ⅆ\mathrm{Re}}{ⅆt}=\frac{\left(\mathrm{Re__target}-\mathrm{Re}\right)}{\mathrm{T__const}}$

The friction factor of flow is calculated with:

$\mathrm{λ}=\mathrm{HeatTransfer.Functions.lambda_Re}\left(\mathrm{Re},\mathrm{roughness},\mathrm{D__h_act},\mathrm{Re__CoT},\mathrm{IF__speed},\mathrm{Geo__act}\right)$

(*) The above function $\mathrm{HeatTransfer.Functions.lambda_Re}$ is to calculated friction factor for Laminar and Turbulent flow.
The fundamental implementation is based on the following equations. Especially, the equation of Turbulent flow is Swamee and Jain's approximation[1] .

 (Reference) Detailed implementation of Friction factor calculation Friction factor of Laminar flow is calculated with: $\mathrm{λ__lam}=\mathrm{Geo__act}\cdot \frac{64}{\mathrm{Re}}$ And, Turbulent flow's friction factor is defined with (Swamee and Jain's approximation): $\mathrm{λ__tur}=\frac{0.25}{\mathrm{log}{\left(\frac{\frac{\mathrm{roughness}}{\mathrm{D__h_act}}}{3.7}+\frac{5.74}{{\mathrm{Re}}^{0.9}}\right)}^{2}}$ Intermittency is defined with: $\mathrm{κ}=\frac{\mathrm{tanh}\left(\frac{\mathrm{IF__speed}\cdot \left(\mathrm{Re}-\mathrm{Re__CoT}\right)}{2}\right)+1}{2}$ So, the friction factor is calculated with: $\mathrm{λ}=\left(1-\mathrm{κ}\right)\cdot \mathrm{λ__lam}+\mathrm{κ}\cdot \mathrm{λ__tur}$ The following plot is Reynolds number vs Friction factor, and $\frac{\mathrm{roughness}}{\mathrm{D__h_act}}=0.001$, $\mathrm{IF__speed}=0.007$, $\mathrm{Re__CoT}=3500$, $\mathrm{Geo__act}=1$.

The definition of Flow calculation is the following and :

 Dynamics of mass = Static Pressure difference is calculated with Darcy–Weisbach equation: $\mathrm{dp}=\frac{1}{2}\cdot \mathrm{λ}\cdot \frac{L}{\mathrm{D__h_act}\cdot {\mathrm{A__act}}^{2}\cdot {\begin{array}{cc}\mathrm{ρ__a}& \mathrm{dp}\ge 0\\ \mathrm{ρ__b}& \mathrm{others}\end{array}}\cdot {\mathrm{mflow}}^{2}\cdot \mathrm{sign}\left(\mathrm{mflow}\right)$
 Dynamics of mass = Dynamic In theory, Mass flow rate is calculated with Darcy–Weisbach equation: $\mathrm{mflow}=\sqrt{\frac{2\cdot \mathrm{D__h_act}\cdot {\mathrm{A__act}}^{2}}{\mathrm{λ}\cdot L}}\cdot \sqrt{{\begin{array}{cc}\mathrm{ρ__a}& \mathrm{dp}\ge 0\\ \mathrm{ρ__b}& \mathrm{others}\end{array}\cdot \left|\mathrm{dp}\right|}\cdot \mathrm{sign}\left(\mathrm{dp}\right)$ In the Heat Transfer Library, the following equation is used to resolve difficulties of the numerical calculation: $\mathrm{mflow}=\sqrt{\frac{2\cdot \mathrm{D__h_act}\cdot {\mathrm{A__act}}^{2}}{\mathrm{\lambda }\cdot L}}\cdot \mathrm{HeatTransfer.Functions.regRoot2}\left(\mathrm{dp},\mathrm{dp_small},\mathrm{ρ__a},\mathrm{ρ__b},\mathrm{true},\mathrm{sharpness}\right)$ (*) $\mathrm{HeatTransfer.Functions.regRoot2}$ is the same function as $\mathrm{Modelica.Fluid.Utilities.regRoot2}$. To check the details of the package and view the original documentation, which includes author and copyright information, click here.

Definitions related to Mass flow rate and pressure :

$\mathrm{dp}=\mathrm{port_a.p}-\mathrm{port_b.p}$

$v=\frac{\mathrm{mflow}}{{\begin{array}{cc}\mathrm{ρ__a}& \mathrm{dp}\ge 0\\ \mathrm{ρ__b}& \mathrm{others}\end{array}\cdot \mathrm{A__act}}$

$\mathrm{port_a.mflow}=\mathrm{mflow}$

$\mathrm{port_b.mflow}=-\mathrm{mflow}$

Density is calculated with:

$\mathrm{ρ__a}=\mathrm{inStream}\left(\mathrm{port_a.rho}\right)$

$\mathrm{ρ__b}=\mathrm{inStream}\left(\mathrm{port_b.rho}\right)$

If Fidelity of properties = Constant, properties are calculated with:

$\mathrm{μ__a}=\mathrm{μ}$

$\mathrm{μ__b}=\mathrm{μ}$

(*) Regarding the value of properties for Constant, see more details in Air Settings.

If Fidelity of properties = Ideal Gas (NASA Polynomial), properties are calculated with:

$\mathrm{μ__a}=\mathrm{Function__vis}\left(\mathrm{inStream}\left(\mathrm{port_a.T}\right)\right)$

$\mathrm{μ__b}=\mathrm{Function__vis}\left(\mathrm{inStream}\left(\mathrm{port_b.T}\right)\right)$

(*) The properties are defined with NASA polynomials and coefficients, see more details in Air Settings.

Port's variables are defined with:

$\mathrm{port_a.hflow}=\mathrm{inStream}\left(\mathrm{port_b.hflow}\right)$

$\mathrm{port_b.hflow}=\mathrm{inStream}\left(\mathrm{port_a.hflow}\right)$

$\mathrm{port_a.rho}=\mathrm{inStream}\left(\mathrm{port_b.rho}\right)$

$\mathrm{port_b.rho}=\mathrm{inStream}\left(\mathrm{port_a.rho}\right)$

$\mathrm{port_a.T}=\mathrm{inStream}\left(\mathrm{port_b.T}\right)$

$\mathrm{port_b.T}=\mathrm{inStream}\left(\mathrm{port_a.T`}\right)$

 References [1] : Swamee P.K., Jain A.K. (1976): Explicit equations for pipe-flow problems. Proc. ASCE, J.Hydraul. Div., 102 (HY5), pp. 657-664.

Variables

 Symbol Units Description Modelica ID $\mathrm{dp}$ $\mathrm{Pa}$ Pressure difference p $\mathrm{mflow}$ $\frac{\mathrm{kg}}{s}$ Mass flow rate mflow $v$ $\frac{m}{s}$ Velocity of flow v $\mathrm{D__h_act}$ $m$ Inner hydraulic diameter used for Fluid simulation Dh_act $\mathrm{A__act}$ ${m}^{2}$ Flow area used for Fluid simulation A_act $\mathrm{Geo__act}$ $-$ Geometrical coefficient used for Fluid simulation Geo_act $\mathrm{Re}$ $-$ Reynolds number for Friction factor calculation Re $\mathrm{Re__target}$ $-$ Targeted Reynolds number for Friction factor calculation Re_target $\mathrm{λ}$ $-$ Friction factor lambda $\mathrm{λ__lam}$ $-$ Friction factor for Laminar flow lambda_lam $\mathrm{λ__tur}$ $-$ Friction factor for Turbulent flow lambda_tur $\mathrm{κ}$ $-$ Intermittency factor to calculate Transition zone kappa $\mathrm{ρ__a}$ $\frac{\mathrm{kg}}{{m}^{3}}$ Density at port_a rho_a $\mathrm{ρ__b}$ $\frac{\mathrm{kg}}{{m}^{3}}$ Density at port_b rho_b $\mathrm{μ__a}$ $\mathrm{Pa}\cdot s$ Dynamic viscosity at port_a vis_a $\mathrm{μ__b}$ $\mathrm{Pa}\cdot s$ Dynamic viscosity at port_b vis_b

Connections

 Name Units Condition Description Modelica ID $\mathrm{port__a}$  Air Port $\mathrm{port_a}$ $\mathrm{port__b}$  Air Port $\mathrm{port_b}$ $\mathrm{geo_in}$  if External input of Geometrical coefficient = false Geometrical coefficient input $\mathrm{geo_in}$

Parameters

 Symbol Default Units Description Modelica ID $\mathrm{AirSettings1}$ $-$ Specify a component of Air simulation settings Settings $\mathrm{Circular}$ $-$ Select pipe type  - General  - Circular pipe  - Rectangular pipe TypeOfPipe $L$ $0.1$ $m$ Pipe length L $\mathrm{D__h}$ $0.1$ $m$ Internal hydraulic diameter if Type of pipe is General or Circular. Dh $\mathrm{a__rect}$ $0.1$ $m$ Horizontal length only if Type of pipe = Rectangular. a_rec $\mathrm{b__rect}$ $0.2$ $m$ Vertical length only if Type of pipe = Rectangular. b_rec $A$ $\frac{1}{4}\cdot \mathrm{Pi__}\cdot {\mathrm{D__h}}^{2}$ ${m}^{2}$ Flow area only if Type of pipe = General. A $\mathrm{roughness}$ $0.000025$ $m$ Absolute roughness of pipe, with a default for a smooth steel pipe roughness $\mathrm{false}$ $-$ If true, Geometrical coefficient is defined by the input. And, if Type of pipe = Rectangular, this parameter is valid. Geo_ext $\mathrm{Geo}$ $1$ $-$ Geometrical coefficient for Laminar flow only if Type of pipe = General and External input of Geometrical coefficient = false. Geo inline - See Data Source Options section above. DSM_geo_rec $\mathrm{table__rect}$ $\left[\begin{array}{cc}0& 1.5\\ 0.1& 1.323\\ 0.2& 1.192\\ 0.3& 1.094\\ 0.4& 1.023\\ 0.5& 0.9716\\ 0.6& 0.9360\\ 0.7& 0.9120\\ 0.8& 0.8983\\ 0.9& 0.8909\\ 1.0& 0.8887\end{array}\right]$ $-$ Geometrical coefficient for Rectangular pipe, if  = inline. [1] :Volume flow rate [2] :Pressure difference table_geo_rec $\mathrm{data__rect}$ $2$ - Geometrical coefficient for Rectangular pipe, if  =file or attachment. You can specify data by using an attached file or specifying the path of file (.csv and .xls, .xlsx) data_geo_rec $\mathrm{columns__rect}$ $\left[2\right]$ - Determines which columns of the data table will be used to interpolate. For example, in an Excel spreadsheet, column A corresponds with 1, column B corresponds with 2, and so on. columns_geo_rec 0 - Number of rows that are skipped from the top of the data table. skiprows_geo_rec $\mathrm{smoothness__rect}$ Table points are linearly interpolated - Determines whether the data points will be interpolated linearly or with a cubic spline. smoothness_geo_rec $\mathrm{dp__small}$ $0.1$ $\mathrm{Pa}$ Approximation of function for |dp| <= dp_small dp_small $\mathrm{sharpness}$ $1.0$ $-$ Sharpness of approximation for sqrt(dp) and sqrt(rho * dp) sharpness $\mathrm{T__const}$ $0.001$ $s$ Time constant for Reynolds number calculation T_const $\mathrm{Re__CoT}$ $3500$ $-$ Reynolds number of the center of Transition zone Re_CoT $0.007$ $-$ Changing rate of Intermittency factor IF_spread