![]() |
programmer's documentation
|
The following local variables need to be defined for the examples in this section:
The following initialization block needs to be added for the following examples:
At the end of the subroutine, it is recommended to deallocate the work array:
In theory Fortran 95 deallocates locally-allocated arrays automatically, but deallocating arrays in a symetric manner to their allocation is good pratice, and avoids using a different logic for C and Fortran.
Map field array
2 calls:
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)
(iappel = 2)
To be completed by the user: cell selection
(4 <= x; 2 <= y <= 8)
No head losses else.
For iappel = 1
, define ncepdp
, the number of cells with head losses. This is valid for both examples above.
Defining the number of cells with head losses
Computing the head loss coefficient values
Third call, at each time step
iappel = 3:
ckupdc:
compute head loss coefficients in the calculation coordinates, organized in order k11, k22, k33, k12, k13, k23
Note:
Diagonal tensor : Example of head losses in direction x
3x3 tensor: Example of head losses at alpha = 45 degres x,y direction x
resists by ck1
and y
by ck2
ck2 = 0
represents vanes as follows: in coordinate system x
, y