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

changing reaction rate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 1999, 21:52
Default changing reaction rate
  #1
Arthur Valais
Guest
 
Posts: n/a
Hello All,

Does anyone have any source code snippet on how to alter the volume reaction rate on a per cell basis after each time step or iteration? My guess is to use DEFINE_ADJUST and DEFINE_VR_RATE together but I'm lost after that. Any clues will be appreciated.

Arthur Valais
  Reply With Quote

Old   December 10, 1999, 11:53
Default Re: changing reaction rate
  #2
Joe Maruszewski
Guest
 
Posts: n/a
Hi,

Here's a rather silly example of how you could modify the reaction rate as a function of time. In the example, when a new time step is done the reaction rate is cut in half.

#include "udf.h"

DEFINE_VR_RATE(my_rate, c, t, r, mw, yi, rr, rr_t) { static real old_flow_time = 0.; static real specified_rr = 1.; if (RP_Get_Real("flow-time") > old_flow_time)

specified_rr /= 2.; old_flow_time = RP_Get_Real("flow-time"); *rr = specified_rr; }

If you could be more specific about what you are trying to do I may be able to provide more suggestions.

Joe
  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
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 17:55
UDF for catalyst volumetric reaction, temperature overshoot though rate is small elmcmaster FLUENT 0 October 11, 2010 10:37
surface reaction rate with udf yellow-stuff FLUENT 4 January 29, 2010 13:53
UDF changing the rate exponent of a reaction Stefan H Fluent UDF and Scheme Programming 0 September 16, 2009 14:20
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 01:07


All times are GMT -4. The time now is 23:29.