specie and specieMixtures feature for electrical property calculation

This commit is contained in:
ignis 2018-04-25 14:56:01 +09:00
parent c06d324891
commit 8670f39b9f
6 changed files with 75 additions and 1 deletions

View file

@ -68,6 +68,16 @@ Foam::scalar Foam::SpecieMixture<MixtureType>::W
}
template<class MixtureType>
Foam::scalar Foam::SpecieMixture<MixtureType>::z
(
const label speciei
) const
{
return this->getLocalThermo(speciei).z();
}
template<class MixtureType>
Foam::scalar Foam::SpecieMixture<MixtureType>::Qc
(
@ -78,6 +88,16 @@ Foam::scalar Foam::SpecieMixture<MixtureType>::Qc
}
template<class MixtureType>
Foam::scalar Foam::SpecieMixture<MixtureType>::Qc2
(
const label speciei
) const
{
return this->getLocalThermo(speciei).Qc2();
}
template<class MixtureType>
Foam::scalar Foam::SpecieMixture<MixtureType>::Cp
(

View file

@ -81,9 +81,15 @@ public:
//- Molecular weight of the given specie [kg/kmol]
virtual scalar W(const label speciei) const;
//- Number of 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;
//- Absolute specific charge of the given specie []
virtual scalar Qc2(const label specieI) const;
// Per specie thermo properties

View file

@ -111,4 +111,34 @@ Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::Qc() const
}
Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::Qc2() const
{
const PtrList<volScalarField>& Y(basicMultiComponentMixture::Y());
tmp<volScalarField> tQc
(
new volScalarField
(
IOobject
(
IOobject::groupName("Qc2", 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->Qc2(i);
}
return tQc;
}
// ************************************************************************* //

View file

@ -88,15 +88,24 @@ public:
//- Molecular weight of the given specie [kg/kmol]
virtual scalar W(const label speciei) const = 0;
//- Number of charges of the given specie []
virtual scalar z(const label speciei) const = 0;
//- Specific charge of the given specie [C/kg]
virtual scalar Qc(const label speciei) const = 0;
//- Absolute specific charge of the given specie [C/kg]
virtual scalar Qc2(const label speciei) const = 0;
//- Molecular weight of the mixture [kg/kmol]
tmp<volScalarField> W() const;
//- Charge number of the mixture [C/kg]
//- Specific charge of the mixture [C/kg]
tmp<volScalarField> Qc() const;
//- Absolute specific charge of the mixture [C^2/kg]
tmp<volScalarField> Qc2() const;
// Per specie thermo properties

View file

@ -188,6 +188,9 @@ public:
//- Electric charge [C/kg]
inline scalar Qc() const;
//- Electric charge squared [C^2/kg]
inline scalar Qc2() const;
// I-O

View file

@ -150,6 +150,12 @@ inline scalar specie::Qc() const
}
inline scalar specie::Qc2() const
{
return nCharges_ * nCharges_ * NA * e * e / molWeight_;
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
inline void specie::operator=(const specie& st)