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

Compute shear stress interFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree47Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2010, 07:56
Default
  #21
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
idrama is on a distinguished road
Hey Foamers,

does anybody know a book or paper where the formula in wallShearStress.C is mathematically derived? I need something which I can cite it in my scientific work (I must guarantee that it work).

Furthermore, does anybody know a justifaction that I can use this formular even for two-phase flows, especally, in VOF?

Cheers in advanced!
idrama is offline   Reply With Quote

Old   April 15, 2010, 04:46
Default
  #22
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
idrama is on a distinguished road
Hey folks!

I have used interFoam with an k-e-model. I modified wallShearStress.C that the material property directory is reading correctly. Now I need to know if the formular is still valid.

cheers
idrama is offline   Reply With Quote

Old   April 16, 2010, 07:53
Default
  #23
New Member
 
Anders Bøje
Join Date: Apr 2010
Posts: 7
Rep Power: 16
andboje is on a distinguished road
Hi
I am trying to implement calculations of the shear stress in an interFoam case, simulating injection moulding.
I have been looking at the threads on this forum trying to figure out how to do this. In this thread it seems that something similar is done, but being new to the world of OpenFOAM I am looking for some more basic instructions.
Where do I implement the c++ code? Do I have to create new files or modify existing ones?
If someone has done shear stress implementation, I would much appreciate some help. For instance if you have a case where this is done I could take a look at, not nessesarily interFOAM. The same goes for the wallShearStress utility.

Best Regards
Anders
andboje is offline   Reply With Quote

Old   June 8, 2010, 18:20
Default
  #24
Senior Member
 
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16
Daniele111 is on a distinguished road
Hi
In Ras turbolent model, if i use wallShearStress tool, the result is normalised?

Best regards
Daniele111 is offline   Reply With Quote

Old   June 9, 2010, 03:08
Default
  #25
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
idrama is on a distinguished road
What you mean by "normelised"? If you mean that the calculated vectors have the length one, then No !. The vectors are actually tensor of rank 1, i.e. the vectors points in the direction to where forces acts and the magnitude of them are force acting.

Cheers
idrama is offline   Reply With Quote

Old   June 9, 2010, 08:56
Default
  #26
Senior Member
 
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16
Daniele111 is on a distinguished road
No, i would know if is there rho or not in the result

Best regards
Daniele111 is offline   Reply With Quote

Old   June 25, 2010, 08:00
Default
  #27
Senior Member
 
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16
Daniele111 is on a distinguished road
Hi
How can I calulate the wallShearStress runtime?
Thanks
Daniele111 is offline   Reply With Quote

Old   June 25, 2010, 10:04
Default
  #28
Senior Member
 
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16
Daniele111 is on a distinguished road
Can I use sampleDict to sample wallShearStress on bottom? I do:
1)blockMesh
2)simpleFoam
3)wallShearStress
4)sample -latestTime

but in my set directory output file of whall shear stress is 0 everywhere...
Daniele111 is offline   Reply With Quote

Old   September 16, 2010, 17:22
Default
  #29
New Member
 
Peter
Join Date: Aug 2010
Posts: 16
Rep Power: 16
Peter85 is on a distinguished road
Hi@all,

