BUG: ThermoSurfaceFilm: reintroduce energy to film sources (fixes #2996)
This commit is contained in:
parent
3d8a1c7f63
commit
2999c15f77
@ -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<CloudType>::ThermoSurfaceFilm
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
template<class filmType>
|
||||
void Foam::ThermoSurfaceFilm<CloudType>::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<class CloudType>
|
||||
bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
||||
(
|
||||
|
@ -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<class filmType>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user