CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Access to continuity info using a controlDict function? (https://www.cfd-online.com/Forums/openfoam-solving/180709-access-continuity-info-using-controldict-function.html)

New_Old November 28, 2016 18:18

Access to continuity info using a controlDict function?
 
Hello everyone,

After using foamLog during my first days on OpenFOAM this week, I just discovered that it is possible to extract residuals simply by adding a function in controlDict. Something like that:

Code:

residualsHot
{
        functionObjectLibs ("libutilityFunctionObjects.so");
        type residuals;
        region hotSide;
        outputControl timeStep;
        outputInterval 1;
        fields
        (
            p_rgh
            U
            T
        );
}

1. It works great for extracting e.g. P, U and T residuals, but is it possible to extract local and global continuity errors in a similar way?

2. While we're at it, what's your favorite way to monitor conservation of mass, momentum, and energy in OpenFOAM?

I'm working on conjugate heat transfer problems and due to my total inexperience with OpenFOAM, I'm looking for the single most elegant and efficient way to closely monitor the convergence state of my CHT simulations so I can play with all the knobs available and quickly figure out which settings work best for my type of applications.

Many thanks!
/Jay

floquation November 29, 2016 03:25

Quote:

Originally Posted by New_Old (Post 627306)
2. While we're at it, what's your favorite way to monitor conservation of mass, momentum, and energy in OpenFOAM

I use "pyFoamPlotWatcher.py" from pyFoam, which is a package that contains several useful utilities for OpenFoam. Also have a look at "customRegexp" in the same link.

New_Old December 2, 2016 15:12

Thanks Kevin, I will have a closer look at pyFoam.

Just to give some background, I am at the moment using OpenFOAM at home, on a low spec laptop. It's plenty enough to learn the basics of OpenFOAM. However, any external call like foamLog just kill the little performance I manage to squeeze out of the virtual machine.

This is why I have rapidly decided to move away from the foamLog/Gnuplot type of combo, to instead aim for getting everything I need written at runtime.

Hence my interest for function objects.


All times are GMT -4. The time now is 10:21.