CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Explicit source term implementation (https://www.cfd-online.com/Forums/openfoam-programming-development/211341-explicit-source-term-implementation.html)

wvn November 14, 2018 11:31

Explicit source term implementation
 
Hi all,

I am trying to implement a reaction heat source term into the temperature equation of a clone of buoyantBoussinesqPimpleFoam. The source term is given by
Code:

Q_T/(rho_compat*rhok*cp)
Q_T is computed explicitly based on chemical mole fractions.

I have plotted Q_T to verify that it is being properly computed. The maximum value of Q_T is on the order of 3.4e-2.

The T equation implementation looks like this:
Code:

fvScalarMatrix TEqn
    (
        fvm::ddt(T)
      + fvm::div(phi, T)
      - fvm::laplacian(alphaEff, T)
    ==
        radiation->ST(rhoCpRef, T)
        + fvOptions(T)
        + Q_T/(rho_compat*rhok*cp)
    );

    TEqn.relax();

    fvOptions.constrain(TEqn);

    TEqn.solve();


However, when I run the case with an initial, uniform temperature distribution of 300K, the temperature distribution does not change and no buoyancy effects can be seen.

The OpenFOAM programmer's guide suggests (in a footnote on page P-35) that this implementation should be sufficient for an explicit source term.

I have also made an attempt to use fvOptions, but I have struggled to find sufficient documentation.

Suggestions are welcome.

Thanks!


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