CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to calculate gradient of pressure and velocity on an outlet face (http://www.cfd-online.com/Forums/openfoam-solving/58232-how-calculate-gradient-pressure-velocity-outlet-face.html)

skabilan December 5, 2008 21:15

Hi All, I need to find the
 
Hi All,

I need to find the gradient of normal velocity (averaged over the outlet surface) along the direction normal to the outlets and also the gradient of pressure (once again an average) along the direction normal to the outlets.

Thanks in advance!
Senthil

wolle1982 December 8, 2008 05:41

Maybe you can use the "sample"
 
Maybe you can use the "sample"-Tool.

go look at http://www.cfd-online.com/OpenFOAM_D...s/1/10206.html

insteat of the points-"cloud" you also can use the "uniform" command which creates a line with variable number of points.

skabilan December 8, 2008 18:26

Hi Wolfgang, Thanks for the
 
Hi Wolfgang,

Thanks for the Help. Actually, I wanted to calculate the both the gradients on the fly (i.e., after every iteration). I was using the buildGlobalBoundaryList.H computeMassFlux.H files to compute the massflux at the boundaries in my icoFoam. I used the following two lines to calculate the maximum gradient of velocity and pressure along the normal direction.

max_vel_grad= max(mag(U.boundaryField()[patchIndex].snGrad()));
max_press_grad=max(p.boundaryField()[patchIndex].snGrad());

Let me know if it is doing other than what I think it is doing!

Thanks in advance!
Senthil


All times are GMT -4. The time now is 10:27.