From cc55cb39eef6c72a6ffa5298e724c7faf4150ffd Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 16 Sep 2010 18:04:53 +0100 Subject: [PATCH] ENH: Use film surface values, and removed copy of cell labels from member data --- .../SurfaceFilmModel/SurfaceFilmModel.C | 10 ++++------ .../SurfaceFilmModel/SurfaceFilmModel.H | 3 --- .../ThermoSurfaceFilm/ThermoSurfaceFilm.C | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 8f98590bf4..5ef3c76eb3 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -40,7 +40,6 @@ Foam::SurfaceFilmModel::SurfaceFilmModel(CloudType& owner) g_(dimensionedVector("zero", dimAcceleration, vector::zero)), coeffDict_(dictionary::null), active_(false), - injectorCellsPatch_(0), massParcelPatch_(0), diameterParcelPatch_(0), UFilmPatch_(0), @@ -64,7 +63,6 @@ Foam::SurfaceFilmModel::SurfaceFilmModel g_(g), coeffDict_(dict.subDict(type + "Coeffs")), active_(true), - injectorCellsPatch_(0), massParcelPatch_(0), diameterParcelPatch_(0), UFilmPatch_(0), @@ -112,17 +110,17 @@ void Foam::SurfaceFilmModel::inject(TrackData& td) this->owner().mesh().boundaryMesh()[primaryPatchI] ); - injectorCellsPatch_ = wpp.faceCells(); + const labelList& injectorCellsPatch = wpp.faceCells(); const label filmPatchI = filmPatches[i]; const mapDistribute& distMap = wpp.map(); cacheFilmFields(filmPatchI, distMap, filmModel); - forAll(injectorCellsPatch_, j) + forAll(injectorCellsPatch, j) { if (diameterParcelPatch_[j] > 0) { - const label cellI = injectorCellsPatch_[j]; + const label cellI = injectorCellsPatch[j]; const point& pos = this->owner().mesh().C()[cellI]; // Create a new parcel @@ -159,7 +157,7 @@ void Foam::SurfaceFilmModel::cacheFilmFields filmModel.diametersForPrimary().boundaryField()[filmPatchI]; distMap.distribute(diameterParcelPatch_); - UFilmPatch_ = filmModel.U().boundaryField()[filmPatchI]; + UFilmPatch_ = filmModel.Us().boundaryField()[filmPatchI]; distMap.distribute(UFilmPatch_); rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchI]; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index 986bd943d8..f94c3c29bd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -85,9 +85,6 @@ protected: // Cached injector fields per film patch - //- Injector cell / patch face - labelList injectorCellsPatch_; - //- Parcel mass / patch face scalarList massParcelPatch_; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index d0c1ba984e..04413ad9cf 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -80,7 +80,7 @@ bool Foam::ThermoSurfaceFilm::transferParcel { const polyPatch& pp = this->owner().mesh().boundaryMesh()[patchI]; - label faceI = pp.whichFace(p.face()); + const label faceI = pp.whichFace(p.face()); // Patch face normal const vector& nf = pp.faceNormals()[faceI]; @@ -137,7 +137,7 @@ void Foam::ThermoSurfaceFilm::cacheFilmFields filmModel ); - TFilmPatch_ = filmModel.T().boundaryField()[filmPatchI]; + TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchI]; distMap.distribute(TFilmPatch_); cpFilmPatch_ = filmModel.cp().boundaryField()[filmPatchI];