Chemical reaction in buoyantPimpleFoam
I am making a custom solver from buoyantPimpleFoam base in which I would like to add (for now) a simple chemical reaction a + b -> c
The dissipation of species (volScalarFields) a and b and formation of c follow the simple relation: di/dt = k(T)*a*b, where k(T) is a constant following the Archenius law k(T) = k0 * e^(-Ea/R/T), where are all constants except T - temperature.
So my problem is using the temperature field to calculate the k(T) in a solver with energy balance (h - hEqn).
I tried defining T in createFields.H as any other volScalarField is defined, but the problem is that the program reads T only in the beginning and it stays the same for the whole simulation.
Thank you for any reply.
Hello again, I would just like to post the solution to my problem. The running temperature at the h - based (hEqn) solvers can be accessed with the function thermo.T(). So I just wrote T = thermo.T() somewhere in the loop, and now all functions of T work. Example:
+ fvm::div(phi, Ca)
- fvm::laplacian(Da, Ca)
This is the equation for transport of specie a with dissipation.
|All times are GMT -4. The time now is 13:07.|