From 89fded32d46084bd7733c81c7d1b383922e433a1 Mon Sep 17 00:00:00 2001 From: Steven DeCaluwe Date: Tue, 5 Dec 2017 08:19:00 -0700 Subject: [PATCH] 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` --- src/thermo/ConstDensityThermo.cpp | 2 +- test/data/sofc-test.xml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/thermo/ConstDensityThermo.cpp b/src/thermo/ConstDensityThermo.cpp index 420f53adb..e3edba6c4 100644 --- a/src/thermo/ConstDensityThermo.cpp +++ b/src/thermo/ConstDensityThermo.cpp @@ -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 diff --git a/test/data/sofc-test.xml b/test/data/sofc-test.xml index ea7bbaf2a..fbebb19db 100644 --- a/test/data/sofc-test.xml +++ b/test/data/sofc-test.xml @@ -40,11 +40,11 @@ 101325.0 Ox:0.95 VO**:0.05 - + 0.7 - - + + @@ -132,6 +132,9 @@ 0.0 + + 0.0018 + @@ -146,6 +149,9 @@ 0.0 + + 0.0018 +