How to get a second derivative in udf?
How to get a second derivative ( diff(T,z,2), where T is temperature, z is one dimensionality, 2 refers to the second derivative) in udf?
Thanks. 
Re: How to get a second derivative in udf?
you must copy for each cell the first derivative of T in a UDMlocation (at the end or after each iteration when needed). In postprocessing you can ask for the first derivative of this UDM, which is actually the desired second derivative.
As far as I know there is no other way. good luck, Laika, still orbiting 
Re: How to get a second derivative in udf?
Thanks.
How can I get the first derivative of the defined UDM? by C_UDSI_G(c,t,i)? Can I define an UDS to refer to first derivative of temperature [C_UDSI(c,t,0)=C_T_G(c,t)[2]] and use C_UDSI_G(c,t,0) to give the second derivative? Thanks a lot. the second derivative appears in the source term, so I must update its value by each iteration. 
Re: How to get a second derivative in udf?
almost UDS >c_UDSI(... UDM >C_UDMI(...
the difference is that Fluent solves a transport equation for a UDS and not for a UDM. A UDM is just a memory location, but you can ask for the first derivatives. Hence the procedure:ask to calculate the first derivative of your quantity. Store it through the use of a UDF in a UDM, and ask for the first derivative of your UDM. good luck, Laika, still orbiting 
Well, it seems C_UDMI_G(cell, thread, n) isn't accessible, but we can get C_UDSI_G(cell, thread, n). The problem I met is that those values of C_UDSI_G at cells attached with boundaries are wrong. Any idea to properly get it fixed or any other approach we can employ?
Quote:

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