CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Gradient of a User defined Variable (

Ramadas August 17, 2007 06:25

Gradient of a User defined Variable

I am using CFX 10.0

I need to compute the gradient of a user defined variable with respect to time, say dV_by_dt (where V is a user defined variable)

I now need to use this in the source term of another user defined variable.

How do I do this?

The example in the manual only shows how to use spatial gradient (with respect to x,y,z)



Eric August 19, 2007 22:17

Re: Gradient of a User defined Variable
I am calculating the Gradient of Density in Tecplot360. But I did not know the Unit of Gradient of Density.

Stumpy August 21, 2007 09:19

Re: Gradient of a User defined Variable
That's fairly difficult to do. You would need to use a Fortran routine to get the value of your variable at the current timestep, then store that value in memory (in the MMS, see doc). You would manually calculate the gradient using the value at the current timestep and the value stored in memory from the previous timestep. Unless you're experienced at using Fortran and the MMS in CFX then you would probably need the assistance of a CFX consulting engineer.

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