diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index bba8da15144c72cb0d14c8d1c4610f837b63f0ca..8efaf0f5d50ee60a97cb1bbda81fe132b39c3ce1 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -35,6 +35,39 @@ License // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +template<class BasicThermo, class MixtureType> +Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryBaseTypes() +{ + const volScalarField::GeometricBoundaryField& tbf = + this->T_.boundaryField(); + + wordList hbt(tbf.size(), word::null); + + forAll(tbf, patchi) + { + if (isA<fixedJumpFvPatchScalarField>(tbf[patchi])) + { + const fixedJumpFvPatchScalarField& pf = + dynamic_cast<const fixedJumpFvPatchScalarField&>(tbf[patchi]); + + hbt[patchi] = pf.interfaceFieldType(); + } + else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi])) + { + const fixedJumpAMIFvPatchScalarField& pf = + dynamic_cast<const fixedJumpAMIFvPatchScalarField&> + ( + tbf[patchi] + ); + + hbt[patchi] = pf.interfaceFieldType(); + } + } + + return hbt; +} + + template<class BasicThermo, class MixtureType> Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes() { @@ -149,7 +182,8 @@ Foam::heThermo<BasicThermo, MixtureType>::heThermo ), mesh, dimEnergy/dimMass, - this->heBoundaryTypes() + this->heBoundaryTypes(), + this->heBoundaryBaseTypes() ) { init(); @@ -179,7 +213,8 @@ Foam::heThermo<BasicThermo, MixtureType>::heThermo ), mesh, dimEnergy/dimMass, - this->heBoundaryTypes() + this->heBoundaryTypes(), + this->heBoundaryBaseTypes() ) { init(); diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index 2c894eee43727db7c8d7b3f84380b0840805284b..ef9919a99cdb5b3a303780d45045ccfcfe5bd176 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -68,6 +68,10 @@ protected: // by interrogating the temperature field boundary types wordList heBoundaryTypes(); + //- Return the enthalpy/internal energy field boundary base types + // by interrogating the temperature field boundary types + wordList heBoundaryBaseTypes(); + //- Correct the enthalpy/internal energy field boundaries void heBoundaryCorrection(volScalarField& he);