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   September 16, 2011, 01:43
Default Measuring wall shear stress in bend pipe
  #1
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
My geometry is a bifurcation and on of the vessel is bent. I want to measure the wall shear stress along the bent vessel. The wall shear stress is already calculated. I only find a way to measure the wall shear stress along the straight pipe but no idea how to do it in bent pipe.

Any hind would be helpful.

Cheers!
liguifan is offline   Reply With Quote

Old   September 16, 2011, 02:40
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
You can use the utility wallShearStress.
Wenty likes this.
Bernhard is offline   Reply With Quote

Old   September 16, 2011, 02:46
Default
  #3
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
You can use the utility wallShearStress.
Hi Bernhard,

I think wallShearStress utility is for turbulent flow. My case is laminar flow and I want to plot the wall shear stress along the pipe. My code is to find laminar flow but don't know how to measure it.

Thanks for the hind anyway.
liguifan is offline   Reply With Quote

Old   September 16, 2011, 03:06
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Of course you can still use that utility. I suppose it reads turbulenceProperties or RASProperties. You set it to laminar there. Otherwise you make your own version of the wallShearStress utility and update it for laminar flow. I think the first method will work, since the RASModels have a dummy laminar model included.
Bernhard is offline   Reply With Quote

Old   September 16, 2011, 03:38
Default
  #5
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
You can use the utility wallShearStress.
Dear Bernhard,
I think this utility needs some modifications because it computes wall traction instead of wall shear stress, right?
PenPencil likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   September 16, 2011, 04:55
Default
  #6
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Bernhard,
I think this utility needs some modifications because it computes wall traction instead of wall shear stress, right?
Hi Amir,

What modification have you done to measure the wall shear stress ?

Thanks
liguifan is offline   Reply With Quote

Old   September 16, 2011, 04:59
Default
  #7
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
Of course you can still use that utility. I suppose it reads turbulenceProperties or RASProperties. You set it to laminar there. Otherwise you make your own version of the wallShearStress utility and update it for laminar flow. I think the first method will work, since the RASModels have a dummy laminar model included.
Hi Bernhard,

I will try it later today. However, i still don't understand how to plot wall shear stress along a bent pipe.

Have you got any idea for that?

Thanks
liguifan is offline   Reply With Quote

Old   September 16, 2011, 06:08
Default
  #8
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Hi Amir,

What modification have you done to measure the wall shear stress ?

Thanks
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,
fumiya, shikamaru, m5m5kh and 4 others like this.
__________________
Amir
Amir is offline   Reply With Quote

Old   September 17, 2011, 00:30
Default
  #9
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Can any one tell me the difference between wallShearStress and the definition?

For newtonian flow the wall shear stress is defined as mu*du/dy which is proportional to the normal velocity gradient to the wall
But in wallShearStress it is defined:
wallShearStress.boundaryField()[patchi] =
(
-mesh.Sf().boundaryField()[patchi]
/mesh.magSf().boundaryField()[patchi]
) & Reff.boundaryField()[patchi]; -- What does this code mean? why it calculated wall shear stress ?

In wallGradU:
The velocity gradient is defined as
wallGradU.boundaryField()[patchi] =
-U.boundaryField()[patchi].snGrad(); -- This makes sense to me.
And mu*wallGradU is the definition one.

Can anyone explain?
liguifan is offline   Reply With Quote

Old   September 17, 2011, 00:36
Default
  #10
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan 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,
Dear Amir,

Thanks for your reply.

To my knowledge, the wall shear stress is mu*velocity gradient. In the code of wallShearStress:
-mesh.Sf().boundaryField()[patchi]
/mesh.magSf().boundaryField()[patchi]
Do you mean this is the T(stress tensor)?

Why the say shear stress = t-(t.n)n ? If T is the shear tensor, isn't T's normal component T.n already the shear stress?

I am confused here.
liguifan is offline   Reply With Quote

Old   September 17, 2011, 08:37
Default
  #11
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Dear Amir,

Thanks for your reply.

To my knowledge, the wall shear stress is mu*velocity gradient. In the code of wallShearStress:
-mesh.Sf().boundaryField()[patchi]
/mesh.magSf().boundaryField()[patchi]
Do you mean this is the T(stress tensor)?

