Skip to content

Append data, reaction equation parsing, imporved json database structure

Compare
Choose a tag to compare
@gdmiron gdmiron released this 12 Dec 11:18
· 58 commits to master since this release
ae8feb6

Append data, reaction equation parsing, imporved json database structure

This release brings new functionality:

  • Append additional data to the database from provided files in json database format.
import thermofun as thermofun
database = thermofun.Database('slop98-thermofun.json')
database.appendData('additional-data-thermofun.json')
  • Calculate properties for a given reaction equation (reactants with with the symbols used in the equation should be present in the database)
import thermofun as thermofun
engine = thermofun.ThermoEngine('slop98-thermofun.json')
logK = engine.thermoPropertiesReaction(298.15, 1e5, "Cal = Ca+2 + CO3-2").log_equilibrium_constant.val
  • Database files have an improved JSON format. A thermofun database file contains 'substances', 'reactions', and 'elements' lists, plus additional keys with information about the ThermoDataSet.
{
  "thermodataset": "slop98-inorganic",
  "datasources": [
    "db.thermohub.org",
    "[1998SHO/EA]"
  ],
  "date": "10.12.2019 13:43:37",
  "substances": ["..."],
  "reactions": ["..."],
  "elements": ["..."]
}
  • using pytests in CI
  • removed version pinning from pybind11 and nlohmann json libs
  • bugfixes