Water Flow

Flow calculation of Water

 Description The Water Flow component models a generic flow calculation for the lumped thermal fluid simulation of Water. This component calculates mainly the mass flow rate.

Equations

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

 Type of flow = Linear and Dynamics of mass = Static Pressure difference is calculated with: $\mathrm{dp}=\frac{1}{A\cdot \mathrm{α__linear}}\cdot \mathrm{mflow}$
 Type of flow = Linear and Dynamics of mass = Dynamic Mass flow rate is calculated with: $\mathrm{mflow}=A\cdot \mathrm{α__linear}\cdot \mathrm{dp}$
 Type of flow = Square root and Dynamics of mass = Static Pressure difference is calculated with: $\mathrm{dp}=\frac{1}{{\left(A\cdot \mathrm{α__sqrt}\right)}^{2}}\cdot {\mathrm{mflow}}^{2}\cdot \mathrm{sign}\left(\mathrm{mflow}\right)$
 Type of flow = Square root and Dynamics of mass = Dynamic In theory, Mass flow rate is calculated with: $\mathrm{mflow}=A\cdot \mathrm{α__sqrt}\cdot \sqrt{\mathrm{dp}}$ In the Heat Transfer Library, the following equation is used to resolve difficulties of the numerical calculation: $\mathrm{mflow}=A\cdot \mathrm{α__sqrt}\cdot \mathrm{HeatTransfer.Functions.regRoot}\left(\mathrm{dp},\mathrm{sharpness}\right)$ (*) $\mathrm{HeatTransfer.Functions.regRoot}$ is the same function as $\mathrm{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 Pressure difference is calculated with: $\mathrm{dp}=\frac{1}{2}\cdot \mathrm{λ}\cdot \frac{L}{\mathrm{D__h}\cdot {A}^{2}\cdot {\begin{array}{cc}\mathrm{inStream}\left(\mathrm{port_a.rho}\right)& \mathrm{dp}\ge 0\\ \mathrm{inStream}\left(\mathrm{port_b.rho}\right)& \mathrm{others}\end{array}}\cdot {\mathrm{mflow}}^{2}\cdot \mathrm{sign}\left(\mathrm{mflow}\right)$
 Type of flow = Darcy-Weisbach and Dynamics of mass = Dynamic In theory, Mass flow rate is calculated with: $\mathrm{mflow}=\sqrt{\frac{2\cdot \mathrm{D__h}\cdot {A}^{2}}{\mathrm{λ}\cdot L}}\cdot \sqrt{{\begin{array}{cc}\mathrm{inStream}\left(\mathrm{port_a.rho}\right)& \mathrm{dp}\ge 0\\ \mathrm{inStream}\left(\mathrm{port_b.rho}\right)& \mathrm{others}\end{array}\cdot \mathrm{dp}}$ 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}\cdot {A}^{2}}{\mathrm{\lambda }\cdot L}}\cdot \mathrm{HeatTransfer.Functions.regRoot2}\left(\mathrm{dp},\mathrm{dp_small},\mathrm{inStream}\left(\mathrm{port_a.rho}\right),\mathrm{inStream}\left(\mathrm{port_b.rho}\right),\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.

Common definitions are the following:

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

$v=\frac{\mathrm{mflow}}{{\begin{array}{cc}\mathrm{inStream}\left(\mathrm{port_a.rho}\right)& \mathrm{dp}\ge 0\\ \mathrm{inStream}\left(\mathrm{port_b.rho}\right)& \mathrm{others}\end{array}\cdot A}$

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

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

$\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)$

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

Connections

 Name Description Modelica ID $\mathrm{port__a}$ Water Port $\mathrm{port_a}$ $\mathrm{port__b}$ Water Port $\mathrm{port_b}$

Parameters

 Symbol Default Units Description Modelica ID $\mathrm{WaterSettings1}$ $-$ Specify a component of Water simulation settings Settings $\mathrm{Linear}$ $-$ Select Flow calculation type  - Linear  - Square root  - Darcy-Weisbach TypeOfFlow $\mathrm{α__linear}$ $30$ $-$ Flow coefficient for Linear type alpha_lin $\mathrm{α__sqrt}$ $3000$ $-$ Flow coefficient for Square root type alpha_sqrt $L$ $0.5$ $m$ Pipe length (Only for Darcy-Weisbach) L $\mathrm{D__h}$ $0.01$ $m$ Internal hydraulic diameter (Only for Darcy-Weisbach) Dh $A$ $\frac{\mathrm{Pi}}{10000}$ ${m}^{2}$ Flow area A $\mathrm{λ}$ $0.000015$ $-$ Friction coefficient for Darcy-Weisbach equation lambda $\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