CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Obtaining velocities at specific plane (https://www.cfd-online.com/Forums/openfoam-pre-processing/211253-obtaining-velocities-specific-plane.html)

Skymaas November 14, 2018 03:11

Obtaining velocities at specific plane
 
1 Attachment(s)
Hey guys,


I am fairly new to openFOAM so bear with me on this:

In this study, I will be trying the find the uniformity index after an expansion and in order to calculate this, i need to know the velocities after the guide vanes(See attached picture).
I have tried to create a plane just after the guide vanes in Pointwise, which did not work. Then i tried using createPatch, but this did not work either.
Can anyone point me in the direction of how to achieve the velocities at a specific plane, after the guide vanes?

tomf November 15, 2018 05:18

Hi,

Working with the surfaces functionObject, something like the following, could work if you make an stl of the plane that you want to look for the velocities. You should get a high enough resolution on this stl.

Code:

    velocities_on_plane
    {
        type            surfaces;
        functionObjectLibs ("libsampling.so");
        writeControl  writeTime;

        surfaceFormat  vtk;
        fields          (U);

        interpolationScheme cellPoint;

        surfaces
        (     
            Plane
            {
                type            sampledTriSurfaceMesh;
                surface        Plane.stl;
                source          cells;
                interpolate    true;
            }     
        );
    }


Skymaas November 16, 2018 03:10

Hi tomf,


Thanks for your response!
How is one going to include a STL. file in the main geometry?

tomf November 16, 2018 03:33

Hi

You do not do it like that. Just place a separate plane.stl into a folder called constant/triSurface/ like you would for making a mesh using snappyHexMesh. This plane.stl you have to create separately. I do not know what software you have available, but there should be multiple solutions to this. OpenFOAM will interpolate to this plane.

Hope this helps.
Cheers,
Tom

olesen January 1, 2019 05:42

Quote:

Originally Posted by Skymaas (Post 715273)
Hey guys,
I am fairly new to openFOAM so bear with me on this:

In this study, I will be trying the find the uniformity index after an expansion and in order to calculate this, i need to know the velocities after the guide vane.

It is actually a bit easier than that. Uniformity Index is part of surface field functions in 1806 and later - without you needing to write any code.
The plane can either be a regular cutting plane, or from an stl, etc via a distanceSurface with distance = 0.
The latter can be rather important to obtain proper sampling per cell. There is a small example in the tutorials (compressible/rhoSimpleFoam/squareBend) that you can work from.


All times are GMT -4. The time now is 22:56.