Skip to main content

UPXO

PyPI version Python versions License: GPL v3 Documentation

UPXO logo and banner

UPXO (UKAEA Poly-XTAL Operations) is an open-source Pythonic computational framework for generating, analysing, manipulating, meshing, visualising, and exporting representative polycrystalline grain structures for materials science. Although primarily developed for applications pertaining to multi-scale computational studies of nuclear structural materials, it can also solve a wide range of such problems in the Aerospace and Automobile sectors.

UPXO can enable you to create complex 2D and 3D poly-crystalline grain-structures suitable for Finite Element (FE) simulations, microstructure characterisation, and data-driven materials research involving such computational domains.

Funding: This work has been funded by STEP, a major technology and infrastructure programme led by UK Industrial Fusion Solutions Ltd (UKIFS), which aims to deliver the UK's prototype fusion power plant and a path to the commercial viability of fusion.

A dedicated wiki has been created to help users. Please find it here


Installation

pip install upxo

Install with all optional extras (interactive plots, FE meshing, EBSD import):

pip install upxo[all]

Or select specific extras:

Extra Adds Command
viz Interactive plots (Plotly) pip install upxo[viz]
mesh FE meshing (pyvoro, tetgen, gmsh) pip install upxo[mesh]
ebsd EBSD data import (DefDAP) pip install upxo[ebsd]

Requires Python >= 3.13. See the Getting Started wiki page for environment setup guides.

Canonical package metadata is in pyproject.toml (pip install . / python -m build). Optional requirements.txt mirrors core deps only; use extras (upxo[all]) for DefDAP, meshing backends, etc.


Quick Start

from upxo.ggrowth.mcgs import mcgs

# Run a 2D Monte Carlo grain growth simulation
pxt = mcgs(input_dashboard='path/to/input_dashboard.xls')
pxt.simulate()
pxt.detect_grains()

# Access the grain structure at the final saved time slice
gs = pxt.gs[pxt.m[-1]]
print(f"Number of grains: {gs.n}")

More end-to-end examples (2D/3D generation, hierarchical and twinned microstructures, meshing, visualisation) are in the Workflows documentation.

Demo notebooks are not in the pip wheel. Clone this repo and see src/upxo/demos/ (a curated set is tracked in git; see the Demo Notebooks wiki).


Core capabilities

  • Generation of grain structures — Voronoi tessellation and Monte Carlo simulation (Potts model); hierarchical lath microstructures; twinned FCC microstructures.
  • Characterisation and Analysis — morphology, texture, and topological properties.
  • Manipulation Tools — feature removal, introduction, modification, and replacement.
  • Representativeness Assessment — morphological, textural, and topological assessment.
  • FE Meshing — grain boundary geometry conformant and non-conformant Finite Element meshes.
  • Data Interface — import, export, and management of grain structure data; EBSD integration.
  • Visualisation — tools for plotting 2D and 3D microstructures.

Microstructures Supported

UPXO can produce a broad range of synthetic grain structures, including:

  • Equiaxed polycrystals generated from tessellation methods
  • Elongated and directionally structured grains
  • Hierarchical microstructures — lath-based morphologies with packets, blocks, and sub-blocks (Ferritic-Martensitic steels)
  • Twinned microstructures — Sigma-3 annealing and deformation twins in FCC materials (Cu, CuCrZr, OFHC-Cu)
  • Texture-guided crystal orientation assignment
  • EBSD-derived microstructure input and validation
  • Multi-scale grain arrangements

Applications

UPXO is intended to cater to the needs of research involving microstructure-based modelling of structural materials.

Typical applications include:

Nuclear materials research

Synthetic microstructures can be generated for nuclear fusion relevant structural materials, enabling computational investigations of irradiation-induced degradation and microstructural evolution.

Aerospace and automotive materials

Non-equiaxed, gradient grain morphologies representative of manufacturing processes such as rolling, extrusion, forging, additive manufacturing, and welding may be produced in UPXO.

Data-driven materials modelling

Large ensembles of statistically representative microstructures can be generated and analysed, supporting machine-learning approaches and surrogate modelling.

Research in grain growth kinetics

Researchers can take advantage of the easy to use pipelines and templates to run existing or custom Pott's model Monte-Carlo simulation algorithms. The frameworks provide multiple entry points to study the grain growth kinetics, such as (a) Energetics (b) Ensemble properties of space partitioning (statistical - morphological, topological and spatial)


Cite As

If you use UPXO in your research, please cite:

Sunil Anandatheertha, Vikram Phalke, Eralp Demir, Chris Hardie, UKAEA Poly-XTAL operations (UPXO V1.0): An open-source Python package for generating, assessment and meshing of poly-crystalline grain structures, SoftwareX, Volume 34, 2026, 102736, ISSN 2352-7110, https://doi.org/10.1016/j.softx.2026.102736

@article{anandatheertha2026upxo1pnt1,
  title   = {UKAEA Poly-XTAL operations (UPXO V1.0): An open-source Python package for
             generating, assessment and meshing of poly-crystalline grain structures},
  author  = {Anandatheertha, Sunil and Phalke, Vikram and Demir, Eralp and Hardie, Chris},
  journal = {SoftwareX},
  volume  = {34},
  pages   = {102736},
  year    = {2026},
  issn    = {2352-7110},
  doi     = {10.1016/j.softx.2026.102736}
}

Need Help Getting Started?

If you are from an academic institution and feel UPXO could be useful to your project or use case, and need personal help, don't hesitate to contact Dr. Sunil Anandatheertha — I will be happy to help you set up and offer help in using UPXO.

📧 vaasu.anandatheertha@ukaea.uk


License

UPXO is distributed under the GNU General Public License v3.0 (GPL-3.0) for open-source and academic use.

Companies, industrial users, and other organisations wishing to use UPXO in commercial or proprietary applications may obtain a separate commercial license.

For commercial licensing enquiries, please contact:

Additional licensing information is provided in COMMERCIAL.md.

Metadata

Release files for upxo 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upxo 1.2.1
File Size Uploaded
upxo-1.2.1.tar.gz 2.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for upxo 1.2.1
File Interpreter ABI Platform
upxo-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 MB

Release files / upxo-1.2.1.tar.gz

Download URL upxo-1.2.1.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
901f32c8d12558dd6a9a7ee46d27c206922a169f1dfd54143db2985afdd0a771
BLAKE2b-256 checksum
How to use checksums
4d6aae5c21e9c1cc83c7f218ee6d6bc586584f0f2ab3143e3aa6494da99c7b2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / upxo-1.2.1-py3-none-any.whl

Download URL upxo-1.2.1-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bb2ca499252efdd4bb3e9e48cc5307929a20f2eea7ed5f3a3c4242d857c44b9e
BLAKE2b-256 checksum
How to use checksums
f6e7ead9208d5d902bfec139defb1efd56fe510f4e3e0d44f13f1320acaf349f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.1

2 release files

1.3.0

2 release files

This release

1.2.1 This release

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page