mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added semi-implicit treatment for particle sources
This commit is contained in:
@ -126,6 +126,16 @@ Foam::scalar Foam::KinematicCloud<ParcelType>::cloudSolution::relaxCoeff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
bool Foam::KinematicCloud<ParcelType>::cloudSolution::semiImplicit
|
||||||
|
(
|
||||||
|
const word& fieldName
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return readBool(sourceTermDict().subDict(fieldName).lookup("semiImplicit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
bool Foam::KinematicCloud<ParcelType>::cloudSolution::sourceActive() const
|
bool Foam::KinematicCloud<ParcelType>::cloudSolution::sourceActive() const
|
||||||
{
|
{
|
||||||
@ -495,6 +505,22 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
mesh_,
|
mesh_,
|
||||||
dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
|
dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
UCoeff_
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "UCoeff",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimMass/dimTime, 0.0)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
@ -556,7 +582,24 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
c.UTrans_().dimensions(),
|
c.UTrans_().dimensions(),
|
||||||
c.UTrans_().field()
|
c.UTrans_().field()
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
UCoeff_
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
name + "UCoeff",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
c.UCoeff_()
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -602,7 +645,8 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
postProcessingModel_(NULL),
|
postProcessingModel_(NULL),
|
||||||
surfaceFilmModel_(NULL),
|
surfaceFilmModel_(NULL),
|
||||||
UIntegrator_(NULL),
|
UIntegrator_(NULL),
|
||||||
UTrans_(NULL)
|
UTrans_(NULL),
|
||||||
|
UCoeff_(NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -658,6 +702,7 @@ template<class ParcelType>
|
|||||||
void Foam::KinematicCloud<ParcelType>::resetSourceTerms()
|
void Foam::KinematicCloud<ParcelType>::resetSourceTerms()
|
||||||
{
|
{
|
||||||
UTrans().field() = vector::zero;
|
UTrans().field() = vector::zero;
|
||||||
|
UCoeff().field() = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -187,6 +187,9 @@ public:
|
|||||||
//- Return relaxation coefficient for field
|
//- Return relaxation coefficient for field
|
||||||
scalar relaxCoeff(const word& fieldName) const;
|
scalar relaxCoeff(const word& fieldName) const;
|
||||||
|
|
||||||
|
//- Return semi-implicit flag coefficient for field
|
||||||
|
bool semiImplicit(const word& fieldName) const;
|
||||||
|
|
||||||
//- Return reference to the mesh
|
//- Return reference to the mesh
|
||||||
inline const fvMesh& mesh() const;
|
inline const fvMesh& mesh() const;
|
||||||
|
|
||||||
@ -323,6 +326,9 @@ protected:
|
|||||||
//- Momentum
|
//- Momentum
|
||||||
autoPtr<DimensionedField<vector, volMesh> > UTrans_;
|
autoPtr<DimensionedField<vector, volMesh> > UTrans_;
|
||||||
|
|
||||||
|
//- Coefficient for carrier phase U equation
|
||||||
|
autoPtr<DimensionedField<scalar, volMesh> > UCoeff_;
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
@ -536,8 +542,15 @@ public:
|
|||||||
inline const DimensionedField<vector, volMesh>&
|
inline const DimensionedField<vector, volMesh>&
|
||||||
UTrans() const;
|
UTrans() const;
|
||||||
|
|
||||||
//- Return tmp momentum source term - fully explicit
|
//- Return coefficient for carrier phase U equation
|
||||||
inline tmp<DimensionedField<vector, volMesh> > SU() const;
|
inline DimensionedField<scalar, volMesh>& UCoeff();
|
||||||
|
|
||||||
|
//- Return const coefficient for carrier phase U equation
|
||||||
|
inline const DimensionedField<scalar, volMesh>&
|
||||||
|
UCoeff() const;
|
||||||
|
|
||||||
|
//- Return tmp momentum source term
|
||||||
|
inline tmp<fvVectorMatrix> SU(volVectorField& U) const;
|
||||||
|
|
||||||
|
|
||||||
// Check
|
// Check
|
||||||
|
|||||||
@ -410,38 +410,54 @@ Foam::KinematicCloud<ParcelType>::UTrans() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::KinematicCloud<ParcelType>::SU() const
|
Foam::KinematicCloud<ParcelType>::UCoeff()
|
||||||
{
|
{
|
||||||
tmp<DimensionedField<vector, volMesh> > tSU
|
return UCoeff_();
|
||||||
(
|
}
|
||||||
new DimensionedField<vector, volMesh>
|
|
||||||
(
|
|
||||||
IOobject
|
template<class ParcelType>
|
||||||
(
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
this->name() + "SU",
|
Foam::KinematicCloud<ParcelType>::UCoeff() const
|
||||||
this->db().time().timeName(),
|
{
|
||||||
this->mesh(),
|
return UCoeff_();
|
||||||
IOobject::NO_READ,
|
}
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
this->mesh(),
|
template<class ParcelType>
|
||||||
dimensionedVector
|
inline Foam::tmp<Foam::fvVectorMatrix>
|
||||||
(
|
Foam::KinematicCloud<ParcelType>::SU(volVectorField& U) const
|
||||||
"zero",
|
{
|
||||||
dimDensity*dimVelocity/dimTime,
|
if (debug)
|
||||||
vector::zero
|
{
|
||||||
)
|
Info<< "UTrans min/max = " << min(UTrans()).value() << ", "
|
||||||
)
|
<< max(UTrans()).value() << nl
|
||||||
);
|
<< "UCoeff min/max = " << min(UCoeff()).value() << ", "
|
||||||
|
<< max(UCoeff()).value() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (solution_.sourceActive())
|
if (solution_.sourceActive())
|
||||||
{
|
{
|
||||||
vectorField& SU = tSU().field();
|
if (solution_.semiImplicit("UTrans"))
|
||||||
SU = UTrans()/(mesh_.V()*this->db().time().deltaT());
|
{
|
||||||
|
return
|
||||||
|
UTrans()/(mesh_.V()*this->db().time().deltaT())
|
||||||
|
+ fvm::SuSp(-UCoeff().dimensionedInternalField()/mesh_.V(), U)
|
||||||
|
+ UCoeff()/mesh_.V()*U;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
|
||||||
|
fvVectorMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
fvm.source() = -UTrans()/(this->db().time().deltaT());
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tSU;
|
return tmp<fvVectorMatrix>(new fvVectorMatrix(U, dimForce));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,25 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
this->mesh(),
|
this->mesh(),
|
||||||
dimensionedScalar("zero", dimEnergy, 0.0)
|
dimensionedScalar("zero", dimEnergy, 0.0)
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
hsCoeff_
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "hsCoeff",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar("zero", dimEnergy/dimTime/dimTemperature, 0.0),
|
||||||
|
zeroGradientFvPatchScalarField::typeName
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
@ -149,6 +167,22 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
),
|
),
|
||||||
c.hsTrans()
|
c.hsTrans()
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
hsCoeff_
|
||||||
|
(
|
||||||
|
new DimensionedField<scalar, volMesh>
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + "hsCoeff",
|
||||||
|
this->db().time().timeName(),
|
||||||
|
this->db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
c.hsCoeff()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -171,7 +205,8 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
heatTransferModel_(NULL),
|
heatTransferModel_(NULL),
|
||||||
TIntegrator_(NULL),
|
TIntegrator_(NULL),
|
||||||
radiation_(false),
|
radiation_(false),
|
||||||
hsTrans_(NULL)
|
hsTrans_(NULL),
|
||||||
|
hsCoeff_(NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -233,6 +268,7 @@ void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
|
|||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::resetSourceTerms();
|
KinematicCloud<ParcelType>::resetSourceTerms();
|
||||||
hsTrans_->field() = 0.0;
|
hsTrans_->field() = 0.0;
|
||||||
|
hsCoeff_->field() = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -122,6 +122,9 @@ protected:
|
|||||||
//- Sensible enthalpy transfer [J/kg]
|
//- Sensible enthalpy transfer [J/kg]
|
||||||
autoPtr<DimensionedField<scalar, volMesh> > hsTrans_;
|
autoPtr<DimensionedField<scalar, volMesh> > hsTrans_;
|
||||||
|
|
||||||
|
//- Coefficient for carrier phase hs equation [W/K]
|
||||||
|
autoPtr<DimensionedField<scalar, volMesh> > hsCoeff_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
@ -232,8 +235,15 @@ public:
|
|||||||
inline const DimensionedField<scalar, volMesh>&
|
inline const DimensionedField<scalar, volMesh>&
|
||||||
hsTrans() const;
|
hsTrans() const;
|
||||||
|
|
||||||
//- Return enthalpy source [J/kg/m3/s]
|
//- Return coefficient for carrier phase hs equation
|
||||||
inline tmp<DimensionedField<scalar, volMesh> > Sh() const;
|
inline DimensionedField<scalar, volMesh>& hsCoeff();
|
||||||
|
|
||||||
|
//- Return const coefficient for carrier phase hs equation
|
||||||
|
inline const DimensionedField<scalar, volMesh>&
|
||||||
|
hsCoeff() const;
|
||||||
|
|
||||||
|
//- Return sensible enthalpy source term [J/kg/m3/s]
|
||||||
|
inline tmp<fvScalarMatrix> Sh(volScalarField& hs) const;
|
||||||
|
|
||||||
|
|
||||||
// Radiation - overrides thermoCloud virtual abstract members
|
// Radiation - overrides thermoCloud virtual abstract members
|
||||||
|
|||||||
@ -98,34 +98,60 @@ Foam::ThermoCloud<ParcelType>::hsTrans() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
Foam::ThermoCloud<ParcelType>::Sh() const
|
Foam::ThermoCloud<ParcelType>::hsCoeff()
|
||||||
{
|
{
|
||||||
tmp<DimensionedField<scalar, volMesh> > tSh
|
return hsCoeff_();
|
||||||
(
|
}
|
||||||
new DimensionedField<scalar, volMesh>
|
|
||||||
(
|
|
||||||
IOobject
|
template<class ParcelType>
|
||||||
(
|
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
|
||||||
this->name() + "Sh",
|
Foam::ThermoCloud<ParcelType>::hsCoeff() const
|
||||||
this->db().time().timeName(),
|
{
|
||||||
this->mesh(),
|
return hsCoeff_();
|
||||||
IOobject::NO_READ,
|
}
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
template<class ParcelType>
|
||||||
this->mesh(),
|
inline Foam::tmp<Foam::fvScalarMatrix>
|
||||||
dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
|
Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
|
||||||
)
|
{
|
||||||
);
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "hsTrans min/max = " << min(hsTrans()).value() << ", "
|
||||||
|
<< max(hsTrans()).value() << nl
|
||||||
|
<< "hsCoeff min/max = " << min(hsCoeff()).value() << ", "
|
||||||
|
<< max(hsCoeff()).value() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->solution().sourceActive())
|
if (this->solution().sourceActive())
|
||||||
{
|
{
|
||||||
scalarField& Sh = tSh();
|
if (this->solution().semiImplicit("hsTrans"))
|
||||||
Sh = hsTrans_()/(this->mesh().V()*this->db().time().deltaT());
|
{
|
||||||
|
const volScalarField Cp = thermo_.thermo().Cp();
|
||||||
|
|
||||||
|
return
|
||||||
|
hsTrans()/(this->mesh().V()*this->db().time().deltaT())
|
||||||
|
+ fvm::SuSp
|
||||||
|
(
|
||||||
|
-hsCoeff().dimensionedInternalField()/(Cp*this->mesh().V()),
|
||||||
|
hs
|
||||||
|
)
|
||||||
|
+ hsCoeff()/(Cp*this->mesh().V())*hs;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
|
||||||
|
fvScalarMatrix& fvm = tfvm();
|
||||||
|
|
||||||
|
fvm.source() = -hsTrans()/(this->db().time().deltaT());
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tSh;
|
return tmp<fvScalarMatrix>(new fvScalarMatrix(hs, dimEnergy/dimTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -121,8 +121,23 @@ void Foam::KinematicParcel<ParcelType>::calc
|
|||||||
// ~~~~~~
|
// ~~~~~~
|
||||||
|
|
||||||
// Calculate new particle velocity
|
// Calculate new particle velocity
|
||||||
|
scalar Cud = 0.0;
|
||||||
vector U1 =
|
vector U1 =
|
||||||
calcVelocity(td, dt, cellI, Re, muc_, d0, U0, rho0, mass0, Su, dUTrans);
|
calcVelocity
|
||||||
|
(
|
||||||
|
td,
|
||||||
|
dt,
|
||||||
|
cellI,
|
||||||
|
Re,
|
||||||
|
muc_,
|
||||||
|
d0,
|
||||||
|
U0,
|
||||||
|
rho0,
|
||||||
|
mass0,
|
||||||
|
Su,
|
||||||
|
dUTrans,
|
||||||
|
Cud
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Accumulate carrier phase source terms
|
// Accumulate carrier phase source terms
|
||||||
@ -131,6 +146,9 @@ void Foam::KinematicParcel<ParcelType>::calc
|
|||||||
{
|
{
|
||||||
// Update momentum transfer
|
// Update momentum transfer
|
||||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||||
|
|
||||||
|
// Update momentum transfer coefficient
|
||||||
|
td.cloud().UCoeff()[cellI] += np0*mass0*Cud;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +172,8 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
const scalar rho,
|
const scalar rho,
|
||||||
const scalar mass,
|
const scalar mass,
|
||||||
const vector& Su,
|
const vector& Su,
|
||||||
vector& dUTrans
|
vector& dUTrans,
|
||||||
|
scalar& Cud
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = this->cloud().pMesh();
|
const polyMesh& mesh = this->cloud().pMesh();
|
||||||
@ -165,7 +184,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
tetIndices tetIs = this->currentTetIndices();
|
tetIndices tetIs = this->currentTetIndices();
|
||||||
|
|
||||||
// Momentum source due to particle forces
|
// Momentum source due to particle forces
|
||||||
const vector FCoupled = mass*td.cloud().forces().calcCoupled
|
const vector Fcp = mass*td.cloud().forces().calcCoupled
|
||||||
(
|
(
|
||||||
this->position(),
|
this->position(),
|
||||||
tetIs,
|
tetIs,
|
||||||
@ -177,7 +196,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
d
|
d
|
||||||
);
|
);
|
||||||
|
|
||||||
const vector FNonCoupled = mass*td.cloud().forces().calcNonCoupled
|
const vector Fncp = mass*td.cloud().forces().calcNonCoupled
|
||||||
(
|
(
|
||||||
this->position(),
|
this->position(),
|
||||||
tetIs,
|
tetIs,
|
||||||
@ -195,15 +214,17 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
|
|
||||||
// Update velocity - treat as 3-D
|
// Update velocity - treat as 3-D
|
||||||
const scalar As = this->areaS(d);
|
const scalar As = this->areaS(d);
|
||||||
const vector ap = Uc_ + (FCoupled + FNonCoupled + Su)/(utc*As);
|
const vector ap = Uc_ + (Fcp + Fncp + Su)/(utc*As);
|
||||||
const scalar bp = 6.0*utc/(rho*d);
|
const scalar bp = 6.0*utc/(rho*d);
|
||||||
|
|
||||||
|
Cud = bp;
|
||||||
|
|
||||||
IntegrationScheme<vector>::integrationResult Ures =
|
IntegrationScheme<vector>::integrationResult Ures =
|
||||||
td.cloud().UIntegrator().integrate(U, dt, ap, bp);
|
td.cloud().UIntegrator().integrate(U, dt, ap, bp);
|
||||||
|
|
||||||
vector Unew = Ures.value();
|
vector Unew = Ures.value();
|
||||||
|
|
||||||
dUTrans += dt*(utc*As*(Ures.average() - Uc_) - FCoupled);
|
dUTrans += dt*(utc*As*(Ures.average() - Uc_) - Fcp);
|
||||||
|
|
||||||
// Apply correction to velocity and dUTrans for reduced-D cases
|
// Apply correction to velocity and dUTrans for reduced-D cases
|
||||||
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
|
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
|
||||||
|
|||||||
@ -308,7 +308,8 @@ protected:
|
|||||||
const scalar rho, // density
|
const scalar rho, // density
|
||||||
const scalar mass, // mass
|
const scalar mass, // mass
|
||||||
const vector& Su, // explicit particle momentum source
|
const vector& Su, // explicit particle momentum source
|
||||||
vector& dUTrans // momentum transfer to carrier
|
vector& dUTrans, // momentum transfer to carrier
|
||||||
|
scalar& Cud // linearised drag coefficient
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -353,6 +353,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// ~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Calculate new particle temperature
|
// Calculate new particle temperature
|
||||||
|
scalar Cuh = 0.0;
|
||||||
scalar T1 =
|
scalar T1 =
|
||||||
calcHeatTransfer
|
calcHeatTransfer
|
||||||
(
|
(
|
||||||
@ -368,7 +369,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
Cp0,
|
Cp0,
|
||||||
NCpW,
|
NCpW,
|
||||||
Sh,
|
Sh,
|
||||||
dhsTrans
|
dhsTrans,
|
||||||
|
Cuh
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -376,8 +378,23 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// ~~~~~~
|
// ~~~~~~
|
||||||
|
|
||||||
// Calculate new particle velocity
|
// Calculate new particle velocity
|
||||||
|
scalar Cud = 0;
|
||||||
vector U1 =
|
vector U1 =
|
||||||
calcVelocity(td, dt, cellI, Re, mus, d0, U0, rho0, mass0, Su, dUTrans);
|
calcVelocity
|
||||||
|
(
|
||||||
|
td,
|
||||||
|
dt,
|
||||||
|
cellI,
|
||||||
|
Re,
|
||||||
|
mus,
|
||||||
|
d0,
|
||||||
|
U0,
|
||||||
|
rho0,
|
||||||
|
mass0,
|
||||||
|
Su,
|
||||||
|
dUTrans,
|
||||||
|
Cud
|
||||||
|
);
|
||||||
|
|
||||||
dUTrans += 0.5*(mass0 - mass1)*(U0 + U1);
|
dUTrans += 0.5*(mass0 - mass1)*(U0 + U1);
|
||||||
|
|
||||||
@ -414,8 +431,14 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
// Update momentum transfer
|
// Update momentum transfer
|
||||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||||
|
|
||||||
|
// Update momentum transfer coefficient
|
||||||
|
td.cloud().UCoeff()[cellI] += np0*0.5*(mass0 + mass1)*Cud;
|
||||||
|
|
||||||
// Update sensible enthalpy transfer
|
// Update sensible enthalpy transfer
|
||||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||||
|
|
||||||
|
// Update sensible enthalpy coefficient
|
||||||
|
td.cloud().hsCoeff()[cellI] += np0*Cuh*this->areaS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -303,6 +303,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// ~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Calculate new particle temperature
|
// Calculate new particle temperature
|
||||||
|
scalar Cuh = 0.0;
|
||||||
scalar T1 =
|
scalar T1 =
|
||||||
calcHeatTransfer
|
calcHeatTransfer
|
||||||
(
|
(
|
||||||
@ -318,7 +319,8 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
Cp0,
|
Cp0,
|
||||||
NCpW,
|
NCpW,
|
||||||
Sh,
|
Sh,
|
||||||
dhsTrans
|
dhsTrans,
|
||||||
|
Cuh
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -326,8 +328,23 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// ~~~~~~
|
// ~~~~~~
|
||||||
|
|
||||||
// Calculate new particle velocity
|
// Calculate new particle velocity
|
||||||
|
scalar Cud = 0.0;
|
||||||
vector U1 =
|
vector U1 =
|
||||||
calcVelocity(td, dt, cellI, Re, mus, d0, U0, rho0, mass0, Su, dUTrans);
|
calcVelocity
|
||||||
|
(
|
||||||
|
td,
|
||||||
|
dt,
|
||||||
|
cellI,
|
||||||
|
Re,
|
||||||
|
mus,
|
||||||
|
d0,
|
||||||
|
U0,
|
||||||
|
rho0,
|
||||||
|
mass0,
|
||||||
|
Su,
|
||||||
|
dUTrans,
|
||||||
|
Cud
|
||||||
|
);
|
||||||
|
|
||||||
dUTrans += 0.5*(mass0 - mass1)*(U0 + U1);
|
dUTrans += 0.5*(mass0 - mass1)*(U0 + U1);
|
||||||
|
|
||||||
@ -345,8 +362,14 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
// Update momentum transfer
|
// Update momentum transfer
|
||||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||||
|
|
||||||
|
// Update momentum transfer coefficient
|
||||||
|
td.cloud().UCoeff()[cellI] += np0*0.5*(mass0 + mass1)*Cud;
|
||||||
|
|
||||||
// Update sensible enthalpy transfer
|
// Update sensible enthalpy transfer
|
||||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||||
|
|
||||||
|
// Update sensible enthalpy coefficient
|
||||||
|
td.cloud().hsCoeff()[cellI] += np0*Cuh*this->areaS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -164,6 +164,7 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
scalar NCpW = 0.0;
|
scalar NCpW = 0.0;
|
||||||
|
|
||||||
// Calculate new particle velocity
|
// Calculate new particle velocity
|
||||||
|
scalar Cuh = 0.0;
|
||||||
scalar T1 =
|
scalar T1 =
|
||||||
calcHeatTransfer
|
calcHeatTransfer
|
||||||
(
|
(
|
||||||
@ -179,7 +180,8 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
Cp0,
|
Cp0,
|
||||||
NCpW,
|
NCpW,
|
||||||
Sh,
|
Sh,
|
||||||
dhsTrans
|
dhsTrans,
|
||||||
|
Cuh
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -187,8 +189,23 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
// ~~~~~~
|
// ~~~~~~
|
||||||
|
|
||||||
// Calculate new particle velocity
|
// Calculate new particle velocity
|
||||||
|
scalar Cud = 0.0;
|
||||||
vector U1 =
|
vector U1 =
|
||||||
calcVelocity(td, dt, cellI, Re, mus, d0, U0, rho0, mass0, Su, dUTrans);
|
calcVelocity
|
||||||
|
(
|
||||||
|
td,
|
||||||
|
dt,
|
||||||
|
cellI,
|
||||||
|
Re,
|
||||||
|
mus,
|
||||||
|
d0,
|
||||||
|
U0,
|
||||||
|
rho0,
|
||||||
|
mass0,
|
||||||
|
Su,
|
||||||
|
dUTrans,
|
||||||
|
Cud
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Accumulate carrier phase source terms
|
// Accumulate carrier phase source terms
|
||||||
@ -198,8 +215,14 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
// Update momentum transfer
|
// Update momentum transfer
|
||||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||||
|
|
||||||
|
// Update momentum transfer coefficient
|
||||||
|
td.cloud().UCoeff()[cellI] += np0*mass0*Cud;
|
||||||
|
|
||||||
// Update sensible enthalpy transfer
|
// Update sensible enthalpy transfer
|
||||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||||
|
|
||||||
|
// Update sensible enthalpy coefficient
|
||||||
|
td.cloud().hsCoeff()[cellI] += np0*Cuh*this->areaS();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new particle properties
|
// Set new particle properties
|
||||||
@ -225,7 +248,8 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
|||||||
const scalar Cp,
|
const scalar Cp,
|
||||||
const scalar NCpW,
|
const scalar NCpW,
|
||||||
const scalar Sh,
|
const scalar Sh,
|
||||||
scalar& dhsTrans
|
scalar& dhsTrans,
|
||||||
|
scalar& Cuh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!td.cloud().heatTransfer().active())
|
if (!td.cloud().heatTransfer().active())
|
||||||
@ -270,6 +294,8 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
|||||||
|
|
||||||
dhsTrans += dt*htc*As*(0.5*(T + Tnew) - Tc_);
|
dhsTrans += dt*htc*As*(0.5*(T + Tnew) - Tc_);
|
||||||
|
|
||||||
|
Cuh = bp;
|
||||||
|
|
||||||
return Tnew;
|
return Tnew;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -223,7 +223,8 @@ protected:
|
|||||||
const scalar Cp, // specific heat capacity
|
const scalar Cp, // specific heat capacity
|
||||||
const scalar NCpW, // Sum of N*Cp*W of emission species
|
const scalar NCpW, // Sum of N*Cp*W of emission species
|
||||||
const scalar Sh, // explicit particle enthalpy source
|
const scalar Sh, // explicit particle enthalpy source
|
||||||
scalar& dhsTrans // sensible enthalpy transfer to carrier
|
scalar& dhsTrans, // sensible enthalpy transfer to carrier
|
||||||
|
scalar& Cuh // linearised heat transfer coefficient
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user