CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Probing function in OpenFOAM-1.6 (https://www.cfd-online.com/Forums/openfoam/68115-probing-function-openfoam-1-6-a.html)

sven September 7, 2009 15:03

Probing function in OpenFOAM-1.6
 
Hey, I wanted to use the probing function to plot some variables over time in OpenFOAM-1.6. I already used this function in OpenFOAM-1.5. Thus, I just copied the entries from a controlDict from 1.5 and added that to my controlDict in 1.6. My controlDict in 1.6 then looks like:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application turbFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 10;

deltaT 0.0005;

writeControl timeStep;

writeInterval 2000;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;


Code:

functions
(
    probes1
    {
        // Type of functionObject
        type probes;

        // Where to load it from (if not already in solver)
        functionObjectLibs ("libsampling.so");

        // Locations to be probed. runTime modifiable!
        probeLocations
        (
            (10 0.05 0.0)
        );

        // Fields to be probed. runTime modifiable!
        fields
        (
            U
        );
    }

    fieldAverage1
    {
        // Type of functionObject
        type fieldAverage;

        // Where to load it from (if not already in solver)
        functionObjectLibs ("libfieldAverage.so");

        // Fields to be  averaged - runTime modifiable
        fields
        (
            U
            {
                mean            on;
                prime2Mean      on;
                base            time;
            }
            p
            {
                mean            on;
                prime2Mean      on;
                base            time;
            }
        );
    }
);


// ************************************************************************* //

If I try to run my case with that, I always get an error:

Code:

keyword outputControl is undefined in dictionary "::functions::probes1"

file: ::functions::probes1 from line 53 to line 68.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 388.

FOAM exiting

Does anyone know where the problem is or has anyone successfully used the probing function in OpenFOAM-1.6??

Thanks a lot!

ulli September 7, 2009 15:19

Hi Sven,

I used the probes in OF 1.6. An example can be found in
\incompressible\pimpleFoam\t-junction\system

// Write at same frequency as fields
outputControl outputTime;
outputInterval 1;

I think there is new keyword word for the output control.

Ulrich

sven September 8, 2009 19:26

Thanks Ulli, this was exactly the problem. Now it works!


All times are GMT -4. The time now is 23:47.