diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index dbef189cc8..5770d4fd8d 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019-2022 OpenCFD Ltd. + Copyright (C) 2019-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,6 +62,53 @@ Foam::ThermoSurfaceFilm::ThermoSurfaceFilm // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +template +void Foam::ThermoSurfaceFilm::absorbInteraction +( + filmType& film, + const parcelType& p, + const polyPatch& pp, + const label facei, + const scalar mass, + bool& keepParticle +) +{ + DebugInfo<< "Parcel " << p.origId() << " absorbInteraction" << endl; + + // Patch face normal + const vector& nf = pp.faceNormals()[facei]; + + // Patch velocity + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; + + // Relative parcel velocity + const vector Urel(p.U() - Up); + + // Parcel normal velocity + const vector Un(nf*(Urel & nf)); + + // Parcel tangential velocity + const vector Ut(Urel - Un); + + film.addSources + ( + pp.index(), + facei, + mass, // mass + mass*Ut, // tangential momentum + mass*mag(Un), // impingement pressure + mass*p.hs() // energy + ); + + this->nParcelsTransferred()++; + + this->totalMassTransferred() += mass; + + keepParticle = false; +} + + template bool Foam::ThermoSurfaceFilm::transferParcel ( diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index 03ed5a41b0..7cbb659358 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2021 OpenCFD Ltd. + Copyright (C) 2021-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -143,6 +143,21 @@ public: // Member Functions + // Interaction models + + //- Absorb parcel into film + template + void absorbInteraction + ( + filmType&, + const parcelType& p, + const polyPatch& pp, + const label facei, + const scalar mass, + bool& keepParticle + ); + + // Evaluation //- Transfer parcel from cloud to surface film