Improved and generalised the interface to the combustion model by having the
[OpenFOAM-1.6.x.git] / applications / solvers / combustion / fireFoam / fuhsEqn.H
blob798cee4007e4979d948a7ba4d44af90aba62f5cb
2     // Solve fuel equation
3     // ~~~~~~~~~~~~~~~~~~~
4     fvScalarMatrix R = combustion->R(fu);
6     {
7         fvScalarMatrix fuEqn
8         (
9             fvm::ddt(rho, fu)
10           + mvConvection->fvmDiv(phi, fu)
11           - fvm::laplacian(turbulence->alphaEff(), fu)
12          ==
13             R
14         );
16         fuEqn.relax();
17         fuEqn.solve();
18     }
20     Info<< "max(fu) = " << max(fu).value() << endl;
21     Info<< "min(fu) = " << min(fu).value() << endl;
24     // Solve sensible enthalpy equation
25     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26     radiation->correct();
27     dQ = combustion->dQ(R);
29     {
30         fvScalarMatrix hsEqn
31         (
32             fvm::ddt(rho, hs)
33           + mvConvection->fvmDiv(phi,hs)
34           - fvm::laplacian(turbulence->alphaEff(), hs)
35          ==
36             DpDt
37           + dQ
38           + radiation->Shs(thermo)
39         );
41         hsEqn.relax();
42         hsEqn.solve();
43     }
45     thermo.correct();
46     combustion->correct();