Head Loss with cs_user_head_losses.f90

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Pisolino
Posts: 86
Joined: Thu Apr 26, 2012 1:55 pm

Head Loss with cs_user_head_losses.f90

Post by Pisolino »

Hi all,
i want to set a particular kind of head loss definition. Using cs_user_head_losses.f90 i'm trying to set for each cell a particular condition:
1- start: all cells are initialised to 0 (this is set by default)
2- after 100 iterations there is one head_loss penalisation iteration:
scanning all the zone cells, depending on some conditions (turbulence,...) a cell may be set to a headloss value ( i.e. ckupdc(cell_id,1) = 20) . From now on for all the iterations such cell must mantain the headloss value of 20 also if the condition changes (increase or decrease of turbulence i.e.)
3- again after 100 iterations another penalisation iteration and so on

I thought that once i set the ckupdc value, since i import the array from the simulation environment, it is mantained from one iteration to another, however i noticed that every iteration ckupdc array is nullified. Is there a way to declare ckupdc once and make it mantain such value constant until i redefine it (avoiding iteration clearing) ??

thanks in advance,

Andrea
Andrea
CEO and R&D manager @ ARGO srl

mail: info@argosrl.eu
site: www.argosrl.eu
Post Reply