CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   probing vorticity at a point (http://www.cfd-online.com/Forums/openfoam/102591-probing-vorticity-point.html)

suryawanshi_nitin May 29, 2012 10:57

probing vorticity at a point
 
Hi
Im doing 2D LES simulatin for flow over flat plate using pisoFoam algorithm. I want to monitor vorticity at a particular point, like we use probe function in openfoam for velocity/ pressure at point.
Even i tried with available post utilities feature vorticity in openfoam but it is giving me only vorticity values at point but without giving the corresponding x,y,z coordinates of that point... plz help me on this
I want to monitor vorticity within boundary layer about 40 points.

thanks in advance...

Regards
Nitin Suryawanshi

gschaider May 29, 2012 12:12

Quote:

Originally Posted by suryawanshi_nitin (Post 363594)
Hi
Im doing 2D LES simulatin for flow over flat plate using pisoFoam algorithm. I want to monitor vorticity at a particular point, like we use probe function in openfoam for velocity/ pressure at point.
Even i tried with available post utilities feature vorticity in openfoam but it is giving me only vorticity values at point but without giving the corresponding x,y,z coordinates of that point... plz help me on this
I want to monitor vorticity within boundary layer about 40 points.

"only vorticity values at point": you mean you get a full field-file but you want only values at probe-locations? Then you might want to run the probeLocations-utility afterwards (it needs a dict in which you can specify the name of the field and the locations of the probes).

If you want to monitor the vorticity during the run you might want to try swak4Foam with this in controlDict:
Code:

functions {
    vortField
    {
        type expressionField;
        outputControl timeStep;
        outputInterval 1;
        fieldName vorticity;
        expression "curl(U)";
        autowrite true;       
    }
    probeVort
    {
        type probes;
        fields (
          vorticity
        );
....

Maybe there is a functionObject in OF that has the functionality of the vorticity-utility then you can use that instead of the expressionField (and avoid using swak4Foam at all)

suryawanshi_nitin June 16, 2012 01:19

Thanks for your reply sir and very very sorry for delayed reply as i was busy with other things.
I have tried with probeLocations sampling utility. it has worked well..
but for that first we should create vorticity field for each time step by typing vorticity in termianl within working directory in which time step wise results are there

Thanks again...

maalan May 13, 2014 12:37

Quote:

If you want to monitor the vorticity during the run you might want to try swak4Foam with this in controlDict:
Code:

functions {
    vortField
    {
        type expressionField;
        outputControl timeStep;
        outputInterval 1;
        fieldName vorticity;
        expression "curl(U)";
        autowrite true;       
    }
    probeVort
    {
        type probes;
        fields (
          vorticity
        );
....

Maybe there is a functionObject in OF that has the functionality of the vorticity-utility then you can use that instead of the expressionField (and avoid using swak4Foam at all)
I do exactly the same in order to compute the drag or lift coefficients for the flow past a square cylinder 2D via the vorticity formulation, i.e.:

Code:

    IpressureLift
    {
        type swakExpression;
        valueType patch;
        patchName SQUARE;
        accumulations (
            sum
        );
        expression "p*normal()&vector(0,1,0)*area()";
        verbose true;
    }

    IviscousLift
    {
        type swakExpression;
        valueType patch;
        patchName SQUARE;
        accumulations (
            sum
        );
        expression "-(2/200)*(vorticity^normal())&vector(0,1,0)*area()";
        verbose true;
    }

When I compared this results versus the forces obtained via the function forces in OF, I find differences in the viscous term... The pressure term is exactly the same.

I guess that OF calculates the viscosity term by using the viscous stress tensor, isn't it? Anyway, how could I improve my results bernhard?

gschaider May 13, 2014 19:56

Quote:

Originally Posted by maalan (Post 491599)
I do exactly the same in order to compute the drag or lift coefficients for the flow past a square cylinder 2D via the vorticity formulation, i.e.:

Code:

    IpressureLift
    {
        type swakExpression;
        valueType patch;
        patchName SQUARE;
        accumulations (
            sum
        );
        expression "p*normal()&vector(0,1,0)*area()";
        verbose true;
    }

    IviscousLift
    {
        type swakExpression;
        valueType patch;
        patchName SQUARE;
        accumulations (
            sum
        );
        expression "-(2/200)*(vorticity^normal())&vector(0,1,0)*area()";
        verbose true;
    }

When I compared this results versus the forces obtained via the function forces in OF, I find differences in the viscous term... The pressure term is exactly the same.

I guess that OF calculates the viscosity term by using the viscous stress tensor, isn't it? Anyway, how could I improve my results bernhard?

Yep. And part of the problem might be that expressionField does its calculations on the cells and the boundary values are basically zeroGradient. The stuff that the turbulence-model calculates (R etc) are available through function plugins (only to the internalField-parser but if I remember correctly with the right BCs). To use function plugins add the right library (for instance "libswakThermoTurbFunctionPlugin.so") to the libs-entry and the parser will know the new functions (also report a list of functions the first time it is used)

maalan May 14, 2014 01:58

Quote:

Yep. And part of the problem might be that expressionField does its calculations on the cells and the boundary values are basically zeroGradient. The stuff that the turbulence-model calculates (R etc) are available through function plugins (only to the internalField-parser but if I remember correctly with the right BCs). To use function plugins add the right library (for instance "libswakThermoTurbFunctionPlugin.so") to the libs-entry and the parser will know the new functions (also report a list of functions the first time it is used)
Thank you for your reply, bernhard, but I forgot to say that my case is laminar (Re_L=200). How do you think I could manage the vorticity issue on the square surface?? (I assume that the critical point is on the corners).

Thanks again!

gschaider May 14, 2014 09:35

Quote:

Originally Posted by maalan (Post 491663)
Thank you for your reply, bernhard, but I forgot to say that my case is laminar (Re_L=200). How do you think I could manage the vorticity issue on the square surface?? (I assume that the critical point is on the corners).

Thanks again!

Sorry. Haven't time to think it properly through, but my gut feeling says that it has something to do (or can be replaced) by snGrad(U) (that'd be the gradient of U in the direction of normal())

maalan May 15, 2014 05:46

Quote:

Sorry. Haven't time to think it properly through, but my gut feeling says that it has something to do (or can be replaced) by snGrad(U) (that'd be the gradient of U in the direction of normal())
Sorry but I am little confused... I'm trying to calculate the viscous term via the vorticity integral as shown:

Code:

    IviscousLift
    {
        type swakExpression;
        valueType patch;
        patchName SQUARE;
        accumulations (
            sum
        );
        expression "-(2/200)*(vorticity^normal())&vector(0,1,0)*area()";
        verbose true;
    }

Where the vorticity field was previously calculated in the next manner:

Code:

   
    vorticity
    {
        type expressionField;
        outputControl timeStep;
        fieldName vorticity;
        expression "curl(U)";
        verbose true;
        autowrite true;
    }

So, I don't understand why it has to do with snGrad(U).
Would you mind to explain a little more, bernhard?

Thanks!


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