OpenPhase is an open-source software library for phase-field simulations of complex scientific problems. It is written in object-oriented C++ and features a modular structure where each module is dedicated to solving a single problem along the phase-field simulation strategy.
OpenPhase-Academic v2.0 provides a comprehensive framework for phase-field modeling, enabling researchers to simulate complex material science phenomena. The library is designed with a modular architecture, making it easy to combine different physical models and simulation components for your specific research needs.
OpenPhase can simulate a wide range of physical phenomena, including:
- Solidification processes: Solidification in binary systems considering melt flow
- Grain growth: Structural transformation in solids including grain growth
- Phase transformations: Solid-solid phase transformations accompanied by large deformations and plasticity
- Multiphase flows: Phase transformations in fluid systems considering multiphase flow and wetting phenomena
- Reactive flows: Heat exchange in reactive gas flows through particle beds and solid combustion
- Sintering processes: Solid-state and liquid-phase sintering
- Heat transfer: Heat diffusion and heat sources with latent heat effects
- Elastic deformation: Small strain mechanics with spectral elasticity solvers
- Chemical diffusion: Binary diffusion
- Magnetic and electric fields: Magnetism and electrical potential calculations
- Fracture mechanics: Crack propagation and fracture field modeling
Here are some visual examples of the complex phenomena that can be simulated using OpenPhase:
A collage of various phase-field simulations performed with OpenPhase, showcasing diverse microstructural evolutions, fluid dynamics, and material processes.
For more simulation videos and visualizations, visit the Simulation Gallery.
- Modular Architecture: Each module handles a specific aspect of phase-field simulations, making it easy to combine different physical models
- Smart Microstructure Creation: Easy creation of initial microstructures, realistic nucleation based on various properties
- Extensive Physical Modules: Diffusion, thermodynamics, mechanics, chemical, fluid-dynamics, magnetism, electrics, and more
- All-in-One Design Workflow: Modular structure which allows easy extensions of the library and simplifies the development of user programs
- High Performance: Parallel computing support via OpenMP and MPI hybrid parallelism
- Comprehensive Examples: Multiple example simulations demonstrating various capabilities
- Benchmark Suite: Validated test cases to verify installation and functionality
- Cross-Platform: Supports Linux and Windows (via WSL)
- Python Bindings: Python interface for easier scripting and integration
- Documentation: User manual and code documentation available
Prerequisites:
- GNU GCC C++17 compliant compiler (GCC 9.0.0 or greater).
- FFTW3 library (www.fftw.org)
Note: The OpenPhase project is developed for Linux, but it is not restricted to use it in any other OS.
Step 1: Update the packages list:
sudo apt updateStep 2: Install C++ compiler by installation of the development package build-essential:
sudo apt install build-essentialStep 3: Check C++ compiler version:
g++ --versionInstalling fftw-dev package on Ubuntu:
sudo apt-get install fftw-dev libfftw3-3 libfftw3-devInstalling the MPI Library for computing Fast Fourier Transforms package on Ubuntu (MPI users):
sudo apt-get install libfftw3-mpi-devFor Windows users, we recommend using Windows Subsystem for Linux (WSL). This allows you to use the same Linux-based installation and build process.
-
Open PowerShell as Administrator and run:
wsl --install -
Restart your computer when prompted.
-
After restart, WSL will finish installation. You'll be prompted to create a username and password for your Linux distribution.
-
Update your Linux distribution:
sudo apt update && sudo apt upgrade -y -
Install required tools in your WSL terminal:
sudo apt update sudo apt install build-essential sudo apt-get install fftw-dev libfftw3-3 libfftw3-dev
For MPI support (optional):
sudo apt-get install libfftw3-mpi-dev
Once WSL is set up, you can follow the Linux installation instructions below.
To compile the OpenPhase library, run make in the distribution root directory:
makeThis will compile the library and place it into the ./lib directory. This will take a few minutes depending on your system.
Note: If you got a 'Compilation done' message on your terminal, now you are ready to run your first example.
To compile example simulations:
make examplesExamples are located in the ./examples directory. To run them, navigate into the specific example directory and follow the instructions in the README file.
To compile benchmarks to test the library:
make benchmarksTo run the benchmarks, enter the ./benchmarks directory and follow the instructions in the README file.
To change the compiler, use:
make CXX=<preferred_compiler_name>Note: Intel compilers are not supported. Use GNU GCC 9.0.0 or greater.
You can customize the build with additional options using:
make SETTINGS="<option1> <option2> ..."Note that OpenMP parallelism is enabled by default.
Available options:
serial: No OpenMP parallelizationmpi-parallel: Compiles OpenPhase with MPI supportdebug: Compiles OpenPhase with debug information and enables additional output and checks via the DEBUG flagsilent: Disables most of the console output from the library
Example:
make SETTINGS="debug serial"include/: Header files containing the library APIsrc/: Source code implementationexamples/: Example simulations demonstrating various featuresbenchmarks/: Test cases for validationdocumentation/: User manual and documentationexternal/: External dependencies
Each simulation typically consists of:
- A C++ source file implementing your simulation
- An input file (
.opiextension) with simulation parameters
The library assumes that each module that requires user input will read it from a dedicated input file. The input files (with the .opi file extension) are located in the corresponding example directories.
Example simulations are located in the examples/ directory. Navigate to any example directory and follow the instructions in the README file.
To run an example simulation:
cd examples/NormalGG
./NormalGG- User Manual: Available in the
documentation/UserManual/directory - Code Documentation: Generate using Doxygen by running
doxygenin the project root. The documentation will be created in the./documentationdirectory. - Installation Guide: See the
INSTALLfile for detailed compilation instructions
A detailed manual for the library should be available from the project's web page: www.openphase.rub.de
To test the library, compile and run the benchmarks:
make benchmarks
cd benchmarksThen navigate to a specific benchmark directory and follow the instructions in the README file to run the test.
The examples/ directory contains numerous simulation examples demonstrating various capabilities of OpenPhase:
- SolidificationFe: Iron solidification
- SolidificationNiAl: Nickel-Aluminum solidification
- SolidificationFeC: Iron-Carbon solidification
- SolidificationMgAl: Magnesium-Aluminum solidification
- MeltingFe: Iron melting process
- EutecticII: Eutectic solidification
- NormalGG: Normal grain growth
- FacetedGG: Faceted grain growth
- Pearlite: Pearlite formation
- PrecipitationNiTi: Precipitation in Nickel-Titanium
- Superalloys: Superalloy phase transformations
- SolidPhaseSintering: Solid-state sintering
- LiquidPhaseSintering: Liquid-phase sintering
- Flow: Basic flow simulation
- ThermalCompressibleFlow: Compressible thermal flow (Poiseuille, cylinder, packed bed)
- Wetting: Liquid droplet wetting on solid surfaces
- ReactiveFlow: Reactive flow simulations including:
- Flame0D: Zero-dimensional flame
- FlameSpeed1D: One-dimensional flame speed
- FlameWall2D: Two-dimensional flame-wall interaction
- FlamePackedBed2D: Flame propagation in packed beds
- HeatDiffusion: Heat diffusion processes
- LatentHeat: Latent heat effects
Each example includes source code and input files to help you get started.
OpenPhase is developed by researchers at ICAMS (Interdisciplinary Centre for Advanced Materials Simulation) at Ruhr University Bochum, in collaboration with OpenPhase Solutions GmbH.
For a complete list of contributors, see the AUTHORS file.
OpenPhase has been used in numerous research publications. For a comprehensive list of featured and related publications, visit the Publications page.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
- Email: [email protected]
- Project Website: www.openphase.rub.de
- Repository: Github Repository
If you would like to contribute, fork the repository, work on your changes, and contact the developer team at [email protected] for any contributions.
OpenPhase has been developed with contributions from researchers at Ruhr University Bochum and OpenPhase Solutions GmbH. We thank all contributors and users for their support and feedback.
Note: This is the Academic version of OpenPhase (v2.0). For the latest version and commercial licensing options, visit www.openphase-solutions.com.

