View Issue Details

IDProjectCategoryView StatusLast Update
0000641OpenFOAMBugpublic2012-10-08 09:21
Reporterdhora Assigned Touser2 
PrioritynoneSeverityfeatureReproducibilityN/A
Status closedResolutionno change required 
Summary0000641: functionObjects: additional option for outputControl
DescriptionThe functionObjects can be executed at 'outputTime' and 'timeStep'. Sometimes it's useful to use them for the monitoring of the convergence during the corrector loops of a time step in a transient simulation. It's easy to adapt the solvers to do that but then it's not necessary anymore to execute the functionObjects at the end of the time step. A third option, e.g. 'byCommand', would be nice to avoid this unnecessary execution.
TagsNo tags attached.

Activities

wyldckat

2012-08-31 15:07

updater   ~0001658

This seems to be an interesting feature, but I fail to understand what exactly do you want/need it to do!?
Because from your description, the closest I can figure out is the "systemCall" function object for running commands...

A more detailed description and an example would help understand better what you're suggesting.

dhora

2012-08-31 16:24

reporter  

functionObjects.tar.gz (3,877 bytes)

dhora

2012-08-31 16:24

reporter   ~0001663

I attached 3 files. An adapted pisoFoam solver which executes the functionObjects after each corrector loop. A controlDict file for the cavity tutorial and the corresponding log file. I want to avoid the execution of the functionObjects at the end of the time step. It produces the same results as in the last corrector loop. It's not a severe problem but not necessary.

The goal is to be sure that a sufficiently high number of corrector loops is used in the simulation.

wyldckat

2012-08-31 17:50

updater   ~0001666

Last edited: 2012-08-31 17:52

OK, now it is a lot easier to understand :) And the solution _seems_ relatively easy as well, at least in theory.

So, here's the overview of the situation:
# Right now (AFAIK) only Foam::Time is taking advantage of function objects.

# In OpenFOAM 2.0 was added the Foam::solutionControl class, from which derive "pimpleControl" and "simpleControl".

# "pisoControl" wasn't added back then; I deduce (from what I've seen) that it was because the developers are planning on dropping independent PISO for the preferred PIMPLE, which integrates PISO.

# So, putting aside the need for "pisoControl", what seems _easy_ to do is to add to Foam::solutionControl class the private variable "functionObjectList functionObjects_", which is the same it's currently only available in Foam::Time.
  Additionally, all methods used for the solution loops will have to call up the functionObjects_ the same way as already done in Foam::Time.

# The problem is that this is all _in theory_, because I'm seeing that "functionObjectList" is tightly connected to Foam::Time. This would likely result in the need to either re-write the existing "functionObject" class infrastructure as a template class or duplicate+modify the existing code for Foam::solutionControl.

Nonetheless, the final outcome would result in two types of function objects: Time based and Solution based. Having both in the same dictionary branch would be somewhat complicated, but not impossible.
With any luck, this is already planned in the roadmap for OpenFOAM since 2.0 was launched.

user2

2012-09-17 13:05

  ~0001691

> The goal is to be sure that a sufficiently high number of corrector loops is used in the simulation.

If this is the case, you can use the residualControl function object to ensure that the equation is solved to within the required relative or absolute tolerance

user2

2012-10-08 09:21

  ~0001706

orphaned report - closing

Issue History

Date Modified Username Field Change
2012-08-30 12:48 dhora New Issue
2012-08-31 15:07 wyldckat Note Added: 0001658
2012-08-31 16:24 dhora File Added: functionObjects.tar.gz
2012-08-31 16:24 dhora Note Added: 0001663
2012-08-31 17:50 wyldckat Note Added: 0001666
2012-08-31 17:51 wyldckat Note Edited: 0001666
2012-08-31 17:52 wyldckat Note Edited: 0001666
2012-09-17 13:05 user2 Note Added: 0001691
2012-10-08 09:21 user2 Note Added: 0001706
2012-10-08 09:21 user2 Status new => closed
2012-10-08 09:21 user2 Assigned To => user2
2012-10-08 09:21 user2 Resolution open => no change required