Problem with cs_probe_set_create_from_segment

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Problem with cs_probe_set_create_from_segment

Post by So_nuc »

Hello,

I'd want to create a set of probes in order to post-process the main fields (Pressure, velocity, Mesh Velocity) at specific location. When I set a single probe by means of the function "cs_probe_set_add_probe" after creating the probe with "cs_probe_set_create", the main fields are written in time (as it is expected).

However when I create a set of probes with "cs_probe_set_create_from_segment", only the DIsplacement field is written. I tried to use the additional function "cs_probe_set_auto_var" to force the other fields to be written but it does not work.

The basic solution to this would be to create a set of single probes but what a pity from my point of view to give up such a practical functionality.

Thanks for the attention.

Best regards,

So_nuc
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Re: Problem with cs_probe_set_create_from_segment

Post by So_nuc »

Hello,

I finally created the probes without the creation from segment as proposed within Code_Saturne.

Kind regards,

So_nuc
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem with cs_probe_set_create_from_segment

Post by Yvan Fournier »

Hello,

We'll check this. Probes_create_from_segment should behave the same as other probes. The displacement field is a bit special, because it can be written based on mesh deformation and not regular variables.

Did you check when creating probes from a segment, you created it as a probe set and not a profile ? The "mesh"/"writer" association is a bit different in both cases, so this might explain the issue.

Best regards,

Yvan
So_nuc
Posts: 45
Joined: Wed Sep 05, 2018 12:16 pm

Re: Problem with cs_probe_set_create_from_segment

Post by So_nuc »

Hello,

Yes I associated the writer as below:

cs_probe_set_t *pset = cs_probe_set_create_from_segment( "probes_set" , n_probes , P1 , P2 );
int writer_ids[] = {CS_POST_WRITER_PROBES};
cs_probe_set_associate_writers(pset, 1, writer_ids);
cs_probe_set_auto_var(pset, "true");

But no worry, it works with a set of single probes, for example automatically written by means of a loop or script file (quite practical when the number of probes to set is relatively huge).

Kind regards,

So_nuc
Post Reply