|
[Sponsors] |
October 4, 2010, 10:45 |
Volumatric reaction rate UDF
|
#1 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
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. |
|
October 4, 2010, 11:45 |
|
#2 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
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! |
|
October 4, 2010, 11:56 |
|
#3 |
Member
anonym
Join Date: Mar 2009
Posts: 65
Rep Power: 17 |
I think it's much easier import chemkin files (kinetics and thermo data), than write udf. Have you tried?
|
|
October 5, 2010, 06:19 |
|
#4 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
I dont have chemkin
|
|
October 5, 2010, 06:24 |
|
#5 |
Member
anonym
Join Date: Mar 2009
Posts: 65
Rep Power: 17 |
It is free for all Fluent users, who has permission for the Fluent 6.1 or later version.
|
|
October 5, 2010, 12:02 |
|
#6 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
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. |
|
October 5, 2010, 12:26 |
|
#7 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
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 |
|
October 5, 2010, 17:57 |
|
#8 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
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.
|
|
October 6, 2010, 06:22 |
|
#9 |
New Member
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 17 |
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. |
|
Tags |
rate, reaction, volumetric |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
case files UDF volumetric reaction rate | Marie-Anne | Main CFD Forum | 2 | February 24, 2006 10:43 |
UDF about reaction rate | Julien | FLUENT | 0 | June 30, 2005 13:23 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 01:07 |