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

wall shear stress

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

Like Tree3Likes
  • 1 Post By wyldckat
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   August 20, 2014, 00:06
Default wall shear stress
  #1
Member
 
Ali reza
Join Date: Mar 2014
Posts: 95
Rep Power: 3
1988 is on a distinguished road
Hello everyone
I want to plot wall shear stress contours and I did it by using"wallShearStress" command but it does not give me the right amount of that and it is some how irrelevant.
I have also read this page
Measuring wall shear stress in bend pipe
but I did not get what to do ,is there any idea?

Last edited by wyldckat; August 31, 2014 at 16:42. Reason: removed [HTML] wrapper for the link to the thread
1988 is offline   Reply With Quote

Old   August 21, 2014, 07:09
Default
  #2
Member
 
Ali reza
Join Date: Mar 2014
Posts: 95
Rep Power: 3
1988 is on a distinguished road
there is no idea?
1988 is offline   Reply With Quote

Old   August 31, 2014, 09:38
Default
  #3
Member
 
Ali reza
Join Date: Mar 2014
Posts: 95
Rep Power: 3
1988 is on a distinguished road
no one is interested in this topic?
1988 is offline   Reply With Quote

Old   August 31, 2014, 17:23
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Ali Reza,

In the next few paragraphs I'll be going on a rant, because, well... it has been hard to get the time to help people on the forum and then I stumble on this kind of thread and it makes me feel like I should find better things to do in life.
Therefore, if you don't want to read what I've written below, I strongly suggest you read instead the instructions given on this thread: How to give enough info to get help


------------------

Ready? Commencing ranting:
Quote:
Originally Posted by 1988 View Post
Hello everyone
OK, good start

Quote:
Originally Posted by 1988 View Post
I want to plot wall shear stress contours
OK, so far so good...
Quote:
Originally Posted by 1988 View Post
and I did it by using"wallShearStress" command
OK, you used the utility wallShearStress, seems all well so far...

Quote:
Originally Posted by 1988 View Post
but it does not give me the right amount of that and it is some how irrelevant.
And you lost me. That part of the sentence pretty much says nothing Ironically, it's pretty much "irrelevant" for making it possible to help you based on your description

Quote:
Originally Posted by 1988 View Post
I have also read this page
Measuring wall shear stress in bend pipe
but I did not get what to do ,is there any idea?
Uhm... there are over 40 posts on that thread. It'll take me 15-30 minutes to read it all.
You know, I and many people that use this forum have got plenty of ideas, but usually nobody has 20h to write every possible idea on how you could solve the problem
In my case, pretty much because I have not understood what the problem was, since you did not clearly state what the problem is.

Quote:
Originally Posted by 1988 View Post
there is no idea?
Actually, the problem is a lack of time.

Quote:
Originally Posted by 1988 View Post
no one is interested in this topic?
Again, not a problem of a lack of interest, but rather a lack of time .


Let me try to put this into a perspective to try and explain it to you, so that perhaps you can understand why I'm ranting. I like helping people here on the forum, because:
  1. It's better than playing computer games, since this way I can learn more about OpenFOAM and ParaView and so on, which in comparison games are unlikely able to teach me about.
  2. I like helping people and I prefer to help people in something that I'm good at or at least in something I would like to become good at.
But unfortunately, as time passes by, I become older and older, stress takes its toll on the body and mind... and work continues to increase. Because in today's world, usually as one gains more knowledge, also gains more responsibilities and proportionally less free time.
This to say that a few years ago every day I was able to come to the forums for an hour or two, and help a little few people every day. Nowadays it's a matter of great luck that I'm able to spend 2-4h per weekend to try and help a few people.

... and now I'm getting tired of ranting... yes, I'm getting that old ...

OK, so to sum it up: with luck, I'll be able to answer your next post next Saturday, 6 days from now. And I can only hope that you will provide more than enough information in order to help you.
If you do not provide enough information, that will mean that I will have to write every single detail I need to know from your case in order for me to be able to help you... and only 7 days from then will I be able to look at your answer with all of the necessary information.


In other words:
  1. If you had provided enough information in your very first post, or in the other 2 posts you made with no additional relevant information, I would have been able to answer your question and we would both be happy.
  2. Since you did not, then with luck, I will be able to answer your question in 6 days time.
  3. But if you do not provide enough information, it will take 13 or more days, for me or anyone else to be able to answer you, if you do not provide the necessary information.
Therefore, if you really want to know the answer and if you really want me or anyone else to help you, then please provide more than enough information when you ask your question, so that we can all be happy!

End of rant.
---------------

Best regards,
Bruno

