Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: Species support in Database and TDB read/write #137
Species in a TDB are parsed in the
The Specie class has several attributes:
As discussed in the Thermo-Calc database manager guide, elements entered via the ELEMENT command are automatically entered as species. We match that behavior here. The constituents of an element are just that element with a fraction of 1 and the charge is 0.
In principle, the constituents dictionary will be used in the solver to link the specie to how it contributes to the overall mass balance conditions.
Tests are included that test the basic functionality. I think the examples I chose were representative, and I'm unaware of any edge cases that I missed.
This could be merged immediately to better support parsing of species, but no changes were made to the solver and the species defined here should not affect calculations in any way.
@richardotis comments? suggestions?
I agree. I think the species class might also be the correct place to keep our assumptions about the species, e.g. vacancies, so we can get away from implicit assumptions throughout the codebase.
For the most part, I envision that everything in
I think most of the changes are relatively straightforward replacement of element with species in