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

Volumatric reaction rate UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 4, 2010, 09:45
Default Volumatric reaction rate UDF
  #1
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 8
elmcmaster is on a distinguished road
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.
elmcmaster is offline   Reply With Quote

Old   October 4, 2010, 10:45
Default
  #2
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 8
elmcmaster is on a distinguished road
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!
elmcmaster is offline   Reply With Quote

Old   October 4, 2010, 10:56
Lightbulb
  #3
Member
 
anonym
Join Date: Mar 2009
Posts: 65
Rep Power: 8
Laci is on a distinguished road
I think it's much easier import chemkin files (kinetics and thermo data), than write udf. Have you tried?
Laci is offline   Reply With Quote

Old   October 5, 2010, 05:19
Default
  #4
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 8
elmcmaster is on a distinguished road
I dont have chemkin
elmcmaster is offline   Reply With Quote

Old   October 5, 2010, 05:24
Wink
  #5
Member
 
anonym
Join Date: Mar 2009
Posts: 65
Rep Power: 8
Laci is on a distinguished road
It is free for all Fluent users, who has permission for the Fluent 6.1 or later version.
Laci is offline   Reply With Quote

Old   October 5, 2010, 11:02
Default
  #6
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 55
Rep Power: 8
Allan Walsh is on a distinguished road
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.
Allan Walsh is offline   Reply With Quote

Old   October 5, 2010, 11:26
Default
  #7
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 8
elmcmaster is on a distinguished road
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
elmcmaster is offline   Reply With Quote

Old   October 5, 2010, 16:57
Default
  #8
Member
 
Allan Walsh
Join Date: Mar 2009
Posts: 55
Rep Power: 8
Allan Walsh is on a distinguished road
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.
Allan Walsh is offline   Reply With Quote

Old   October 6, 2010, 05:22
Thumbs up
  #9
New Member
 
Michael McMaster
Join Date: May 2009
Posts: 29
Rep Power: 8
elmcmaster is on a distinguished road
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.
elmcmaster is offline   Reply With Quote

Reply

Tags
rate, reaction, volumetric

Thread Tools
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 On
Pingbacks are On
Refbacks are On


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 13: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 12:23
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


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