View Issue Details

IDProjectCategoryView StatusLast Update
0001881OpenFOAMBugpublic2015-10-27 16:39
Reporterdemichie Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
PlatformIntelOSXubuntuOS Version14.04
Product Versiondev 
Summary0001881: reactingEulerFoam: possible error
DescriptionI am looking at how mass transfer is implemented in reactingTwoPhaseEulerFoam and I have found some possible bug to be checked.


In HeatAndMassTransferPhaseSystem.C the momentum transfer associated with the mass change is:


*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt21, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt12, U2);

where

const volScalarField dmdt(this->dmdt(pair));
const volScalarField dmdt21(posPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));

I think it should be:

*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt12, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt21, U2);

because the speed associated to a mass transfer from phase 1 to phase 2 is U1.

This is done in the correct way for the new face momentum equations.
Similar problems are present in the heatTrasfer term:

*eqns[phase1.name()] +=
dmdt21*(phase1.thermo().he(phase1.thermo().p(), Tf))
- fvm::Sp(dmdt21, he1)
+ dmdt21*(K2 - K1);

but for the first phase it should be:

        *eqns[phase1.name()] +=
            - dmdt21*(phase2.thermo().he(phase2.thermo().p(), Tf))
            + fvm::Sp(dmdt12, he1)
            - dmdt21* K2
            + dmdt12 *K1;


I think that also additional terms accounting for the mass change should also be present in alpha equation in twoPhaseSystem.C.

This is the modification that I think is required:


        volScalarField::DimensionedInternalField Sp
        (
            IOobject
            (
                "Sp",
                runTime.timeName(),
                mesh
            ),
            // mesh,
            // dimensionedScalar("Sp", dimless/dimTime, 0.0)
            // mass transfer by phase change
            // See Eq 2.6 Ghione's thesis
            dmdt() / phase2_.rho() - dmdt() / phase1_.rho()
        );

        volScalarField::DimensionedInternalField Su
        (
            IOobject
            (
                "Su",
                runTime.timeName(),
                mesh
            ),
            // Divergence term is handled explicitly to be
            // consistent with the explicit transport solution
            fvc::div(phi)*min(alpha1, scalar(1))
            // mass transfer by phase change
            + dmdt() / phase1_.rho()
         );



Additional InformationI am checking all these terms because in the last year I have written a solver based on twoPhaseEulerFoam making the phases multi-component and adding mass transfer between the phases. For these reason I have several comparison I can do between my solver and reactingTwoPhaseEulerFoam.
TagsNo tags attached.

Activities

henry

2015-10-27 16:09

manager   ~0005506

Look carefully at the way the continuityError is handled and the way this affects the implementation of the dmdt sources.

The mass exchange sources for the phase fraction are handled via dgdt which is constructed from the divU of the phases which include this effect.

demichie

2015-10-27 16:33

reporter   ~0005508

Thank you for the clarification. Now I have seen that divU is calculated form pEqnComp already accounting for the mass exchange.

Issue History

Date Modified Username Field Change
2015-10-27 14:54 demichie New Issue
2015-10-27 16:09 henry Note Added: 0005506
2015-10-27 16:33 demichie Note Added: 0005508
2015-10-27 16:39 henry Status new => closed
2015-10-27 16:39 henry Assigned To => henry
2015-10-27 16:39 henry Resolution open => no change required