BUG: ThermoSurfaceFilm: reintroduce energy to film sources (fixes #2996)
This commit is contained in:
parent
927b06a19d
commit
9f40e04cc1
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -62,6 +62,53 @@ Foam::ThermoSurfaceFilm<CloudType>::ThermoSurfaceFilm
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * 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>
|
template<class CloudType>
|
||||||
bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
||||||
(
|
(
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -141,6 +141,21 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// 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
|
// Evaluation
|
||||||
|
|
||||||
//- Transfer parcel from cloud to surface film
|
//- Transfer parcel from cloud to surface film
|
||||||
|
Loading…
Reference in New Issue
Block a user