programmer's documentation
Examples of data settings for head losses (cs_user_head_losses.f90)

User cs_user_head_losses subroutine which is called at three different stages in the code (iappel=1, 2 or 3).

Note that calling this subroutine completely overwrites head losses defined using the GUI.

ckupdc is the local head loss term.

It appears on the momentum as follows:

\[ \rho \der{\vect{u}}{t} = - \grad p + \vect{headloss} \: (+\: \text{other terms})\]

with

\[ \vect{headloss} = - \rho \tens{ckupdc}\cdot \vect{u} \,\: (\text{in } kg\cdot m^{-2} \cdot s^{-1})\]

For a distributed head loss, let ${ \tens{\xi_l} = \dfrac{\tens{dh_l}}{(0.5 \rho u^2)}}$ given by the litterature ( $ \tens{dh_l} $ is the head loss per unit length)

the source term tspdc is equal to $\tens{dh_l} = - \tens{\xi_l}(0.5\rho\vect{u}^2)$

we have $ \tens{ckupdc} = 0.5\tens{\xi_l}|\vect{U}| $

For a singular head loss, let $\tens{\xi_l} = \dfrac{\tens{dh_s}}{0.5\rho\vect{u}^2}$ given by the litterature ( $\tens{dh_s} $ is the singular head loss)

the source term tspdc is equal to

\[\frac{\tens{dh_s}}{L} = - \frac{\tens{\xi_l}}{L} (0.5 \rho\vect{u}^2)\]

. We have

\[\tens{ckupdc} = 0.5\frac{\tens{\xi_s}}{L}|\vect{u}|\]

where $ L $ is the length over which we have chosen to represent the singular head loss.

Head loss setting examples

Here is the list of examples: