CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   DEFINE_VR_RATE issue (https://www.cfd-online.com/Forums/fluent-udf/96146-define_vr_rate-issue.html)

Robbb January 13, 2012 10:20

DEFINE_VR_RATE issue
 
Hello everyone!
I wrote this UDF to define a reaction rate:

#include "udf.h"
DEFINE_VR_RATE(user_rate, c, t, r, mole_weight, species_mf, rr)
{
real s1 = species_mf[0];
real mw1 = mole_weight[0];
*rr=(2.303/12.6)*s1*mw1;
}


which seems to work.
Now I need to insert a -temperature dependent- value of D (which is constant in this udf and is 12.6 ). The dependence is D=12.6/ 10^((T-121)/10)
How can I insert it?

ComputerGuy January 14, 2012 19:42

Please see my reply in this thread:http://www.cfd-online.com/Forums/flu...botulinum.html


Quote:

Originally Posted by Robbb (Post 339199)
Hello everyone!
I wrote this UDF to define a reaction rate:

#include "udf.h"
DEFINE_VR_RATE(user_rate, c, t, r, mole_weight, species_mf, rr)
{
real s1 = species_mf[0];
real mw1 = mole_weight[0];
*rr=(2.303/12.6)*s1*mw1;
}


which seems to work.
Now I need to insert a -temperature dependent- value of D (which is constant in this udf and is 12.6 ). The dependence is D=12.6/ 10^((T-121)/10)
How can I insert it?



All times are GMT -4. The time now is 17:47.