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/)
-   -   udf for reaction (https://www.cfd-online.com/Forums/fluent-udf/133230-udf-reaction.html)

hane April 12, 2014 03:43

udf for reaction
 
hello Mr.ghorrocks
please help me in writing udf codes
i have the reaction rate for the hetrogenous reaction
i selected "user define" in reaction tab in fluent
now i dont know how to write udf for that
this is my reaction rate by concentration, below:
this is reaction:
phenol+oxygen+microorganism=>co2
and this is rate of phenol consumption that is important for us
r:rate
c:concentration of phenol
r = ka*(((225-ka*vaq*(225/pphenol-75)*((C-75)/((ka*(225/pphenol-75)-(139875/2)*mmax/(ya*(ks+75+5625/ki)*(ko+373/10)))))/vorg)/pphenol)-C)-mmax*C*(373/10+(kla*(csat-373/10)-(139875/2)*mmax/(yb*(ks+75+5625/ki)*(ko+373/10)))*((C-75)/((ka*(225/pphenol-75)-(139875/2)*mmax/(ya*(ks+75+5625/ki)*(ko+373/10))))))*(25+(139875/2)*mmax*((C-75)/((ka*(225/pphenol-75)-(139875/2)*mmax/(ya*(ks+75+5625/ki)*(ko+373/10)))))/((ks+75+5625/ki)*(ko+373/10)))/(ya*(ks+C+(1/ki)*(C^2))*(ko+(373/10+(kla*(csat-373/10)-(139875/2)*mmax/(yb*(ks+75+5625/ki)*(ko+373/10)))*((C-75)/((ka*(225/pphenol-75)-(139875/2)*mmax/(ya*(ks+75+5625/ki)*(ko+373/10))))))))
except "r" and "C" all parameters are constant,which i have the value of them
i have red some tutorials on udf writing,
the only thing i know is,
we have to use this macro
DEFINE_HET_RXN_RATE(user_evap_condens_react, c, t, hr, mw,
yi, rr, rr_t)

would you please help me how to write udf
this is for my thesis , & i got into a trouble
i would be very thankful if you kindly give me any hint,or
write just a couple of code lines as a basis of my project

tanx and regards
Hamed from university of tabriz


All times are GMT -4. The time now is 19:35.