Converts CAD files to a DAGMC h5m file
Project description
A minimal package that uses CadQuery functionality to convert Cad geometry to DAGMC h5m files
This particular method of producing DAGMC compatible h5m files from CAD geometry is intended to convert STP files or CadQuery objects to h5m file.
One unique feature of this package is the ability to combine STP files with CadQuery objects. This allows for the addition of parametric geometry to static geometry.
Installation
In principle, any Conda distribution will work.
Install using Conda and pip
This example uses Conda to install some dependencies that are not available via PyPi.
Create a new conda environment
conda create --name new_env python=3.9 -y
Activate the environment
conda activate new_env
Install the dependencies
conda install -c conda-forge moab multimethod typish ezdxf nptyping nlopt casadi gmsh python-gmsh ocp>=7.7.1 -y
conda install -c cadquery -c conda-forge cadquery=master --no-deps -y
Then you can install the cad_to_dagmc package with pip
pip install cad_to_dagmc
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others link to DAGMC documentation.You can run conda install -c conda-forge openmc
however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
conda install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
Install using Mamba and pip
This example uses Mamba to install some dependencies that are not available via PyPi.
Create a new conda environment, I've chosen Python 3.9 here but new versions are also supported.
conda create --name new_env python=3.9 -y
Activate the environment
mamba activate new_env
Install the dependencies
conda install -c conda-forge mamba -y
mamba install -c conda-forge moab multimethod typish ezdxf nptyping nlopt casadi gmsh python-gmsh ocp>=7.7.1 -y
mamba install -c cadquery -c conda-forge cadquery=master --no-deps -y
Then you can install the cad_to_dagmc package with pip
pip install cad_to_dagmc
You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others link to DAGMC documentation.You can run conda install -c conda-forge openmc
however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
mamba install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
Usage - creation of DAGMC h5m files
For examples see the examples folder
Usage - simulation with transport code
For examples see the CAD tasks in the neutronics-workshop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cad_to_dagmc-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21219b6e91beae9fd3ade2f0d6173d61b971e4fd43d1a28c62a0da1bacac6e44 |
|
MD5 | a49b9e9a23ec0884fb2867d8e197b892 |
|
BLAKE2b-256 | 849980d2ee792f90179989aabd13df560b2c617d10548046e13a33040458a891 |