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.
Install (Conda)
Creates a new empty Conda environment and activate it
conda create --name new_env python=3.9
conda activate new_env
Installs cad_to_dagmc and dependencies
conda install -c fusion-energy -c cadquery -c conda-forge cad_to_dagmc
Install (Mamba)
Creates a new empty Conda environment and activate it
conda create --name new_env python=3.9
conda activate new_env
Installs Mamba
conda install -c conda-forge mamba
Installs cad_to_dagmc and dependencies
mamba install -c fusion-energy -c cadquery -c conda-forge cad_to_dagmc
Install (Conda + pip)
You will need to install some dependencies that are not available via PyPi. This example uses mamba but conda could also be used.
conda install -c conda-forge mamba
mamba install -c conda-forge moab
mamba install -c conda-forge gmsh
mamba install -c conda-forge python-gmsh
mamba install -c cadquery -c conda-forge cadquery=master
Then you can install the cad_to_dagmc package with pip
pip install cad_to_dagmc
Usage
To use the h5m geometry you will need a transport code with DAGMC enabled such as OpenMC. Just to note that currently the conda install for CadQuery and OpenMC can't be installed in the same conda environment. A work around for this is to create the h5m geometry in one conda environment and simulate with OpenMC in another conda environment.
For examples see the examples folder
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.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8571ff89736a7dff2c3b079fa8fa765aad5b818ee7129b9676624b73686f269f |
|
MD5 | 45e6b1b1add9896e1ebc45aa0f2b2be5 |
|
BLAKE2b-256 | 418e1c4fa180d729ae83e6f8f961e5d1bfe4b030f6b7ce7c665460a4856c0795 |