diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C index b8f40a82b8..7bafa4b2fd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,6 +26,7 @@ License #include "interfaceCompositionModel.H" #include "phaseModel.H" #include "phasePair.H" +#include "phaseSystem.H" #include "rhoReactionThermo.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -48,18 +49,29 @@ Foam::interfaceCompositionModel::interfaceCompositionModel pair_(pair), species_(dict.lookup("species")), Le_("Le", dimless, dict), + phase_ + ( + // !!! This is a hack, to let the models know which side of the + // interface it applies to. In general, we are going to need improve + // the phase-pair system to take into account model sidedness and other + // types of asymmetry from just dispersed/continuous. + pair.phase1().name() == IOobject::group(dict.dictName()) + ? pair.phase1() + : pair.phase2() + ), + otherPhase_(pair.otherPhase(phase_)), thermo_ ( - pair.phase1().mesh().lookupObject + phase_.mesh().lookupObject ( - IOobject::groupName(basicThermo::dictName, pair.phase1().name()) + IOobject::groupName(basicThermo::dictName, phase_.name()) ) ), otherThermo_ ( - pair.phase2().mesh().lookupObject + otherPhase_.mesh().lookupObject ( - IOobject::groupName(basicThermo::dictName, pair.phase2().name()) + IOobject::groupName(basicThermo::dictName, otherPhase_.name()) ) ) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H index bd0481fd61..5f05513fb6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/interfaceCompositionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,6 +68,12 @@ class interfaceCompositionModel //- Lewis number const dimensionedScalar Le_; + //- Phase + const phaseModel& phase_; + + //- Other phase + const phaseModel& otherPhase_; + //- Multi-component thermo model for this side of the interface const rhoReactionThermo& thermo_;