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

Bug in the DEFINE_ADJUST macro?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2002, 16:31
Default Bug in the DEFINE_ADJUST macro?
  #1
Senthil
Guest
 
Posts: n/a
We need to modify flow variables (velocites and temperature) periodically in a time dependent simulation. Fluent 6.0 manual says that DEFINE_ADJUST macro can be used for this purpose. When we used this macro, we found out that the the solver behaved as if no change was made. It appears that despite using the UDF based on DEFINE_ADJUST macro the information about the change in the flow variables is not passed on to the solver correctly.

When we contacted the technical assistance people in fluent, they suggested to us to use solve--initialize--patch using a custom field function instead. i.e to calculate the new values for flow variables in the custom field function. However, in this approach one must stop the run, make the change manually using the solve---initialise--patch option, continue the run until next time instant, stop and make manual change, and so on. If everytime the change has to be made manually, it would not be feasible to use Fluent for our project. Since DEFINE_ADJUST macro was meant to change the flow variable values but it does not communicate the change to the solver correctly, this looks like a bug. Has anybody faced this problem before?.

Thanks Senthil
  Reply With Quote

Old   September 1, 2002, 22:53
Default Re: Bug in the DEFINE_ADJUST macro?
  #2
Greg Perkins
Guest
 
Posts: n/a
In a time-dependent simulation, you may need to be careful which values you update. Note that variables such as C_U have time-step info saved in C_U_M1 (and for 2nd order) C_U_M2 - see manual.

I'm not sure exactly how to do it, so here's some options:

1. since your update is periodic why not use a DEFINE_ON_DEMAND - this works the same as an adjust, but since you're outside the solver iterations, I imagine that using C_U could work.

2. If 1 doesn't work - try it with updating the _M1 variables instead.

3. If 1 & 2 doesn't work change the _M1 variables on the first iteration of the new timestep using your define_adjust.

4. If 1-3 fail, you can use the text interface to tell fluent explicitly when to change to a new timestep (rather than use the default method). For sure if you play with this and combine with 1-3 there will be a way to update the variables correctly. For this cause, you can write a scheme macro with which you can implement your iterative method. (I've developed my own scheme macros for a hybrid steady-unsteady (pseudo-steady) solution method and it works quite well!)

and yep no text interface to the patch command is a pain!

Good Luck

Greg

In a non-steady solution
  Reply With Quote

Old   September 2, 2002, 04:54
Default Re: Bug in the DEFINE_ADJUST macro?
  #3
mystic_cfd
Guest
 
Posts: n/a
off topic,

but picking up on Greg's last comment, how can we get Fluent to add a bit of code to allow the patch command in the text user interface?

Or is there a clever dude out there who already coded the scheme for it and would like to share?

may convergence be with you...
  Reply With Quote

Old   September 2, 2002, 10:32
Default Re: Bug in the DEFINE_ADJUST macro?
  #4
Vivek Buwa
Guest
 
Posts: n/a
Hey Senthil,

It worked well for my case. We have used DEFINE_ADJUST for changing fluent variables for time dependent solution. I wonder what could have gone wrong in your case!

Vivek
  Reply With Quote

Old   September 3, 2002, 18:29
Default Re: Bug in the DEFINE_ADJUST macro?
  #5
Senthil
Guest
 
Posts: n/a
When we change the flow field values, we are always changing the corresponding values for previous time steps (_M1 and _M2). We have tried using various macros like DEFINE_ON_DEMAND, DEFINE_INIT macro. None of these macros worked for our case. I did not understand your suggestion 4. Can you please explain how to do that.

Thanks

Senthil
  Reply With Quote

Old   September 3, 2002, 22:26
Default Re: Bug in the DEFINE_ADJUST macro?
  #6
Greg Perkins
Guest
 
Posts: n/a
In the text interface you can break up a time step into the update new time level and solve iterations. This gives you more control over when the change to _M1 etc occurs.

Check out the user manual for the text interface and have a play around with the options.

Greg
  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
Macro Heat Exchanger not selecting (Please help!) zdeth FLUENT 2 September 11, 2012 13:52
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 04:18
Macro problem cfddummy Siemens 1 April 9, 2007 12:37
macro not function! guang ai Siemens 0 July 25, 2004 18:53
Call a macro from a macro Flav Siemens 2 July 1, 2004 05:42


All times are GMT -4. The time now is 05:51.