A small thermodynamics visualization project for exploring Gibbs energy functions and phase-boundary behavior in a binary A-B system.
This project builds a phase diagram and visualizes how Gibbs energy curves and chemical potentials change with temperature. The workflow is separated into three parts:
g_functions/phase_diagram.py— generates the equilibrium phase diagram datag_functions/g_functions.py— evaluates Gibbs energy and chemical potential functionsg_functions/plotting.py— renders the interactive plots
g_functions/__init__.pyg_functions/__main__.pyg_functions/g_functions.pyg_functions/phase_diagram.pyg_functions/plotting.pyGFunctions.py— compatibility wrapper for the original script namePhaseDiagram.py— compatibility wrapper for the original script nametests/— validation for the model and dataset generation
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython -m g_functionspytest -qThe original script style has been reorganized into a cleaner package layout without changing the underlying physics or plotting behavior. The goal is to make the project easier to understand, extend, and validate.