Dear sir,

I am seeing this error message as material indexing error, when I used this UDF to implement the WSGGM in Ansys fluent. Please check any error in the UDF.

#include "udf.h"

#include "materials.h"

DEFINE_WSGGM_ABS_COEFF(user_wsggm_abs_coeff, c, t, xi, p_t, s, soot_conc, Tcell, nb, ab_wsggm, ab_soot)

{

Material *m = THREAD_MATERIAL(t);

int ico2 = mixture_specie_index(m, "co2");

int ih2o = mixture_specie_index(m, "h2o");

real CO2_molf, H2O_molf;

real k2, k3, k4;

CO2_molf= xi[ico2];

H2O_molf= xi[ih2o];

switch (nb)

{

case 0 : /* First gray gas*/

{

*ab_wsggm = 0;

}

break;

case 1 : /* Second gray gas*/

{

k2 = 0.4201;

*ab_wsggm = (k2 * (H2O_molf + CO2_molf)) * p_t;

}

break;

case 2 : /* Third gray gas*/

{

k3 = 6.516;

*ab_wsggm = (k3 * (H2O_molf + CO2_molf)) * p_t;

}

break;

case 3 : /* Fourth gray gas*/

{

k4 = 131.9;

*ab_wsggm = (k4 * (H2O_molf + CO2_molf)) * p_t;

}

}

*ab_soot = 0.1;

}

More Subrat Garnayak's questions See All
Similar questions and discussions