|
[Sponsors] |
December 1, 1999, 21:52 |
changing reaction rate
|
#1 |
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 |
|
December 10, 1999, 11:53 |
Re: changing reaction rate
|
#2 |
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 |
|
|
|
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 |