lagrangian: PhaseChangeModel: Added access to the parcel
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -82,11 +82,17 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
const scalar Tdash = min(T, TMax);
|
||||
const scalar Tsdash = min(Ts, TMax);
|
||||
|
||||
const typename TrackCloudType::parcelType& p =
|
||||
static_cast<const typename TrackCloudType::parcelType&>(*this);
|
||||
typename TrackCloudType::parcelType::trackingData& ttd =
|
||||
static_cast<typename TrackCloudType::parcelType::trackingData&>(td);
|
||||
|
||||
// Calculate mass transfer due to phase change
|
||||
phaseChange.calculate
|
||||
(
|
||||
p,
|
||||
ttd,
|
||||
dt,
|
||||
this->cell(),
|
||||
Re,
|
||||
Pr,
|
||||
d,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,7 +26,6 @@ License
|
||||
#include "LiquidEvaporation.H"
|
||||
#include "specie.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
using namespace Foam::constant::mathematical;
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
@ -139,8 +138,9 @@ Foam::LiquidEvaporation<CloudType>::~LiquidEvaporation()
|
||||
template<class CloudType>
|
||||
void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
@ -173,7 +173,7 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
}
|
||||
|
||||
// construct carrier phase species volume fractions for cell, celli
|
||||
const scalarField Xc(calcXc(celli));
|
||||
const scalarField Xc(calcXc(p.cell()));
|
||||
|
||||
// calculate mass transfer of each specie in liquid
|
||||
forAll(activeLiquids_, i)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -111,8 +111,9 @@ public:
|
||||
//- Update model
|
||||
virtual void calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -131,8 +131,9 @@ Foam::LiquidEvaporationBoil<CloudType>::~LiquidEvaporationBoil()
|
||||
template<class CloudType>
|
||||
void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
@ -171,7 +172,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
scalar rhos = ps*liquids_.W(X)/(RR*Ts);
|
||||
|
||||
// construct carrier phase species volume fractions for cell, celli
|
||||
const scalarField XcMix(calcXc(celli));
|
||||
const scalarField XcMix(calcXc(p.cell()));
|
||||
|
||||
// carrier thermo properties
|
||||
scalar Hsc = 0.0;
|
||||
@ -180,7 +181,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
scalar kappac = 0.0;
|
||||
forAll(this->owner().composition().carrier().Y(), i)
|
||||
{
|
||||
scalar Yc = this->owner().composition().carrier().Y()[i][celli];
|
||||
scalar Yc = this->owner().composition().carrier().Y()[i][p.cell()];
|
||||
Hc += Yc*this->owner().composition().carrier().Ha(i, pc, Tc);
|
||||
Hsc += Yc*this->owner().composition().carrier().Ha(i, ps, Ts);
|
||||
Cpc += Yc*this->owner().composition().carrier().Cp(i, ps, Ts);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -118,8 +118,9 @@ public:
|
||||
//- Update model
|
||||
virtual void calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,8 +60,9 @@ Foam::NoPhaseChange<CloudType>::~NoPhaseChange()
|
||||
template<class CloudType>
|
||||
void Foam::NoPhaseChange<CloudType>::calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,8 +81,9 @@ public:
|
||||
//- Update model
|
||||
virtual void calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -155,8 +155,9 @@ public:
|
||||
//- Update model
|
||||
virtual void calculate
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar d,
|
||||
|
||||
Reference in New Issue
Block a user