CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF code help solve reaction rate equation palm oil

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

LinkBack Thread Tools Display Modes
Old   February 13, 2017, 11:34
Default UDF code help solve reaction rate equation palm oil
New Member
Join Date: Feb 2017
Posts: 2
Rep Power: 0
zirkov is on a distinguished road
Hello everyone,

I am trying to write a UDF code to import it into Ansys Fluent.

Actually, the reason of writing a UDF code is that there is not in fluent data base palm oil namely Triglycerides for reactants and Alkanes for products.

So I have to write a UDF code.

Firstly, I have already a udf code (DEFINE_PROPERTY) for chemical properties for each triglycerides, each alkanes and some fatty acids like density, conductivity, specific heat capacity, viscosity ect..

I am here to help me how to write the reaction kinetic rate for each equation. I need to find the rate k1 to k8 reactions. For each reactant and each product, I don't have the concentration.

I have found a UDF example but I'd like to know if it's a good example to take for writing a UDF code with my case (palm oil)

#include "udf.h"

#define K1 2.0e-2
#define K2 5.

DEFINE_VR_RATE(vol_reac_rate, c, t, r, mole_weight, species_mf, rate, rr_t)
real s1 = species_mf[0];
real mw1 = mole_weight[0];

if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous)
*rate = K1*s1/pow((1.+K2*s1),2.0)/mw1;
*rate = 0.;

*rr_t = *rate;

I have sent in attachment a file with my kinetic equation reaction.

Is it possible to use the previous code UDF for my case, otherwise do you have any idea ?

Thank you for your help.
Attached Files
File Type: pdf Kinetic equation reaction.pdf (95.4 KB, 0 views)
zirkov is offline   Reply With Quote


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
How to add Arrhenius Reaction Rate to energy equation? Zack OpenFOAM Programming & Development 1 January 3, 2017 15:14
udf for multiple reaction rate monababaei Fluent UDF and Scheme Programming 2 December 1, 2016 04:19
Langmiur equation as a reaction rate in fluent FLUENT 0 June 1, 2013 04:17
using rate equation for volumetric reaction byronsmith FLUENT 3 April 8, 2009 11:58
UDF rate equation alp FLUENT 3 November 8, 2007 13:39

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