CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How could I get the gradient of UDM? (https://www.cfd-online.com/Forums/fluent/84717-how-could-i-get-gradient-udm.html)

fireman February 7, 2011 09:27

How could I get the gradient of UDM?
 
Hi, everyone,

I am trying to get the second derivative of the velocity using UDF. I give the value of the gradient of velocity to a UDM, then I need to know how to get the gradient of the UDM? Could anyone help?

Thanks very much!

Fireman

ComputerGuy February 7, 2011 19:57

You could write the derivative of velocity (C_DUDX, etc) to a UDS, then use C_UDSI_G(c,t,0) to get the derivative of the scalar. That's kind of a hack way to do it, but it's there.

You'll need to enable the User-defined scalar, and turn off solution of the transport equation for your scalar in order to keep the values you write fixed.


You could also calculate the numerical derivative yourself by looking at the cell's neighboring values for Du/Dx (etc) and coming up with some approximation.

Hope this helps.
ComputerGuy

fireman February 8, 2011 05:36

ComputerGuy, thank you very much!


All times are GMT -4. The time now is 08:48.