I have a problem with saving profiles using cs_user_postprocess.c in case Rij-SSG turbulence model (for k-epsilon works well). For the moment I am using this approach to create a set of points in the profile:
Code: Select all
cs_probe_set_t *pset =
cs_probe_set_create_from_segment("Prof1", // name
4000, // n_probes
start, // start coordinates
end); // end coordinates
cs_probe_set_associate_writers(pset, 1, writer_ids);
....
if (cs_glob_turb_rans_model->irijco) {
cs_real_6_t *cvar_rij = (cs_real_6_t *)CS_F_(rij)->val;
for (cs_lnum_t i = 0; i < n_cells; i++) {
cs_lnum_t c_id = cell_list[i];
for (cs_lnum_t j = 0; i < 6; i++)
rij[i][j] = cvar_rij[c_id][j];
}
}
else {
for (cs_lnum_t i = 0; i < n_cells; i++) {
cs_lnum_t c_id = cell_list[i];
rij[i][0] = CS_F_(r11)->val[c_id];
rij[i][1] = CS_F_(r22)->val[c_id];
rij[i][2] = CS_F_(r33)->val[c_id];
rij[i][3] = CS_F_(r12)->val[c_id];
rij[i][4] = CS_F_(r23)->val[c_id];
rij[i][5] = CS_F_(r13)->val[c_id];
}
}