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

Measuring wall shear stress in bend pipe

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

Like Tree38Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2012, 06:51
Default
  #41
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Ah OK, I will bear that in mind for future. Since it is working I'll leave it be for the moment!

Cheers,

Tian
TianC is offline   Reply With Quote

Old   March 15, 2013, 07:21
Default
  #42
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by Amir View Post
Of course it is! the tau parameter depends on your model. (actually I prepared it for viscoelastic solver where the tau parameter exists but for general cases you have to set its formulation in your code)
Hi Amir,
Thank you for your code.
Now I wonder how can I define tau boundary condition in 0 directory.
Can you please attach an example case?

Bests,
Mojtaba.a is offline   Reply With Quote

Old   March 15, 2013, 09:45
Default
  #43
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Mojtaba.a View Post
Hi Amir,
Thank you for your code.
Now I wonder how can I define tau boundary condition in 0 directory.
Can you please attach an example case?

Bests,
Hi,

For this purpose, if it's really necessary according to your solver, take a look over the attachment.
It's Better to see this post (http://www.cfd-online.com/Forums/ope...tml#post377001) before any changes; note that the formulation of tau depends on your constitutive model you've used.

Bests,
Attached Files
File Type: zip tau.zip (342 Bytes, 104 views)
Mojtaba.a likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   March 15, 2013, 11:08
Default
  #44
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by Amir View Post
note that the formulation of tau depends on your constitutive model you've used.
Thank you Amir, it really helped.
I am using simpleFoam to simulate steady incompressible air flow over a 3D cube, using LRR turbulence model.
How can I know what constitutive model i am using?

besides, I have some problems calculating shear stress, using your code. Before, using utilities like wallShearStress or wallGradU, it was all enough to run these commands in the case directory to calculate velocity gradient or wall traction as you mentioned before. but here after compiling your code, when I run "shear" command, I get this error message which needs tau boundary condition in the whole time directories. For instance I put tau baoundary condition in 0 directory and after running the command I got this:

Quote:
--> FOAM FATAL IO ERROR:
cannot find file

file: /home/onixa/OpenFOAM/onixa-2.1.1/run/sehatSanj4/100/tau at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
Thanks in advance,
Mojtaba.a is offline   Reply With Quote

Old   March 15, 2013, 12:38
Default
  #45
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Mojtaba.a View Post
Thank you Amir, it really helped.
I am using simpleFoam to simulate steady incompressible air flow over a 3D cube, using LRR turbulence model.
How can I know what constitutive model i am using?
Reasonably, it's consisted of laminar and turbulent parts; you can find that from the solver code and regarded libraries.
Quote:
Originally Posted by Mojtaba.a View Post
besides, I have some problems calculating shear stress, using your code. Before, using utilities like wallShearStress or wallGradU, it was all enough to run these commands in the case directory to calculate velocity gradient or wall traction as you mentioned before. but here after compiling your code, when I run "shear" command, I get this error message which needs tau boundary condition in the whole time directories. For instance I put tau baoundary condition in 0 directory and after running the command I got this:

Thanks in advance,
Dear Mojtaba,
This is not correct to put the "tau" file to "0" folder! All of your folders should have this file with their specific data according to that time! I developed this utility for viscoelastic solver in which the tau variable is stored like other variables such as U or p.
Anyway, if you want to use this code you have 3 options:
1- Use it as a utility; for this purpose, you've got to change this code; i.e., substitute "tau" with your appropriate relations according to your solver (looking over the main utility to compute wall traction may help you figure it out).
2- Change the solver to write "tau" at each time step like other variables like U or p.
3- Substitute this code as a part of your solver, embed it there properly ...

Hope that these options would clarify the situation for you.

Bests,
Mojtaba.a and sourav90 like this.
__________________
Amir
Amir is offline   Reply With Quote

Old   April 3, 2013, 23:46
Default wallGradU
  #46
Member
 
Join Date: Aug 2012
Posts: 68
Blog Entries: 1
Rep Power: 14
Nucleophobe is on a distinguished road
@ Amir,

