solidMixtureProperties: Updated documentation, removed unused functions and corrected remaining

This commit is contained in:
Henry Weller
2017-02-20 15:30:25 +00:00
parent 9f3cf0a7fa
commit 0ab1758b2f
2 changed files with 19 additions and 44 deletions

View File

@ -88,40 +88,29 @@ Foam::autoPtr<Foam::solidMixtureProperties> Foam::solidMixtureProperties::New
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalarField Foam::solidMixtureProperties::X(const scalarField& Y) const Foam::scalar Foam::solidMixtureProperties::rho(const scalarField& Y) const
{ {
scalarField X(Y.size()); scalar rrho = 0;
scalar rhoInv = 0.0;
forAll(X, i)
{
rhoInv += Y[i]/properties_[i].rho();
X[i] = Y[i]/properties_[i].rho();
}
tmp<scalarField> tfld(X/rhoInv);
return tfld();
}
Foam::scalar Foam::solidMixtureProperties::rho(const scalarField& X) const
{
scalar val = 0.0;
forAll(properties_, i) forAll(properties_, i)
{ {
val += properties_[i].rho()*X[i]; rrho += Y[i]/properties_[i].rho();
} }
return val;
return 1/rrho;
} }
Foam::scalar Foam::solidMixtureProperties::Cp(const scalarField& Y) const Foam::scalar Foam::solidMixtureProperties::Cp(const scalarField& Y) const
{ {
scalar val = 0.0; scalar Cp = 0;
forAll(properties_, i) forAll(properties_, i)
{ {
val += properties_[i].Cp()*Y[i]; Cp += Y[i]*properties_[i].Cp();
} }
return val;
return Cp;
} }

View File

@ -31,17 +31,11 @@ Description
\verbatim \verbatim
<parentDictionary> <parentDictionary>
{ {
C C;
{
defaultCoeffs yes; // employ default coefficients
}
ash ash
{ {
defaultCoeffs no; //... user defined properties for ash
ashCoeffs
{
... user defined properties for ash
}
} }
} }
\endverbatim \endverbatim
@ -58,10 +52,9 @@ See also
#ifndef solidMixtureProperties_H #ifndef solidMixtureProperties_H
#define solidMixtureProperties_H #define solidMixtureProperties_H
#include "scalarField.H"
#include "PtrList.H"
#include "solidProperties.H" #include "solidProperties.H"
#include "autoPtr.H" #include "PtrList.H"
#include "scalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -134,19 +127,12 @@ public:
return components_.size(); return components_.size();
} }
//- Returns the mass fractions, given mole fractions
scalarField Y(const scalarField& X) const;
//- Returns the mole fractions, given mass fractions
scalarField X(const scalarField& Y) const;
//- Calculate the mixture density [kg/m^3] as a function of //- Calculate the mixture density [kg/m^3] as a function of
// volume fractions // mass fractions
scalar rho(const scalarField& X) const; scalar rho(const scalarField& Y) const;
//- Calculate the mixture heat capacity [J/(kg K)] as a function //- Calculate the mixture heat capacity [J/(kg K)] as a function of
// of mass fractions // mass fractions
scalar Cp(const scalarField& Y) const; scalar Cp(const scalarField& Y) const;
}; };