Skip to content

2D Grain Structure Generation

Sunil Anandatheertha edited this page May 22, 2026 · 1 revision

2D Grain Structure Generation

UPXO supports two primary methods for generating 2D polycrystalline grain structures.


Monte Carlo Grain Structure (MCGS2D)

MCGS2D uses the Potts model Monte Carlo algorithm to simulate grain growth from a random initial state. The simulation is driven by an Excel dashboard (gschar1.xls) which exposes all key parameters.

Key parameters:

  • Grid size (nx, ny)
  • Number of grain orientations (Q)
  • Number of Monte Carlo steps (MCS)
  • Temperature (kT)
  • Sampling intervals (time slices)

Entry point: src/upxo/demos/gschar/gschar1.ipynb

Custom algorithms: You can supply your own growth rate function by subclassing the MC engine. See the ggrowth/mcgs.py module and algorithms/ for reference implementations.


Voronoi Tessellation (VTGS2D)

Voronoi-based 2D grain structures are generated from a set of seed points using pyvoro. Grain morphology is controlled by seed point distribution and domain geometry.

Entry point: src/upxo/pxtal/vortess2d.py


Coming Soon

  • Detailed parameter sweeping guide (parswep/mcgs2d_parameter_sweeping.py)
  • Gradient grain structure generation
  • Spatial grain size distribution control

Clone this wiki locally