diff --git a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.C b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.C index df9a4c1f0c4fd5535a372dedebad58c752e335bf..18fa9faa7381cddad11cd1bbf0391ed4768d2b97 100644 --- a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.C @@ -88,40 +88,29 @@ Foam::autoPtr<Foam::solidMixtureProperties> Foam::solidMixtureProperties::New // * * * * * * * * * * * * * * * 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 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(); -} - + scalar rrho = 0; -Foam::scalar Foam::solidMixtureProperties::rho(const scalarField& X) const -{ - scalar val = 0.0; 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 { - scalar val = 0.0; + scalar Cp = 0; + forAll(properties_, i) { - val += properties_[i].Cp()*Y[i]; + Cp += Y[i]*properties_[i].Cp(); } - return val; + + return Cp; } diff --git a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.H b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.H index 2d34f771b8d3dcba9c385d0d98491a737931f602..a9cdfa732c24bd4d3c2bf2a430a325a57191f9e2 100644 --- a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.H +++ b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidMixtureProperties/solidMixtureProperties.H @@ -31,17 +31,11 @@ Description \verbatim <parentDictionary> { - C - { - defaultCoeffs yes; // employ default coefficients - } + C; + ash { - defaultCoeffs no; - ashCoeffs - { - ... user defined properties for ash - } + //... user defined properties for ash } } \endverbatim @@ -58,10 +52,9 @@ See also #ifndef solidMixtureProperties_H #define solidMixtureProperties_H -#include "scalarField.H" -#include "PtrList.H" #include "solidProperties.H" -#include "autoPtr.H" +#include "PtrList.H" +#include "scalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -134,19 +127,12 @@ public: 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 - // volume fractions - scalar rho(const scalarField& X) const; + // mass fractions + scalar rho(const scalarField& Y) const; - //- Calculate the mixture heat capacity [J/(kg K)] as a function - // of mass fractions + //- Calculate the mixture heat capacity [J/(kg K)] as a function of + // mass fractions scalar Cp(const scalarField& Y) const; };