Why the say shear stress = t-(t.n)n ? If T is the shear tensor, isn't T's normal component T.n already the shear stress?

I am confused here.
Dear Guifan,

T is stress tensor and n is unit normal vector, according to openFOAM definitions:
Code:
n=-mesh.Sf().boundaryField()[patchi] / mesh.magSf().boundaryField()[patchi]
and,
Code:
T=Reff.boundaryField()[patchi]
so t=T.n is:
Code:
            wallShearStress.boundaryField()[patchi] =
            (
                -mesh.Sf().boundaryField()[patchi]
                /mesh.magSf().boundaryField()[patchi]
            ) & Reff.boundaryField()[patchi];
it's traction definition not shear force. in other words, it contains normal component, so I proposed:
Code:
shear stress= t - (t.n)n
Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 18, 2011, 09:21
Default
  #12
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Guifan,

T is stress tensor and n is unit normal vector, according to openFOAM definitions:
Code:
n=-mesh.Sf().boundaryField()[patchi] / mesh.magSf().boundaryField()[patchi]
and,
Code:
T=Reff.boundaryField()[patchi]
so t=T.n is:
Code:
            wallShearStress.boundaryField()[patchi] =
            (
                -mesh.Sf().boundaryField()[patchi]
                /mesh.magSf().boundaryField()[patchi]
            ) & Reff.boundaryField()[patchi];
it's traction definition not shear force. in other words, it contains normal component, so I proposed:
Code:
shear stress= t - (t.n)n
Bests,
Dear Amir,

Thanks for the reply.

I found that the tangetient component of traction tensor is t-(t.n)n as you decribed.

For the code stuff:
Is this the right thing:
forAll(real_wall_shear_stress.boundaryField(),patc hi)
{
wallShearStress.boundaryField()[patchi] =
(
-mesh.Sf().boundaryField()[patchi]
/mesh.magSf().boundaryField()[patchi]
) & Reff.boundaryField()[patchi];[/CODE]
real_wall_shear_stress.boundaryField()[patchi]= wallShearStress-(wallShearStress&(mesh.Sf().boundaryField()[patchi] /mesh.magSf().boundaryField()[patchi]))&(mesh.Sf().boundaryField()[patchi]/mesh.magSf().boundaryField()[patchi])
}
the right results since mesh.Sf().boundaryField()[patchi] /mesh.magSf().boundaryField()[patchi] is the "n"

Please let me know if there is something wrong.

Btw, why the tangential component of t is not t&n but t-(t&n)&n ?

Thanks again!
liguifan is offline   Reply With Quote

Old   September 18, 2011, 09:42
Default
  #13
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Dear Amir,

Thanks for the reply.

I found that the tangetient component of traction tensor is t-(t.n)n as you decribed.

For the code stuff:
Is this the right thing:
forAll(real_wall_shear_stress.boundaryField(),patc hi)
{
wallShearStress.boundaryField()[patchi] =
(
-mesh.Sf().boundaryField()[patchi]
/mesh.magSf().boundaryField()[patchi]
) & Reff.boundaryField()[patchi];[/CODE]
real_wall_shear_stress.boundaryField()[patchi]= wallShearStress-(wallShearStress&(mesh.Sf().boundaryField()[patchi] /mesh.magSf().boundaryField()[patchi]))&(mesh.Sf().boundaryField()[patchi]/mesh.magSf().boundaryField()[patchi])
}
the right results since mesh.Sf().boundaryField()[patchi] /mesh.magSf().boundaryField()[patchi] is the "n"

Please let me know if there is something wrong.

Btw, why the tangential component of t is not t&n but t-(t&n)&n ?

