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 Multiphase chemical reaction. (https://www.cfd-online.com/Forums/fluent-udf/235173-udf-multiphase-chemical-reaction.html)

U1990 April 4, 2021 18:15

UDF Multiphase chemical reaction.
 
Hello, everyone.


I am trying to model a chemical reaction between two different fluids using Eulerian multiphase model. However, the reaction rate is calculated according to many correlations. I have writting a UDF code to incorporate this equations in model. But my problem is when I try to program the reaction between the specie 1 (in phase 1) with specie 2 (in phase 2).


How can I identify and select a specific specie in a phase?


I appreciate very much your help.

Yasser April 5, 2021 10:12

show what you have, so someone can suggest how to proceed

JeroenH April 9, 2021 03:04

I am not sure this is what you need, but you can get the index of a species in a mixture with the following bit of code (example is for oxygen):

Material *mat = THREAD_MATERIAL(t0);
int ind_O2 = mixture_specie_index(mat, "o2");

You can use this index to obtain the molecular weight or species mass fraction for example.


All times are GMT -4. The time now is 14:21.