![]() |
programmer's documentation
|
User cs_user_head_losses subroutine which is called at three different stages in the code (iappel=1, 2 or 3).
iappel
= 1: Calculation of the number of cells where a head loss term is imposed: ncepdp
. Called once at the beginning of the calculation.iappel
= 2: Identification of the cells where a head loss term is imposed: array icepdc(ncepdc)
. Called once at the beginning of the calculation.iappel
= 3: Calculation of the values of the head loss term. Called at each time step.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:
with
For a distributed head loss, let given by the litterature (
is the head loss per unit length)
the source term tspdc
is equal to
we have
For a singular head loss, let given by the litterature (
is the singular head loss)
the source term tspdc
is equal to
. We have
where is the length over which we have chosen to represent the singular head loss.
Here is the list of examples: