Writer output after a given timestep mathematical expression editor issue

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Boone11
Posts: 20
Joined: Fri Jan 13, 2023 10:47 am

Writer output after a given timestep mathematical expression editor issue

Post by Boone11 »

Hi all,

I would like to save outputs with the writer to make animation on Paraview.

I need to save the data every 20 timesteps but only after the 10000th timestep.
I write in the setup file:

Code: Select all

<frequency period="formula">
  if ( niter &gt; 10000 ) {  if (mod((niter - 10000), 20) == 0) { iactive=1; } }
</frequency>
But it does not work, no output is saved. May you help me?

Notice that I even try:

Code: Select all

<frequency period="formula">
  if ( niter &gt; 10000 ) {  iactive=1; }
</frequency>
And it still does not output anything.

Here is the full setup for the writer output:

Code: Select all

                        <writer id="-1" label="results">
                                <directory name="postprocessing"/>
                                <format name="ensight" options="separate_meshes"/>
                                <frequency period="formula">if (niter &gt; 10000) { iactive=1; }</frequency>
                                <output_at_start status="off"/>
                                <output_at_end status="off"/>
                                <time_dependency choice="fixed_mesh"/>
                        </writer>
Thank you very much!
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Writer output after a given timestep mathematical expression editor issue

Post by Yvan Fournier »

Hello,

Which version of the code are you using ? You seem to be using an obsolete/old syntax.

Using a current code version and the correct syntax (check the predefined variables and examples in the MEG dialog), the code seems to work as expected.

Best regards,

Yvan
Boone11
Posts: 20
Joined: Fri Jan 13, 2023 10:47 am

Re: Writer output after a given timestep mathematical expression editor issue

Post by Boone11 »

Hi Yvan,

I am using the 5.3.4 version. Is the syntax adapted to this version? If not, could you give me the appropriate one? There is no example in the MEG dialog.

Thanks again
Best regards,
Martin
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Writer output after a given timestep mathematical expression editor issue

Post by Yvan Fournier »

Hello,

The syntax changed with version 5.3 it seems, so it was probably correct for earlier versions but not for 5.3.

To get the MEG dialog with an example, I recommend upgrading your version (v5.3 has been retired in September 2019).

Best regards,

Yvan
Post Reply