mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated intermediate lib cloud sources
This commit is contained in:
@ -127,7 +127,7 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::resetSourcesOnStartup() const
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const KinematicCloud<ParcelType>&
|
inline const Foam::KinematicCloud<ParcelType>&
|
||||||
Foam::KinematicCloud<ParcelType>::cloudCopy() const
|
Foam::KinematicCloud<ParcelType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const ReactingCloud<ParcelType>&
|
inline const Foam::ReactingCloud<ParcelType>&
|
||||||
Foam::ReactingCloud<ParcelType>::cloudCopy() const
|
Foam::ReactingCloud<ParcelType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
@ -169,34 +169,9 @@ Foam::ReactingCloud<ParcelType>::Srho(const label i) const
|
|||||||
{
|
{
|
||||||
scalarField& rhoi = tRhoi();
|
scalarField& rhoi = tRhoi();
|
||||||
rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V());
|
rhoi = rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V());
|
||||||
|
}
|
||||||
|
|
||||||
return tRhoi;
|
return tRhoi;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return tmp<DimensionedField<scalar, volMesh> >
|
|
||||||
(
|
|
||||||
new DimensionedField<scalar, volMesh>
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
this->name() + "rhoTrans",
|
|
||||||
this->db().time().timeName(),
|
|
||||||
this->db(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh(),
|
|
||||||
dimensionedScalar
|
|
||||||
(
|
|
||||||
"zero",
|
|
||||||
rhoTrans_[0].dimensions()/dimTime/dimVolume,
|
|
||||||
0.0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,7 +193,12 @@ Foam::ReactingCloud<ParcelType>::Srho() const
|
|||||||
false
|
false
|
||||||
),
|
),
|
||||||
this->mesh(),
|
this->mesh(),
|
||||||
dimensionedScalar("zero", rhoTrans_[0].dimensions(), 0.0)
|
dimensionedScalar
|
||||||
|
(
|
||||||
|
"zero",
|
||||||
|
rhoTrans_[0].dimensions()/dimTime/dimVolume,
|
||||||
|
0.0
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -230,12 +210,10 @@ Foam::ReactingCloud<ParcelType>::Srho() const
|
|||||||
sourceField += rhoTrans_[i];
|
sourceField += rhoTrans_[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return trhoTrans/(this->db().time().deltaT()*this->mesh().V());
|
sourceField /= this->db().time().deltaT()*this->mesh().V();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return trhoTrans;
|
return trhoTrans;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -244,8 +222,6 @@ inline Foam::tmp<Foam::fvScalarMatrix>
|
|||||||
Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
||||||
{
|
{
|
||||||
if (this->solution().sourceActive())
|
if (this->solution().sourceActive())
|
||||||
{
|
|
||||||
if (this->solution().semiImplicit("rho"))
|
|
||||||
{
|
{
|
||||||
tmp<volScalarField> trhoTrans
|
tmp<volScalarField> trhoTrans
|
||||||
(
|
(
|
||||||
@ -267,6 +243,9 @@ Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
|||||||
|
|
||||||
scalarField& sourceField = trhoTrans();
|
scalarField& sourceField = trhoTrans();
|
||||||
|
|
||||||
|
if (this->solution().semiImplicit("rho"))
|
||||||
|
{
|
||||||
|
|
||||||
forAll(rhoTrans_, i)
|
forAll(rhoTrans_, i)
|
||||||
{
|
{
|
||||||
sourceField += rhoTrans_[i];
|
sourceField += rhoTrans_[i];
|
||||||
@ -280,26 +259,6 @@ Foam::ReactingCloud<ParcelType>::Srho(volScalarField& rho) const
|
|||||||
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
|
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
|
||||||
fvScalarMatrix& fvm = tfvm();
|
fvScalarMatrix& fvm = tfvm();
|
||||||
|
|
||||||
tmp<volScalarField> trhoTrans
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
this->name() + "rhoTrans",
|
|
||||||
this->db().time().timeName(),
|
|
||||||
this->db(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh(),
|
|
||||||
dimensionedScalar("zero", dimMass, 0.0)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField& sourceField = trhoTrans();
|
|
||||||
|
|
||||||
forAll(rhoTrans_, i)
|
forAll(rhoTrans_, i)
|
||||||
{
|
{
|
||||||
sourceField += rhoTrans_[i];
|
sourceField += rhoTrans_[i];
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const ReactingMultiphaseCloud<ParcelType>&
|
inline const Foam::ReactingMultiphaseCloud<ParcelType>&
|
||||||
Foam::ReactingMultiphaseCloud<ParcelType>::cloudCopy() const
|
Foam::ReactingMultiphaseCloud<ParcelType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
|
|||||||
@ -30,7 +30,7 @@ using namespace Foam::constant;
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const ThermoCloud<ParcelType>&
|
inline const Foam::ThermoCloud<ParcelType>&
|
||||||
Foam::ThermoCloud<ParcelType>::cloudCopy() const
|
Foam::ThermoCloud<ParcelType>::cloudCopy() const
|
||||||
{
|
{
|
||||||
return cloudCopyPtr_();
|
return cloudCopyPtr_();
|
||||||
|
|||||||
Reference in New Issue
Block a user