Exec Intervals, but skip first iteration

Numerical methods and mathematical models of Elmer
Post Reply
AndrejR
Posts: 6
Joined: 04 Dec 2020, 17:36
Antispam: Yes

Exec Intervals, but skip first iteration

Post by AndrejR »

Hi, I have a steady-state simulation, in which I want a certain solver to run only every 5 iterations (5th iteration, 10th iteration...). I attempted to do this:

Code: Select all

Solver 8:
   Exec Solver: after timestep
   Exec Intervals(1): 5
but this makes solver run on 1st iteration, 6th iteration etc. What can I do to skip that first execution?
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Exec Intervals, but skip first iteration

Post by kevinarden »

You should read through Chapter 13, there is some discussion on controlling when solvers run, or don't run.

https://www.nic.funet.fi/pub/sci/physic ... Manual.pdf
AndrejR
Posts: 6
Joined: 04 Dec 2020, 17:36
Antispam: Yes

Re: Exec Intervals, but skip first iteration

Post by AndrejR »

I am thinking that maybe Exec Condition with custom Fortran function might help me. But I need to pass it current value of Steady-State iterator. Is this possible? I cannot find any such information in the documentation.

EDIT: I just realized that's just variable Time in Steady-State simulations. A little confusing, but I got it. I will try it and let you know if it worked.

EDIT2: Works like a charm, thanks!
Post Reply