Skip to content

Latest commit

 

History

93 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aGSM4PFM

Adaptive Gradient Smoothing Method for Phase Field Modeling

Allan-Cahn Simulation Cahn-Hillard Simulation

Figure 1: Animations of aGSM simulation for Allan-Cahn equation (left) and Cahn-Hillard equation (right).


Overview

This repository provides a high-performance numerical solver leveraging the Gradient Smoothing Method (GSM), integrated with adaptive remeshing of structured meshes, for efficient Phase Field modeling of interface dynamics.

Key Features:

  • Second-Order Accuracy: Achieves general 2nd-order accuracy across computations.
  • Linear Computational Complexity: Scales as O(N), meaning runtime increases linearly with the number of elements.
  • Superior Performance: Outperforms weak-form Finite Element Method (FEM)-based software with adaptive mesh approaches.
  • Efficient for Large-Scale Problems: Exhibits significant advantages over strong-form Finite Difference Methods (FDM), especially for thin interfaces or large-scale simulations.

Performance Comparison

Performance Metrics

Figure 2: Accuracy (a) and Computational Complexity (b) of aGSM compared to Finite Difference Method (FDM) and FEM-based software (MOOSE).


Mesh Adaptation

Mesh Comparison

Figure 3: Meshes used in computation for cases with different interface thickness (a). Meshes of FDM (b), aGSM (c), and MOOSE (d).

HAMR

Figure 4: Hierarchical adaptive mesh refinement: effect of refinement level on mesh quality


Source Code

The repository contains MATLAB source code implementing aGSM for solving phase field equations, including Allan-Cahn (A-C) and Cahn-Hillard (C-H) models. A python version is also provided for the adaptive mesh refiment algorithm applied to tracking moving interface.

Usage:

  • MATLAB License Required: You will need a MATLAB license to run the provided scripts.
  • Executable File Available: For users without access to MATLAB, a standalone executable file is provided, enabling exploration of the algorithm. (Please download and install the MyAppInstaller.exe before running the standalone file)

Getting Started

To use the code, follow these steps:

  1. Clone the repository:
    git clone https://github.com/pnnl/aGSM4PFM.git
    cd aGSM4PFM
  2. Ensure that MATLAB is installed and licensed.
  3. Run the provided MATLAB scripts or executable file to explore the solver.

📁 Project Structure

aGSM4PFM
└── AMR4PF/
    └── main_program.py (python script)
└── aGSM4AC/
    └── build
        └── PFMAPP4AC.exe (standalone file)
    └── src
        └── main_program.m (source code)
└── aGSM4CH/
   └── build
       └── PFMAPP4CH.exe (standalone file)
   └── src
    └── main_program.m (source code)

Authors

Zirui Mao
Pacific Northwest National Laboratory (PNNL)
📧 zirui.mao@pnnl.gov

[Alice Xu]
High school student, Hanford High School, Richland, WA


Citation

If you use this code or find it helpful, please cite our upcoming publication:
Paper: Mao, Zirui and Xu, Alice and Hu, Shenyang and Stinis, Panos and Shao, Yuyan and Li, Ang and Li, Yulan, An adaptive phase field framework for large-scale interface evolution problems using a strong-form gradient smoothing approach. Available at SSRN: https://ssrn.com/abstract=6366410 or http://dx.doi.org/10.2139/ssrn.6366410


License

This project is licensed under the BSD License.
Refer to the license file for more details.

By using this freeware, you are agree to the following:

  1. you are free to copy and redistribute the material in any medium or format.
  2. you are free to remix, transform, and build upon the material for any personal purpose.
  3. you must provide the name of the creator and attribution parties, a copyright notice, a license notice, paper citation, a
    disclaimer notice, and a link to the material.
  4. users are entirely at their own risk using this freeware and techniques.

Before use, please read the License carefully.


Acknowledgments

This work is supported by the PNNL LDRD Project and utilized resources from the HPC Deception Cluster at PNNL.

The Pacific Northwest National Laboratory (PNNL) is operated by Battelle for the U.S. Department of Energy under Contract DE-AC05-76RL01830.


Feedback & Contributions

We welcome feedback, issues, or improvements.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages