CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Determining the mass transfer reaction? (

Lindz September 30, 2009 08:36

Determining the mass transfer reaction?

Im writing a UDF for the mass transfer of four different species which are set in the mass transfer panel. However, they are very similar except for one value which varies for each reaction. Is there a way I can have one DEFINE_MASS_TRANSFER code which determines which mass transfer reaction it is being applied to or would I have to copy the code 4 times with different names and changed single values.

For example, in DEFINE_VR_RATE you could use the following:

if (!strcmp(r->name, "reaction-1"))
/* Reaction 1 */
else if (!strcmp(r->name, "reaction-2"))
/* Reaction 2 */
/* Message("Unknown Reaction\n"); */
There isnt a 'r' destination for the DEFINE_MASS_TRANSFER which represents current reaction.

Much thanks in advance,


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