filmToVoFTransfer: Updated to lookup VoFtoFilmTransfer from any position in the fvModels
This commit is contained in:
@ -130,10 +130,7 @@ void Foam::fv::filmToVoFTransfer::correct()
|
|||||||
|
|
||||||
const label patchiVoF = film_.surfacePatchMap().nbrPolyPatch().index();
|
const label patchiVoF = film_.surfacePatchMap().nbrPolyPatch().index();
|
||||||
|
|
||||||
const VoFtoFilmTransfer& VoFtoFilm
|
const VoFtoFilmTransfer& VoFtoFilm(this->VoFtoFilm(VoF_.fvModels()));
|
||||||
(
|
|
||||||
refCast<VoFtoFilmTransfer>(VoF_.fvModels()[0])
|
|
||||||
);
|
|
||||||
|
|
||||||
const scalarField alphaVoF
|
const scalarField alphaVoF
|
||||||
(
|
(
|
||||||
@ -170,22 +167,11 @@ void Foam::fv::filmToVoFTransfer::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type, class TransferRateFunc>
|
const Foam::fv::VoFtoFilmTransfer& Foam::fv::filmToVoFTransfer::VoFtoFilm
|
||||||
Foam::tmp<Foam::VolInternalField<Type>>
|
|
||||||
inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
|
||||||
(
|
(
|
||||||
TransferRateFunc transferRateFunc,
|
const Foam::fvModels& fvModels
|
||||||
const dimensionSet& dimProp
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const Foam::fvModels& fvModels
|
|
||||||
(
|
|
||||||
fvModels::New
|
|
||||||
(
|
|
||||||
refCast<const fvMesh>(film_.surfacePatchMap().nbrMesh())
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const VoFtoFilmTransfer* VoFtoFilmPtr = nullptr;
|
const VoFtoFilmTransfer* VoFtoFilmPtr = nullptr;
|
||||||
|
|
||||||
forAll(fvModels, i)
|
forAll(fvModels, i)
|
||||||
@ -216,6 +202,26 @@ inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return *VoFtoFilmPtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type, class TransferRateFunc>
|
||||||
|
Foam::tmp<Foam::VolInternalField<Type>>
|
||||||
|
inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
||||||
|
(
|
||||||
|
TransferRateFunc transferRateFunc,
|
||||||
|
const dimensionSet& dimProp
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const Foam::fvModels& fvModels
|
||||||
|
(
|
||||||
|
fvModels::New
|
||||||
|
(
|
||||||
|
refCast<const fvMesh>(film_.surfacePatchMap().nbrMesh())
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
tmp<VolInternalField<Type>> tSu
|
tmp<VolInternalField<Type>> tSu
|
||||||
(
|
(
|
||||||
VolInternalField<Type>::New
|
VolInternalField<Type>::New
|
||||||
@ -229,7 +235,7 @@ inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
|||||||
UIndirectList<Type>(tSu.ref(), film_.surfacePatch().faceCells()) =
|
UIndirectList<Type>(tSu.ref(), film_.surfacePatch().faceCells()) =
|
||||||
film_.surfacePatchMap().fromNeighbour
|
film_.surfacePatchMap().fromNeighbour
|
||||||
(
|
(
|
||||||
(VoFtoFilmPtr->*transferRateFunc)()
|
(VoFtoFilm(fvModels).*transferRateFunc)()
|
||||||
);
|
);
|
||||||
|
|
||||||
return tSu/mesh().V();
|
return tSu/mesh().V();
|
||||||
|
|||||||
@ -54,6 +54,8 @@ namespace Foam
|
|||||||
namespace fv
|
namespace fv
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class VoFtoFilmTransfer;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class filmToVoFTransfer Declaration
|
Class filmToVoFTransfer Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -86,6 +88,8 @@ class filmToVoFTransfer
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
const VoFtoFilmTransfer& VoFtoFilm(const fvModels&) const;
|
||||||
|
|
||||||
//- Return the transfer rate from the VoF transferRateFunc
|
//- Return the transfer rate from the VoF transferRateFunc
|
||||||
template<class Type, class TransferRateFunc>
|
template<class Type, class TransferRateFunc>
|
||||||
inline tmp<VolInternalField<Type>> VoFToFilmTransferRate
|
inline tmp<VolInternalField<Type>> VoFToFilmTransferRate
|
||||||
|
|||||||
@ -138,8 +138,10 @@ bool Foam::solvers::isothermalFilm::initFilmMesh()
|
|||||||
if (nWallFaces != mesh.nCells())
|
if (nWallFaces != mesh.nCells())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "The number of filmWall faces in the mesh "
|
<< "The number of film wall faces in the mesh "
|
||||||
"is not equal to the number of cells"
|
<< nWallFaces
|
||||||
|
<< " is not equal to the number of cells "
|
||||||
|
<< mesh.nCells()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,5 +11,5 @@ EXE_LIBS = \
|
|||||||
-lsurfMesh \
|
-lsurfMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lgenericPatches \
|
-lgenericPatchFields \
|
||||||
-lextrudeModel
|
-lextrudeModel
|
||||||
|
|||||||
@ -42,7 +42,6 @@ Description
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ThermoSurfaceFilm.C
|
ThermoSurfaceFilm.C
|
||||||
ThermoSurfaceFilmI.H
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user