- **FLUENT**
(*https://www.cfd-online.com/Forums/fluent/*)

- - **Computation of Derivatives
**
(*https://www.cfd-online.com/Forums/fluent/27722-computation-derivatives.html*)

Computation of Derivatives
Hello
I have obtained a solution using Fluent V5, but now I am trying to post-process my results. I want to compute and store the derivative of a variable such as total pressure (i.e. for a variable that is derived from the variables actually solved for). I can see that in the "Adaptation" section, there is an option that computes the derivatives of such a function, but it is not possible to store the result anywhere (I want to combine it with other things). It is important for me that Fluent does the computation, using it's own differencing. I know that I can take the data outside of Fluent, and write a small program to compute these things myself, but I want to see what the results are using Fluent's differencing. Does anyone have an idea about how I can get Fluent to compute the derivative of any derived varable, and allow me to store it inside Fluent? Any help would be much appreciated. |

Re: Computation of Derivatives
One approach is to use a User Defined Function. Allocate 4 User Defined Scalars and turn off their solution. Then, in an ADJUST function, set the first UDS to the function that you want (eg pressure)...
C_UDSI(c,t,0) = C_P(c,t); Then, copy the gradient of C_UDSI(c,t,0) into the other 3 UDSs as C_UDSI(c,t,1) = C_UDSI_G(c,t,0)[0]; C_UDSI(c,t,2) = C_UDSI_G(c,t,0)[1]; C_UDSI(c,t,3) = C_UDSI_G(c,t,0)[2]; /* for 3D only */ Now you can plot the gradients. |

All times are GMT -4. The time now is 11:19. |