A professional interactive CLI wizard for creating OpenPhase phase-field simulations.
The OpenPhase Wizard simplifies the creation of new phase-field simulation projects. It provides a user-friendly terminal interface (TUI) to configure complex material parameters, physics modules, and grid settings, automatically generating all necessary C++ and OPI files ready for compilation within the OpenPhase environment.
The wizard is a companion tool and cannot be used effectively without the OpenPhase library. It integrates with your local OpenPhase directory to:
- Clone and parse existing examples.
- Automatically update the master CMake build system.
- Output generated projects directly into the
OpenPhase/examples/structure.
Download OpenPhase here: https://github.com/OpenPhase/OpenPhase
- Python version 3.9 or higher is required.
You must tell the wizard where your OpenPhase installation is located.
-
Environment Variable (Permanent): Set
OPENPHASE_PATHto point to your OpenPhase root directory.- Windows (PowerShell):
[Environment]::SetEnvironmentVariable("OPENPHASE_PATH", "C:\Path\To\OpenPhase", "User") - Linux/macOS: Add
export OPENPHASE_PATH="/path/to/openphase"to your~/.bashrcor~/.zshrc.
- Windows (PowerShell):
-
Automatic Detection: The wizard will also find OpenPhase if:
- It is located in a sibling directory named
OpenPhase. - It is in the default home directory (
~/OpenPhase).
- It is located in a sibling directory named
Using uv (Recommended)
cd openphase-cli-wizard
uv venv
uv pip install -e .cd openphase-cli-wizard
python -m venv .venv
# Activate venv:
# Windows: .venv\Scripts\activate | Linux: source .venv/bin/activate
pip install -e .Once installed and your path is set, simply run:
openphase-wizard- Project Cloning: Instantly clone official OpenPhase examples as templates for your own work.
- Physics Modules: Support for Temperature, Nucleation, Compositional Diffusion, and multiple Driving Force modes.
- Intelligent Parsing: Automatically detects physics configurations and initialization methods from existing
.cppand.opifiles. - Modern TUI: A beautiful, interactive interface built with Textual.
- Automated CMake: Your new projects are automatically added to the OpenPhase build system.
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run in development mode (with hot-reload)
textual run --dev openphase_wizard.app:OpenPhaseWizardAppApache License 2.0