|
[Sponsors] |
January 2, 2019, 08:46 |
DEFINE_CHEM_STEP reaction heat
|
#1 |
New Member
Join Date: May 2018
Posts: 29
Rep Power: 8 |
Hello everyone,
I finally managed to get my reaction system going with the DEFINE_CHEM_STEP macro (see below). Although the mass fractions of the species are correct, I no longer see a generation of heat. The temperature profile of a converged simulation states a constant temperature of e.g. 500 K. Although my mixture has indeed different enthalpys set for the species (which are produced/consumed). Where/How do I handle reaction enthalpies when dealing with DEFINE_CHEM_STEP? I'm using Fluent 19.2 with some other custom udf (viscosity, heat capacity, thermal conductivity and density of the mixture, although these are throughly tested). Code:
DEFINE_CHEM_STEP(chem_steps, c, t, p, num_p, n_spe, dt, pres, temp, yk) { real ck[N_COMP]; real rates[N_COMP]; real pres_bar = *pres / 1e5; // bar real rho = C_R(c, t); // Get concentrations from mass fractions for (i = 0; i < N_COMP; i++) { ck[i] = rho * yk[i] / M_i[i]; } // Calculate the rates rates[i_example_species] = -k_exp * ck[i_example_species]; // etc. for (i = 0; i < N_COMP; i++) { ck[i] += rates[i] * *dt; yk[i] = ck[i] * M_i[i] / rho; // Message("\n Specie %d = %f \t TimeStep = %e", i, yk[i], *dt); } } |
|
May 2, 2020, 12:13 |
|
#2 |
Member
Di Cheng
Join Date: May 2010
Location: Beijing, China
Posts: 47
Rep Power: 16 |
Did you enabled the energy equation?
|
|
December 15, 2021, 05:01 |
|
#3 |
New Member
Jinshan Yi
Join Date: Dec 2021
Posts: 7
Rep Power: 5 |
I also encountered the same problem. Have you solved it?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interphase mass transfer of a reaction | cfx_ws1992 | Main CFD Forum | 0 | May 15, 2017 22:42 |
UDF to access quantity of heat absorbed by one phase in Multi phase reaction process | Yuting | FLUENT | 0 | March 15, 2017 23:52 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Reaction heat | Laci | FLUENT | 2 | July 23, 2009 03:03 |
heat of reaction | Paul | FLUENT | 4 | August 7, 2003 12:58 |