Skip to content

steer-materials

Material definitions for the STEER simulation framework.

steer-materials provides base classes for representing physical materials — metals, solvents, and other substances — with built-in unit conversion, validation, and cost tracking.

It is a support package within the broader STEER (Storage Technology for Energy and Economic Research) ecosystem.

Features

  • Validated properties — density, cost, and names are type-checked on assignment.
  • Automatic unit conversion — values are stored in SI internally and exposed in common units (g/cm³, $/kg).
  • Cost tracking — optional volume/mass tracking with automatic cost derivation.
  • Soft & hard ranges — each physical property carries a plausible range and an absolute bound.
  • Serialization — built-in JSON serialization via steer-core mixins.

Quick example

from steer_materials.Base import Metal

aluminum = Metal(
    name="Aluminum",
    density=2.7,        # g/cm³
    specific_cost=2.50, # $/kg
    color="silver",
)
print(aluminum.density)        # 2.7
print(aluminum.specific_cost)  # 2.5
Section Description
Installation Install from PyPI or source
Quick Start Create your first material in 5 minutes
Examples Common usage patterns and recipes
API Reference Full class and method documentation
Developer Guide Contributing, testing, and code style