stl-to-h5m

Convert non overlapping STL files into a DAGMC h5m file complete with material tags and ready for use in neutronics simulations.

https://github.com/fusion-energy/stl_to_h5m

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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary

Keywords

cad dagmc h5m neutronics openmc stl

Keywords from Contributors

neutron photon fispact mcnp serpent cross h5 section conversion convert
Last synced: 6 months ago · JSON representation ·

Repository

Convert non overlapping STL files into a DAGMC h5m file complete with material tags and ready for use in neutronics simulations.

Basic Info
  • Host: GitHub
  • Owner: fusion-energy
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 64.5 KB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 4
Topics
cad dagmc h5m neutronics openmc stl
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

N|Python

CI with install

Upload Python Package anaconda-publish

conda-publish PyPI

This is a minimal Python package that provides a Python API interfaces for converting multiple STL files into a DAGMC h5m file ready for use in simulation.

Convert STL files to a DAGMC h5m file complete with material tags and ready for use neutronics simulations.

warning this approach does not imprint and merge the geometry and therefore requires that the STL files do not overlap. Overlaps could lead to particles being lost during transport. If imprinting and merging is required consider using Paramak exportdagmch5m() method or cad-to-h5m to make the DAGMC geometry.

It is strongly advised to used the DAGMC overlap checker to check the resulting h5m file (see checking for overlaps section below).

Installation - Conda

This single line command should install the package and dependencies (including moab)

bash conda install -c fusion-energy -c fusion-energy stl_to_h5m

Installation - Pip + Conda

These two commands should install the package and dependencies. Moab requires a separate install as it is not available on pip

bash conda install -c conda-forge moab pip install stl_to_h5m

Usage - single file

To convert a single STL file into a h5m file. This also tags the volume with the material tag m1.

```python from stltoh5m import stltoh5m

stltoh5m( fileswithtags=[('part1.stl', 'mat1')], h5m_filename='dagmc.h5m', ) ```

Usage - multiple files

To convert multiple STL files into a h5m file. This also tags the relevant volumes with material tags called m1 and m2.

```python from stltoh5m import stltoh5m

stltoh5m( fileswithtags=[ ('part1.stl', 'mat1'), ('part2.stl', 'mat2') ], h5m_filename='dagmc.h5m' ) ```

Usage - checking for overlaps

To check for overlaps in the resulting h5m file one can use the DAGMC overlap checker. -p is the number of points to check on each line

bash conda install -c conda-forge dagmc overlap_check dagmc.h5m -p 1000

Acknowledgments

This package is largely based on a script by @pshriwise

Owner

  • Name: Fusion Energy
  • Login: fusion-energy
  • Kind: organization

A collection of software projects related to fusion energy

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Shimwell"
  given-names: "Jonathan"
  orcid: "https://orcid.org/0000-0001-6909-0946"
- family-names: "Shriwise"
  given-names: "Patrick"
  orcid: "https://orcid.org/0000-0002-3979-7665"
title: "Stl-to-5m: Convert non overlapping STL files into a DAGMC h5m file complete with material tags and ready for use in neutronics simulations."
version: 0.0.2
date-released: 2021-910-1
url: "https://github.com/fusion-energy/stl_to_h5m"

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 70
  • Total Committers: 4
  • Avg Commits per committer: 17.5
  • Development Distribution Score (DDS): 0.086
Top Committers
Name Email Commits
Jonathan Shimwell m****l@j****m 64
shimwell s****l@u****m 3
autopep8 a****8@u****m 2
Jonathan Shimwell d****l@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 17
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.29
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • shimwell (17)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 114 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 10
  • Total maintainers: 2
pypi.org: stl-to-h5m

Converts STL files to a DAGMC h5m file using PyMoab

  • Homepage: https://github.com/fusion-energy/stl_to_h5m
  • Documentation: https://stl-to-h5m.readthedocs.io/
  • License: MIT License Copyright (c) 2021 Fusion Energy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.2.3
    published over 3 years ago
  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 114 Last month
Rankings
Dependent packages count: 4.8%
Forks count: 19.1%
Average: 19.3%
Dependent repos count: 21.5%
Downloads: 23.2%
Stargazers count: 27.8%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/anaconda-publish.yml actions
  • actions/checkout v2 composite
.github/workflows/black.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • stefanzweifel/git-auto-commit-action v4 composite
.github/workflows/ci_with_install.yml actions
  • actions/checkout v2 composite
.github/workflows/conda-build-test.yml actions
  • actions/checkout v2 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite