Air Change - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Air Change

Sudden or gradual change in pipe diameter, contraction and enlargement

 

Description

Equations

Variables

Connections

Parameters

See Also

Description

The Air Change component models a sudden or gradual change in the diameter of a pipe, and covers both contraction and enlargement which is automatically identified based on the ratio of diameters and flow direction. This component calculates mainly pressure difference and mass flow rate.

Equations

The calculation is changed based on parameter values of Loss model type, and Dynamics of mass in the Air Settings component, and the diameters at port_a and port_b.

The ratio of diameters are calculated with:

β=d__bd__ad__a>d__bd__ad__botherwise

The definition of loss coefficients are defined as follow:

Loss model type = Crane

This is for Crane model [1] [2].

 

If d__a>d__b,

Loss coefficient of Contraction at Inlet (at port_a):

K__c={0.8sinθ21β2β4θ45180Pi0.51β2sinθ2β4otherwise

Loss coefficient of Enlargement at Outlet (at port_a):

K__e={2.6sinθ21β22β4θ45180Pi1β22β4otherwise

Thus, the total loss coefficient is defined by using the linear approximation for the transition between Contraction and Enlargement:

K&equals;K__edp<dp__transitionK__cK__e2dp__transitiondp&plus;K__c&plus;K__e2dp__transitiondpdp__transitionK__cdp&gt;dp__transition

And, if d__ad__b,

Loss coefficient of Enlargement at Inlet (at port_a):

K__e&equals;&lcub;2.6sinθ21β22θ45180Pi1β22otherwise

Loss coefficient of Contraction at Inlet (at port_a):

K__c&equals;&lcub;0.8sin&theta;21&beta;2&theta;45180Pi0.51&beta;2sin&theta;2otherwise

Thus, the total loss coefficient is defined by using the linear approximation for the transition between Contraction and Enlargement:

K&equals;K__cdp<dp__transitionK__eK__c2dp__transitiondp&plus;K__e&plus;K__c2dp__transitiondpdp__transitionK__edp&gt;dp__transition

 

Loss model type = Hooper

This is for Hooper model [2].

 

Reynolds number for Friction factor calculation is defined with:

Re__target&equals;max&lpar;&lcub;&rho;__adp0&rho;__bothersv__bd__bd__a2d__a&lcub;&mu;__adp0&mu;__bothers&comma;10&rpar;

&DifferentialD;Re&DifferentialD;t&equals;Re__targetReT__const

The friction factor of flow is calculated with:

&lambda;&equals;`HeatTransfer.Functions.lambda_Re`Re&comma;roughness&comma;d__a&comma;Re__CoT&comma;IF__speed&comma;1

(*) The above function `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] .

 

Intermittencies for transition between Laminar and Turbulent flow are defined with:

&kappa;__K_c&equals;tanhIF__speedReRe__CoT_c2&plus;12

&kappa;__K_e&equals;tanhIF__speedReRe__CoT_e2&plus;12

 

If d__a&gt;d__b,

Loss coefficient of Contraction at Inlet (at port_a):

K__c&equals;1&kappa;__K_cK__c_l&plus;&kappa;__K_cK__c_t

Laminar:

K__c_l&equals;&lcub;1.2&plus;160Re1&beta;411.6sinθ2θ45180Pi1.2&plus;160Re1β41sinθ2otherwise

Turbulent:

K__c_t&equals;&lcub;0.6&plus;0.48&lambda;1&beta;2&beta;41.6sin&theta;2&theta;45180Pi0.6&plus;0.48λ1β2β4sinθ2otherwise

Loss coefficient of Enlargement at Outlet (at port_a):

K__e&equals;1&kappa;__K_eK__e_l&plus;&kappa;__K_eK__e_t

Laminar:

K__e_l&equals;&lcub;21&beta;41&beta;42.6sinθ2θ45180Pi21β41β4otherwise

Turbulent:

K__e_t&equals;&lcub;1.0&plus;0.8&lambda;1β221β42.6sinθ2θ45180Pi1.0&plus;0.8λ1β221β4otherwise

Thus, the total loss coefficient is defined by using the linear approximation for the transition between Contraction and Enlargement:

K&equals;K__edp<dp__transitionK__cK__e2dp__transitiondp&plus;K__c&plus;K__e2dp__transitiondpdp__transitionK__cdp&gt;dp__transition

And, if d__ad__b,

Loss coefficient of Enlargement at Inlet (at port_a):

K__e&equals;1&kappa;__K_eK__e_l&plus;&kappa;__K_eK__e_t

Laminar:

K__e_l&equals;&lcub;21&beta;42.6sinθ2θ45180Pi21β4otherwise

Turbulent:

K__e_t&equals;&lcub;1.0&plus;0.8λ1β222.6sinθ2θ45180Pi1.0&plus;0.8λ1β22otherwise

Loss coefficient of Contraction at Inlet (at port_a):

K__c&equals;1&kappa;__K_cK__c_l&plus;&kappa;__K_cK__c_t

Laminar:

K__c_l&equals;&lcub;1.2&plus;160Re1&beta;41&beta;41.6sinθ2θ45180Pi1.2&plus;160Re1β41&beta;4sinθ2otherwise

Turbulent:

K__c_t&equals;&lcub;0.6&plus;0.48&lambda;1&beta;21.6sin&theta;2&theta;45180Pi0.6&plus;0.48λ1β2sinθ2otherwise

Thus, the total loss coefficient is defined by using the linear approximation for the transition between Contraction and Enlargement:

K&equals;K__cdp<dp__transitionK__eK__c2dp__transitiondp&plus;K__e&plus;K__c2dp__transitiondpdp__transitionK__edp&gt;dp__transition

(Reference) Detailed implementation of Friction factor calculation

Friction factor of Laminar flow is calculated with:

&lambda;__lam&equals;64Re

And, Turbulent flow's friction factor is defined with (Swamee and Jain's approximation):

&lambda;__tur&equals;0.25logroughnessd__a3.7&plus;5.74Re0.92

Intermittency is defined with:

&kappa;&equals;tanhIF__speedReRe__CoT2&plus;12

So, the friction factor is calculated with:

&lambda;&equals;1&kappa;&lambda;__lam&plus;&kappa;&lambda;__tur

The following plot is Reynolds number vs Friction factor, and roughnessd__a&equals;0.001, IF__speed&equals;0.007, Re__CoT&equals;3500.

 

 

The definition of Flow calculation is the following and:

Dynamics of mass = Static

Pressure difference and flow velocities are calculated with the following equations:

v__a&equals;mflow&lcub;&rho;__adp0&rho;__bothersd__a22π

v__b&equals;mflow&lcub;&rho;__adp0&rho;__bothersd__b22π

dp&equals;K&lcub;&rho;__adp0&rho;__bothersv__a2signv__a2

Dynamics of mass = Dynamic

In theory, Mass flow rate and flow velocities are calculated with the following equations with Loss coefficient:

v__a&equals;2K&lcub;1&rho;__adp01&rho;__bothersdpsigndp

mflow&equals;d__a22&pi;&lcub;&rho;__adp0&rho;__bothersv__a

v__b&equals;mflow&lcub;&rho;__adp0&rho;__bothersd__b22&pi;

In the Heat Transfer Library, the equation for v__a is used to resolve difficulties of the numerical calculation:

v__a&equals;2K`HeatTransfer.Functions.regRoot2`dp&comma;dp_small&comma;1&rho;__a&comma;1&rho;__b&comma;true&comma;sharpness

(*) `HeatTransfer.Functions.regRoot2` is the same function as `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:

dp&equals;`port_a.p``port_b.p`

`port_a.mflow`&equals;mflow

`port_b.mflow`&equals;mflow

Density is calculated with:

&rho;__a&equals;inStream`port_a.rho`

&rho;__b&equals;inStream`port_b.rho`

If Fidelity of properties = Constant, properties &mu; and c__p and k are constants and properties at each ports are:

&mu;__a&equals;&mu;

&mu;__b&equals;&mu;

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

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

&mu;__a&equals;Function__visinStream`port_a.T`

&mu;__b&equals;Function__visinStream`port_b.T`

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

Port's variables are defined with:

`port_a.hflow`&equals;inStream`port_b.hflow`

`port_b.hflow`&equals;inStream`port_a.hflow`

`port_a.rho`&equals;inStream`port_b.rho`

`port_b.rho`&equals;inStream`port_a.rho`

`port_a.T`&equals;inStream`port_b.T`

`port_b.T`&equals;inStream`port_a.T`

References

[1] : Flow of Fluids Through Valves, Fittings, and Pipe, Crane Valves North America, Technical Paper No. 410M. 1979, p A-26

[2] : Ron Darby, Chemical Engineering Fluid Mechanics 2nd edition, Marcel Dekker, 2001

[3] : William B. Hooper, Calculate Head loss caused by change in pipe size, Chemical Engineering November 1988, p 89

 

Variables

Symbol

Units

Description

Modelica ID

dp

Pa

Pressure difference

dp

mflow

kgs

Mass flow rate

mflow

v__a

ms

Velocity of flow at port a

v_a

v__b

ms

Velocity of flow at port b

v_b

K

Loss coefficient

K

K__c

Loss coefficient, Contraction

K_c

K__e

Loss coefficient, Enlargement

K_e

K__c_l

Loss coefficient, Contraction, Laminar (only for Hooper model)

K_c_l

K__c_t

Loss coefficient, Contraction, Turbulent (only for Hooper model)

K_c_t

K__e_l

Loss coefficient, Enlargement, Laminar (only for Hooper model)

K_e_l

K__e_t

Loss coefficient, Enlargement, Turbulent (only for Hooper model)

K_e_t

Re

Reynolds number for Friction factor calculation

Re

Re__target

Targeted Reynolds number for Friction factor calculation

Re_target

&lambda;

Friction factor

lambda

&kappa;__K_c

Intermittency factor to calculate Transition zone, Contraction, Loss coefficient (Only for Hooper)

kappa_K_c

&kappa;__K_e

Intermittency factor to calculate Transition zone, Enlargement, Loss coefficient (Only for Hooper)

kappa_K_e

&rho;__a

kgm3

Density at port_a

rho_a

&rho;__b

kgm3

Density at port_b

rho_b

&mu;__a

Pas

Dynamic viscosity at port_a

vis_a

&mu;__b

Pas

Dynamic viscosity at port_b

vis_b

Connections

Name

Units

Condition

Description

Modelica ID

port__a

 

Air Port

port_a

port__b

 

Air Port

port_b

Parameters

Symbol

Default

Units

Description

Modelica ID

Airsimulationsettings 

AirSettings1

Specify a component of Air simulation settings

Settings

Loss model type

Crane

Select loss calculation model type

 - Crane

 - Hooper

TypeOfModel

d__a

0.05

m

Diameter, port_a

d_a

d__b

0.02

m

Diameter, port_b

d_b

&theta;

20180Pi

rad

Angle of Contraction/Enlargement

theta

roughness

0.000025

m

Absolute roughness of pipe, with a default for a smooth steel pipe

roughness

dp__transition

10

Pa

Pressure difference for Transition zone |dp| <= dp_transition

dp_transition

dp__small

0.1

Pa

Approximation of function for |dp| <= dp_small

dp_small

sharpness

1.0

Sharpness of approximation for sqrt(dp) and sqrt(rho * dp)

sharpness

T__const

0.001

s

Time constant for Reynolds number calculation

T_const

Re__CoT

3500

Reynolds number of the center of Transition zone

Re_CoT

Re__CoT_c

2500

Reynolds number of the center of Transition zone, Contraction

Re_CoT_c

Re__CoT_e

4000

Reynolds number of the center of Transition zone, Enlargement

Re_CoT_e

Spread ofIntermittencyfactor

0.007

Changing rate of Intermittency factor

IF_spread

See Also

Heat Transfer Library Overview

Air Overview

Air Shapes Overview