My Project
programmer's documentation
|
Initialize variables. More...
Functions/Subroutines | |
subroutine | cs_user_f_initialization (nvar, nscal, dt) |
Initialize variables.
See cs_user_initialization for examples.
This subroutine is called at beginning of the computation (restart or not) before the loop time step.
This subroutine enables to initialize or modify (for restart) unkown variables and time step values.
Modification of the behaviour law of physical quantities (rom, viscl, viscls, cp) is not done here. It is the purpose of the user subroutine cs_user_physical_properties
rom
and viscl
values are equal to ro0
and viscl0
or initialize by reading the restart file. Variables diffusivity and specific heat (when they are defined) have no value except if they are read from a restart file.
Cells may be identified using the getcel subroutine. The syntax of this subroutine is described in the cs_user_boundary_conditions subroutine, but a more thorough description can be found in the user guide.
Field cell values arrays can be retrieved using the appropriate access functions as described here.
Example of field ids:
irom
iviscl
ivisct
icp
field_get_key_int
(ivarfl(isca(iscal)), kivisl, ...) subroutine cs_user_f_initialization | ( | integer | nvar, |
integer | nscal, | ||
double precision, dimension(ncelet) | dt | ||
) |
[in] | nvar | total number of variables |
[in] | nscal | total number of scalars |
[in] | dt | time step (per cell) |