Thanks again!
There are few errors in this part of code:
First of all: I'm not sure that inner product is overloaded for 2 variables which one of them is scalar and another is vector, so it's better to use:
Code:
t-(t&n)n
As you know, t&n retrieves projection of vector t on normal vector n, so the tangential component would be
Code:
t-(t&n)n
Another tip; OpenFOAM can not compile such successive terms (as I know; because I'm new in developing); I developed a code for that which may help (it's not the best one as I said before):
Code:
		  volTensorField gradU=fvc::grad(U);
		  volTensorField T=mu*(gradU+gradU.T());
		  volVectorField nn
	     (
	         IOobject
	         (
	             "nn",
	             runTime.timeName(),
	             mesh,
	             IOobject::NO_READ,
	             IOobject::NO_WRITE
	         ),
			   mesh,
			   vector::zero
	     ); 
        forAll(nn.boundaryField(), patchI)
        {
            nn.boundaryField()[patchI] =
            (
                -mesh.Sf().boundaryField()[patchI]
                /mesh.magSf().boundaryField()[patchI]
            );
        }
        		  
        forAll(wallShearStress.boundaryField(), patchI)
        {
            wallShearStress.boundaryField()[patchI] =
              nn.boundaryField()[patchI] & T.boundaryField()[patchI];
        }
		  
        forAll(normal.boundaryField(), patchI)
        {
            normal.boundaryField()[patchI] =
				  (nn.boundaryField()[patchI] & wallShearStress.boundaryField()[patchI])
				  *nn.boundaryField()[patchI];
        }
        
        forAll(shear.boundaryField(), patchI)
        {
			   shear.boundaryField()[patchI] =
			   wallShearStress.boundaryField()[patchI]-normal.boundaryField()[patchI];
        }
Here, shear variable is what you need and wallShearStress is previous definition.
Obviously, you can change some part to use other stress tensor objects.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 19, 2011, 20:23
Default
  #14
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Amir View Post
There are few errors in this part of code:
First of all: I'm not sure that inner product is overloaded for 2 variables which one of them is scalar and another is vector, so it's better to use:
Code:
t-(t&n)n
As you know, t&n retrieves projection of vector t on normal vector n, so the tangential component would be
Code:
t-(t&n)n
Another tip; OpenFOAM can not compile such successive terms (as I know; because I'm new in developing); I developed a code for that which may help (it's not the best one as I said before):
Code:
		  volTensorField gradU=fvc::grad(U);
		  volTensorField T=mu*(gradU+gradU.T());
		  volVectorField nn
	     (
	         IOobject
	         (
	             "nn",
	             runTime.timeName(),
	             mesh,
	             IOobject::NO_READ,
	             IOobject::NO_WRITE
	         ),
			   mesh,
			   vector::zero
	     ); 
        forAll(nn.boundaryField(), patchI)
        {
            nn.boundaryField()[patchI] =
            (
                -mesh.Sf().boundaryField()[patchI]
                /mesh.magSf().boundaryField()[patchI]
            );
        }
        		  
        forAll(wallShearStress.boundaryField(), patchI)
        {
            wallShearStress.boundaryField()[patchI] =
              nn.boundaryField()[patchI] & T.boundaryField()[patchI];
        }
		  
        forAll(normal.boundaryField(), patchI)
        {
            normal.boundaryField()[patchI] =
				  (nn.boundaryField()[patchI] & wallShearStress.boundaryField()[patchI])
				  *nn.boundaryField()[patchI];
        }
        
        forAll(shear.boundaryField(), patchI)
        {
			   shear.boundaryField()[patchI] =
			   wallShearStress.boundaryField()[patchI]-normal.boundaryField()[patchI];
        }
Here, shear variable is what you need and wallShearStress is previous definition.
Obviously, you can change some part to use other stress tensor objects.

Bests,
Dear Amir,

Thanks for the correction.

This code works however the results are a little bit different from it should be in my case. After a little bit research. I found that the definition of Shear tensor is T=2*mu*(gamma_hat)*D where D=1/2(gradU+gradU.T()).
gamma_hat is shear rate. For newtonian case , mu is independent of gamma_hat, for non-Newtonian case, mu is a function of gamma_hat.

gamma_hat=sqrt(2.0)*mag(symm(gradU)) for Newtonian case.

In your code, I found "volTensorField T=mu*(gradU+gradU.T())" and there is a difference in gamma_hat(shear rate) term. Did you miss it or I did something wrong( please correct me if I am wrong).

Cheers!
mm.abdollahzadeh likes this.

Last edited by liguifan; September 19, 2011 at 21:11.
liguifan is offline   Reply With Quote

Old   September 19, 2011, 23:14
Default
  #15
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Dear Amir,

