CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenFOAM, Difference between combustion and reaction (https://www.cfd-online.com/Forums/openfoam-solving/216182-openfoam-difference-between-combustion-reaction.html)

farshadexp March 30, 2019 14:22

OpenFOAM, Difference between combustion and reaction
 
Hi;
Can any one explain the differences between following codes, bold lines:


Code:

forAll(Y, i)
    {
        if (i != inertIndex && composition.active(i))
        {
            volScalarField& Yi = Y[i];

            fvScalarMatrix YiEqn
            (
                fvm::ddt(rho, Yi)
              + mvConvection->fvmDiv(phi, Yi)
              - fvm::laplacian(turbulence->muEff(), Yi)
            ==
                reaction->R(Yi)
              + fvOptions(rho, Yi)
            );

            YiEqn.relax();

            fvOptions.constrain(YiEqn);

            YiEqn.solve(mesh.solver("Yi"));

            fvOptions.correct(Yi);

            Yi.max(0.0);
            Yt += Yi;
        }
    }

Code:

forAll(Y, i)
    {
        if (i != inertIndex && composition.active(i))
        {
            volScalarField& Yi = Y[i];

            fvScalarMatrix YiEqn
            (
                fvm::ddt(rho, Yi)
              + mvConvection->fvmDiv(phi, Yi)
              - fvm::laplacian(turbulence->alphaEff(), Yi)
              ==
                parcels.SYi(i, Yi)
              + surfaceFilm.Srho(i)
              + combustion->R(Yi)
              + fvOptions(rho, Yi)
            );

            YiEqn.relax();

            fvOptions.constrain(YiEqn);

            YiEqn.solve(mesh.solver("Yi"));

            fvOptions.correct(Yi);

            Yi.max(0.0);
            Yt += Yi;
        }
    }

the first one is part of YEqn.H (reactingFoam) and the second one is part of YEEqn.H (fireFoam).

clapointe March 31, 2019 12:16

There shouldn't be any difference. If you check the respective create fields, you'll notice one creates names the combustion autoPtr "combustion" and the other names it "reaction".

Caelan

farshadexp March 31, 2019 15:42

Dear Caelan, thanks for your answer.

You are right. I quote both of the pointer definitions below for future users who may follow this thread:


Code:

autoPtr<CombustionModel<psiReactionThermo>> reaction
(
    CombustionModel<psiReactionThermo>::New(thermo, turbulence())
);


Code:

autoPtr<CombustionModel<psiReactionThermo>> combustion
(
    CombustionModel<psiReactionThermo>::New(thermo, turbulence())
);

But I have a more general Q. what's the difference between fireFoam and for example reactingFoam?! Why EDC or PaSR combustion models do not works with fireFoam, in other words, no reaction (no temperature rise) occurs when using EDC or PaSR in fireFoam solver!

clapointe March 31, 2019 17:49

In brief, fireFoam tutorials are all configured to use infinitelyFast chemistry. To use other combustion models you'll likely need to provide some sort of energy source (eg a spark or a pilot flame or preheating reactants) to start reactions. Look into the reactingFoam tutorials for examples for how to do this. However, then you'll need to start thinking about the nature of your combustion problem -- for mixing controlled diffusion flames the infinitely fast assumption is not a terrible one. That said, there are extensions of the EDC to les that do modify the infinitely fast heat release by local laminar/turbulence timescales (see e.g. https://www.sciencedirect.com/scienc...79711214000125). I think the OpenFoam+ side has a variant of this.

Caelan

farshadexp April 1, 2019 01:49

I used energy sources (e.g ignition by setFields and fvSolution) but nothing changed.
I am going to try extended version of OF, maybe I could find the solution.
p.s: results of infinitelyFast are not reliable comparing with experiments for pool fire.

clapointe April 1, 2019 10:42

If you change the combustion model, you will need to make corresponding changes to the thermo/reactions. Re. infinitely fast, it may not work out of the box. As I said, extension to the eddy dissipation model works quite well. See eg. https://www.sciencedirect.com/scienc...10002944#b0005.

Caelan


All times are GMT -4. The time now is 09:20.