CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Programing a UDF (https://www.cfd-online.com/Forums/fluent/47159-programing-udf.html)

poper January 29, 2008 04:15

Programing a UDF
 
Hi everyone!

I´m a begineer using UDF´s. I´d like to create one UDF related with methane combustion (CH4 + 2O2-->CO2 + 2H2O).

The reaction mechanism is (-R_CH4)=k1*YCH4^0.72*e(k2/T) [mol/s·m3], where K1 and K2 are constants, T is temperature and YCH4 is the molar fraction of methane.

I´d like to use the DEFINE_SOURCE macro because is the one I´ve used before but I don´t know how to translate the reaction to a programing language!!

Thank you in advance

Best regards

Allan Walsh January 29, 2008 12:34

Re: Programing a UDF
 
Have you looked at the example in the UDF manual?

RE13 January 30, 2008 18:31

Re: Programing a UDF
 
try DEFINE_VR_RATE

poper January 31, 2008 03:27

Re: Programing a UDF
 
Thanks for the replies.

I´ll try DEFINE_VR_RATE because it seems easier to work with

Best regards


All times are GMT -4. The time now is 06:16.