Hello,
I changed the name to "n_cells_with_ghosts",
but same problem can be seen.
You can see the log file.
_________________________________________________________________
For mass flux. is the code correct below?
I am not sure how it should be wrriten for " inner_mass_flux->val
= inner_mass_flux_m->val" and "inner_mass_flux_m".
Code: Select all
void
cs_user_initialization(cs_domain_t *domain)
{
cs_field_t *vel = cs_field_by_name("velocity");
cs_field_t *vel_m = cs_field_by_name("meanVel");
cs_field_t *inner_mass_flux = cs_field_by_name("inner_mass_flux");
cs_field_t *inner_mass_flux_m = cs_field_by_name("inner_mass_flux_mean");
cs_field_t *boundary_mass_flux = cs_field_by_name("boundary_mass_flux");
cs_field_t *boundary_mass_flux_m = cs_field_by_name("boundary_mass_flux_mean");
for (cs_lnum_t i = 0; i < cs_glob_mesh->n_cells_with_ghosts; i++) {
vel->val[i] = vel_m->val[i];
inner_mass_flux->val[i] = inner_mass_flux_m->val[i];
boundary_mass_flux->val[i] = boundary_mass_flux_m->val[i];
}
}
Would you check this?
At least now, some error message can be seen by this code.
_______________________________________________________________________
Whwn I use the following code to check where the code works or not, it seems that part of instantaneous velocity field was replaced with new value (in this case:1e5). You can see the result in picture. Blue zone cannot be replaced by mean velocity.
In my case, computation was done with 4 parallelization. I checked how it works without parallelization, and same problem happend. So problem is not due to parallelization.
Code: Select all
void
cs_user_initialization(cs_domain_t *domain)
{
cs_field_t *vel = cs_field_by_name("velocity");
cs_field_t *vel_m = cs_field_by_name("meanVel");
for (cs_lnum_t i = 0; i < cs_glob_mesh->n_cells; i++) {
vel->val[i] = 1e5;
}
}
Best regards,
Hamada