Volumatric reaction rate UDF
Hi,
I am having a bit of trouble deciphering the UDF manual in fluent when it shows the define_v_rate for volumetric reaction rate. They show that its possible to first calulate the arrenhius constant for the reaction at whatever local temperature its at by using some code, but i cant work out what it means. Essentially i want to have contained within the UDF a way of calulating the Arrenius constant for variable temperature, a way of calculating the equlibrium contsant as a function of temperature and calulating the mole fraction based on partial pressure. I dont know what to do! Any help would be greatly appreciated. 
I take it that it has something to do with the thread pointer or cell pointer, but i can find anywhere in the manual explaining it!
Arrrrgh! 
I think it's much easier import chemkin files (kinetics and thermo data), than write udf. :) Have you tried?

I dont have chemkin

It is free for all Fluent users, who has permission for the Fluent 6.1 or later version.

Just work through the math described by the computer code. It may seem a little convuluted since the UDF has to loop through each species in each reaction.
Start simple, and work up. I would not advise even trying to use a UDF for a volumetric reaction rate unless you have a few weeks of time to play with it. If you don't have the time, rework your equation to fit the standard Fluent format and deal with any inaccuracies. Good luck. 
Thanks for the tips, basically i have a rate equation:
1. r=k1Ca^aCb^b(1/Ke)Cc^cCd^d but need to caclulate arrhenius rate constant(related to k1) and equilibrium constant, Ke, which vary as functions of temperature, t,they are of the form: 2. Arrhenius function, k1 = k0e^(E/Rt) 3. Equilibrium function, approximated by (a/x(t)b) I know how to do this say in matlab or excel or c++ but within the udf i dont know how to address the value of local temperature as a varible in these functions to calculate the needed vaules for the constants and subsequentlly an accurate localised value for the rate, which is necessary for what im working on now and in the next year in my final year as PhD sutdent. Thanks, Michael :) 
The variable for temperature is just C_T(c,t,) where c is the cell and t is the thread. Have you had a chance to look at the UDF examples for the define volume reaction rate? This is quite helpful. Good luck.

Hey, thanks Allen, that seems to work, ill need to do some tests though to ensure it working correctly.
If i need to access local pressure and concentrations of species what would i do then? Pressure= C_P(c,t)? reactant with a for loop and criteria for selecting the right reactant? Ithink it shows you how to do this in the manual. 
All times are GMT 4. The time now is 22:43. 