|July 18, 2011, 11: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, 18:04||
Join Date: Mar 2009
Posts: 91Rep Power: 9
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||17||September 21, 2015 09:13|
|how to calculate the temperature gradient of wall||houbaolin||FLUENT||0||July 28, 2008 02:51|
|Calculate normal gradient||Sunil||FLUENT||0||April 30, 2008 16:44|
|calculate the temperature gradient on a profile||arther||FLUENT||0||April 19, 2006 23:12|
|how to calculate the gradient of volume fraction||hxhua||FLUENT||0||July 1, 2005 08:43|