polygontorus
a tool for creating axially symetric CSG geometry
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.3%) to scientific vocabulary
Keywords
Repository
a tool for creating axially symetric CSG geometry
Basic Info
Statistics
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
PolygonTorus
Is a tool for creating axially symmetric CSG geometry. By revolving polygons around an axis, we get toroids -- a torus-like surface, which is a composite of conical, planar and cylindrical surfaces.
Below is an example of an ITER-like simplified model generated with PolygonTorus. This is a fully CSG model consiting of only 9 cells and 309 surfaces.

Currently it generates CSG geometry for openMC and MCNP. When generating MCNP geometry the tool can be used by itself, whereas when generating openMC geometry, openMC is used for the construction of surfaces and regions.
The tool is in its early stages:
* There are two separate modules for openMC and MCNP inputs.
* Code is not well documented.
* For MCNP: The tool generates only regions. The generation of cells is made easier with the split_into_lines() function, but is still cumbersome.
For a theoretical explanation see polygontorus_presentation.pdf. For examples see examples folder.
Features
Offset(): Because of its robust definition of geometry this tool can be used for arbitrarily thin layers. When generating thick layers inside the shells (negative offset), caution should be used since vertices may get deleted.
Known limitations
- Generation of a Polygon with many vertices in MCNP. This can result in a region definition that is too big for MCNP (MCNP 5.16 was tested).
- The
split_into_lines()function is buggy at times. - Supports only convex polygons. Region splitting should be implemented (also to ensure cell definitions are more simple - see 1st limitation).
Ongoing activities
- Performance assessment of polygon torus vs. toroidal surfaces
- Better MCNP workflow
Similar work
Recently, the creation of an axially symmetric CSG geometry from a revolved polygon defined with vertices has been achieved by multiple parties, independently: * OceanNuclear for bluemira * the team at Southwestern Institute for Physics * others?
Ideally, this method would be incorporated into openmc. In the mean time I plan to develop some more features, and make it more eficently use surfaces.
A similar feature has already been implemented in openmc openmc.model.Polygon. The openmc feature nicely handles non-convex polygons.
Owner
- Name: ijs-f8
- Login: ijs-f8
- Kind: organization
- Repositories: 1
- Profile: https://github.com/ijs-f8
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Fortuna
given-names: Mark
orcid: https://orcid.org/0000-0002-4629-357X
title: "PolygonTorus: A tool for creating axially symmetric CSG geometry."
url: "https://github.com/mark-fortuna/polygontorus"
version: 0.0.1
date-released: 2025-05-30
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2