Skip to content

About

This is a package grouping a set of useful routines to manipulate/analyse/modify CAD files in SpaceClaim environment.

Resources

Stars

7 stars

Watchers

4 watching

Forks

Repository files navigation

GitHub last commit GitHub issues PyPI

RadModeling

RadModeling

RadModeling prepares CAD models for Monte Carlo radiation transport and checks the MCNP geometry obtained from them. It is a Python package with a command line tool, radmod, plus a few thin SpaceClaim tools for the interactive part of the work.

machine.step ──radmod init──▶ machine_simplified.step + machine_registry.csv
                                   │
                    simplify in SpaceClaim (or any CAD program)
                                   │
machine_simplified.step ──radmod check──▶ volumes, tori, splines, invalid solids
                        ──radmod export─▶ machine_export.step
                                   │
                         GEOUNED (or another converter)
                                   │
machine_export.mcnp ──radmod compare───▶ CAD vs MCNP volumes, density correction factors
                    ──radmod materials─▶ materials and densities in the cells
                    ──radmod slice─────▶ slice plots with the CAD overlaid
                    ──radmod atlas─────▶ PDF of slices: whole model + every problem
  • Stable component IDs: tags like Pump casing [rm12] in the component names survive any CAD program, so simplified models always match the original components.
  • One registry: an Excel-friendly CSV with materials, densities, volumes and density correction factors.
  • CAD vs MCNP comparison without running MCNP: the MCNP cells are evaluated directly to measure their volumes, their disagreement with the CAD, and to plot slices with the CAD on top.
  • Geometry tools in SpaceClaim: FMESH cards from the selected boxes, toroidal elbows to mitred cylinders.
  • SpaceClaim tools published once that always run the latest installed code.

Installation

pip install radmodeling

Where the radmod executable is blocked ("Access is denied"), write python -m radmod instead, with the same arguments.

Quick start

radmod init machine.step                       # tag + registry
# fill the 'material' column of machine_registry.csv
# simplify machine_simplified.step in SpaceClaim, save it back as STEP
radmod check machine_simplified.step
radmod export machine_simplified.step
# convert machine_export.step to machine_export.mcnp with GEOUNED
radmod compare machine_export.mcnp machine_export.step
radmod materials machine_export.mcnp -l materials.toml
radmod slice machine_export_materials.mcnp machine_export.step --normal z
radmod atlas machine_export_materials.mcnp machine_export.step

Every command finds machine_registry.csv next to its input files (-r gives another one). SpaceClaim tools: radmod spaceclaim-loaders <folder> and publish the loaders once.

Full documentation: https://radmodeling.readthedocs.io

License

Copyright 2019 F4E | European Joint Undertaking for ITER and the Development of Fusion Energy (‘Fusion for Energy’). Licensed under the EUPL, Version 1.2 (the “Licence”); see LICENSE. You may not use this work except in compliance with the Licence. Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an “AS IS” basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence.

About

This is a package grouping a set of useful routines to manipulate/analyse/modify CAD files in SpaceClaim environment.

Resources

Stars

7 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages