Skip to content

YAML-Based Thermodynamic Data Storage

Choose a tag to compare

@sinagilassi sinagilassi released this 13 Apr 15:40
· 1658 commits to main since this release

馃啎 New Feature: YAML-Based Thermodynamic Data Storage

You can now directly store and load thermodynamic data from .yml files using a streamlined reference system. This allows for easier data management, version control, and collaboration.


馃敡 How It Works

Step 1: Define Your Reference File

import os

# Define path to your YAML data file
yml_file = 'tests\\source-ref-1.yml'
yml_path = os.path.join(os.getcwd(), yml_file)

# Reference dictionary
ref = {'reference': [yml_path]}

Step 2: Initialize the App with the Custom Reference

thermo_db = ptdb.init(custom_reference=ref)

Step 3: Add STRUCTURE and VALUES as List to yml file

STRUCTURE:
  COLUMNS: [Temperature, Pressure, Enthalpy, ...]
  SYMBOL: [T, P, H, ...]
  UNIT: [K, bar, kJ/mol, ...]

VALUES:
  - [298.15, 1.0, -241.8, ...]
  - [350.00, 1.5, -230.2, ...]
  ...

Let us know if you have feedback or suggestions!