mixture got specific charge field calculation
This commit is contained in:
parent
3efddbac8a
commit
c06d324891
8 changed files with 67 additions and 35 deletions
|
|
@ -69,12 +69,12 @@ Foam::scalar Foam::SpecieMixture<MixtureType>::W
|
|||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::scalar Foam::SpecieMixture<MixtureType>::z
|
||||
Foam::scalar Foam::SpecieMixture<MixtureType>::Qc
|
||||
(
|
||||
const label speciei
|
||||
) const
|
||||
{
|
||||
return this->getLocalThermo(speciei).z();
|
||||
return this->getLocalThermo(speciei).Qc();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ public:
|
|||
//- Molecular weight of the given specie [kg/kmol]
|
||||
virtual scalar W(const label speciei) const;
|
||||
|
||||
//- Number of elementary charges of the given specie []
|
||||
virtual scalar z(const label specieI) const;
|
||||
//- Specific charge of the given specie []
|
||||
virtual scalar Qc(const label specieI) const;
|
||||
|
||||
|
||||
// Per specie thermo properties
|
||||
|
|
|
|||
|
|
@ -81,4 +81,34 @@ Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::W() const
|
|||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::Qc() const
|
||||
{
|
||||
const PtrList<volScalarField>& Y(basicMultiComponentMixture::Y());
|
||||
|
||||
tmp<volScalarField> tQc
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Qc", Y[0].group()),
|
||||
Y[0].time().timeName(),
|
||||
Y[0].mesh()
|
||||
),
|
||||
Y[0].mesh(),
|
||||
dimensionedScalar("zero", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Qc = tQc.ref();
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
Qc += Y[i]*this->Qc(i);
|
||||
}
|
||||
|
||||
return tQc;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
|||
|
|
@ -88,9 +88,15 @@ public:
|
|||
//- Molecular weight of the given specie [kg/kmol]
|
||||
virtual scalar W(const label speciei) const = 0;
|
||||
|
||||
//- Specific charge of the given specie [C/kg]
|
||||
virtual scalar Qc(const label speciei) const = 0;
|
||||
|
||||
//- Molecular weight of the mixture [kg/kmol]
|
||||
tmp<volScalarField> W() const;
|
||||
|
||||
//- Charge number of the mixture [C/kg]
|
||||
tmp<volScalarField> Qc() const;
|
||||
|
||||
|
||||
// Per specie thermo properties
|
||||
|
||||
|
|
|
|||
|
|
@ -174,6 +174,21 @@ public:
|
|||
inline scalar z() const;
|
||||
|
||||
|
||||
// Electric charge function
|
||||
|
||||
|
||||
// Mole specific properties
|
||||
|
||||
//- Electric charge [C/kmol]
|
||||
inline scalar qc() const;
|
||||
|
||||
|
||||
// Mass specific properties
|
||||
|
||||
//- Electric charge [C/kg]
|
||||
inline scalar Qc() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write to Ostream
|
||||
|
|
|
|||
|
|
@ -138,6 +138,18 @@ inline scalar specie::z() const
|
|||
}
|
||||
|
||||
|
||||
inline scalar specie::qc() const
|
||||
{
|
||||
return nCharges_ * NA * e;
|
||||
}
|
||||
|
||||
|
||||
inline scalar specie::Qc() const
|
||||
{
|
||||
return nCharges_ * NA * e / molWeight_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void specie::operator=(const specie& st)
|
||||
|
|
|
|||
|
|
@ -336,21 +336,6 @@ public:
|
|||
) const;
|
||||
|
||||
|
||||
// Electric charge function
|
||||
|
||||
|
||||
// Mole specific properties
|
||||
|
||||
//- Electric charge [C/kmol]
|
||||
inline scalar qc() const;
|
||||
|
||||
|
||||
// Mass specific properties
|
||||
|
||||
//- Electric charge [C/kg]
|
||||
inline scalar QC() const;
|
||||
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
|
|
|
|||
|
|
@ -530,20 +530,4 @@ inline Foam::species::thermo<Thermo, Type> Foam::species::operator==
|
|||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::qc() const
|
||||
{
|
||||
return this->z() * this->NA * this->e;
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::QC() const
|
||||
{
|
||||
return this->z() * this->NA * this->e / this->W();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue