diff --git a/src/regionModels/pyrolysisModels/Make/options b/src/regionModels/pyrolysisModels/Make/options index 30a5fa428b..b892a00590 100644 --- a/src/regionModels/pyrolysisModels/Make/options +++ b/src/regionModels/pyrolysisModels/Make/options @@ -1,5 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ @@ -14,11 +16,19 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude - LIB_LIBS = \ - -lregionModels \ - -lsolidChemistryModel \ - -lbasicSolidThermo \ -lfiniteVolume \ + -lsampling \ + -lAMIInterpolation \ -lmeshTools \ - -lcompressibleLESModels + -lchemistryModel \ + -lspecie \ + -lspecie \ + -lsolid \ + -lbasicThermophysicalModels \ + -lsolidChemistryModel \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lLESdeltas \ + -lregionModels diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C index 05c684c043..7dd0080e8b 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C @@ -25,7 +25,7 @@ License #include "pyrolysisModel.H" #include "fvMesh.H" -#include "directMappedFieldFvPatchField.H" +#include "mappedFieldFvPatchField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,7 +70,7 @@ void pyrolysisModel::constructMeshObjects() forAll(filmDelta.boundaryField(), patchI) { const fvPatchField& fvp = filmDelta.boundaryField()[patchI]; - if (isA >(fvp)) + if (isA >(fvp)) { foundCoupledPatch = true; break; @@ -81,7 +81,7 @@ void pyrolysisModel::constructMeshObjects() { WarningIn("void pyrolysisModels::constructMeshObjects()") << "filmCoupled flag set to true, but no " - << directMappedFieldFvPatchField::typeName + << mappedFieldFvPatchField::typeName << " patches found on " << filmDelta.name() << " field" << endl; } diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 942094d838..95214ac92e 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -25,8 +25,6 @@ License #include "reactingOneDim.H" #include "addToRunTimeSelectionTable.H" -#include "directMappedPatchBase.H" -#include "mapDistribute.H" #include "zeroGradientFvPatchFields.H" #include "surfaceInterpolate.H" #include "fvm.H" diff --git a/src/regionModels/regionCoupling/Make/options b/src/regionModels/regionCoupling/Make/options index 5201314345..9182aa4de1 100644 --- a/src/regionModels/regionCoupling/Make/options +++ b/src/regionModels/regionCoupling/Make/options @@ -1,5 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C index 0908509b4d..a48cc3232e 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C @@ -146,7 +146,7 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs() const label filmPatchI = filmModel.regionPatchID(patchI); - const mapDistribute& filmMap = filmModel.mappedPatches()[filmPatchI].map(); + const mappedPatchBase& filmMap = filmModel.mappedPatches()[filmPatchI]; scalarField deltaFilm = filmModel.delta().boundaryField()[filmPatchI]; filmMap.distribute(deltaFilm); @@ -161,7 +161,7 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs() const label pyrPatchI = pyrModel.regionPatchID(patchI); - const mapDistribute& pyrMap = pyrModel.mappedPatches()[pyrPatchI].map(); + const mappedPatchBase& pyrMap = pyrModel.mappedPatches()[pyrPatchI]; scalarField TPyr = pyrModel.T().boundaryField()[pyrPatchI]; pyrMap.distribute(TPyr); diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C index 23154894bd..6f9b6b5819 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C @@ -149,7 +149,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() const label filmPatchI = filmModel.regionPatchID(patchI); - const mapDistribute& filmMap = filmModel.mappedPatches()[filmPatchI].map(); + const mappedPatchBase& filmMap = filmModel.mappedPatches()[filmPatchI]; scalarField deltaFilm = filmModel.delta().boundaryField()[filmPatchI]; filmMap.distribute(deltaFilm); @@ -167,7 +167,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() const label pyrPatchI = pyrModel.regionPatchID(patchI); - const mapDistribute& pyrMap = pyrModel.mappedPatches()[pyrPatchI].map(); + const mappedPatchBase& pyrMap = pyrModel.mappedPatches()[pyrPatchI]; scalarField phiPyr = pyrModel.phiGas().boundaryField()[pyrPatchI]; pyrMap.distribute(phiPyr); diff --git a/src/regionModels/regionModel/Make/files b/src/regionModels/regionModel/Make/files index 7a62c0c570..570b357b11 100644 --- a/src/regionModels/regionModel/Make/files +++ b/src/regionModels/regionModel/Make/files @@ -4,6 +4,6 @@ singleLayerRegion/singleLayerRegion.C regionModel1D/regionModel1D.C /* Boundary conditions */ -derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.C +derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C LIB = $(FOAM_LIBBIN)/libregionModels diff --git a/src/regionModels/regionModel/Make/options b/src/regionModels/regionModel/Make/options index a3ae8da833..f82c3cc9a9 100644 --- a/src/regionModels/regionModel/Make/options +++ b/src/regionModels/regionModel/Make/options @@ -1,7 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude + LIB_LIBS = \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lsampling \ + -lAMIInterpolation diff --git a/src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.C b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C similarity index 79% rename from src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.C rename to src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C index 3f358d0051..01828d085a 100644 --- a/src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.C +++ b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "directMappedVariableThicknessWallFvPatch.H" +#include "mappedVariableThicknessWallFvPatch.H" #include "addToRunTimeSelectionTable.H" #include "regionModel1D.H" @@ -31,11 +31,11 @@ License namespace Foam { - defineTypeNameAndDebug(directMappedVariableThicknessWallFvPatch, 0); + defineTypeNameAndDebug(mappedVariableThicknessWallFvPatch, 0); addToRunTimeSelectionTable ( fvPatch, - directMappedVariableThicknessWallFvPatch, + mappedVariableThicknessWallFvPatch, polyPatch ); } @@ -43,19 +43,13 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::directMappedVariableThicknessWallFvPatch:: +void Foam::mappedVariableThicknessWallFvPatch:: makeDeltaCoeffs(scalarField& dc) const { - const directMappedVariableThicknessWallPolyPatch& pp = - refCast - ( - patch() - ); + const mappedVariableThicknessWallPolyPatch& pp = + refCast(patch()); - const directMappedPatchBase& mpp = refCast - ( - patch() - ); + const mappedPatchBase& mpp = refCast(patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); diff --git a/src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.H b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H similarity index 83% rename from src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.H rename to src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H index 20926b7967..a203fc0169 100644 --- a/src/regionModels/regionModel/derivedFvPatches/directMappedVariableThicknessWall/directMappedVariableThicknessWallFvPatch.H +++ b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::directMappedVariableThicknessWallFvPatch + Foam::mappedVariableThicknessWallFvPatch Description Take thickness field and number of layers and returns deltaCoeffs @@ -30,15 +30,15 @@ Description To be used with 1D thermo baffle. SourceFiles - directMappedVariableThicknessWallFvPatch.C + mappedVariableThicknessWallFvPatch.C \*---------------------------------------------------------------------------*/ -#ifndef directMappedWallFvPatch_H -#define directMappedWallFvPatch_H +#ifndef mappedWallFvPatch_H +#define mappedWallFvPatch_H #include "wallFvPatch.H" -#include "directMappedVariableThicknessWallPolyPatch.H" +#include "mappedVariableThicknessWallPolyPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,10 +46,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class directMappedVariableThicknessWallFvPatch Declaration + Class mappedVariableThicknessWallFvPatch Declaration \*---------------------------------------------------------------------------*/ -class directMappedVariableThicknessWallFvPatch +class mappedVariableThicknessWallFvPatch : public wallFvPatch { @@ -65,13 +65,13 @@ protected: public: //- Runtime type information - TypeName(directMappedVariableThicknessWallPolyPatch::typeName_()); + TypeName(mappedVariableThicknessWallPolyPatch::typeName_()); // Constructors //- Construct from components - directMappedVariableThicknessWallFvPatch + mappedVariableThicknessWallFvPatch ( const polyPatch& patch, const fvBoundaryMesh& bm @@ -79,7 +79,6 @@ public: : wallFvPatch(patch, bm) {} - }; diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index 40e9580398..1d74a9c646 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -26,7 +26,7 @@ License #include "regionModel.H" #include "fvMesh.H" #include "Time.H" -#include "directMappedWallPolyPatch.H" +#include "mappedWallPolyPatch.H" #include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -99,11 +99,11 @@ void Foam::regionModels::regionModel::initialise() forAll(rbm, patchI) { const polyPatch& regionPatch = rbm[patchI]; - if (isA(regionPatch)) + if (isA(regionPatch)) { if (debug) { - Pout<< "found " << directMappedWallPolyPatch::typeName + Pout<< "found " << mappedWallPolyPatch::typeName << " " << regionPatch.name() << endl; } @@ -111,20 +111,20 @@ void Foam::regionModels::regionModel::initialise() nBoundaryFaces += regionPatch.faceCells().size(); - const directMappedWallPolyPatch& dmp = - refCast(regionPatch); + const mappedWallPolyPatch& mapPatch = + refCast(regionPatch); - const label primaryPatchI = dmp.samplePolyPatch().index(); + const label primaryPatchI = mapPatch.samplePolyPatch().index(); primaryPatchIDs.append(primaryPatchI); mappedPatches_.set ( patchI, - new directMappedPatchBase + new mappedPatchBase ( pbm[primaryPatchI], regionMesh().name(), - directMappedPatchBase::NEARESTPATCHFACE, + mapPatch.mode(), regionPatch.name(), vector::zero ) @@ -134,13 +134,12 @@ void Foam::regionModels::regionModel::initialise() primaryPatchIDs_.transfer(primaryPatchIDs); intCoupledPatchIDs_.transfer(intCoupledPatchIDs); -// mappedPatches_.resize(nCoupledPatches); if (nBoundaryFaces == 0) { WarningIn("regionModel::initialise()") - << "Region model being applied without direct mapped boundary " - << "conditions" << endl; + << "Region model has no mapped boundary conditions - transfer " + << "between regions will not be possible" << endl; } } diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index 47b0e44e21..bc9fb54a33 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -40,7 +40,7 @@ SourceFiles #include "Switch.H" #include "labelList.H" #include "volFields.H" -#include "directMappedPatchBase.H" +#include "mappedPatchBase.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -118,7 +118,7 @@ protected: labelList intCoupledPatchIDs_; //- List of patch map info - PtrList mappedPatches_; + PtrList mappedPatches_; // Protected member functions @@ -213,8 +213,7 @@ public: inline const labelList& intCoupledPatchIDs() const; //- Return the list of patch map info - inline const PtrList& - mappedPatches() const; + inline const PtrList& mappedPatches() const; //- Return region ID corresponding to primaryPatchID inline label regionPatchID(const label primaryPatchID) const; diff --git a/src/regionModels/regionModel/regionModel/regionModelI.H b/src/regionModels/regionModel/regionModel/regionModelI.H index 61b4cdb2d1..197e663d50 100644 --- a/src/regionModels/regionModel/regionModel/regionModelI.H +++ b/src/regionModels/regionModel/regionModel/regionModelI.H @@ -132,7 +132,7 @@ Foam::regionModels::regionModel::intCoupledPatchIDs() const } -inline const Foam::PtrList& +inline const Foam::PtrList& Foam::regionModels::regionModel::mappedPatches() const { return mappedPatches_; diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 87118d9d2e..9a8d4db4e0 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -26,7 +26,6 @@ License #include "singleLayerRegion.H" #include "fvMesh.H" #include "Time.H" -#include "directMappedWallPolyPatch.H" #include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C index f3252c00a8..1f0ae5700b 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C @@ -25,8 +25,8 @@ License #include "singleLayerRegion.H" #include "zeroGradientFvPatchFields.H" -#include "directMappedFixedInternalValueFvPatchFields.H" -#include "directMappedFixedPushedInternalValueFvPatchFields.H" +#include "mappedFixedInternalValueFvPatchFields.H" +#include "mappedFixedPushedInternalValueFvPatchFields.H" // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // @@ -41,8 +41,7 @@ Foam::regionModels::singleLayerRegion::mappedFieldAndInternalPatchTypes() const forAll(intCoupledPatchIDs_, i) { const label patchI = intCoupledPatchIDs_[i]; - bTypes[patchI] = - directMappedFixedInternalValueFvPatchField::typeName; + bTypes[patchI] = mappedFixedInternalValueFvPatchField::typeName; } return bTypes; @@ -61,7 +60,7 @@ Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes() const { const label patchI = intCoupledPatchIDs_[i]; bTypes[patchI] = - directMappedFixedPushedInternalValueFvPatchField::typeName; + mappedFixedPushedInternalValueFvPatchField::typeName; } return bTypes; diff --git a/src/regionModels/surfaceFilmModels/Make/options b/src/regionModels/surfaceFilmModels/Make/options index 1db0d316db..1ef8337c6c 100644 --- a/src/regionModels/surfaceFilmModels/Make/options +++ b/src/regionModels/surfaceFilmModels/Make/options @@ -1,5 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ @@ -11,15 +13,25 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude LIB_LIBS = \ - -lregionModels \ - -lSLGThermo \ -lfiniteVolume \ + -lsampling \ + -lAMIInterpolation \ -lmeshTools \ + -lbasicThermophysicalModels \ + -lspecie \ + -lliquidProperties \ + -lliquidMixtureProperties \ + -lsolidProperties \ + -lsolidMixtureProperties \ + -lreactionThermophysicalModels \ + -lSLGThermo \ -ldistributionModels \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lcompressibleLESModels \ + -lregionModels diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index 8960467fbd..63db76ed68 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -29,7 +29,7 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "directMappedWallPolyPatch.H" +#include "mappedWallPolyPatch.H" #include "mapDistribute.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -153,11 +153,11 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() const label filmPatchI = filmModel.regionPatchID(patchI); - const mapDistribute& distMap = filmModel.mappedPatches()[filmPatchI].map(); + const mappedPatchBase& filmMap = filmModel.mappedPatches()[filmPatchI]; tmp mDotFilm(filmModel.primaryMassTrans()); scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; - distMap.distribute(mDotFilmp); + filmMap.distribute(mDotFilmp); // Retrieve RAS turbulence model const RASModel& rasModel = db().lookupObject("RASProperties"); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C index 348821df9b..8cd0aaf5aa 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C @@ -29,7 +29,7 @@ License #include "RASModel.H" #include "addToRunTimeSelectionTable.H" #include "surfaceFilmModel.H" -#include "directMappedWallPolyPatch.H" +#include "mappedWallPolyPatch.H" #include "mapDistribute.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,11 +70,11 @@ tmp mutkFilmWallFunctionFvPatchScalarField::calcUTau const label filmPatchI = filmModel.regionPatchID(patchI); - const mapDistribute& distMap = filmModel.mappedPatches()[filmPatchI].map(); + const mappedPatchBase& filmMap = filmModel.mappedPatches()[filmPatchI]; tmp mDotFilm(filmModel.primaryMassTrans()); scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; - distMap.distribute(mDotFilmp); + filmMap.distribute(mDotFilmp); // Retrieve RAS turbulence model diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index b3f7b1a991..461fbd10ae 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -31,7 +31,7 @@ License #include "fvcReconstruct.H" #include "fvcVolumeIntegrate.H" #include "addToRunTimeSelectionTable.H" -#include "directMappedWallPolyPatch.H" +#include "mappedWallPolyPatch.H" #include "mapDistribute.H" #include "cachedRandom.H" @@ -90,7 +90,7 @@ void kinematicSingleLayer::correctThermoFields() "void Foam::surfaceFilmModels::kinematicSingleLayer::" "correctThermo()" ) << "Kinematic surface film must use " - << thermoModelTypeNames_[thermoModel_] << "thermodynamics" << endl; + << thermoModelTypeNames_[tmConstant] << "thermodynamics" << endl; } } @@ -115,6 +115,7 @@ void kinematicSingleLayer::transferPrimaryRegionThermoFields() Info<< "kinematicSingleLayer::" << "transferPrimaryRegionThermoFields()" << endl; } + // Update fields from primary region via direct mapped // (coupled) boundary conditions UPrimary_.correctBoundaryConditions(); @@ -132,6 +133,18 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields() << "transferPrimaryRegionSourceFields()" << endl; } + // Convert accummulated source terms into per unit area per unit time + const scalar deltaT = time_.deltaTValue(); + forAll(rhoSpPrimary_.boundaryField(), patchI) + { + const scalarField& priMagSf = + primaryMesh().magSf().boundaryField()[patchI]; + + rhoSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT; + USpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT; + pSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT; + } + // Retrieve the source fields from the primary region via direct mapped // (coupled) boundary conditions // - fields require transfer of values for both patch AND to push the @@ -139,13 +152,6 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields() rhoSp_.correctBoundaryConditions(); USp_.correctBoundaryConditions(); pSp_.correctBoundaryConditions(); - - // Convert accummulated source terms into per unit area per unit time - // Note: boundary values will still have original (neat) values - const scalar deltaT = time_.deltaTValue(); - rhoSp_.field() /= magSf()*deltaT; - USp_.field() /= magSf()*deltaT; - pSp_.field() /= magSf()*deltaT; } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H index 13e21759a7..f94ea58c21 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H @@ -65,7 +65,7 @@ private: //- Heat transfer coefficient - film region [W/m2/K] // Assumes that the primary regtion to film region boundaries are - // described as directMappedPushed types + // described as mappedPushed types volScalarField htcConvFilm_; diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index c0c211444b..c6c373500f 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -29,7 +29,7 @@ License #include "fvm.H" #include "addToRunTimeSelectionTable.H" #include "zeroGradientFvPatchFields.H" -#include "directMappedFieldFvPatchField.H" +#include "mappedFieldFvPatchField.H" #include "mapDistribute.H" // Sub-models @@ -59,7 +59,7 @@ wordList thermoSingleLayer::hsBoundaryTypes() wordList bTypes(T_.boundaryField().types()); forAll(bTypes, patchI) { - if (bTypes[patchI] == directMappedFieldFvPatchField::typeName) + if (bTypes[patchI] == mappedFieldFvPatchField::typeName) { bTypes[patchI] = fixedValueFvPatchField::typeName; } @@ -150,7 +150,7 @@ void thermoSingleLayer::correctHsForMappedT() forAll(T_.boundaryField(), patchI) { const fvPatchField& Tp = T_.boundaryField()[patchI]; - if (isA >(Tp)) + if (isA >(Tp)) { hs_.boundaryField()[patchI] == hs(Tp, patchI); } @@ -206,17 +206,22 @@ void thermoSingleLayer::transferPrimaryRegionSourceFields() kinematicSingleLayer::transferPrimaryRegionSourceFields(); + // Convert accummulated source terms into per unit area per unit time + const scalar deltaT = time_.deltaTValue(); + forAll(hsSpPrimary_.boundaryField(), patchI) + { + const scalarField& priMagSf = + primaryMesh().magSf().boundaryField()[patchI]; + + hsSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT; + } + // Retrieve the source fields from the primary region via direct mapped // (coupled) boundary conditions // - fields require transfer of values for both patch AND to push the // values into the first layer of internal cells hsSp_.correctBoundaryConditions(); - // Convert accummulated source terms into per unit area per unit time - // Note: boundary values will still have original (neat) values - const scalar deltaT = time_.deltaTValue(); - hsSp_.field() /= magSf()*deltaT; - // Apply enthalpy source as difference between incoming and actual states hsSp_ -= rhoSp_*hs_; } @@ -700,11 +705,12 @@ tmp > thermoSingleLayer::Srho() const forAll(intCoupledPatchIDs(), i) { const label filmPatchI = intCoupledPatchIDs()[i]; - const mapDistribute& distMap = mappedPatches_[filmPatchI].map(); + const mappedPatchBase& filmMap = mappedPatches_[filmPatchI]; scalarField patchMass = primaryMassPCTrans_.boundaryField()[filmPatchI]; - distMap.distribute(patchMass); + + filmMap.distribute(patchMass); const label primaryPatchI = primaryPatchIDs()[i]; const unallocLabelList& cells = @@ -755,11 +761,12 @@ tmp > thermoSingleLayer::Srho forAll(intCoupledPatchIDs_, i) { const label filmPatchI = intCoupledPatchIDs_[i]; - const mapDistribute& distMap = mappedPatches_[filmPatchI].map(); + const mappedPatchBase& filmMap = mappedPatches_[filmPatchI]; scalarField patchMass = primaryMassPCTrans_.boundaryField()[filmPatchI]; - distMap.distribute(patchMass); + + filmMap.distribute(patchMass); const label primaryPatchI = primaryPatchIDs()[i]; const unallocLabelList& cells = @@ -805,11 +812,12 @@ tmp > thermoSingleLayer::Sh() const forAll(intCoupledPatchIDs_, i) { const label filmPatchI = intCoupledPatchIDs_[i]; - const mapDistribute& distMap = mappedPatches_[filmPatchI].map(); + const mappedPatchBase& filmMap = mappedPatches_[filmPatchI]; scalarField patchEnergy = primaryEnergyPCTrans_.boundaryField()[filmPatchI]; - distMap.distribute(patchEnergy); + + filmMap.distribute(patchEnergy); const label primaryPatchI = primaryPatchIDs()[i]; const unallocLabelList& cells = diff --git a/src/regionModels/thermoBaffleModels/Make/options b/src/regionModels/thermoBaffleModels/Make/options index 44ab48e425..ad043bc32e 100644 --- a/src/regionModels/thermoBaffleModels/Make/options +++ b/src/regionModels/thermoBaffleModels/Make/options @@ -4,6 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C index f3b420dd27..ae7552ae15 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C @@ -85,7 +85,7 @@ temperatureThermoBaffleFvPatchScalarField baffle_(), solidThermoType_() { - if (!isA(patch().patch())) + if (!isA(patch().patch())) { FatalErrorIn ( @@ -97,7 +97,7 @@ temperatureThermoBaffleFvPatchScalarField " const dictionary& dict\n" ")\n" ) << "\n patch type '" << patch().type() - << "' not type '" << directMappedPatchBase::typeName << "'" + << "' not type '" << mappedPatchBase::typeName << "'" << "\n for patch " << patch().name() << " of field " << dimensionedInternalField().name() << " in file " << dimensionedInternalField().objectPath() diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C index b47ec3436f..7764366004 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C @@ -25,7 +25,7 @@ License #include "thermoBaffleModel.H" #include "fvMesh.H" -#include "directMappedVariableThicknessWallPolyPatch.H" +#include "mappedVariableThicknessWallPolyPatch.H" #include "wedgePolyPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -101,7 +101,7 @@ void thermoBaffleModel::init() const polyPatch& pp = rbm[patchI]; if ( - !isA(pp) + !isA(pp) && oneD_ && !constantThickness_ ) @@ -115,13 +115,13 @@ void thermoBaffleModel::init() ")" ) << "\n patch type '" << pp.type() << "' not type '" - << directMappedVariableThicknessWallPolyPatch::typeName + << mappedVariableThicknessWallPolyPatch::typeName << "'. This is necessary for 1D solution " << " and variable thickness" << "\n for patch. " << pp.name() << exit(FatalError); } - else if (!isA(pp)) + else if (!isA(pp)) { FatalErrorIn ( @@ -132,7 +132,7 @@ void thermoBaffleModel::init() ")" ) << "\n patch type '" << pp.type() << "' not type '" - << directMappedWallPolyPatch::typeName + << mappedWallPolyPatch::typeName << "'. This is necessary for 3D solution" << "\n for patch. " << pp.name() << exit(FatalError); @@ -143,10 +143,10 @@ void thermoBaffleModel::init() { const label patchI = intCoupledPatchIDs_[0]; const polyPatch& pp = rbm[patchI]; - const directMappedVariableThicknessWallPolyPatch& ppCoupled = + const mappedVariableThicknessWallPolyPatch& ppCoupled = refCast < - const directMappedVariableThicknessWallPolyPatch + const mappedVariableThicknessWallPolyPatch >(pp); thickness_ = ppCoupled.thickness();