CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   wallShearStress Monitoring (http://www.cfd-online.com/Forums/openfoam-solving/118872-wallshearstress-monitoring.html)

Mojtaba.a June 5, 2013 14:08

wallShearStress Monitoring
 
Hi Guys,
I am simulating a flow over an external body in which calculating wallShearStress is my major effort. I want to be able to monitor this field, therefore I can stop simulations whenever the value of this field gets steady.
Right now i am monitoring U field without any problems using probes function object.
As you know wallShearStress is defined on surfaces, I don't know how to monitor specified points on particular surfaces.
Is there any function object similar to probes that can handle surfaces?

Thank you very much,
Mojtaba

Mojtaba.a June 8, 2013 16:27

Any suggestions?

Artur November 26, 2013 12:43

Hi,

Did you find an answer to this? I wrote a utility which writes out the wallShearStress at runtime using function objects and then tried using the patchCloud runtimeObject to extract the values over a set of points (see below) but it didn't work, I end up with no output files. However, if I tell it to probe pressure it works just fine...

If you haven't worked this out yet maybe together we can find a solution..

Best wishes,

Artur

Code:

samplingLine
{
    type            sets;
    functionObjectLibs ("libsampling.so");

    outputControl  outputTime;
    writeInterval  1600;

    setFormat  vtk;
    fields          ( p wallShearStress );

    interpolationScheme cellPoint;

    sets
    (
        plateProbePoints
        {
        type        patchCloud;
        axis        xyz;
        points
        (
            (0 0.01 0.05)
            (0.2 0.01 0.05)
            (0.4 0.01 0.05)
            (0.6 0.01 0.05)
            (0.8 0.01 0.05)
            (1 0.01 0.05)
        );
        maxDistance 0.1;    // maximum distance to search
        patches    (plate);
        }

    );
}


Mojtaba.a November 27, 2013 05:14

Quote:

Originally Posted by Artur (Post 463591)
Hi,

Did you find an answer to this? I wrote a utility which writes out the wallShearStress at runtime using function objects and then tried using the patchCloud runtimeObject to extract the values over a set of points (see below) but it didn't work, I end up with no output files. However, if I tell it to probe pressure it works just fine...

If you haven't worked this out yet maybe together we can find a solution..

Best wishes,

Artur

Code:

samplingLine
{
    type            sets;
    functionObjectLibs ("libsampling.so");

    outputControl  outputTime;
    writeInterval  1600;

    setFormat  vtk;
    fields          ( p wallShearStress );

    interpolationScheme cellPoint;

    sets
    (
        plateProbePoints
        {
        type        patchCloud;
        axis        xyz;
        points
        (
            (0 0.01 0.05)
            (0.2 0.01 0.05)
            (0.4 0.01 0.05)
            (0.6 0.01 0.05)
            (0.8 0.01 0.05)
            (1 0.01 0.05)
        );
        maxDistance 0.1;    // maximum distance to search
        patches    (plate);
        }

    );
}


Hi,
Unfortunately I haven't found a solution yet. Well this is interesting. How have you been able to monitor a surface? You have monitored surface pressure successfully using this utility?
Can you upload your utility?

Artur November 27, 2013 06:08

1 Attachment(s)
Quote:

Originally Posted by Mojtaba.a (Post 463694)
Hi,
Unfortunately I haven't found a solution yet. Well this is interesting. How have you been able to monitor a surface? You have monitored surface pressure successfully using this utility?
Can you upload your utility?

Hi,

The provided snippet, when put in the functions( ); in the controlDict will extract the pressure over a surface. The algorithm will snap the points from the specified locations to the nearest point on the surface and sample there (governed by the max distance). Say if my surface was at y=0 (which it is) it would sample at the x locations given and z=0.05. It won't do the wall shear stress though. Hence I modified the utility that calculates wallShearStess at runtime to dump the values to a file. I only coded it last night and can't spend too much time on it since it's just a side project and so it's not very well written and will dump the values for all cell centres of a specific patch (I need it for a 2D case and so that's good enough for me). If you need it only for monitoring convergence you can just pick a few points from there and look at their time trace and it should work just as well. See the dropbox link for a test case and the utility (I use OF 2.2.2) is attached..

https://www.dropbox.com/s/zuq0k17vhdik6bm/flatPlate.tgz

All the best,

Artur


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