Page 1 of 1

Writer output after a given timestep mathematical expression editor issue

Posted: Thu Aug 24, 2023 12:33 pm
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!

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

Posted: Mon Aug 28, 2023 12:20 am
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

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

Posted: Mon Aug 28, 2023 9:05 am
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

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

Posted: Mon Aug 28, 2023 4:03 pm
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