7.3
general documentation
Force temperature in a given region

Force temperature in a given region

This is an example of cs_user_extra_operations which sets temperature to 20 in a given region starting at t = 12s

Body

Do this with precaution... The user is responsible for the validity of results.

Here is the corresponding code:

/* Example: set temperature to 20 in a given region starting at t = 12s
* -------------------------------------------------------------------- */
if ((CS_F_(t) != NULL) && (t_cur >= 12.0)) {
cs_real_t *cvar_t = CS_F_(t)->val;
cs_array_real_set_scalar(domain->mesh->n_cells, 20.0, cvar_t);
bft_printf("User modification of variables at the end of the time step");
}