CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Setting SolverPerformance in controlDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2014, 15:51
Default Setting SolverPerformance in controlDict
  #1
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
Hi everybody,

I've just started learning OpenFoam, and ran into a problem setting SolverPerformance in controlDict. From what I understand, settings in a case's controlDict is supposed to override settings in $WM_PROJECT_DIR/etc/controlDict, but this doesn't seem to happen when I try it.

What I do is:

run
cp -r $WM_PROJECT_DIR/tutorials/incompressible/icoFoam/cavity .
cd cavity/

I add the line:
SolverPerformance 2;
to the end of cavity/system/controlDict

and then:

blockMesh
icoFoam

The output I get is:

Time = 0.005

Courant Number mean: 0 max: 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 7.55402e-07, No Iterations 35
time step continuity errors : sum local = 5.03809e-09, global = 4.40722e-19, cumulative = 4.40722e-19
DICPCG: Solving for p, Initial residual = 0.523591, Final residual = 9.72352e-07, No Iterations 34
time step continuity errors : sum local = 1.07766e-08, global = 2.93897e-19, cumulative = 7.34619e-19
ExecutionTime = 0.02 s ClockTime = 0 s


However, if I open $WM_PROJECT_DIR/etc/controlDict, and set:
SolverPerformance 2;

The output I get is something like:

Time = 0.005

Courant Number mean: 0 max: 0
DILUPBiCG: Iteration 0 residual = 1
DILUPBiCG: Iteration 1 residual = 0.153298
DILUPBiCG: Iteration 2 residual = 0.0375508
DILUPBiCG: Iteration 3 residual = 0.00820823
DILUPBiCG: Iteration 4 residual = 0.00174405
DILUPBiCG: Iteration 5 residual = 0.000357418
DILUPBiCG: Iteration 6 residual = 7.4212e-05
DILUPBiCG: Iteration 7 residual = 1.51806e-05
DILUPBiCG: Iteration 8 residual = 2.96338e-06
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8

etc



Does anyone know why it didn't work setting the SolverPerformance in the local controlDict for the case?


Cheers,
Begineer is offline   Reply With Quote

Old   March 17, 2014, 13:46
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I think you need to use a sub dictionary like the example below taken from the 2.2 release notes.

Code:
DebugSwitches 
{ 
    SolverPerformance 2; 
}
Regards,
Tom
tomf is offline   Reply With Quote

Old   March 17, 2014, 17:58
Default
  #3
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
Hi Tom,

Thanks for the suggestion. However, when I tried it, I now get an output saying:


...
Create time

Overriding DebugSwitches according to controlDict
Create mesh for time = 0

Reading transportProperties

etc


I didn't get the "Overriding DebugSwitches according to controlDict" previously, so at least it reads the DebugSwitches. Unfortunately, I don't get any extra output information, so something is still missing.
Begineer is offline   Reply With Quote

Old   March 18, 2014, 09:51
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hmm just did a test and I can report the same issue with the unBoundedGauss warning in version 2.2, meaning I get the

"Overriding DebugSwitches according to controlDict"

in the log, but still get the warning. Maybe there is some bug or additional setting I am not aware of.
tomf is offline   Reply With Quote

Old   March 18, 2014, 10:30
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

this message is produced by TimeIO.C and it seems do read the settings:

Code:
    if (controlDict_.found("DebugSwitches"))
    {
        Info<< "Overriding DebugSwitches according to " << controlDict_.name()
            << endl;
    
        simpleObjectRegistry& objects = debug::debugObjects();
        const dictionary& localSettings = controlDict_.subDict("DebugSwitches");
        forAllConstIter(dictionary, localSettings, iter)
        {
            const word& name = iter().keyword();
    
            simpleObjectRegistryEntry* objPtr = objects.lookupPtr(name);
    ...
Maybe it then forgets about them

But OpenFOAM quite happily reads debug switches from ~/.OpenFOAM/<VERSION>/controlDict. Though it is site-wide settings.
alexeym is offline   Reply With Quote

Old   March 18, 2014, 16:11
Default
  #6
New Member
 
Join Date: Jan 2014
Posts: 6
Rep Power: 12
Begineer is on a distinguished road
It seems this has already been reported as a bug:
http://www.openfoam.org/mantisbt/view.php?id=1020
(should have checked this before opening a thread, sorry)

The answer is: "The debug symbols are currently only stored for non-templated classes."

When checking SolverPerformance.C, it indeed is a template class, so I guess that explains it.
Begineer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 09:53
Residual level setting of Fluent lhlh ANSYS 2 November 17, 2012 21:35
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
Ultra high temperature? bk Siemens 2 July 19, 2005 00:01
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 16:58.