CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Command on gradient

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2007, 13:32
Default Command on gradient
  #1
Tong Wu
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!
  Reply With Quote

Old   February 26, 2007, 02:28
Default Re: Command on gradient
  #2
Bogdan
Guest
 
Posts: n/a
the macro C_UDSI_G(c,t,i) gives the gradient vector of the UDS
  Reply With Quote

Old   February 26, 2007, 05:40
Default Re: Command on gradient
  #3
Tong Wu
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.
  Reply With Quote

Old   February 26, 2007, 05:55
Default Re: Command on gradient
  #4
Bogdan
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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
gradient of species mass fraction zhou FLUENT 1 March 14, 2020 07:55
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
Pressure Gradient in channelOodles sega OpenFOAM Running, Solving & CFD 14 August 12, 2009 06:21
can I use static enthalpy gradient to describe dT Jay CFX 0 August 6, 2008 23:01
How to compute gradient for non-orthogonal grids? Paul Hsieh Main CFD Forum 3 November 11, 2003 04:52


All times are GMT -4. The time now is 13:21.