PS: I wasn't very helpful on this post, I know, but unfortunately you did not provide enough information in order to help you
1988 likes this.
wyldckat is offline   Reply With Quote

Old   September 4, 2014, 05:53
Default
  #5
Member
 
Ali reza
Join Date: Mar 2014
Posts: 95
Rep Power: 3
1988 is on a distinguished road
thanks for your complete analysis and remebering me to poste in the right way.
I feel so good after reading your post,it was useful .
ok.
I am going to give the the whole things about this case.I have simulated,laminar,incompressible,newotoinian and transient flow in a pipe which is shown in the picture.
I have got different contours like velocity maginitude and pressure,all of them show what I have expected to see but the wall shear stress contours were not in this way.
the wall shear stress contours shoul be the same as which has been shown in picture2.
As I said before,I think there some thing wrong between what I need and what openfoam shows,is that right?
what should I do?
inlet velocity profile is u=0.15-0.15cos(2.5pi*t)
and nu is defined as =3.78e-6
source codes are here
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Application
    wallShearStress

Description
    Calculates and reports wall shear stress for all patches, for the
    specified times when using RAS turbulence models.

    Default behaviour assumes operating in incompressible mode.
    Use the -compressible option for compressible RAS cases.

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"

#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RAS/RASModel/RASModel.H"

#include "fluidThermo.H"
#include "compressible/RAS/RASModel/RASModel.H"

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

void calcIncompressible
(
    const fvMesh& mesh,
    const Time& runTime,
    const volVectorField& U,
    volVectorField& wallShearStress
)
{
    #include "createPhi.H"

    singlePhaseTransportModel laminarTransport(U, phi);

    autoPtr<incompressible::RASModel> model
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );

    const volSymmTensorField Reff(model->devReff());

    forAll(wallShearStress.boundaryField(), patchI)
    {
        wallShearStress.boundaryField()[patchI] =
        (
           -mesh.Sf().boundaryField()[patchI]
           /mesh.magSf().boundaryField()[patchI]
        ) & Reff.boundaryField()[patchI];
    }
}


void calcCompressible
(
    const fvMesh& mesh,
    const Time& runTime,
    const volVectorField& U,
    volVectorField& wallShearStress
)
{
    IOobject rhoHeader
    (
        "rho",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::NO_WRITE
    );

    if (!rhoHeader.headerOk())
    {
        Info<< "    no rho field" << endl;
        return;
    }

    Info<< "Reading field rho\n" << endl;
    volScalarField rho(rhoHeader, mesh);

    #include "compressibleCreatePhi.H"

    autoPtr<fluidThermo> pThermo(fluidThermo::New(mesh));
    fluidThermo& thermo = pThermo();

    autoPtr<compressible::RASModel> model
    (
        compressible::RASModel::New
        (
            rho,
            U,
            phi,
            thermo
        )
    );

    const volSymmTensorField Reff(model->devRhoReff());

    forAll(wallShearStress.boundaryField(), patchI)
    {
        wallShearStress.boundaryField()[patchI] =
        (
           -mesh.Sf().boundaryField()[patchI]
           /mesh.magSf().boundaryField()[patchI]
        ) & Reff.boundaryField()[patchI];
    }
}


int main(int argc, char *argv[])
{
    timeSelector::addOptions();

    #include "addRegionOption.H"

    argList::addBoolOption
    (
        "compressible",
        "calculate compressible wall shear stress"
    );

    #include "setRootCase.H"
    #include "createTime.H"
    instantList timeDirs = timeSelector::select0(runTime, args);
    #include "createNamedMesh.H"

    const bool compressible = args.optionFound("compressible");

    forAll(timeDirs, timeI)
    {
        runTime.setTime(timeDirs[timeI], timeI);
        Info<< "Time = " << runTime.timeName() << endl;
        mesh.readUpdate();

        volVectorField wallShearStress
        (
            IOobject
            (
                "wallShearStress",
                runTime.timeName(),
                mesh,
                IOobject::NO_READ,
                IOobject::AUTO_WRITE
            ),
            mesh,
            dimensionedVector
            (
                "wallShearStress",
                sqr(dimLength)/sqr(dimTime),
                vector::zero
            )
        );

        IOobject UHeader
        (
            "U",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        );

        if (UHeader.headerOk())
        {
            Info<< "Reading field U\n" << endl;
            volVectorField U(UHeader, mesh);

            if (compressible)
            {
                calcCompressible(mesh, runTime, U, wallShearStress);
            }
            else
            {
                calcIncompressible(mesh, runTime, U, wallShearStress);
            }
        }
        else
        {
            Info<< "    no U field" << endl;
        }

        Info<< "Writing wall shear stress to field " << wallShearStress.name()
            << nl << endl;

        wallShearStress.write();
    }

    Info<< "End" << endl;

    return 0;
}