Thank you for your clarification that wallShearStress computes traction.

To clarify, would an acceptable alternative be to run the utility wallGradU, and then to multiply the resulting field by mu?
In other words,
tau = mu * wallGradU

where 'tau' is the conventional wall shear stress. Is this also correct?


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

Is that expected? Was the wallShearStress utility fixed? I am solving a laminar incompressible flow with a density rho close to that of water.

Last edited by Nucleophobe; April 4, 2013 at 00:29.
Nucleophobe is offline   Reply With Quote

Old   April 4, 2013, 05:42
Default
  #47
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Nucleophobe View Post
I just tried this for my case, and I get the same result doing either of the following:
tau = (wallShearStress) * rho
tau = (wallGradU) * mu
Is that expected? Was the wallShearStress utility fixed? I am solving a laminar incompressible flow with a density rho close to that of water.
Hi,

None of the implemented statements are real wall shear stress but in many cases their differences are really negligible; i.e., it depends on the wall curvature and the velocity gradients.
In other words, your first equation computes wall traction including the normal stress and the second one just computes the normal gradient of the velocity vector while the real wall shear stress is originated from rate of deformation tensor.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   April 5, 2013, 07:52
Default
  #48
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 16
tfuwa is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Guifan,

In many solvers such as FLUENT and OpenFOAM wall traction is considered as wall shear stress and I don't know why!
If we assume T as stress tensor and n as unit normal vector of desired face we have:
t= T.n ; t= traction (force vector exerted to desired face per unit area); the utility compute this, but we want:
shear stress= t - (t.n)n ;which shear stress is tangential vector here.

Bests,
Hi There,

Thank you Amir, for the clarification. I read this for several times and am really confused.

if shear stress= t - (t.n)n is the right definition (and it is), then why "FLUENT and OpenFOAM" prefer t= T.n?

Quote:
Hi,

None of the implemented statements are real wall shear stress but in many cases their differences are really negligible; i.e., it depends on the wall curvature and the velocity gradients.
In other words, your first equation computes wall traction including the normal stress and the second one just computes the normal gradient of the velocity vector while the real wall shear stress is originated from rate of deformation tensor.

Bests,
In what cases, "their differences are negligible"? Is it possible that when it comes to the space close to a wall, the wall normal stress is always small enough to be neglected? For those of you who have used Amir's code, could you please advise the difference? Thanks.

I need to solve the shear stress along a trench under sea bottom, is it good to just apply official utility?
__________________
Kind regards,

Albert
tfuwa is offline   Reply With Quote

Old   April 5, 2013, 10:51
Default
  #49
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by tfuwa View Post
why "FLUENT and OpenFOAM" prefer t= T.n?
Dear Albert,

That's my question too!

Quote:
Originally Posted by tfuwa View Post
I need to solve the shear stress along a trench under sea bottom, is it good to just apply official utility?
Regarding my own experience, and as a part my master thesis, I found around 10% deviation between these 2 relations for my case, which was a viscoelastic substance flowing in a sphere. As you can see, I developed a code for my own purpose and I've used the "tau" directly because it's computed explicitly in viscoelastic solver; however, you can easily merge some parts of that with the original utility in order to develop a more general one and use it without any doubt!
You know, the differences are really case dependent and difficult to estimate before examine.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   April 5, 2013, 13:26
Default
  #50
Member
 
Join Date: Aug 2012
Posts: 68
Blog Entries: 1
Rep Power: 14
Nucleophobe is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Albert,

That's my question too!



Regarding my own experience, and as a part my master thesis, I found around 10% deviation between these 2 relations for my case, which was a viscoelastic substance flowing in a sphere. As you can see, I developed a code for my own purpose and I've used the "tau" directly because it's computed explicitly in viscoelastic solver; however, you can easily merge some parts of that with the original utility in order to develop a more general one and use it without any doubt!
You know, the differences are really case dependent and difficult to estimate before examine.

Bests,

Since shear stress= t - (t.n)n, is the calculation using wallShearStress generally high, or low? Can the quantity (t.n)n be negative? I'm a little unfamiliar with the syntax so it isn't clear to me offhand.

