Skip to main content

Meshing library for nuclear workflows.

Project description

https://github.com/Thea-Energy/stellarmesh/raw/main/docs/logo.png

Tests PyPI Version Conda Version

Stellarmesh is a meshing library for nuclear workflows. Principally, it supports the creation of DAGMC geometry from CAD models.

Features:

  • ✅ Import of CadQuery, build123d, STEP and BREP geometry

  • ✅ Surface and volume meshing

  • ✅ Gmsh and OpenCASCADE meshing backends

  • ✅ Linear and angular mesh tolerances

  • ✅ Surface boundary conditions

  • ✅ Imprinting and merging of conformal geometry

  • ✅ Mesh refinement

  • ✅ Programmatic manipulation of .h5m tags

  • ✅ Automated testing and integration

Getting Started

Example

import build123d as bd
import stellarmesh as sm

solids = [bd.Solid.make_torus(1000, 100)]
for _ in range(3):
    solids.append(bd.Solid.thicken(solids[-1].faces()[0], 100))
solids = solids[1:]

geometry = sm.Geometry(solids[::-1], material_names=["a", "a", "c"])
mesh = sm.SurfaceMesh.from_geometry(
    geometry, sm.GmshSurfaceOptions(min_mesh_size=50, max_mesh_size=200)
)
mesh.write("test.msh")
mesh.render("docs/torus-mesh-reversed.png", rotation_xyz=(90, 0, -90), normals=15)

h5m = sm.DAGMCModel.from_mesh(mesh)
h5m.write("dagmc.h5m")
h5m.write("dagmc.vtk")
Rendered mesh with normals.

Acknowledgements

Stellarmesh is originally a project of Thea Energy, who are building the world’s first planar coil stellarator.

https://github.com/user-attachments/assets/37b9ba1c-b22c-4837-b226-a6212854127e

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stellarmesh-1.1.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stellarmesh-1.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file stellarmesh-1.1.0.tar.gz.

File metadata

  • Download URL: stellarmesh-1.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stellarmesh-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ae62b8ab4c0a6bf578fc56d59498404e4cdcfd805b8dbb18aefbb619b32b044b
MD5 51f47e9a2f75a40fdb472cb873e59594
BLAKE2b-256 66ee1bcd83b042efe445b3265fd48380cc35b07ecfcec23ccc8ab199a9636969

See more details on using hashes here.

Provenance

The following attestation bundles were made for stellarmesh-1.1.0.tar.gz:

Publisher: release.yml on stellarmesh/stellarmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stellarmesh-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: stellarmesh-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stellarmesh-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54bb223311821e7cd09869af3adc5a064edcc2d2ee2c8bf86a4544318b4087bd
MD5 90f87af22300f18b1c4cd2253c3203e5
BLAKE2b-256 ea1892442d72bcd41794b7ded6748cc13d195aafe799e9063374a16c00a52c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for stellarmesh-1.1.0-py3-none-any.whl:

Publisher: release.yml on stellarmesh/stellarmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page