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 (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. They are maintained in the separate UPXO-demos repository (MIT license); 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.3.0

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.3.0
File Size Uploaded
upxo-1.3.0.tar.gz 2.5 MB Details

Built distribution (wheel)

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

Total release size: 5.2 MB

Release files / upxo-1.3.0.tar.gz

Download URL upxo-1.3.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
03fe511a02c86d59d41fd23b51693d184fc088625924f82714753a4312d9e6bf
BLAKE2b-256 checksum
How to use checksums
0a6986f0f371b2e454f89e0f0622c82d5e6d1ba60b3d1e4028b58ab58c45de7d
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 Oct 6, 2026.

Transparency log

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

Download URL upxo-1.3.0-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7de99d97bcb91b86f4f0960b95bd773ac8ac9e581f1c44c1f568d756a78c4a83
BLAKE2b-256 checksum
How to use checksums
c40fb3dcf0c11ebf2b13d364bcc0f5904e8db4cb45732363791d22d1897efb8b
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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.1

2 release files

This release

1.3.0 This release

2 release files

1.2.1

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