this week, I simulated a channel flow using rhoSimpleFoam with k-Omega-SST-Modell. To validate the results, I need to calculate the friction coefficient cf(Tau_wall / (0.5*roh_0*U_0^2).

There are now 2 possibilities to get Tau_wall.
First by taking the wall shear stress computed by the WallShearStress postprocessing tool. (Simply taking the magnitude of the wallshearstresses as Tau_wall). The second approach is to use the wallGradU tool, and compute the cf as described above by Santos. Surprisingly, the results were quite different (diffference of more than 10 Percent).

Is anybody able to explain the value differences?
My guess is that the shear stresses calculated by the wallshearstress tool are not exact. Is that true?

Thanks,

Peter
Peter85 is offline   Reply With Quote

Old   February 27, 2011, 19:45
Default
  #30
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by philippose View Post
Hi,


In the simple case, if you take laminar flow, the wall shear stress is calculated using the equation:

wallShear = nu * rho * mesh.boundaryField()[patchID].snGrad()

So, to calculate the wall shear stress in the case of a turbulent simulation, you need to do something like:

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

Philippose
HI Philippose

I have tried both laminar flow and turbulent flow wss as you suggested for the same simulation. How come the wss calculated by the two methods vary so much from each other?

Do you need to multiple rho*nu for the turbulent case?

Thanks
jiejie is offline   Reply With Quote

Old   April 11, 2011, 13:17
Default
  #31
New Member
 
Sergio
Join Date: Apr 2011
Posts: 8
Rep Power: 15
Sergio13 is on a distinguished road
Hello Guys
I am also very new to OpenFoam and CFD, and I was wondering how can I calculate the Viscous Stresses (say in a given point of the fluid).

In addition, note that instead of RAS, I am using a LES Turbulence model.

Thanks for your help

Sergio
Sergio13 is offline   Reply With Quote

Old   June 23, 2011, 10:33
Default
  #32
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 70
Rep Power: 17
David* is on a distinguished road
There are so much unanswered questions in here, so I try to answer two of them:
Quote:
Originally Posted by Daniele111 View Post
No, i would know if is there rho or not in the result
At least for incompressible cases, rho is excluded, so you have to multiply the results from wallShearStress by your density.


Quote:
Originally Posted by Daniele111 View Post
Can I use sampleDict to sample wallShearStress on bottom? I do:
1)blockMesh
2)simpleFoam
3)wallShearStress
4)sample -latestTime

but in my set directory output file of whall shear stress is 0 everywhere...
The trick is to use
Code:
surfaces
(
        type        patch;
        patchName   bottom;
)
in your sampleDict.

Hope that helps someone!
David* is offline   Reply With Quote

Old   January 14, 2012, 08:55
Default
  #33
New Member
 
alex
Join Date: Jun 2009
Posts: 17
Rep Power: 17
oort is on a distinguished road
Hello

So if we run the wallShearStress utility we must multiply the values by the rho?

For instance in my case i'm simulating water flow in a tube with spacers and after running the wallShearStress it gives me as in the figure.

The value of maximum magnitude of "displayed" wall shear stress is near 0.00043 (in unknown units...). If I multiply by the density of water (near 996 kg/m³) its gives 4.3 (in unkown units).

Is this new units Pascal?

Thanks,

Duarte Silva



Last edited by oort; January 14, 2012 at 10:25.
oort is offline   Reply With Quote

Old   January 14, 2012, 10:35
Default
  #34
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
idrama is on a distinguished road
Yes, according to the wallShearStress.C code you must multiply by rho to obtain pascal. But to be sure, open the dictionaries wallShearStress in the time directories by using a editor and take a look at the dimension line. Here you can get the dimension of the data. Just do an dimension analysis and you will see that the data have to be multiplied by the density.
idrama is offline   Reply With Quote

Old   August 28, 2012, 09:12
Default
  #35
New Member
 
Elise
Join Date: Jan 2012
Posts: 15
Rep Power: 14
Elise is on a distinguished road
Quote:
Originally Posted by philippose View Post
Hi,
wallShear = (-mesh.Sf().boundaryField()[patchID]/(mag(mesh.Sf().boundaryField()[patchID])) ) & (turbulence->R()().boundaryField()[patchID])

The above equation will give you the wall shear stress with the velocity gradient resolved in the direction normal to each face in the patch.

Philippose
Ok, but what is the meaning of the x, y and z values? Is the wall shear stress normal to each face then the magnitude of those values with x,y and z cartesian contributions? : Magnitude is then the wall shear stress normal to each face