Thanks for the correction.

This code works however the results are a little bit different from it should be in my case. After a little bit research. I found that the definition of Shear tensor is T=2*mu*(gamma_hat)*D where D=1/2(gradU+gradU.T()).
gamma_hat is shear rate. For newtonian case , mu is independent of gamma_hat, for non-Newtonian case, mu is a function of gamma_hat.

gamma_hat=sqrt(2.0)*mag(symm(gradU)) for Newtonian case.

In your code, I found "volTensorField T=mu*(gradU+gradU.T())" and there is a difference in gamma_hat(shear rate) term. Did you miss it or I did something wrong( please correct me if I am wrong).

Cheers!
Dear Guifan,

Your definition is wrong; here, viscosity is a function of shear rate, it's not a multiplication term!
T=2 \eta (\gamma\dot{} ) D
The differences maybe due to coarse grid near boundaries or schemes for gradients.

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

Old   September 19, 2011, 23:28
Default
  #16
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Guifan,

Your definition is wrong; here, viscosity is a function of shear rate, it's not a multiplication term!
T=2 \eta (\gamma\dot{} ) D
The differences maybe due to coarse grid near boundaries or schemes for gradients.

Bests,
Dear Amir,

Thanks for the correction. I misunderstood the definition.

I try to finer my mesh and see what happened next.

Regards
liguifan is offline   Reply With Quote

Old   September 23, 2011, 07:06
Default
  #17
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 14
liguifan is on a distinguished road
Dear Amir,

I tried \tau=\mu*\frac{du}{dy} and your code to get some wall shear stress plots.

In published paper, they normally define wall shear stress as the way you did.

After some comparison, I found that my wall shear stress is quite low than what they did on paper. There are still more than 20% difference between my plots and their plots after I multiple a factor to my plots.

Have you got any experience with these kind of problem? I am stuck with it for quite a while.

From the other method:\tau=\mu*\frac{du}{dy}The plots are totally different. Do you have any idea with this?

Any idea would be appreciated

Thanks
liguifan is offline   Reply With Quote

Old   September 23, 2011, 10:07
Default
  #18
New Member
 
lintao
Join Date: Sep 2011
Posts: 1
Rep Power: 0
lintao is on a distinguished road
thx u very much. it helps a lot.
lintao is offline   Reply With Quote

Old   September 23, 2011, 10:15
Default
  #19
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Dear Amir,

I tried \tau=\mu*\frac{du}{dy} and your code to get some wall shear stress plots.

In published paper, they normally define wall shear stress as the way you did.

After some comparison, I found that my wall shear stress is quite low than what they did on paper. There are still more than 20% difference between my plots and their plots after I multiple a factor to my plots.

Have you got any experience with these kind of problem? I am stuck with it for quite a while.

From the other method:\tau=\mu*\frac{du}{dy}The plots are totally different. Do you have any idea with this?

Any idea would be appreciated

Thanks
Dear Guifan,

First of all, note that this relation for shear stress we discussed about is valid just for incompressible flow; for compressible cases, another term should be added.
As you know, in many papers, wall traction is reported instead of wall shear stress, so I suggest you check OpenFOAM utility without changes and see what will happen.
Ensure you have reached grid independence solution by examining wall shear stress of boundaries.
Another suggestion; there is another utility for evaluating velocity gradient @ boundaries (wallGradU), obviously it can compute grad(U) more precisely which you can also use that in your code.
Also try high order schemes for gradient and others.

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

Old   February 13, 2012, 10:26
Default
  #20
Senior Member
 
Join Date: Jan 2012
Posts: 197
Rep Power: 14
itsme_kit is on a distinguished road
Quote:
Originally Posted by liguifan View Post
My geometry is a bifurcation and on of the vessel is bent. I want to measure the wall shear stress along the bent vessel. The wall shear stress is already calculated. I only find a way to measure the wall shear stress along the straight pipe but no idea how to do it in bent pipe.

Any hind would be helpful.

Cheers!
Hi
Can you tell me how to measure the wall shear stress?
I'm confused why my wall shear stress is zero and only a tiny part in inlet is non-zero
I am modelling a 3D laminar straight pipe flow by using star ccm
itsme_kit 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 13:26.