regionModels: Refactored to remove the now redundant regionModel base class

This commit is contained in:
Henry Weller
2022-11-23 14:23:12 +00:00
parent 08307ddb0f
commit 052a4803f0
134 changed files with 328 additions and 724 deletions

View File

@ -8,8 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseIncompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude

View File

@ -5,8 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -17,6 +16,5 @@ EXE_LIBS = \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-lphysicalProperties \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lregionModels \
-lsurfaceFilmModels \ -lsurfaceFilmModels \
-lmeshTools -lmeshTools

View File

@ -9,8 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-llagrangian \ -llagrangian \
@ -24,5 +23,4 @@ EXE_LIBS = \
-lfvModels \ -lfvModels \
-lfvConstraints \ -lfvConstraints \
-lmeshTools \ -lmeshTools \
-lregionModels \
-lsurfaceFilmModels -lsurfaceFilmModels

View File

@ -4,8 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude

View File

@ -1,10 +1,8 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lfiniteVolume \ -lfiniteVolume \
-lgenericPatchFields \ -lgenericPatchFields
-lregionModels

View File

@ -3,8 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/parallel/lnInclude \ -I$(LIB_SRC)/parallel/parallel/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
@ -12,5 +11,4 @@ EXE_LIBS = \
-lparallel \ -lparallel \
-ldecompositionMethods \ -ldecompositionMethods \
-llagrangian \ -llagrangian \
-lregionModels \
-lgenericPatchFields -lgenericPatchFields

View File

@ -2,13 +2,11 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/parallel/lnInclude \ -I$(LIB_SRC)/parallel/parallel/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lparallel \ -lparallel \
-llagrangian \ -llagrangian \
-lregionModels \
-lgenericPatchFields -lgenericPatchFields

View File

@ -66,7 +66,7 @@ MomentumTransportModels/Allwmake $targetType $*
ThermophysicalTransportModels/Allwmake $targetType $* ThermophysicalTransportModels/Allwmake $targetType $*
wmake $targetType radiationModels wmake $targetType radiationModels
wmake $targetType combustionModels wmake $targetType combustionModels
regionModels/Allwmake $targetType $* wmake $targetType surfaceFilmModels
lagrangian/Allwmake $targetType $* lagrangian/Allwmake $targetType $*
mesh/Allwmake $targetType $* mesh/Allwmake $targetType $*
renumber/Allwmake $targetType $* renumber/Allwmake $targetType $*

View File

@ -5,8 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \ -I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \ -I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
@ -15,5 +14,4 @@ LIB_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianParcel \ -llagrangianParcel \
-llagrangianParcelTurbulence \ -llagrangianParcelTurbulence \
-lregionModels \
-lsurfaceFilmModels -lsurfaceFilmModels

View File

@ -7,8 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \ -I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
@ -22,7 +21,6 @@ LIB_LIBS = \
-lmulticomponentThermophysicalModels \ -lmulticomponentThermophysicalModels \
-lradiationModels \ -lradiationModels \
-lphysicalProperties \ -lphysicalProperties \
-lregionModels \
-lsurfaceFilmModels \ -lsurfaceFilmModels \
-lsampling \ -lsampling \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -10,8 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
@ -29,7 +28,6 @@ LIB_LIBS = \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-lcompressibleMomentumTransportModels \ -lcompressibleMomentumTransportModels \
-lphysicalProperties \ -lphysicalProperties \
-lregionModels \
-lsurfaceFilmModels \ -lsurfaceFilmModels \
-lsampling \ -lsampling \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -1,9 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
makeType=${1:-libso}
wclean $makeType regionModel
wclean $makeType surfaceFilmModels
wclean $makeType thermalBaffle
#------------------------------------------------------------------------------

View File

@ -1,11 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmake $targetType regionModel
wmake $targetType surfaceFilmModels
wmake $targetType thermalBaffle
#------------------------------------------------------------------------------

View File

@ -1,4 +0,0 @@
regionModel/regionModel.C
singleLayerRegionModel/singleLayerRegionModel.C
LIB = $(FOAM_LIBBIN)/libregionModels

View File

@ -1,7 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools

View File

