brep-to-h5m
Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations
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 (9.3%) to scientific vocabulary
Keywords from Contributors
Repository
Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations
Basic Info
- Host: GitHub
- Owner: fusion-energy
- License: mit
- Language: Python
- Default Branch: main
- Size: 149 KB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 3
- Releases: 5
Metadata Files
README.md
breptoh5m
A Python package that converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations.
The method uses gmsh to create a conformal mesh of the geometry. The mesh is then converted into a h5m file using either the vertices-to-h5m (default) or stl-to-h5m package.
Installation (Conda)
Create a new enviroment and activate the enviroment.
bash
conda create --name my_env
conda activate my_env
Then install this package
bash
conda install -c fusion-energy -c conda-forge brep_to_h5m
The above command should also install moab and gmsh
Installation (Conda + pip)
Create a new enviroment and activate the enviroment.
bash
conda create --name my_env
conda activate my_env
Install dependancies that are not installed with pip (MOAB and GMSH)
bash
conda install -c conda-forge moab
conda install -c conda-forge gmsh
conda install -c conda-forge python-gmsh
Then install this package
bash
pip install brep_to_h5m
Usage
See the examples folder for a complete workflow from geometry creation to conversion to h5m and then use in and OpenMC simulation.
To make a Brep file with merged surfaces consider using the Paramak as it has a export_brep method that merges the shared surfaces for Brep files.
Starting with a Brep file that has shared surfaces the following command should produce a DAGMC compatible h5m file.
```python from breptoh5m import breptoh5m
breptoh5m( brepfilename='mybrepfilewithmergedsurfaces.brep', materialtags=[ 'materialforvolume1', 'materialforvolume2', 'materialforvolume3', 'materialforvolume4', 'materialforvolume5', 'materialforvolume6', 'materialforvolume7', 'materialforvolume8', ], h5mfilename='dagmc.h5m', minmeshsize= 30, maxmeshsize = 50, mesh_algorithm = 1, ) ```
The resulting dagmc.h5m file can now be used in neutronics simulation with DAGMC enabled transport codes.
Acknowledgement
Many thanks to @makeclean for suggesting gmsh for meshing and Brep for the CAD file format. Also for showing the way forwards by starting gmsh2dagmc.
Owner
- Name: Fusion Energy
- Login: fusion-energy
- Kind: organization
- Repositories: 29
- Profile: https://github.com/fusion-energy
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" title: "BRep_to_h5m - Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations." version: 0.3.1 date-released: 2022-3-23 url: "https://github.com/fusion-energy/brep_to_h5m"
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 125
- Total Committers: 3
- Avg Commits per committer: 41.667
- Development Distribution Score (DDS): 0.136
Top Committers
| Name | Commits | |
|---|---|---|
| Jonathan Shimwell | m****l@j****m | 108 |
| shimwell | s****l@u****m | 16 |
| Jonathan Shimwell | d****l@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 9
- Total pull requests: 32
- Average time to close issues: 4 months
- Average time to close pull requests: 5 days
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 2.33
- Average comments per pull request: 0.13
- Merged pull requests: 32
- 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
- shimwell (7)
- RemDelaporteMathurin (2)
Pull Request Authors
- shimwell (32)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 86 last-month
- Total dependent packages: 2
- Total dependent repositories: 1
- Total versions: 12
- Total maintainers: 2
pypi.org: brep-to-h5m
Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations
- Homepage: https://github.com/fusion-energy/brep_to_h5m
- Documentation: https://brep-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.4.2
published over 3 years ago
Rankings
Maintainers (2)
Dependencies
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- stefanzweifel/git-auto-commit-action v4 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- mcr.microsoft.com/vscode/devcontainers/miniconda 0-3 build
- networkx *
- stl_to_h5m *
- trimesh *
- vertices_to_h5m *
