CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to plot variable (alpha1) on cuttingPlane (runtime postprocessing) (https://www.cfd-online.com/Forums/openfoam-post-processing/123939-how-plot-variable-alpha1-cuttingplane-runtime-postprocessing.html)

pythag0ra5 September 24, 2013 13:30

How to plot variable (alpha1) on cuttingPlane (runtime postprocessing)
 
Hey guys,

i want to use the runtime postprocessing capabilities of OpenFOAM. Therefore, i modified my controlDict-file, it looks like:

Code:

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

libs
(
    "libOpenFOAM.so"
    "libincompressibleTurbulenceModel.so"
    "libincompressibleRASModels.so"
);

application    interFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        120;

deltaT          0.001;

writeControl    adjustableRunTime;

writeInterval  0.05;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision  6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo          0.5;
maxAlphaCo      0.5;

maxDeltaT      1;

functions
{
    #include "cuttingPlane"
}

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

The cuttingPlane-file looks like:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

cuttingPlane
{
    type            surfaces;
    functionObjectLibs ("libsampling.so");
    outputControl  outputTime;

    surfaceFormat  vtk;
    fields          ( alpha1 );

    interpolationScheme cellPoint;

    surfaces
    (
        zNormal
        {
            type            cuttingPlane;
            planeType      pointAndNormal;
            pointAndNormalDict
            {
                basePoint      (0 0 8);
                normalVector    (0 0 1);
            }
            interpolate    true;
        }
    );
}

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

After a certain time-step, i checked the resulting vtk-file in paraview together with the foam-file. Unfortunately, the result of the cuttingPlane looks like nonsense :(:

Here is the complete domain i want to simulate:

http://www.1file.de/uploads/4b061ee8d3.png

Here you can see the domain again (this time with wireframe-representation) together with the cuttingPlane. The position of the cuttingPlane obviously seems to be correct, but the result makes no sense (for me):

http://www.1file.de/uploads/130627e498.png

Do you have a hint for me?

Best regards!

pythag0ra5 September 26, 2013 08:46

Just for your information, i think this is a known bug in OpenFoam 2.2.0. I tried it again with OpenFoam 2.2.1, and now it works!

Best regards!


All times are GMT -4. The time now is 15:59.