It sounds like it would be very useful to develop a new utility for post-processing the correct WSS. (I'll try, we'll see how it goes!)
Nucleophobe is offline   Reply With Quote

Old   April 5, 2013, 14:11
Default
  #51
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Nucleophobe View Post
Since shear stress= t - (t.n)n, is the calculation using wallShearStress generally high, or low? Can the quantity (t.n)n be negative? I'm a little unfamiliar with the syntax so it isn't clear to me offhand.
The real wall shear stress would be lower since it's just one of the component of the wall traction. (The wall traction has 2 perpendicular components, the real wall shear stress and the normal one)
Quote:
Originally Posted by Nucleophobe View Post
It sounds like it would be very useful to develop a new utility for post-processing the correct WSS. (I'll try, we'll see how it goes!)
Yep, it's not very complicated, just merge my code and the official utility with few modifications.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   April 5, 2013, 14:48
Default
  #52
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by Nucleophobe View Post
It sounds like it would be very useful to develop a new utility for post-processing the correct WSS. (I'll try, we'll see how it goes!)
Quote:
Originally Posted by Amir View Post
Yep, it's not very complicated, just merge my code and the official utility with few modifications.
Bests,
Hi,
I just came up with the attached utility. I don't know if I have made any mistakes, but wallShearStress value is different from the actual wallShearStress value of the official utility. Is there anything I am missing?
P.S: mu is supposed to get read from transportProperties.
Attached Files
File Type: gz shear.tar.gz (10.0 KB, 37 views)
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   April 5, 2013, 16:16
Default
  #53
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Mojtaba.a View Post
Hi,
I just came up with the attached utility. I don't know if I have made any mistakes, but wallShearStress value is different from the actual wallShearStress value of the official utility. Is there anything I am missing?
P.S: mu is supposed to get read from transportProperties.
If your flow field is turbulent, they shouldn't be the same. It's better to use the same definition for the stress tensor as it's done in the official utility. (It's more general)

Bests,
Mojtaba.a likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   April 5, 2013, 18:45
Default
  #54
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by Amir View Post
If your flow field is turbulent, they shouldn't be the same. It's better to use the same definition for the stress tensor as it's done in the official utility. (It's more general)

Bests,
Thank you Amir,
I finally compiled the correct wall shear stress utility successfully, based on the official wallShearStress utility which actually computes wall traction.
In my case error was about 5% between wall shear stress and wall traction.
utility is attached.

Bests
Attached Files
File Type: gz shear2.tar.gz (10.0 KB, 85 views)
Amir, shikamaru and gu1 like this.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   April 6, 2013, 00:03
Default
  #55
Member
 
Join Date: Aug 2012
Posts: 68
Blog Entries: 1
Rep Power: 14
Nucleophobe is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Guifan,

In many solvers such as FLUENT and OpenFOAM wall traction is considered as wall shear stress and I don't know why!
If we assume T as stress tensor and n as unit normal vector of desired face we have:
t= T.n ; t= traction (force vector exerted to desired face per unit area); the utility compute this, but we want:
shear stress= t - (t.n)n ;which shear stress is tangential vector here.

Bests,
Just to clarify, what we are doing to correct the wall shear stress from the wallShearStress utility is to subtract the normal component of the traction vector, otherwise known as the pressure, right?

So if the pressure is relatively low in the system, then the error in using the wallShearStress utility is relatively low; however, if the pressure in the system is high, the error will be greater.

Questions:
1) Am I thinking about this correctly? In my case, the error is far less that 1%, but the pressure is low
2) What is the effect of curved geometry? I don't see why that would affect the normal component of the traction vector...

Last edited by Nucleophobe; April 6, 2013 at 00:20.
Nucleophobe is offline   Reply With Quote

Old   April 6, 2013, 07:17
Default
  #56
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Nucleophobe View Post
Just to clarify, what we are doing to correct the wall shear stress from the wallShearStress utility is to subtract the normal component of the traction vector, otherwise known as the pressure, right?
No, this is not correct! We are talking about deviation tensor (T) not the whole stress tensor. The pressure is not a part of deviation tensor. The normal component is originated from the strain rate tensor.

