mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Use film surface values, and removed copy of cell labels from member data
This commit is contained in:
@ -40,7 +40,6 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel(CloudType& owner)
|
|||||||
g_(dimensionedVector("zero", dimAcceleration, vector::zero)),
|
g_(dimensionedVector("zero", dimAcceleration, vector::zero)),
|
||||||
coeffDict_(dictionary::null),
|
coeffDict_(dictionary::null),
|
||||||
active_(false),
|
active_(false),
|
||||||
injectorCellsPatch_(0),
|
|
||||||
massParcelPatch_(0),
|
massParcelPatch_(0),
|
||||||
diameterParcelPatch_(0),
|
diameterParcelPatch_(0),
|
||||||
UFilmPatch_(0),
|
UFilmPatch_(0),
|
||||||
@ -64,7 +63,6 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel
|
|||||||
g_(g),
|
g_(g),
|
||||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||||
active_(true),
|
active_(true),
|
||||||
injectorCellsPatch_(0),
|
|
||||||
massParcelPatch_(0),
|
massParcelPatch_(0),
|
||||||
diameterParcelPatch_(0),
|
diameterParcelPatch_(0),
|
||||||
UFilmPatch_(0),
|
UFilmPatch_(0),
|
||||||
@ -112,17 +110,17 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
|
|||||||
this->owner().mesh().boundaryMesh()[primaryPatchI]
|
this->owner().mesh().boundaryMesh()[primaryPatchI]
|
||||||
);
|
);
|
||||||
|
|
||||||
injectorCellsPatch_ = wpp.faceCells();
|
const labelList& injectorCellsPatch = wpp.faceCells();
|
||||||
|
|
||||||
const label filmPatchI = filmPatches[i];
|
const label filmPatchI = filmPatches[i];
|
||||||
const mapDistribute& distMap = wpp.map();
|
const mapDistribute& distMap = wpp.map();
|
||||||
cacheFilmFields(filmPatchI, distMap, filmModel);
|
cacheFilmFields(filmPatchI, distMap, filmModel);
|
||||||
|
|
||||||
forAll(injectorCellsPatch_, j)
|
forAll(injectorCellsPatch, j)
|
||||||
{
|
{
|
||||||
if (diameterParcelPatch_[j] > 0)
|
if (diameterParcelPatch_[j] > 0)
|
||||||
{
|
{
|
||||||
const label cellI = injectorCellsPatch_[j];
|
const label cellI = injectorCellsPatch[j];
|
||||||
const point& pos = this->owner().mesh().C()[cellI];
|
const point& pos = this->owner().mesh().C()[cellI];
|
||||||
|
|
||||||
// Create a new parcel
|
// Create a new parcel
|
||||||
@ -159,7 +157,7 @@ void Foam::SurfaceFilmModel<CloudType>::cacheFilmFields
|
|||||||
filmModel.diametersForPrimary().boundaryField()[filmPatchI];
|
filmModel.diametersForPrimary().boundaryField()[filmPatchI];
|
||||||
distMap.distribute(diameterParcelPatch_);
|
distMap.distribute(diameterParcelPatch_);
|
||||||
|
|
||||||
UFilmPatch_ = filmModel.U().boundaryField()[filmPatchI];
|
UFilmPatch_ = filmModel.Us().boundaryField()[filmPatchI];
|
||||||
distMap.distribute(UFilmPatch_);
|
distMap.distribute(UFilmPatch_);
|
||||||
|
|
||||||
rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchI];
|
rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchI];
|
||||||
|
|||||||
@ -85,9 +85,6 @@ protected:
|
|||||||
|
|
||||||
// Cached injector fields per film patch
|
// Cached injector fields per film patch
|
||||||
|
|
||||||
//- Injector cell / patch face
|
|
||||||
labelList injectorCellsPatch_;
|
|
||||||
|
|
||||||
//- Parcel mass / patch face
|
//- Parcel mass / patch face
|
||||||
scalarList massParcelPatch_;
|
scalarList massParcelPatch_;
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
|||||||
{
|
{
|
||||||
const polyPatch& pp = this->owner().mesh().boundaryMesh()[patchI];
|
const polyPatch& pp = this->owner().mesh().boundaryMesh()[patchI];
|
||||||
|
|
||||||
label faceI = pp.whichFace(p.face());
|
const label faceI = pp.whichFace(p.face());
|
||||||
|
|
||||||
// Patch face normal
|
// Patch face normal
|
||||||
const vector& nf = pp.faceNormals()[faceI];
|
const vector& nf = pp.faceNormals()[faceI];
|
||||||
@ -137,7 +137,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields
|
|||||||
filmModel
|
filmModel
|
||||||
);
|
);
|
||||||
|
|
||||||
TFilmPatch_ = filmModel.T().boundaryField()[filmPatchI];
|
TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchI];
|
||||||
distMap.distribute(TFilmPatch_);
|
distMap.distribute(TFilmPatch_);
|
||||||
|
|
||||||
cpFilmPatch_ = filmModel.cp().boundaryField()[filmPatchI];
|
cpFilmPatch_ = filmModel.cp().boundaryField()[filmPatchI];
|
||||||
|
|||||||
Reference in New Issue
Block a user