Fixes ConstDensityThermo::standardConcentration()

`ConstDensityThermo::standardConcentration(k)` is now calculated
as `density()/molecularWeight(k)`, rather than the previously
incorrect `molarDensity()`.

Note that this causes a problem for any species where
`molecularWeight(k)=0` (i.e. vacancies).  Such species should be
avoided, in this phase model.

For that reason, `sofc-test.xml` is changed so that the oxide bulk
is modeled as an `IdealSolidSolution`
This commit is contained in:
Steven DeCaluwe 2017-12-05 08:19:00 -07:00 committed by Ray Speth
parent 6cd7bf160f
commit 89fded32d4
2 changed files with 10 additions and 4 deletions

View file

@ -59,7 +59,7 @@ void ConstDensityThermo::getActivityCoefficients(doublereal* ac) const
doublereal ConstDensityThermo::standardConcentration(size_t k) const
{
return molarDensity();
return density()/molecularWeight(k);
}
void ConstDensityThermo::getChemPotentials(doublereal* mu) const

View file

@ -40,11 +40,11 @@
<pressure units="Pa">101325.0</pressure>
<moleFractions>Ox:0.95 VO**:0.05</moleFractions>
</state>
<thermo model="Incompressible">
<thermo model="IdealSolidSolution">
<density units="g/cm3">0.7</density>
</thermo>
<transport model="None"/>
<kinetics model="none"/>
<standardConc model="unity"/>
<transport model="None"/> <kinetics model="none"/>
</phase>
<!-- phase metal_surface -->
@ -132,6 +132,9 @@
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState>
<molarVolume>0.0018</molarVolume>
</standardState>
</species>
<!-- species Ox -->
@ -146,6 +149,9 @@
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState>
<molarVolume>0.0018</molarVolume>
</standardState>
</species>
<!-- species (m) -->