I am using v7.1.1 and trying to output profiles based on the example provided, however, the profiles directory is created but no files are written in there during runtime.
my domain is a rectangular channel of 0<x<22, 0<y<2, 0<z<0.06 and I want to create y-axis profiles at various x locations.
In cs_user_postprocess.c I first defined additional writer
Code: Select all
cs_post_define_writer(CS_POST_WRITER_PROFILES, /* writer_id */
"profiles", /* writer name */
"profiles", /* directory name */
"plot", /* format name */
"", /* format options */
FVM_WRITER_FIXED_MESH,
true, /* output_at_start */
true, /* output_at_end */
1, /* nt_freq */
-1.0); /* dt_freq */
Code: Select all
void
cs_user_postprocess_probes(void)
{
/* x vertical profiles; note we declare this array as "static" so that
its members are garanteed to be present when the _cell_profile_select
function is called */
const char *line_defs[]
= {"12.0", "x12",
"14.0", "x14",
"16.0", "x16",
"18.0", "x18",
"20.0", "x20"};
for (int i = 0; i < 5; i++) {
/* Define profiles */
const cs_real_t x = atof(line_defs[i*2]);
const cs_real_t start_coords[3] = {x, 0., 0.03};
const cs_real_t end_coords[3] = {x, 1.0, 0.03};
cs_probe_set_t *pset
= cs_probe_set_create_from_segment(line_defs[i*2+1],
-1, /* Automatic sampling */
start_coords,
end_coords);
cs_probe_set_snap_mode(pset, CS_PROBE_SNAP_VERTEX);
/* Associate writers */
const int writer_ids[] = {CS_POST_WRITER_PROFILES};
// const int writer_ids[] = {3};
cs_probe_set_associate_writers(pset, 1, writer_ids);
}
}
Thanks