|
[Sponsors] |
February 25, 2007, 14:32 |
Command on gradient
|
#1 |
Guest
Posts: n/a
|
In my case, at the end of every time step, I use UDF to calculate a UDS, this UDS does not transfer. I need the gradient of the UDS at the beginning of next time step. So I should update the UDS's gradient after I change its value. But I do not know how to da. Is there any command can be used to get the gradient? Thank you very much!
|
|
February 26, 2007, 03:28 |
Re: Command on gradient
|
#2 |
Guest
Posts: n/a
|
the macro C_UDSI_G(c,t,i) gives the gradient vector of the UDS
|
|
February 26, 2007, 06:40 |
Re: Command on gradient
|
#3 |
Guest
Posts: n/a
|
I use UDF--DEFINE_EXECUTE_AT_END to change the value of a UDS. The gradient of this UDS will not be automatically updated after the UDS has been changed at the end of a time step. So the macro C_UDSI_G(c,t,i) only gives the gradient vector of the original unchanged UDS. That is the problem.
|
|
February 26, 2007, 06:55 |
Re: Command on gradient
|
#4 |
Guest
Posts: n/a
|
ok, now I understood. I faced the same problem and i couldn't find an "orthodox" solution. What you can do is either compute yourself the gradient( with the formulas given in the manual chapter 26 using the solver), or if your case is with VOF, you can do a trick: set the vof liquid values to an UDMI, then set the vof values to your UDS, force the gradient calculation with the functions described in the "horizontal film boiling" tutorial, and at the end set back the vof values to the UDMI.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
gradient of species mass fraction | zhou | FLUENT | 1 | March 14, 2020 08:55 |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
Pressure Gradient in channelOodles | sega | OpenFOAM Running, Solving & CFD | 14 | August 12, 2009 07:21 |
can I use static enthalpy gradient to describe dT | Jay | CFX | 0 | August 7, 2008 00:01 |
How to compute gradient for non-orthogonal grids? | Paul Hsieh | Main CFD Forum | 3 | November 11, 2003 05:52 |