-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes ConstDensityThermo::standardConcentration()
#490
Conversation
Alright, can somebody explain the Thanks. |
@decaluwe The comment isn't the most useful is it... if you dig into the report here: https://codecov.io/gh/Cantera/cantera/pull/490/tree/src/thermo you can see that the "green dot" column (which represents number of lines that were run in the tests) decreased by 11 in the constDensityThermo.cpp file and the "red dot" column (number of lines that weren't run in the tests) increased by 11. However, the IdealSolidSolnPhase.cpp file gained 9 lines of coverage. I suspect this has to do with you changing the thermo model in sofc-test.xml from "Incompressible" to "IdealSolidSolution"... basically, rather than running the lines in constDensityThermo.cpp, now it runs the lines in IdealSolidSolnPhase.cpp. You could consider adding a test for the code in constDensityThermo.cpp, but whether that's worth it depends on whether this class will be staying around long-term, or if this is just a temporary fix until something better is available. The other random failures in the equil code should be fixed by 1eebd3e that @speth committed last night |
Thanks, @bryanwweber - I did look at the report details, but still didn't know how to read it! 🙄 The The assumption of a constant mass density for a non-stoichiometric substance seems... odd. Even worse, it is specified at the cti layer by the phase model name Regardless, I'll fetch Ray's latest commit, rebase, and re-push to my repo. Thanks. |
I'm not concerned about the changes in code coverage, since they are all fully explained at this point. I would generally regard the code coverage checks as informational rather than a requirement for merging a PR. There's no need to rebase onto the current master, since that will happen automatically when we merge the PR. My only minor suggestions are:
|
Hey, man, spelling is a highly subjective enterprise, sometimes... 🙄 |
90474dd
to
156655d
Compare
`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`
156655d
to
dec97f2
Compare
Okay, should be good to go. |
@decaluwe I agree, the report pages are hard to read, especially the default one it links you to from the PR. I find I have to click around to about 10 different pages before I find what I'm looking for... Ah well, as @speth said, its useful as an informational point (and anyway, having full coverage doesn't mean that you've found all the bugs) |
Fixes #458 .
Changes proposed in this pull request:
-
ConstDensityThermo::standardConcentration
for species k is calculated asdensity()/molecularWeight(k)
. Was previously calculated (incorrectly) asmolarDensity()
.cause problems, and therefore should be avoided for this phase.
-For this reason, sofc-text.xml also had to be changed and models the YSZ
electrolyte as
IdealSolidSolution
, rather than asincompressible_solid
.