|July 18, 2011, 12:48||
How to calculate the gradient along the boundaries from a known volScalarFiled?
Join Date: Jul 2011
Posts: 2Rep Power: 0
I first obtained a volScalarField in a calculation domain, and then I want to calculate the gradient along the domain boundaries.
Does anyone know how to obtain the gradient along domain boundaries from a known volScalarField?
Thank you very much!
|October 28, 2011, 19:04||
Join Date: Mar 2009
Location: Idaho Falls, ID
Posts: 82Rep Power: 6
You can obtain the surface normal gradient at each boundary using snGrad function.
This will give you the surface normal gradient without any non-orthogonality or skewness corrections. If you need these corrections, use fvc::snGrad().
surfaceScalarField snGradP = fvc::snGrad(p);
Then access the value at the boundary with snGradP.boundaryField()[patchI].
If you are looking for a full gradient vector at the boundary, this is a little tricker. Here you will have to interpolate the field gradient (fvc::grad(p)) to the faces and then replace the surface normal component of this with the value coming from fvc::snGrad(p).
Hope this helps
|Thread||Thread Starter||Forum||Replies||Last Post|
|UDF-How to calculate gradient of a scalar||Tony Tonton||Fluent UDF and Scheme Programming||12||July 22, 2013 04:28|
|how to calculate the temperature gradient of wall||houbaolin||FLUENT||0||July 28, 2008 03:51|
|Calculate normal gradient||Sunil||FLUENT||0||April 30, 2008 17:44|
|calculate the temperature gradient on a profile||arther||FLUENT||0||April 20, 2006 00:12|
|how to calculate the gradient of volume fraction||hxhua||FLUENT||0||July 1, 2005 09:43|