Quote:
Originally Posted by Nucleophobe View Post
Questions:
What is the effect of curved geometry? I don't see why that would affect the normal component of the traction vector...
In curved surfaces, the normal components are much more considerable because or rotation effects.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   April 10, 2013, 17:16
Default
  #57
Member
 
Join Date: Aug 2012
Posts: 68
Blog Entries: 1
Rep Power: 14
Nucleophobe is on a distinguished road
Quote:
Originally Posted by Amir View Post
The normal component is originated from the strain rate tensor.
Bests,
Ah, thank you for the clarification. I'm starting to understand now.

Can we say then that the normal component of t.n is related instead to the gradient of the normal velocity in the normal direction?

For instance, if the surface normal is in the x-direction, we would have:
n = (1, 0, 0)
sigma_ij = 2 * mu * e_ij
sigma_ij . n = 2 * mu * (partial(u,x), 1/2 (partial(v,x) + partial(u,y)), 1/2 (partial(w,x) + partial(u,z)))
(sigma_ij . n)n = 2 * mu * partial(u,x)

where sigma_ij is the deviatoric stress tensor in notation that I'm used to.

Also, is the 't' that we've been referring to simply the Cauchy strain tensor (e_ij)?
Nucleophobe is offline   Reply With Quote

Old   April 10, 2013, 17:59
Default
  #58
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Nucleophobe View Post
Can we say then that the normal component of t.n is related instead to the gradient of the normal velocity in the normal direction?
Yep, something like that.
Quote:
Originally Posted by Nucleophobe View Post
(sigma_ij . n)n = 2 * mu * partial(u,x)
You have to change it to "(sigma_ij . n).n = 2 * mu * partial(u,x)"
Quote:
Originally Posted by Nucleophobe View Post
Also, is the 't' that we've been referring to simply the Cauchy strain tensor (e_ij)?
No, in your notation it is (sigma.n)!

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   April 10, 2013, 18:07
Default
  #59
Member
 
Join Date: Aug 2012
Posts: 68
Blog Entries: 1
Rep Power: 14
Nucleophobe is on a distinguished road
Quote:
Originally Posted by Amir View Post
You have to change it to "(sigma_ij . n).n = 2 * mu * partial(u,x)"
Ah, yes. The normal component is of course a vector. I guess I meant :

(sigma_ij . n)n = (2 * mu * partial(u,x), 0, 0)

Edit: Oops; the above is still wrong!; This should be right:
((sigma_ij.n).n) = magnitude of traction in normal direction (scalar), and
((sigma_ij.n).n)n = (2 * mu * partial(u,x), 0, 0)

Quote:
No, in your notation it is (sigma.n)!
And here I meant big 'T' not the little 't' for traction.

I guess what I'm asking is this: what is the definition of what you call the "deviation tensor" T? Is it the same as the sigma I defined? So
T = sigma_ij = 2 * mu * e_ij

Or do I error again?

Last edited by Nucleophobe; April 10, 2013 at 18:27.
Nucleophobe is offline   Reply With Quote

Old   April 10, 2013, 18:18
Default
  #60
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Quote:
Originally Posted by Nucleophobe View Post
T = sigma_ij = 2 * mu * e_ij
Yes, this is correct. It's called the deviation tensor because it causes deviation from the isometric pressure tensor.

Bests,
Nucleophobe likes this.
__________________
Amir
Amir is offline   Reply With Quote

Reply

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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
2D wall shear stress yossarian88 STAR-CCM+ 0 February 21, 2011 14:12
relationship between wall shear stress and TKE winter FLUENT 0 December 11, 2007 18:11
Macro to set Wall Shear Stress Satish FLUENT 4 November 26, 2003 15:46
WALL SHEAR STRESS Min-Hua Wang CFX 0 April 3, 2002 18:40


All times are GMT -4. The time now is 17:50.