The non-default variables initialization can be done using the GUI or in the cs_user_initialization user-defined function. At the calculation beginning, the variables are initialized automatically by the code. Velocity is set to 0, scalars and properties either to zero or to a reference value when available (such as the reference temperature or density) and the turbulent variables are estimated from a reference velocity and characteristic length.
For k, in the k-ε, Rij-ε, v2f, or k-ω models:
and in Rij-ε:
For k-ε in the k-ε, Rij-ε, or v2f models:
For ω, in the k-ω model:
For ϕ and
For α in the EBRSM and BL-v2/k models:
For νt in the Spalart-Allmaras model:
The cs_user_initialization user-defined function allows if necessary to initialize certain variables to values of various fields, whether those fields represent solved variables (the most common case) or properties or even local time step values closer to their estimated final values, in order to obtain a faster convergence.
This function can also be used to modify values in areas not covered by the initial mesh when restarting from a different mesh, or even defining an interpolation from data computed with a different computational code, as shown in the examples.
For calculations with a non-constant time step, the value the reference time step. In the case of a restart using the same time stepping options, the current time step should be read from the restart.
As cs_user_initialization is called after reading the restart file, it could be used to modify the reference or local time step it needed.