CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   the calculation of gradient (http://www.cfd-online.com/Forums/cfx/99078-calculation-gradient.html)

zakir hussain March 26, 2012 00:45

the calculation of gradient
 
hello everybody
From 10.1.1.3 Control Volume Gradients of the CFX-Sover Theory Guide ,I know that:
\nabla(\varphi)=\frac{1}{V}*\sum(\varphi\Deltan)_{ip}

where\Deltan is the outward surface vector at ip,V is the volume of the control volume.
We can use the utility name USER_GETVAR to obtain the gradient we interest.what I want to know is how it calculate the gradient.What kind of algorithm does it use?Is it as the formulation above?

I have a source term like this:
source=-\frac{1}{V}\sum(\varphi_{f}A_{f})

where\varphi_{f} is the value of the variable at the cell faces f, and A_{f} is the face area vectors


How can I implement it with fortran or something else?

Thank you very much!

zakir

zakir hussain March 31, 2012 23:34

hello everyone
I hope I can get help from you.
I have a source term like this:
source=-\frac{1}{V}\sum(\varphi_{f}A_{f})

where\varphi_{f} is the value of the variable at the cell faces f, and A_{f} is the face area vectors


How can I implement it with fortran or something else?

Thank you very much!

zakir

ghorrocks April 1, 2012 06:53

What is the sum over? All the faces of the conttrol volume?

What is the purpose of the source term? I cannot see its physical significance.

zakir hussain April 2, 2012 09:33

yes,the sum over represents all the faces of the control volume.Considering the conservation I should solve the divergence of phi what I use as an source term of poisson equation through Gauss's law ,like
\nabla\cdot\varphi=\frac{1}{V}\sum(\varphi_{f}A_{f})

Thank you for your help!

zakir


All times are GMT -4. The time now is 12:21.