|
[Sponsors] |
August 20, 2014, 01:06 |
wall shear stress
|
#1 |
Senior Member
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12 |
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 http://www.cfd-online.com/Forums/ope...bend-pipe.html but I did not get what to do ,is there any idea? Last edited by wyldckat; August 31, 2014 at 17:42. Reason: removed [HTML] wrapper for the link to the thread |
|
August 21, 2014, 08:09 |
|
#2 |
Senior Member
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12 |
there is no idea?
|
|
August 31, 2014, 10:38 |
|
#3 |
Senior Member
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12 |
no one is interested in this topic?
|
|
August 31, 2014, 18:23 |
|
#4 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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: http://www.cfd-online.com/Forums/ope...-get-help.html ------------------ Ready? Commencing ranting: OK, good start OK, so far so good... OK, you used the utility wallShearStress, seems all well so far... Quote:
Quote:
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. Actually, the problem is a lack of time. 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:
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:
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
__________________
|
|||
September 4, 2014, 06:53 |
|
#5 |
Senior Member
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12 |
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; } // ************************************************************************* // do you agree with that? |
|
September 7, 2014, 17:20 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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:
Best regards, Bruno
__________________
|
||
November 19, 2014, 11:19 |
|
#7 | |
New Member
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 12 |
Quote:
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? |
||
November 23, 2014, 14:45 |
|
#8 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings killsecond,
Quote:
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 |
||
November 23, 2014, 21:32 |
|
#9 | |
New Member
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 12 |
Quote:
Thank you for your advices, I will try them. |
||
May 4, 2017, 06:25 |
Same subject, different issue?
|
#10 |
New Member
novo
Join Date: Jun 2015
Posts: 11
Rep Power: 11 |
Hi,
I have a case study in which I make use of simpleFoam to find the steady-state flow solution inside a microfluidic channel. I am attaching a print screen of the (obtained) flow velocity (magnitude to the left and vector to the right). Then, as according to many suggestions and the guide itself, I want to calculate the wall shear stress by running: Code:
simpleFoam -postProcess -func wallShearStress Code:
Create time Create mesh for time = 0 SIMPLE: convergence criteria field p tolerance 0.01 field U tolerance 0.001 field "(k|epsilon|omega|f|v2)" tolerance 0.001 wallShearStress wallShearStress: processing all wall patches Time = 0 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type laminar No MRF models present wallShearStress wallShearStress write: writing field wallShearStress Time = 53 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type laminar No MRF models present wallShearStress wallShearStress write: writing field wallShearStress End Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform (0 0 0); boundaryField { Walls { type calculated; value uniform (0 0 0); } Inlet_No_Concentration { type calculated; value uniform (0 0 0); } Inlet_Concentration { type calculated; value uniform (0 0 0); } Outlet { type calculated; value uniform (0 0 0); } } // ************************************************************************* // Thank you in advance. |
|
May 8, 2017, 19:59 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer @pnovo: Notice that the output shows this:
Code:
wallShearStress wallShearStress: processing all wall patches Please look inside the file "constant/polyMesh/boundary" and see of what type is the patch/boundary named "Walls". If it's not of type "wall", then that's why it did not calculate the shear stress there on that non-wall .
__________________
|
|
May 9, 2017, 04:03 |
|
#12 |
New Member
novo
Join Date: Jun 2015
Posts: 11
Rep Power: 11 |
Hi,
Thanks for the analysis. That's was exactly the issue. I manually changed the type in "boundary" from "patch" to "wall" and ran again the Code:
simpleFoam -postProcess -func wallShearStress Now, I am preparing my meshes with Salome, export to UNV file type and use Code:
ideasUnvToFoam Thank you! |
|
May 21, 2017, 15:17 |
Wall shear stress utility writing normal stress also
|
#13 |
Member
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15 |
Hello, I am solving a Marangoni Convection Problem. I am using boundary condition as used here Marangoni bc. The solver I am using is buoyantPimpleFoam.
I also have to plot the Nusselt No as mentioned in here http://www.tandfonline.com/doi/abs/1...07788808913603. The geometry is a 20mm x 20mm square cavity with marangoni bc at top surface and no slip on all side. The simulation is 2D. When I plot Shear Stress at the top surface (Y plane), it shows y component of stress also, which in my opinion is not possible as it is a normal stress to the plane. I also checked the wallShearStress.C and found that it uses deviatoric Stress tensor. The dev stress tensor should have zero values at its diagonal locations. I am not able to understand this. Although the Y-stress value is 2 order less but still I think it should be zero. Here is the output from wallShearStress. One more thing. I am using the function object wallShearStress. But some how it is writing the values at every calculation time, where as I want at certain time intervals. Can you suggest what am I missing here? Code:
functions { shearStress { functionObjectLibs ("libfieldFunctionObjects.so"); type wallShearStress; writeInterval 2; patches ("upperWall"); } } Thanks |
|
August 18, 2017, 10:01 |
|
#14 | |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Quote:
-time <ranges> comma-separated time ranges - eg, ':10,20,40:70,1000:' As for your wallShearStress also printing the components you could try calculating the magnitude of the parameter. With regards, Robert |
||
December 28, 2022, 12:12 |
|
#15 | |
Member
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 35
Rep Power: 6 |
Quote:
Check this. Says the wallShearStress is given as a volVectorField. So as Bruno said, you will have to take the magnitude of it as \sqrt(taux^2 + tauy^2 + tauz^2).
__________________
Best Regards Uttam ----------------------------------------------------------------- “When everything seem to be going against you, remember that the airplane takes off against the wind, not with it.” – Henry Ford. |
||
|
|
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 |
Wall shear stress | GamFlu | Main CFD Forum | 0 | June 11, 2011 05:33 |
Wall Shear Stress | GamFlu | FLUENT | 0 | June 11, 2011 04: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 |