diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index f2b3bcd255cf12761e07d468a80729ac18a0b1b1..c3651276f375a149ca6dea6bf44045091bdc4890 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -170,7 +170,7 @@ Foam::temperatureCoupledBase::temperatureCoupledBase void Foam::temperatureCoupledBase::autoMap ( - const FieldMapper& mapper + const fvPatchFieldMapper& mapper ) { if (kappaFunction1_) @@ -186,17 +186,22 @@ void Foam::temperatureCoupledBase::autoMap void Foam::temperatureCoupledBase::rmap ( - const temperatureCoupledBase& ptf, + const fvPatchField<scalar>& ptf, const labelList& addr ) { - if (kappaFunction1_) - { - kappaFunction1_().rmap(ptf.kappaFunction1_(), addr); - } - if (alphaFunction1_) + const auto* tcb = isA<temperatureCoupledBase>(ptf); + + if (tcb) { - alphaFunction1_().rmap(ptf.alphaFunction1_(), addr); + if (kappaFunction1_) + { + kappaFunction1_().rmap(tcb->kappaFunction1_(), addr); + } + if (alphaFunction1_) + { + alphaFunction1_().rmap(tcb->alphaFunction1_(), addr); + } } } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H index 65a759f78227089e9b59a21682a624c6f8c08f6c..3e7eff8b762fd5689862c34fd62b9f698a5a9e83 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H @@ -87,6 +87,7 @@ SourceFiles #include "Enum.H" #include "fvPatch.H" #include "PatchFunction1.H" +#include "fvPatchFieldMapper.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -204,15 +205,15 @@ public: //- Map (and resize as needed) from self given a mapping object virtual void autoMap ( - const FieldMapper& - ); + const fvPatchFieldMapper& + ) = 0; //- Reverse map the given fvPatchField onto this fvPatchField virtual void rmap ( - const temperatureCoupledBase&, + const fvPatchField<scalar>&, const labelList& - ); + ) = 0; //- Given patch temperature calculate corresponding K field virtual tmp<scalarField> kappa(const scalarField& Tp) const; diff --git a/src/faOptions/sources/derived/contactHeatFluxSource/contactHeatFluxSource.H b/src/faOptions/sources/derived/contactHeatFluxSource/contactHeatFluxSource.H index b5aeb34bb39ddf51ddac2520bc73832d5b3520cb..fbc4c6c0a002fef781f98778694f2f0568b13ee1 100644 --- a/src/faOptions/sources/derived/contactHeatFluxSource/contactHeatFluxSource.H +++ b/src/faOptions/sources/derived/contactHeatFluxSource/contactHeatFluxSource.H @@ -164,6 +164,28 @@ public: // Member Functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& mapper + ) + { + temperatureCoupledBase::autoMap(mapper); + } + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchField<scalar>& fld, + const labelList& map + ) + { + temperatureCoupledBase::rmap(fld, map); + } + + // Evaluation //- Add explicit contribution to compressible momentum equation