CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

wall shear stress

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes
  • 4 Post By wyldckat
  • 3 Post By albet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2017, 17:45
Default wall shear stress
  #1
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
Hello,

I need a reference (article, thesis or manual) where explicits shows how postProcess utility from OpenFOAM simulates the wallShearStress, more specifically when I use a wall model in a LES simulation.

Can someone tell me any document where is that information?

Thank you for your kind cooperation!
pedroxramos is offline   Reply With Quote

Old   August 27, 2017, 15:04
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,958
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Pedro,

I'm late, but here is my answer just the same - In code documentation for OpenFOAM 5.0, see: https://cpp.openfoam.org/v5/classFoa...s.html#details
Quoting from there:
Quote:
Stress = R \dot n

where:
  • R = stress tensor
  • \dot n = patch normal vector (into the domain)
From the source code file "/src/functionObjects/field/wallShearStress/wallShearStress.C" at line 190:
Code:
    typedef compressible::turbulenceModel cmpModel;
    typedef incompressible::turbulenceModel icoModel;

    volVectorField& wallShearStress =
        mesh_.lookupObjectRef<volVectorField>(type());

    tmp<volSymmTensorField> Reff;
    if (mesh_.foundObject<cmpModel>(turbulenceModel::propertiesName))
    {
        const cmpModel& model =
            mesh_.lookupObject<cmpModel>(turbulenceModel::propertiesName);

        Reff = model.devRhoReff();
    }
    else if (mesh_.foundObject<icoModel>(turbulenceModel::propertiesName))
    {
        const icoModel& model =
            mesh_.lookupObject<icoModel>(turbulenceModel::propertiesName);

        Reff = model.devReff();
    }
    else
    {
        FatalErrorInFunction
            << "Unable to find turbulence model in the "
            << "database" << exit(FatalError);
    }

    calcShearStress(Reff(), wallShearStress);
Therefore what you need to search for is the "devReff()" and "devRhoReff()" methods for the turbulence model that you are currently using... although it seems like it's best to simply search for "devRhoReff()", because "devReff()" is just when "rho" is simply 1.0.

Since you are looking for LES, I went straight for Smagorinsky and there: https://cpp.openfoam.org/v5/classFoa...agorinsky.html - you can find that it's in the public member functions for this inherited class:
Code:
linearViscousStress< LESModel< BasicTurbulenceModel > >
The source code is shown here: https://cpp.openfoam.org/v5/linearVi...ce.html#l00070
The calculation one there is this:
Code:
this->rho_  *  this->nuEff()  *  dev(twoSymm(fvc::grad(this->U_)))
Which effectively is the product of the effective dynamic viscosity (muEff) with the deviatoric operator applied to "2.0 * symmetric tensor" of the gradient of the velocity field... which is related to this: https://en.wikipedia.org/wiki/Cauchy...eviator_tensor


Mmm... OK, if this still looks gibberish to you, take a look into Tobias Holzmann's "Mathematics, Numerics, Derivations and OpenFOAM" document: http://www.holzmann-cfd.de/index.php...s-and-openfoam - this is just so I don't need to go into more detail myself on the mathematics


edit: I forgot to mention that it looks like this calculation is common to any of the turbulence models.

Best regards,
Bruno
__________________

Last edited by wyldckat; August 27, 2017 at 15:05. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   December 19, 2018, 09:15
Default
  #3
Member
 
Amir
Join Date: Jan 2017
Posts: 30
Rep Power: 5
albet is on a distinguished road
I found the answer,

wallShear = (-mesh.Sf().boundaryField()[patchID]/(mag(mesh.Sf().boundaryField()[patchID])) ) & (turbulence->devReff()().boundaryField()[patchID])


this piece of code gives the wall shear stress equal to wallShearStress utility.
Kind regards,
Amir
wyldckat, JamesCC and sourav90 like this.

Last edited by albet; December 19, 2018 at 13:19.
albet is offline   Reply With Quote

Old   April 24, 2020, 14:39
Default
  #4
Member
 
René Thibault
Join Date: Dec 2019
Posts: 55
Rep Power: 2
Tibo99 is on a distinguished road
Hi everyone,

I don't know if I'm on the right post for my following question but, I hope someone here will guide me trough it.

Im trying to simulate a neutral Atmospheric Boundary Layer with a LES tuubulence model in Openfoam. The thing is, when your mesh is not small enough (which is often the case with limited resources) there is a "correction" that you need to do at the bottom wall. The option is to use a "synthetic wall shear stress" at the bottom wall.

One of the most popular "synthetic wall shear stress model" used is shown in this following paper (also see the formula in attachment):

Journal of Wind Engineering & Industrial Aerodynamics 82 (1999) 189-208
T.G. Thomas, J.J.R. Williams
Generating a wind environment for large eddy simulation of bluff body flow

Is there someone who can guide me on how I could code this "wall model", suggesting me a tutorial in Openfoam programming to achieve this? Maybe starting with a code similar to this one or there is maybe something online that I could find close to this?

Thank you very much!

Best Regards,
Attached Images
File Type: png F.png (4.0 KB, 17 views)
Tibo99 is offline   Reply With Quote

Old   October 9, 2020, 05:28
Default Strange wall shear stress patterns
  #5
Member
 
Wouter
Join Date: Aug 2013
Posts: 35
Rep Power: 9
wouterremmerie is on a distinguished road
Hi everyone,

perhaps related to this post:
when we run k-omega SST sims (steady state with wall functions) using a snappyHexMesh without layers, we see the meshing pattern reflected in the surface friction (see attached image). We tried blending for the wall functions and non-orthogonal correctors, but they don't solve the issue. When we add enough layers to the mesh, this mesh-related pattern disappears.

So probably, the "edgy" pattern has something to do with non-orthonogal cells close to the surface. "Nut" also seems to have this pattern in the cells touching the surface, so it's not just a matter of an error in the "cell-to-surface" calculation that wallShearStress performs, but really a problem with the way Reff is calculated perhaps.


Could it be that Reff is not calculated properly for distorted cells? And if so, is there a way to improve the quality somehow?

Thank you very much for your input!
Attached Images
File Type: jpg image (4).jpg (73.6 KB, 9 views)
wouterremmerie is offline   Reply With Quote

Reply

Tags
postprocessing, shear stress, wall model, wall shear stress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
Zero Wall shear stress at porous interface ftab CFX 0 January 18, 2017 11:53
Wall Shear Stress Sampling Probes Mahe88 OpenFOAM Post-Processing 0 December 14, 2016 11:09
Wall Shear Stress prediction varies with fix y+ Jeeloong FLUENT 0 November 24, 2016 18:17
Re: About wall shear stress Mike FLUENT 9 November 17, 2003 15:41


All times are GMT -4. The time now is 19:09.