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

How can I get the pressure gradient along the direction normal to the local wall surface

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By spam3c

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2008, 16:28
Default Hello, Can anyone tell me h
  #1
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17
qtian is on a distinguished road
Hello,

Can anyone tell me how to the pressure gradient normal to the local wall surface? I have caculated pressure gradient at the first node away from surface. However, I don't know how to get the information of local normal vectors to the wall. Thanks
qtian is offline   Reply With Quote

Old   January 18, 2008, 06:29
Default p.boundaryField().snGrad();
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
p.boundaryField()[patchID].snGrad();

Which is generally zero for walls.

You seem to want to extrapolate the pressure gradient. To do this you will need:

volVectorField gradp = fvc::grad(p);
vectorField nearSurfaceGradP = gradp.boundaryField()[patchID].patchInternalField();

const vectorField& surfaceNormal = mesh.boundary()[patchID].nf();

scalarField gradpWallNormal = nearSurfaceGradP & surfaceNormal;
eugene is offline   Reply With Quote

Old   November 17, 2008, 08:11
Default Hi all, I tried this code a
  #3
New Member
 
Kerstin Heinen
Join Date: Mar 2009
Location: Ludwigshafen, Germany
Posts: 27
Rep Power: 17
kerstin is on a distinguished road
Hi all,

I tried this code above to calculate the gradient of a tensor component in normal direction to the wall...

label wallPatchID = mesh.boundaryMesh().findPatchID("wall");
volScalarField S11 = StressTensor.component(tensor::XX);

volVectorField gradS11 = fvc::grad(S11);
vectorField nearSurfaceGradS11 = gradS11.boundaryField()[wallPatchID].patchInternalField();
scalarField gradS11WallNormal = nearSurfaceGradS11 & surfaceNormal;

Compiles without errors. But I get an error message if I try to run the case.

#0 Foam::error::printStack(Foam:stream&) in "/data/home/openfoam/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/data/home/openfoam/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/tls/libc.so.6"
#3 Foam::tmp<foam::field<foam::innerproduct<foam::vec tor<double>, Foam::Vector<double> >::type> > Foam::operator&<foam::vector<double>, Foam::Vector<double> >(Foam::
UList<foam::vector<double> > const&, Foam::UList<foam::vector<double> > const&) in "/data/home/openfoam/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/lami nar
PTT"

It looks like having problems with the vector product in the last line?

Kerstin
kerstin is offline   Reply With Quote

Old   April 4, 2014, 06:05
Default any quick post processing tool to compute pressure gradients in the domain
  #4
New Member
 
Sabrinho Gonzalez
Join Date: Nov 2009
Posts: 5
Rep Power: 17
spam3c is on a distinguished road
Hi,

Do we have any option/tool in openfoam
like a post processing tool to compute pressure gradients in three directions in a 3D domain?

Thanks, regards
Fahime likes this.
spam3c 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
surface tension as function of normal gradient tom FLUENT 2 September 7, 2016 04:48
Help!!!: Direction / Normal of Boundary Layer JP FLUENT 0 September 9, 2008 19:16
4thorder surface normal gradient interpolation smehdi609 OpenFOAM Running, Solving & CFD 0 June 13, 2008 20:52
Fourth order surface normal gradient interpolation adona058 OpenFOAM Running, Solving & CFD 8 September 24, 2007 16:12
Velocity gradient normal to a wall ap FLUENT 0 July 26, 2004 09:32


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