// ************************************************************************* //
the link which has been posted before was about something in this code that should be changed to show the expeced wall shear stress, they said that wall shear stress command in openfoam computes wall traction instead of wall shear stress.
do you agree with that?
Attached Images
File Type: png picture2.png (86.9 KB, 32 views)
File Type: png picture1.png (26.9 KB, 33 views)
1988 is offline   Reply With Quote

Old   September 7, 2014, 16:20
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Ali,

My guess is that you did not take into account the fact that the wallShearStress utility will give you the results in the same units of the pressure field: http://www.cfd-online.com/Wiki/Wall_shear_stress
Which for incompressible flow, in OpenFOAM, it usually is in "kinematic pressure", namely in "m2/s2".

In post #46 of the other thread you pointed out, you'll find this comment:
Quote:
Originally Posted by Nucleophobe View Post
Edit:
I just tried this for my case, and I get the same result doing either of the following:
tau = (wallShearStress) * rho
tau = (wallGradU) * mu
This means that the value are seeing in OpenFOAM does not yet take into account the density of the fluid. You can use the Calculator filter in ParaView to multiply the "wallShearStress" field by the density value you have for your fluid.

Best regards,
Bruno
1988 and gebab like this.
wyldckat is offline   Reply With Quote

Old   November 19, 2014, 11:19
Default
  #7
New Member
 
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 3
killsecond is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Ali,

My guess is that you did not take into account the fact that the wallShearStress utility will give you the results in the same units of the pressure field: http://www.cfd-online.com/Wiki/Wall_shear_stress
Which for incompressible flow, in OpenFOAM, it usually is in "kinematic pressure", namely in "m2/s2".

In post #46 of the other thread you pointed out, you'll find this comment:

This means that the value are seeing in OpenFOAM does not yet take into account the density of the fluid. You can use the Calculator filter in ParaView to multiply the "wallShearStress" field by the density value you have for your fluid.

Best regards,
Bruno
Hi Bruno,

I know "wallShearStress" utility will show the xyz components of wall shear stress. I want to show the skin friction coefficient (cf=tauw/(0.5*rho*U^2) around a circular cylinder, so which component of wall shear stress is the tauw or how to calculate it?
killsecond is offline   Reply With Quote

Old   November 23, 2014, 14:45
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,258
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings killsecond,

Quote:
Originally Posted by killsecond View Post
I know "wallShearStress" utility will show the xyz components of wall shear stress. I want to show the skin friction coefficient (cf=tauw/(0.5*rho*U^2) around a circular cylinder, so which component of wall shear stress is the tauw or how to calculate it?
Have you tried using the Calculator filter in ParaView? http://www.itk.org/Wiki/ParaView/Users_Guide/Calculator

Oh, wait... you want to know what "tauw" is in fact from the wall shear stress vector? But what you want is the skin friction on the surface of a cylinder... you're referring to this: http://www.cfd-online.com/Wiki/Skin_...on_coefficient
Honestly, I have no idea. My best guess is that you use the magnitude of the wall shear stress. This is a generic Fluid Dynamics question, so I suggest that you ask on the main CFD forum: http://www.cfd-online.com/Forums/main/

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   November 23, 2014, 21:32
Smile
  #9
New Member
 
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 3
killsecond is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings killsecond,



Have you tried using the Calculator filter in ParaView? http://www.itk.org/Wiki/ParaView/Users_Guide/Calculator

Oh, wait... you want to know what "tauw" is in fact from the wall shear stress vector? But what you want is the skin friction on the surface of a cylinder... you're referring to this: http://www.cfd-online.com/Wiki/Skin_...on_coefficient
Honestly, I have no idea. My best guess is that you use the magnitude of the wall shear stress. This is a generic Fluid Dynamics question, so I suggest that you ask on the main CFD forum: http://www.cfd-online.com/Forums/main/

Best regards,
Bruno
Hi Bruno,

Thank you for your advices, I will try them.
killsecond is offline   Reply With Quote

Reply

Thread Tools
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 On
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 3 June 12, 2013 02:12
Wall shear stress GamFlu Main CFD Forum 0 June 11, 2011 04:33
Wall Shear Stress GamFlu FLUENT 0 June 11, 2011 03:52
relationship between wall shear stress and TKE winter FLUENT 0 December 11, 2007 18:11
Re: About wall shear stress Mike FLUENT 9 November 17, 2003 15:41


All times are GMT -4. The time now is 18:30.