What does the quoted code means;
mesh.Sf/mag(mesh.Sf) ; what does this term do? : gives a unit vector normal to the boundary element
& (turbulence->R()() ; is this the lookup of the wall shear stress from the Reynolds stress? : Yes, Reynolds stress

Last edited by Elise; August 29, 2012 at 03:28. Reason: solved
Elise is offline   Reply With Quote

Old   May 10, 2013, 09:54
Default
  #36
Member
 
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17
Yosmcer will become famous soon enough
I know this post is old, but it is the best one I found related to my problem.

I have a wall that is parallel to the X axis, flow is laminar.

I compute the wallShearStress, and have a result.

I use paraFoam to look at this with Paraview.

I plot over line the wallShearsStress by placing the line on the boundary.

I see that I have a value for the magnitude of the wallShearStress, and three others values, one for each direction.

As my face is parallel to the X axis, I expect to have a signed value in the X direction, a value approximating zero in the two other direction, and the absolute value of the X's direction value.

But I also have a Y direction value, so a normal compound to the face. And this value is not negligible (the z value is negligible, but no flow in this direction).
The magnitude is the vectorial sum of the X and Y values (without the sign).

[EDIT]
I think this is because the shears stress must equilibrate at edges. So there is a normal compound corresponding to the tangential one of the perpendicular face, and a continuity of this across the face.



Image from : http://www.codecogs.com/reference/en...ear_stress.php

So, considering the AB face, there is a normal compound to this face at the points A and B, but opposite, so there must be a continuous field across the face, and the resulting shear stress in not totally tangential to the face.

Please, correct me if there is/are mistake(s).
[\EDIT]

Last edited by Yosmcer; May 22, 2013 at 16:18.
Yosmcer is offline   Reply With Quote

Old   May 22, 2013, 09:11
Default
  #37
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 14
sophie_l is on a distinguished road
Hi Yosmcer,

I am using interFoam, however the wallShearStress utility is intended for single phase transport models. I modified it to include "incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H" and etc., and I've modified the option file according to that of interFoam. The compiling is ok, but when I run it, error message pops out.

Quote:
Time = 0
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian

--> FOAM FATAL ERROR:
request for volScalarField alpha1 from objectRegistry region0 failed
available objects of type volScalarField are
2
(
nu1
nu2
)

From function objectRegistry::lookupObject<Type>(const word&) const
in file /lv1/data/openfoam/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 139.
FOAM aborting
Don't know what solver you are using, but how did you compute the wallShearStress?

Could you shed some light on my problem please?

Many thanks in advance.
Sophie
sophie_l is offline   Reply With Quote

Old   May 22, 2013, 11:15
Default
  #38
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Sophie,

alpha1 is not in the object registry in this case. You have to do the same as with U, read it from the time folder.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   May 22, 2013, 11:40
Default
  #39
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 14
sophie_l is on a distinguished road
Hi Pablo,

Thank you so much! I've got it solved.

Best,
Sophie
sophie_l is offline   Reply With Quote

Old   December 9, 2013, 13:45
Default
  #40
Member
 
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13
kmou is on a distinguished road
Quote:
Originally Posted by andboje View Post
Hi
I am trying to implement calculations of the shear stress in an interFoam case, simulating injection moulding.
I have been looking at the threads on this forum trying to figure out how to do this. In this thread it seems that something similar is done, but being new to the world of OpenFOAM I am looking for some more basic instructions.
Where do I implement the c++ code? Do I have to create new files or modify existing ones?
If someone has done shear stress implementation, I would much appreciate some help. For instance if you have a case where this is done I could take a look at, not nessesarily interFOAM. The same goes for the wallShearStress utility.

Best Regards
Anders
Hi Anders,
I have the exact same issue and unfortunately did not understand how to do this as I am myself very new to C++ and OpenFOAM. I would like to calculate dU/dy for my fuel injection with interFoam and then the shear stresses.
I would appreciate your knowledge on this, if you did figure it out.
Thank you very much.
kmou is offline   Reply With Quote

Reply


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
Interfoam Droplet under shear test case adona058 OpenFOAM Running, Solving & CFD 3 May 3, 2010 19:46
shear stress a.abbaspour FLUENT 3 March 23, 2010 10:50
Shear Stress Thomas FLUENT 0 January 13, 2008 16:10
About shear stress, need help!! Dong Wenchao FLUENT 1 August 23, 2006 08:38
Shear Stress RK CFX 0 January 24, 2005 08:11


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