Skip to content

Commit

Permalink
Fixes ConstDensityThermo::standardConcentration()
Browse files Browse the repository at this point in the history
`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`
  • Loading branch information
decaluwe authored and speth committed Dec 6, 2017
1 parent 6cd7bf1 commit 89fded3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/thermo/ConstDensityThermo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions test/data/sofc-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down Expand Up @@ -132,6 +132,9 @@
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState>
<molarVolume>0.0018</molarVolume>
</standardState>
</species>

<!-- species Ox -->
Expand All @@ -146,6 +149,9 @@
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState>
<molarVolume>0.0018</molarVolume>
</standardState>
</species>

<!-- species (m) -->
Expand Down

0 comments on commit 89fded3

Please sign in to comment.