@ -1,180 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "singleLayerRegionModel.H"
#include "fvMesh.H"
#include "surfaceFields.H"
#include "Time.H"
#include "zeroGradientFvPatchFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace regionModels
{
defineTypeNameAndDebug(singleLayerRegionModel, 0);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::regionModels::singleLayerRegionModel::singleLayerRegionModel
(
const fvMesh& mesh,
const word& regionType,
const word& modelName,
bool readFields
)
:
regionModel(mesh, regionType, modelName, false),
nHat_
(
IOobject
(
"nHat",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedVector(dimless, Zero),
zeroGradientFvPatchField<vector>::typeName
),
magSf_
(
IOobject
(
"magSf",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedScalar(dimArea, 0)
),
VbyA_
(
IOobject
(
"VbyA",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedScalar(dimLength, 0),
zeroGradientFvPatchField<vector>::typeName
),
passivePatchIDs_()
{
label nBoundaryFaces = 0;
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
forAll(intCoupledPatchIDs_, i)
{
const label patchi = intCoupledPatchIDs_[i];
const polyPatch& pp = rbm[patchi];
const labelList& fCells = pp.faceCells();
nBoundaryFaces += fCells.size();
UIndirectList<vector>(nHat_, fCells) = pp.faceNormals();
UIndirectList<scalar>(magSf_, fCells) = pp.magFaceAreas();
}
nHat_.correctBoundaryConditions();
if (nBoundaryFaces != regionMesh().nCells())
{
FatalErrorInFunction
<< "Number of primary region coupled boundary faces not equal to "
<< "the number of cells in the local region" << nl << nl
<< "Number of cells = " << regionMesh().nCells() << nl
<< "Boundary faces = " << nBoundaryFaces << nl
<< abort(FatalError);
}
passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1);
forAll(intCoupledPatchIDs_, i)
{
const label patchi = intCoupledPatchIDs_[i];
const polyPatch& ppIntCoupled = rbm[patchi];
if (ppIntCoupled.size() > 0)
{
const label cellId = rbm[patchi].faceCells()[0];
const cell& cFaces = regionMesh().cells()[cellId];
const label faceO
(
cFaces.opposingFaceLabel
(
ppIntCoupled.start(), regionMesh().faces()
)
);
passivePatchIDs_[i] = rbm.whichPatch(faceO);
}
}
Pstream::listCombineGather(passivePatchIDs_, maxEqOp<label>());
Pstream::listCombineScatter(passivePatchIDs_);
VbyA_.primitiveFieldRef() = regionMesh().V()/magSf_;
VbyA_.correctBoundaryConditions();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::regionModels::singleLayerRegionModel::~singleLayerRegionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::volVectorField&
Foam::regionModels::singleLayerRegionModel::nHat() const
{
return nHat_;
}
const Foam::volScalarField::Internal&
Foam::regionModels::singleLayerRegionModel::magSf() const
{
return magSf_;
}
const Foam::volScalarField&
Foam::regionModels::singleLayerRegionModel::VbyA() const
{
return VbyA_;
}
const Foam::labelList&
Foam::regionModels::singleLayerRegionModel::passivePatchIDs() const
{
return passivePatchIDs_;
}
// ************************************************************************* //

View File

@ -1,155 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::singleLayerRegionModel
Description
Base class for single layer region models
SourceFiles
singleLayerRegionModel.C
\*---------------------------------------------------------------------------*/
#ifndef singleLayerRegionModel_H
#define singleLayerRegionModel_H
#include "regionModel.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace regionModels
{
/*---------------------------------------------------------------------------*\
Class singleLayerRegionModel Declaration
\*---------------------------------------------------------------------------*/
class singleLayerRegionModel
:
public regionModel
{
// Private member data
// Region addressing
//- Patch normal vectors
volVectorField nHat_;
//- Cell cross-sectional area magnitude [m^2]
volScalarField::Internal magSf_;
//- Cell layer volume/area [m]
volScalarField VbyA_;
// Addressing
//- List of patch IDs opposite to internally coupled patches
labelList passivePatchIDs_;
public:
//- Runtime type information
TypeName("regionModel");
// Constructors
//- Construct from mesh, region type and name
singleLayerRegionModel
(
const fvMesh& mesh,
const word& regionType,
const word& modelName,
bool readFields = true
);
//- Disallow default bitwise copy construction
singleLayerRegionModel(const singleLayerRegionModel&) = delete;
//- Destructor
virtual ~singleLayerRegionModel();
// Member Functions
// Access
// Region geometry
//- Return the patch normal vectors
const volVectorField& nHat() const;
//- Return the face area magnitudes [m^2]
const volScalarField::Internal& magSf() const;
//- Return the cell layer volume/area [m]
const volScalarField& VbyA() const;
// Addressing
//- Return the list of patch IDs opposite to internally
// coupled patches
const labelList& passivePatchIDs() const;
// Patch type information
//- Return boundary types for mapped field patches
// Also maps internal field value
// Mapping region prescribed by underlying mapped poly patch
template<class Type>
wordList mappedFieldAndInternalPatchTypes() const;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const singleLayerRegionModel&) = delete;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace regionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "singleLayerRegionModelTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,50 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "singleLayerRegionModel.H"
#include "zeroGradientFvPatchFields.H"
#include "mappedValueAndPatchInternalValueFvPatchFields.H"
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
template<class Type>
Foam::wordList Foam::regionModels::singleLayerRegionModel::
mappedFieldAndInternalPatchTypes() const
{
wordList bTypes(regionMesh().boundaryMesh().size());
bTypes = zeroGradientFvPatchField<Type>::typeName;
forAll(intCoupledPatchIDs_, i)
{
bTypes[intCoupledPatchIDs_[i]] =
mappedValueAndPatchInternalValueFvPatchField<Type>::typeName;
}
return bTypes;
}
// ************************************************************************* //

View File

@ -1,3 +1,5 @@
singleLayerRegionModel/singleLayerRegionModel.C
# Surface film models # Surface film models
surfaceFilm/surfaceFilm.C surfaceFilm/surfaceFilm.C
momentumSurfaceFilm/momentumSurfaceFilm.C momentumSurfaceFilm/momentumSurfaceFilm.C

View File

@ -9,7 +9,6 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
@ -22,6 +21,5 @@ LIB_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lcompressibleMomentumTransportModels \ -lcompressibleMomentumTransportModels \
-lfluidThermoThermophysicalTransportModels \ -lfluidThermoThermophysicalTransportModels \
-lregionModels \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools

View File

@ -23,11 +23,12 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "regionModel.H" #include "singleLayerRegionModel.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "surfaceFields.H"
#include "Time.H" #include "Time.H"
#include "mappedWallPolyPatch.H"
#include "zeroGradientFvPatchFields.H" #include "zeroGradientFvPatchFields.H"
#include "mappedWallPolyPatch.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -35,111 +36,14 @@ namespace Foam
{ {
namespace regionModels namespace regionModels
{ {
defineTypeNameAndDebug(regionModel, 0); defineTypeNameAndDebug(singleLayerRegionModel, 0);
}
}
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
void Foam::regionModels::regionModel::constructMeshObjects()
{
// construct region mesh
if (!time_.foundObject<fvMesh>(regionName_))
{
regionMeshPtr_.reset
(
new fvMesh
(
IOobject
(
regionName_,
time_.timeName(),
time_,
IOobject::MUST_READ
)
)
);
}
}
void Foam::regionModels::regionModel::initialise()
{
DebugInFunction << endl;
label nBoundaryFaces = 0;
DynamicList<label> primaryPatchIDs;
DynamicList<label> intCoupledPatchIDs;
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
forAll(rbm, patchi)
{
const polyPatch& regionPatch = rbm[patchi];
if (isA<mappedPatchBase>(regionPatch))
{
DebugInFunction
<< "found " << mappedWallPolyPatch::typeName
<< " " << regionPatch.name() << endl;
intCoupledPatchIDs.append(patchi);
nBoundaryFaces += regionPatch.faceCells().size();
const mappedPatchBase& mapPatch =
refCast<const mappedPatchBase>(regionPatch);
if
(
primaryMesh_.time().foundObject<polyMesh>
(
mapPatch.nbrRegionName()
)
)
{
const label primaryPatchi = mapPatch.nbrPolyPatch().index();
primaryPatchIDs.append(primaryPatchi);
}
}
}
primaryPatchIDs_.transfer(primaryPatchIDs);
intCoupledPatchIDs_.transfer(intCoupledPatchIDs);
if (returnReduce(nBoundaryFaces, sumOp<label>()) == 0)
{
WarningInFunction
<< "Region model has no mapped boundary conditions - transfer "
<< "between regions will not be possible" << endl;
}
if (!outputPropertiesPtr_.valid())
{
const fileName uniformPath(word("uniform")/"regionModels");
outputPropertiesPtr_.reset
(
new timeIOdictionary
(
IOobject
(
regionName_ + "OutputProperties",
time_.timeName(),
uniformPath/regionName_,
primaryMesh_,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
)
)
);
} }
} }
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
bool Foam::regionModels::regionModel::read() bool Foam::regionModels::singleLayerRegionModel::read()
{ {
if (regIOobject::read()) if (regIOobject::read())
{ {
@ -159,7 +63,7 @@ bool Foam::regionModels::regionModel::read()
} }
bool Foam::regionModels::regionModel::read(const dictionary& dict) bool Foam::regionModels::singleLayerRegionModel::read(const dictionary& dict)
{ {
if (const dictionary* dictPtr = dict.subDictPtr(modelName_ + "Coeffs")) if (const dictionary* dictPtr = dict.subDictPtr(modelName_ + "Coeffs"))
{ {
@ -172,9 +76,9 @@ bool Foam::regionModels::regionModel::read(const dictionary& dict)
} }
Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID Foam::label Foam::regionModels::singleLayerRegionModel::nbrCoupledPatchID
( (
const regionModel& nbrRegion, const singleLayerRegionModel& nbrRegion,
const label regionPatchi const label regionPatchi
) const ) const
{ {
@ -242,37 +146,7 @@ Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::regionModels::regionModel::regionModel Foam::regionModels::singleLayerRegionModel::singleLayerRegionModel
(
const fvMesh& mesh,
const word& regionType
)
:
IOdictionary
(
IOobject
(
regionType + "Properties",
mesh.time().constant(),
mesh.time(),
IOobject::NO_READ,
IOobject::NO_WRITE
)
),
primaryMesh_(mesh),
time_(mesh.time()),
infoOutput_(false),
modelName_("none"),
regionMeshPtr_(nullptr),
coeffs_(dictionary::null),
outputPropertiesPtr_(nullptr),
primaryPatchIDs_(),
intCoupledPatchIDs_(),
regionName_("none")
{}
Foam::regionModels::regionModel::regionModel
( (
const fvMesh& mesh, const fvMesh& mesh,
const word& regionType, const word& regionType,
@ -295,75 +169,221 @@ Foam::regionModels::regionModel::regionModel
time_(mesh.time()), time_(mesh.time()),
infoOutput_(true), infoOutput_(true),
modelName_(modelName), modelName_(modelName),
regionMeshPtr_(nullptr), regionName_(lookup("regionName")),
mesh_
(
IOobject
(
regionName_,
time_.timeName(),
time_,
IOobject::MUST_READ
)
),
coeffs_(optionalSubDict(modelName + "Coeffs")), coeffs_(optionalSubDict(modelName + "Coeffs")),
outputPropertiesPtr_(nullptr), outputPropertiesPtr_(nullptr),
primaryPatchIDs_(), primaryPatchIDs_(),
intCoupledPatchIDs_(), intCoupledPatchIDs_(),
regionName_(lookup("regionName")) passivePatchIDs_(),
nHat_
(
IOobject
(
"nHat",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedVector(dimless, Zero),
zeroGradientFvPatchField<vector>::typeName
),
magSf_
(
IOobject
(
"magSf",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedScalar(dimArea, 0)
),
VbyA_
(
IOobject
(
"VbyA",
time_.timeName(),
regionMesh()
),
regionMesh(),
dimensionedScalar(dimLength, 0),
zeroGradientFvPatchField<vector>::typeName
)
{ {
constructMeshObjects(); label nBoundaryFaces = 0;
initialise(); DynamicList<label> primaryPatchIDs;
DynamicList<label> intCoupledPatchIDs;
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
forAll(rbm, patchi)
{
const polyPatch& regionPatch = rbm[patchi];
if (isA<mappedPatchBase>(regionPatch))
{
DebugInFunction
<< "found " << mappedWallPolyPatch::typeName
<< " " << regionPatch.name() << endl;
intCoupledPatchIDs.append(patchi);
nBoundaryFaces += regionPatch.faceCells().size();
const mappedPatchBase& mapPatch =
refCast<const mappedPatchBase>(regionPatch);
if
(
primaryMesh_.time().foundObject<polyMesh>
(
mapPatch.nbrRegionName()
)
)
{
const label primaryPatchi = mapPatch.nbrPolyPatch().index();
primaryPatchIDs.append(primaryPatchi);
}
}
}
primaryPatchIDs_.transfer(primaryPatchIDs);
intCoupledPatchIDs_.transfer(intCoupledPatchIDs);
if (returnReduce(nBoundaryFaces, sumOp<label>()) == 0)
{
WarningInFunction
<< "Region model has no mapped boundary conditions - transfer "
<< "between regions will not be possible" << endl;
}
if (!outputPropertiesPtr_.valid())
{
const fileName uniformPath(word("uniform")/"regionModels");
outputPropertiesPtr_.reset
(
new timeIOdictionary
(
IOobject
(
regionName_ + "OutputProperties",
time_.timeName(),
uniformPath/regionName_,
primaryMesh_,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
)
)
);
}
if (readFields) if (readFields)
{ {
read(); read();
} }
nBoundaryFaces = 0;
forAll(intCoupledPatchIDs_, i)
{
const label patchi = intCoupledPatchIDs_[i];
const polyPatch& pp = rbm[patchi];
const labelList& fCells = pp.faceCells();
nBoundaryFaces += fCells.size();
UIndirectList<vector>(nHat_, fCells) = pp.faceNormals();
UIndirectList<scalar>(magSf_, fCells) = pp.magFaceAreas();
}
nHat_.correctBoundaryConditions();
if (nBoundaryFaces != regionMesh().nCells())
{
FatalErrorInFunction
<< "Number of primary region coupled boundary faces not equal to "
<< "the number of cells in the local region" << nl << nl
<< "Number of cells = " << regionMesh().nCells() << nl
<< "Boundary faces = " << nBoundaryFaces << nl
<< abort(FatalError);
} }
passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1);
Foam::regionModels::regionModel::regionModel forAll(intCoupledPatchIDs_, i)
{
const label patchi = intCoupledPatchIDs_[i];
const polyPatch& ppIntCoupled = rbm[patchi];
if (ppIntCoupled.size() > 0)
{
const label cellId = rbm[patchi].faceCells()[0];
const cell& cFaces = regionMesh().cells()[cellId];
const label faceO
( (
const fvMesh& mesh, cFaces.opposingFaceLabel
const word& regionType, (
const word& modelName, ppIntCoupled.start(), regionMesh().faces()
const dictionary& dict,
bool readFields
) )
: );
IOdictionary passivePatchIDs_[i] = rbm.whichPatch(faceO);
(
IOobject
(
regionType + "Properties",
mesh.time().constant(),
mesh.time(),
IOobject::NO_READ,
IOobject::NO_WRITE,
true
),
dict
),
primaryMesh_(mesh),
time_(mesh.time()),
infoOutput_(false),
modelName_(modelName),
regionMeshPtr_(nullptr),
coeffs_(dict.optionalSubDict(modelName + "Coeffs")),
outputPropertiesPtr_(nullptr),
primaryPatchIDs_(),
intCoupledPatchIDs_(),
regionName_(dict.lookup("regionName"))
{
constructMeshObjects();
initialise();
if (readFields)
{
read(dict);
} }
} }
Pstream::listCombineGather(passivePatchIDs_, maxEqOp<label>());
Pstream::listCombineScatter(passivePatchIDs_);
VbyA_.primitiveFieldRef() = regionMesh().V()/magSf_;
VbyA_.correctBoundaryConditions();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::regionModels::regionModel::~regionModel() Foam::regionModels::singleLayerRegionModel::~singleLayerRegionModel()
{} {}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::regionModels::regionModel::evolve() const Foam::volVectorField&
Foam::regionModels::singleLayerRegionModel::nHat() const
{
return nHat_;
}
const Foam::volScalarField::Internal&
Foam::regionModels::singleLayerRegionModel::magSf() const
{
return magSf_;
}
const Foam::volScalarField&
Foam::regionModels::singleLayerRegionModel::VbyA() const
{
return VbyA_;
}
const Foam::labelList&
Foam::regionModels::singleLayerRegionModel::passivePatchIDs() const
{
return passivePatchIDs_;
}
void Foam::regionModels::singleLayerRegionModel::evolve()
{ {
Info<< "\nEvolving " << modelName_ << " for region " Info<< "\nEvolving " << modelName_ << " for region "
<< regionMesh().name() << endl; << regionMesh().name() << endl;
@ -395,19 +415,19 @@ void Foam::regionModels::regionModel::evolve()
} }
void Foam::regionModels::regionModel::preEvolveRegion() void Foam::regionModels::singleLayerRegionModel::preEvolveRegion()
{} {}
void Foam::regionModels::regionModel::evolveRegion() void Foam::regionModels::singleLayerRegionModel::evolveRegion()
{} {}
void Foam::regionModels::regionModel::postEvolveRegion() void Foam::regionModels::singleLayerRegionModel::postEvolveRegion()
{} {}
void Foam::regionModels::regionModel::info() void Foam::regionModels::singleLayerRegionModel::info()
{} {}

View File

@ -22,23 +22,22 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::regionModels::regionModel Foam::regionModels::singleLayerRegionModel
Description Description
Base class for region models Base class for single layer region models
SourceFiles SourceFiles
regionModelI.H singleLayerRegionModel.C
regionModel.C
regionModelTemplates.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef regionModel_H #ifndef singleLayerRegionModel_H
#define regionModel_H #define singleLayerRegionModel_H
#include "fvMesh.H" #include "fvMesh.H"
#include "timeIOdictionary.H" #include "timeIOdictionary.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,27 +47,13 @@ namespace regionModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class regionModel Declaration Class singleLayerRegionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class regionModel class singleLayerRegionModel
: :
public IOdictionary public IOdictionary
{ {
// Private Member Functions
//- Disallow default bitwise copy construction
regionModel(const regionModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const regionModel&) = delete;
//- Construct region mesh and fields
void constructMeshObjects();
//- Initialise the region
void initialise();
protected: protected:
@ -86,8 +71,11 @@ protected:
//- Model name //- Model name
const word modelName_; const word modelName_;
//- Pointer to the region mesh database //- Region name
autoPtr<fvMesh> regionMeshPtr_; word regionName_;
//- Region mesh
fvMesh mesh_;
//- Model coefficients dictionary //- Model coefficients dictionary
dictionary coeffs_; dictionary coeffs_;
@ -104,9 +92,18 @@ protected:
//- List of patch IDs internally coupled with the primary region //- List of patch IDs internally coupled with the primary region
labelList intCoupledPatchIDs_; labelList intCoupledPatchIDs_;
//- List of patch IDs opposite to internally coupled patches
labelList passivePatchIDs_;
//- Region name
word regionName_; //- Patch normal vectors
volVectorField nHat_;
//- Cell cross-sectional area magnitude [m^2]
volScalarField::Internal magSf_;
//- Cell layer volume/area [m]
volScalarField VbyA_;
// Protected member functions // Protected member functions
@ -126,11 +123,8 @@ public:
// Constructors // Constructors
//- Construct null
regionModel(const fvMesh& mesh, const word& regionType);
//- Construct from mesh, region type and name //- Construct from mesh, region type and name
regionModel singleLayerRegionModel
( (
const fvMesh& mesh, const fvMesh& mesh,
const word& regionType, const word& regionType,
@ -138,19 +132,12 @@ public:
bool readFields = true bool readFields = true
); );
//- Construct from mesh and name and dict //- Disallow default bitwise copy construction
regionModel singleLayerRegionModel(const singleLayerRegionModel&) = delete;
(
const fvMesh& mesh,
const word& regionType,
const word& modelName,
const dictionary& dict,
bool readFields = true
);
//- Destructor //- Destructor
virtual ~regionModel(); virtual ~singleLayerRegionModel();
// Member Functions // Member Functions
@ -188,6 +175,18 @@ public:
inline IOdictionary& outputProperties(); inline IOdictionary& outputProperties();
// Region geometry
//- Return the patch normal vectors
const volVectorField& nHat() const;
//- Return the face area magnitudes [m^2]
const volScalarField::Internal& magSf() const;
//- Return the cell layer volume/area [m]
const volScalarField& VbyA() const;
// Addressing // Addressing
//- Return true if patchi on the local region is a coupled //- Return true if patchi on the local region is a coupled
@ -209,6 +208,19 @@ public:
//- Return region ID corresponding to primaryPatchID //- Return region ID corresponding to primaryPatchID
inline label regionPatchID(const label primaryPatchID) const; inline label regionPatchID(const label primaryPatchID) const;
//- Return the list of patch IDs opposite to internally
// coupled patches
const labelList& passivePatchIDs() const;
// Patch type information
//- Return boundary types for mapped field patches
// Also maps internal field value
// Mapping region prescribed by underlying mapped poly patch
template<class Type>
wordList mappedFieldAndInternalPatchTypes() const;
// Helper // Helper
@ -216,7 +228,7 @@ public:
// regionPatchi // regionPatchi
label nbrCoupledPatchID label nbrCoupledPatchID
( (
const regionModel& nbrRegion, const singleLayerRegionModel& nbrRegion,
const label regionPatchi const label regionPatchi
) const; ) const;
@ -269,6 +281,12 @@ public:
//- Provide some feedback //- Provide some feedback
virtual void info(); virtual void info();
// Member Operators
//- Disallow default bitwise assignment
void operator=(const singleLayerRegionModel&) = delete;
}; };
@ -277,14 +295,15 @@ public:
} // End namespace regionModels } // End namespace regionModels
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "regionModelI.H" #include "singleLayerRegionModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
#include "regionModelTemplates.C" #include "singleLayerRegionModelTemplates.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,85 +23,65 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "regionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
inline const Foam::fvMesh& inline const Foam::fvMesh&
Foam::regionModels::regionModel::primaryMesh() const Foam::regionModels::singleLayerRegionModel::primaryMesh() const
{ {
return primaryMesh_; return primaryMesh_;
} }
inline const Foam::Time& Foam::regionModels::regionModel::time() const inline const Foam::Time&
Foam::regionModels::singleLayerRegionModel::time() const
{ {
return time_; return time_;
} }
inline const Foam::Switch& Foam::regionModels::regionModel::infoOutput() const inline const Foam::Switch&
Foam::regionModels::singleLayerRegionModel::infoOutput() const
{ {
return infoOutput_; return infoOutput_;
} }
inline const Foam::word& Foam::regionModels::regionModel::modelName() const inline const Foam::word&
Foam::regionModels::singleLayerRegionModel::modelName() const
{ {
return modelName_; return modelName_;
} }
inline const Foam::fvMesh& Foam::regionModels::regionModel::regionMesh() const inline const Foam::fvMesh&
Foam::regionModels::singleLayerRegionModel::regionMesh() const
{ {
if (time_.foundObject<fvMesh>(regionName_)) return mesh_;
{
return time_.lookupObject<fvMesh>(regionName_);
}
else if (!regionMeshPtr_.valid())
{
FatalErrorInFunction
<< "Region mesh not available" << abort(FatalError);
}
return regionMeshPtr_();
} }
inline Foam::fvMesh& Foam::regionModels::regionModel::regionMesh() inline Foam::fvMesh& Foam::regionModels::singleLayerRegionModel::regionMesh()
{ {
if (time_.foundObject<fvMesh>(regionName_)) return mesh_;
{
return const_cast<fvMesh&>
(
time_.lookupObject<fvMesh>(regionName_)
);
}
else if (!regionMeshPtr_.valid())
{
FatalErrorInFunction
<< "Region mesh not available" << abort(FatalError);
}
return regionMeshPtr_();
} }
inline const Foam::dictionary& Foam::regionModels::regionModel::coeffs() const inline const Foam::dictionary&
Foam::regionModels::singleLayerRegionModel::coeffs() const
{ {
return coeffs_; return coeffs_;
} }
inline const Foam::dictionary& inline const Foam::dictionary&
Foam::regionModels::regionModel::solution() const Foam::regionModels::singleLayerRegionModel::solution() const
{ {
return regionMesh().solution().dict(); return regionMesh().solution().dict();
} }
inline const Foam::IOdictionary& inline const Foam::IOdictionary&
Foam::regionModels::regionModel::outputProperties() const Foam::regionModels::singleLayerRegionModel::outputProperties() const
{ {
if (!outputPropertiesPtr_.valid()) if (!outputPropertiesPtr_.valid())
{ {
@ -115,7 +95,7 @@ Foam::regionModels::regionModel::outputProperties() const
inline Foam::IOdictionary& inline Foam::IOdictionary&
Foam::regionModels::regionModel::outputProperties() Foam::regionModels::singleLayerRegionModel::outputProperties()
{ {
if (!outputPropertiesPtr_.valid()) if (!outputPropertiesPtr_.valid())
{ {
@ -128,7 +108,7 @@ Foam::regionModels::regionModel::outputProperties()
} }
inline bool Foam::regionModels::regionModel::isCoupledPatch inline bool Foam::regionModels::singleLayerRegionModel::isCoupledPatch
( (
const label regionPatchi const label regionPatchi
) const ) const
@ -145,7 +125,7 @@ inline bool Foam::regionModels::regionModel::isCoupledPatch
} }
inline bool Foam::regionModels::regionModel::isRegionPatch inline bool Foam::regionModels::singleLayerRegionModel::isRegionPatch
( (
const label primaryPatchi const label primaryPatchi
) const ) const
@ -163,20 +143,20 @@ inline bool Foam::regionModels::regionModel::isRegionPatch
inline const Foam::labelList& inline const Foam::labelList&
Foam::regionModels::regionModel::primaryPatchIDs() const Foam::regionModels::singleLayerRegionModel::primaryPatchIDs() const
{ {
return primaryPatchIDs_; return primaryPatchIDs_;
} }
inline const Foam::labelList& inline const Foam::labelList&
Foam::regionModels::regionModel::intCoupledPatchIDs() const Foam::regionModels::singleLayerRegionModel::intCoupledPatchIDs() const
{ {
return intCoupledPatchIDs_; return intCoupledPatchIDs_;
} }
inline Foam::label Foam::regionModels::regionModel::regionPatchID inline Foam::label Foam::regionModels::singleLayerRegionModel::regionPatchID
( (
const label primaryPatchID const label primaryPatchID
) const ) const

View File

@ -23,13 +23,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "regionModel.H" #include "singleLayerRegionModel.H"
#include "mappedPatchBase.H" #include "zeroGradientFvPatchFields.H"
#include "mappedValueAndPatchInternalValueFvPatchFields.H"
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::regionModels::regionModel::toPrimary void Foam::regionModels::singleLayerRegionModel::toPrimary
( (
const label regionPatchi, const label regionPatchi,
Field<Type>& regionField Field<Type>& regionField
@ -56,7 +57,7 @@ void Foam::regionModels::regionModel::toPrimary
template<class Type> template<class Type>
void Foam::regionModels::regionModel::toRegion void Foam::regionModels::singleLayerRegionModel::toRegion
( (
const label regionPatchi, const label regionPatchi,
Field<Type>& primaryField Field<Type>& primaryField
@ -83,7 +84,7 @@ void Foam::regionModels::regionModel::toRegion
template<class Type> template<class Type>
void Foam::regionModels::regionModel::toRegion void Foam::regionModels::singleLayerRegionModel::toRegion
( (
Field<Type>& rf, Field<Type>& rf,
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& pBf const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& pBf
@ -106,4 +107,22 @@ void Foam::regionModels::regionModel::toRegion
} }
template<class Type>
Foam::wordList Foam::regionModels::singleLayerRegionModel::
mappedFieldAndInternalPatchTypes() const
{
wordList bTypes(regionMesh().boundaryMesh().size());
bTypes = zeroGradientFvPatchField<Type>::typeName;
forAll(intCoupledPatchIDs_, i)
{
bTypes[intCoupledPatchIDs_[i]] =
mappedValueAndPatchInternalValueFvPatchField<Type>::typeName;
}
return bTypes;
}
// ************************************************************************* // // ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More