OutputActive

Discussion about coding and new developments
Post Reply
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

OutputActive

Post by tetraeder »

Hello,

i'm working on a user defined solver and i was wondering if there is a way to control the output interval inside my solver. I've looked at ResultOutputSolve and noticed a variable named OutputActive. But i don't understand what it does. If i'm wrong, is there another variable which can be changed to control the output behavior?
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: OutputActive

Post by raback »

Hi

Well, there is a recently introduced keyword "Exec Condition". If it is positive you run the solver, if negative then not. You could thereby define a global variable in some other solver. The only application I did was for the FindOptimum solver where you now define a variable "Found Better" (1 if found, -1 if not) such that you can save the results by setting in the Solver section

Code: Select all

Exec Condition = Equals Found Better
You can also use

Code: Select all

Exec Solver = after saving
then the solver which be run at the instances define by Output Intervals.

-Peter
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

Re: OutputActive

Post by tetraeder »

Thank you! It works!
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

Re: OutputActive

Post by tetraeder »

Hello,
Is there also a way to reset the current timestep? For example if one timestep was solved, but maybe after it i would like to change some parameters and re-run this timestep. If this is impossible, would it be possible to increase the number of Timestep Intervals?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: OutputActive

Post by mzenker »

Hi,

have a look at thia thread: viewtopic.php?f=3&t=2674#p8142. You will find code for an adaptive timestepping solver I wrote which resets to the previous time step if the current one did not converge.

HTH,

Matthias
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

Re: OutputActive

Post by tetraeder »

I've looked at your code, but the problem is that when i define the number of timestep intervalls (for example 400), elmer increases the current timestep, even if there was no convergence, and stops the simulation after 400 timesteps.
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: OutputActive

Post by mzenker »

Hi,

have a look at the code again... ;)
The solver takes care of that. Set the number timesteps to a large number, e.g. 10000, and set the duration in the solver section. The solver stops Elmer if the duration is reached.

HTH,

Matthias
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

Re: OutputActive

Post by tetraeder »

Ahhhhh now i understand it! This makes sense. Thank you.
Post Reply