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

reaction in UDF(DEFINE_VR_RATE)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2009, 06:53
Default reaction in UDF(DEFINE_VR_RATE)
  #1
New Member
 
hameurlaine
Join Date: Jul 2009
Posts: 27
Rep Power: 17
louiza is on a distinguished road
Hello everybody,

How do I write the reaction in the UDF,for example reaction:

Ar + e -> Ar + + 2e (1),(k1 = 2 * 10-7 = reaction rate)

/************************************************** *******************
Multiple reaction UDF that specifies different reaction rates
for different volumetric chemical reactions
************************************************** ********************/
#include "udf.h"

DEFINE_VR_RATE(myrate,c,t,r,mw,yi,rr,rr_t)
{
/*If more than one reaction is defined, it is necessary to distinguish
between these using the names of the reactions. */

if (!strcmp(r->name, "reaction-1"))
{
/* Reaction 1 */
}
else if (!strcmp(r->name, "reaction-2"))
{
/* Reaction 2 */
}
else
{
/* Message("Unknown Reaction\n"); */
}
/* Message("Actual Reaction: %s\n",r->name); */

}


Thank you.
louiza is offline   Reply With Quote

Old   October 12, 2010, 07:36
Default
  #2
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17
elmcmaster is on a distinguished road
Hi louiza, im doing something similar, just fill in the rate expressions for each part , though mine is working its not working correctly yet, ill get back to you if i find out
elmcmaster is offline   Reply With Quote

Old   October 12, 2010, 13:38
Default
  #3
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17
Allan Walsh is on a distinguished road
I'm not clear why you are using a UDF to describe this reaction and not just the built-in Fluent reacting model. You would use an Arrhenius type expression where the Energy of Activation is zero and the pre-exponenential factor is your rate constant (assuming you want the rate as shown). The stoichiometric exponent could also be zero. Make sure that you convert the units for your expression to match those used in Fluent and then check that the calculated rate matches a simple hand-calculation.
If your reaction is different than shown, you could invest a week or so of time and write the UDF.
Allan Walsh is offline   Reply With Quote

Old   October 14, 2010, 00:59
Default
  #4
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17
coalgas is on a distinguished road
Completely agree with you Allan, UDF can be useful only when you have customerised reaction rate equation.
coalgas is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CFX5.7 - chemical reaction problem... H.L. CFX 4 March 25, 2009 11:33
combustion - reaction rates - urgent help needed siri Main CFD Forum 2 March 3, 2007 13:25
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 01:07
chemical reaction - howto Dan Sorensen Siemens 1 February 21, 2000 10:20
turbulent mixing controlled reaction vs. chemical kinetics controlled reaction Hyeryung NA Main CFD Forum 10 November 11, 1999 04:00


All times are GMT -4. The time now is 20:52.