CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Fluid wall shear stress

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 3, 2005, 07:50
Default I am trying to calculate the w
  #1
Sinead Kelly (Kelly)
Guest
 
Posts: n/a
I am trying to calculate the wall shear stress within a fluid in a cylindrical pipe. I have defined WSS as a volVectorField in a createFields.H file, so that I can look at the wall shear stress in dxFoam. The code I have been using for the wall shear stress is:

label patchA = mesh.boundaryMesh().findPatchID("wall");

fixedValueFvPatchVectorField& wallshearstress =
refCast(WSS.boundaryField()[patchA]);

forAll(wallshearstress, patchFaceA)
{
volTensorField gradU = fvc::grad(U);

volTensorField shear = mu*(gradU + gradU.T());

shear[patchFaceA].component(tensor::XX) = 0;
shear[patchFaceA].component(tensor::YY) = 0;
shear[patchFaceA].component(tensor::ZZ) = 0;

wallshearstress[patchFaceA].component(vector::X) = shear[patchFaceA].component(tensor::XY) + shear[patchFaceA].component(tensor::XZ));

wallshearstress[patchFaceA].component(vector::Y) = shear[patchFaceA].component(tensor::YX) + shear[patchFaceA].component(tensor::YZ)

wallshearstress[patchFaceA].component(vector::Z) = shear[patchFaceA].component(tensor::ZX) + shear[patchFaceA].component(tensor::ZY);

}

So, I have been able to get the stress tensor and set the 3 normal components to zero. I have then added the 2 X components to get the overall X component of the shear stress, added the 2 Y components etc.
However, looking at my results in dxFoam, the WSS vectors are not aligned correctly along the wall of the cylinder.
Do I have to project my stress vector onto my surface and does anyone have any idea how to do this? Has anyone written a code to calculate the wall shear stress of a fluid already? Thanks,

Sinead
  Reply With Quote

Old   March 3, 2005, 07:56
Default You might find the applicatio
  #2
Henry Weller (Henry)
Guest
 
Posts: n/a
You might find the application

applications/utilities/postProcessing/wall/wallShearStress

useful. Simply replace R in the expressions with your shear field and it should do what you want.
  Reply With Quote

Old   March 30, 2011, 06:41
Default
  #3
Senior Member
 
Join Date: Sep 2010
Location: France
Posts: 161
Rep Power: 5
T.D. is on a distinguished road
hi henry,
what do you mean by "R" in the expressions where?
thanks
T.D. 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
How to get the wall shear stress by UDF Chen Fangzhi FLUENT 2 May 21, 2010 09:32
wall shear stress in UDF elisa FLUENT 1 August 13, 2008 08:36
wall shear stress Todd FLUENT 0 April 28, 2008 13:51
UDF for wall shear stress Bastian FLUENT 0 July 21, 2004 04:52
wall shear stress lingo FLUENT 2 June 2, 2003 03:40


All times are GMT -4. The time now is 07:52.