Water Valve - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Water Valve

Control the flow of Water

 

Description

Equations

Variables

Connections

Parameters

See Also

Description

The Water Valve component models a generic valve which is to control the flow for the lumped thermal fluid simulation of Water. In this component, the mass flow rate is calculated based on valve opening mainly.

 

Equations

The calculation is changed based on parameter values of Type of flow, Calculation Type, and Dynamics of mass in the Water Settings component.

 

Type of flow = Linear and Dynamics of mass = Static

Calculation Type = true

   Pressure difference is calculated with:

dp=1A⋅α__linear⋅mflow

   Mass flow rate is calculated with:

mflow=opening__act⋅`port_a.mflow`

`port_b.mflow`=−mflow

Calculation Type = false

   Pressure difference is calculated with:

dp=1A⋅opening__act⋅α__linear⋅mflow

   Mass flow rate is calculated with:

mflow=`port_a.mflow`

`port_b.mflow`=−mflow

Type of flow = Linear and Dynamics of mass = Dynamic

Mass flow rate is calculated with:

mflow=opening__act⋅A⋅α__linear⋅dp

Mass flow rate is calculated with:

`port_a.mflow`=mflow

`port_b.mflow`=−mflow

Type of flow = Square root and Dynamics of mass = Static

Calculation Type = true

   Pressure difference is calculated with:

dp=1A⋅α__sqrt2⋅mflow2⋅signmflow

   Mass flow rate is calculated with:

mflow=opening__act⋅`port_a.mflow`

`port_b.mflow`=−mflow

Calculation Type = false

   Pressure difference is calculated with:

dp=1A⋅opening__act⋅α__sqrt2⋅mflow2⋅signmflow

   Mass flow rate is calculated with:

mflow=`port_a.mflow`

`port_b.mflow`=−mflow

Type of flow = Square root and Dynamics of mass = Dynamic

In theory, Mass flow rate is calculated with:

mflow=opening__act⋅A⋅α__sqrt⋅dp

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

mflow=opening__act⋅A⋅α__sqrt⋅`HeatTransfer.Functions.regRoot`dp,sharpness

Mass flow rate is calculated with:

`port_a.mflow`=mflow

`port_b.mflow`=−mflow

(*) `HeatTransfer.Functions.regRoot` is the same function as `Modelica.Fluid.Utilities.regRoot`. To check the details of the package and view the original documentation, which includes author and copyright information, click here.

 

Type of flow = Darcy-Weisbach and Dynamics of mass = Static

Calculation Type = true

   Pressure difference is calculated with:

dp=12⋅λ⋅LD__h⋅A2⋅{inStream`port_a.rho`dp≥0inStream`port_b.rho`others⋅mflow2⋅signmflow

   Mass flow rate is calculated with:

mflow=opening__act⋅`port_a.mflow`

`port_b.mflow`=−mflow

Calculation Type = false

   Pressure difference is calculated with:

dp=12⋅λ⋅LD__h⋅A⋅opening__act2⋅{inStream`port_a.rho`dp≥0inStream`port_b.rho`others⋅mflow2⋅signmflow

   Mass flow rate is calculated with:

mflow=`port_a.mflow`

`port_b.mflow`=−mflow

Type of flow = Darcy-Weisbach and Dynamics of mass = Dynamic

Mass flow rate is calculated with in theory:

mflow=2⋅D__h⋅opening__act⋅A2λ⋅L⋅{inStream`port_a.rho`dp≥0inStream`port_b.rho`others⋅dp

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

mflow=2⋅D__h⋅opening__act⋅A2λ⋅L⋅`HeatTransfer.Functions.regRoot2`dp,dp_small,inStream`port_a.rho`,inStream`port_b.rho`,true,sharpness

Mass flow rate is calculated with:

`port_a.mflow`=mflow

`port_b.mflow`=−mflow

(*) `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.

 

If Dynamic of mass = Static, valve opening is calculated with:

opening__act=min1.0,maxopening,1.0⋅10−10

On the other hand, if Dynamic of mass = Dynamic, it is calculated with:

ⅆopening__actⅆt=min1.0,maxopening,1.0⋅10−10−opening__actT__const

Common definitions are the following:

dp=`port_a.p`−`port_b.p`

v=mflow{inStream`port_a.rho`dp≥0inStream`port_b.rho`others⋅opening__act⋅A

`port_a.hflow`=inStream`port_b.hflow`

`port_b.hflow`=inStream`port_a.hflow`

`port_a.rho`=inStream`port_b.rho`

`port_b.rho`=inStream`port_a.rho`

`port_a.T`=inStream`port_b.T`

`port_b.T`=inStream`port_a.T`

 

Variables

Symbol

Units

Description

Modelica ID

dp

Pa

Pressure difference

p

mflow

kgs

Mass flow rate

mflow

v

ms

Velocity of flow

v

opening__act

−

Valve opening used for Flow calculation

opening_act

typeA_opening

−

Valve opening used if Calculation type = true and Dynamic of mass = Static (Internal calculation use only)

typeA_opening

typeB_opening

−

Valve opening used if Calculation type = false and Dynamic of mass = Static (Internal calculation use only)

typeB_opening

Connections

Name

Description

Modelica ID

port__a

Water Port

port_a

port__b

Water Port

port_b

opening

Valve opening

opening

Parameters

Symbol

Default

Units

Description

Modelica ID

Watersimulationsettings 

WaterSettings1

−

Specify a component of Water simulation settings

Settings

Type offlow

Linear

−

Select Flow calculation type

 - Linear

 - Square root

 - Darcy-Weisbach

TypeOfFlow

α__linear

30

−

Flow coefficient for Linear type

alpha_lin

α__sqrt

3000

−

Flow coefficient for Square root type

alpha_sqrt

L

0.5

m

Pipe length (Only for Darcy-Weisbach)

L

D__h

0.02

m

Internal hydraulic diameter (Only for Darcy-Weisbach)

Dh

A

Pi10000

m2

Flow area

A

λ

0.000015

−

Friction coefficient for Darcy-Weisbach equation

lambda

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 Valve opening (Only if Dynamic of mass = Dynamic)

T_const

Calculation Type

true

−

If true, Mass flow rate is controlled by Valve opening directly. If false, the calculation of Mass flow rate is consistent with Dynamic of mass = Dynamic (Only if Dynamic of mass = Static)

CalType

See Also

Heat Transfer Library Overview

Water Overview

Water Basic Overview