cad-to-dagmc 0.9.9__py3-none-any.whl → 0.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,179 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: cad_to_dagmc
3
- Version: 0.9.9
4
- Summary: Converts CAD files to a DAGMC h5m file
5
- Author-email: Jonathan Shimwell <mail@jshimwell.com>
6
- Project-URL: Homepage, https://github.com/fusion-energy/cad_to_dagmc
7
- Project-URL: Bug Tracker, https://github.com/fusion-energy/cad_to_dagmc/issues
8
- Keywords: dagmc,geometry,plot,slice
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: trimesh
16
- Requires-Dist: networkx
17
- Requires-Dist: cadquery>=2.5.2
18
- Requires-Dist: numpy
19
- Requires-Dist: gmsh
20
- Provides-Extra: tests
21
- Requires-Dist: pytest; extra == "tests"
22
- Requires-Dist: vtk; extra == "tests"
23
- Requires-Dist: assembly-mesh-plugin; extra == "tests"
24
- Dynamic: license-file
25
-
26
-
27
- [![N|Python](https://www.python.org/static/community_logos/python-powered-w-100x40.png)](https://www.python.org)
28
-
29
- [![CI with Conda install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_conda_install.yml) Testing package and running examples with dependencies installed via Conda
30
-
31
- [![CI with pip install](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_pip_install.yml) Testing package and running examples with dependencies installed vua PIP
32
-
33
- [![CI with model benchmark zoo](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml/badge.svg?branch=main)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/ci_with_benchmarks.yml) Testing with [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo)
34
-
35
- [![Upload Python Package](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/python-publish.yml/badge.svg)](https://github.com/fusion-energy/cad_to_dagmc/actions/workflows/python-publish.yml)
36
-
37
- [![PyPI](https://img.shields.io/pypi/v/cad_to_dagmc?color=brightgreen&label=pypi&logo=grebrightgreenen&logoColor=green)](https://pypi.org/project/cad_to_dagmc/)
38
-
39
-
40
- A minimal package that converts CAD geometry to [DAGMC](https://github.com/svalinn/DAGMC/) (h5m) files, [unstructured mesh](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.UnstructuredMesh.html) files (vtk) and Gmsh (msh) files ready for use in neutronics simulations.
41
-
42
- cad-to-dagmc can create DAGMC compatible:
43
- - surface meshes / faceted geometry / triangular meshes
44
- - unstructured mesh / tetrahedral meshes / volume meshes
45
-
46
- cad-to-dagmc can convert the following in to DAGMC compatible meshes:
47
- - STEP files
48
- - CadQuery objects (optionally use names as material tags)
49
- - Gmsh meshes (optionally use physical groups as material tags)
50
-
51
- Cad-to-dagmc offers a wide range of features including.
52
- - Geometry scaling with ```scale_factor``` argument
53
- - Direct surface meshing of CadQuery geometry with ```tolerance``` and ```angular_tolerance``` arguments (avoids using Gmsh)
54
- - Model wide mesh Gmsh size parameters with ```min_mesh_size``` and ```max_mesh_size``` arguments
55
- - Volume specific mesh sizing parameters with the ```set_size``` argument
56
- - Unstructured mesh that share the same coordinates as the surface mesh.
57
- - Volume mesh allows selecting individual volumes in the geometry.
58
- - Parallel meshing to quickly mesh the geometry using multiple CPU cores
59
- - Imprint and merging of CAD geometry, or disable with the ```imprint``` argument
60
- - Add geometry from multiple sources ([STEP](http://www.steptools.com/stds/step/) files, [CadQuery](https://cadquery.readthedocs.io) objects and [Gmsh](https://gmsh.info/) meshes)
61
- - Ability to tag the DAGMC implicit complement material using the ```implicit_complement_material_tag``` argument
62
- - Selected different Gmesh mesh algorithms (defaults to 1) using the ```mesh_algorithm``` argument
63
- - Pass CadQuery objects in memory for fast transfer of geometry using the ```method``` argument
64
- - Easy to install with [pip](https://pypi.org/project/cad-to-dagmc/) and [Conda/Mamba](https://anaconda.org/conda-forge/cad_to_dagmc)
65
- - Well tested both with [CI unit tests](https://github.com/fusion-energy/cad_to_dagmc/tree/main/tests), integration tests and the CSG [Model Benchmark Zoo](https://github.com/fusion-energy/model_benchmark_zoo).
66
- - Access to the Gmsh mesh to allow user to define full set of mesh parameters
67
- - Option to use Gmsh physical groups as material tags
68
- - Compatibly with [assembly-mesh-plugin](https://github.com/CadQuery/assembly-mesh-plugin) (see examples)
69
- - Compatible with [Paramak](https://github.com/fusion-energy/paramak) geometry for fusion simulations.
70
-
71
-
72
- # Installation options
73
-
74
- - Install using Mamba
75
- - Install using Conda
76
- - Install using pip
77
-
78
- ## Install using Mamba
79
-
80
- In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
81
- - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
82
- - [Anaconda](https://www.anaconda.com/download)
83
- - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
84
-
85
- This example assumes you have installed the Miniforge option or separately have installed Mamba with ```conda install -c conda-forge mamba -y```
86
-
87
- Create a new environment, I've chosen Python 3.10 here but newer versions are
88
- also supported.
89
- ```bash
90
- mamba create --name new_env python=3.10 -y
91
- ```
92
-
93
- Activate the environment
94
- ```bash
95
- mamba activate new_env
96
- ```
97
-
98
- Then you can install the cad_to_dagmc package
99
- ```bash
100
- mamba install -y -c conda-forge cad_to_dagmc
101
- ```
102
-
103
- ## Install using Conda
104
-
105
- In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
106
- - [Miniforge](https://github.com/conda-forge/miniforge) (recommended as it includes mamba)
107
- - [Anaconda](https://www.anaconda.com/download)
108
- - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
109
-
110
- Create a new environment, I've chosen Python 3.10 here but newer versions are
111
- also supported.
112
- ```bash
113
- conda create --name new_env python=3.10 -y
114
- ```
115
-
116
- Activate the environment
117
- ```bash
118
- conda activate new_env
119
- ```
120
-
121
- Then you can install the cad_to_dagmc package
122
- ```bash
123
- conda install -y -c conda-forge cad_to_dagmc
124
- ```
125
-
126
- ## Install using pip and source compilations
127
-
128
- It is also possible to avoid the use of conda/mamba and installing using pip.
129
-
130
- First ensure hdf5 is installed as this is needed by MOAB pip install command
131
-
132
- ```
133
- sudo apt-get install libhdf5-dev
134
- ```
135
-
136
- Then install MOAB, currently available from the repo.
137
-
138
- ```
139
- pip install git+https://bitbucket.org/fathomteam/moab/
140
- ```
141
-
142
- Then you can install the cad_to_dagmc package with ```pip```
143
-
144
- ```bash
145
- pip install cad_to_dagmc
146
- ```
147
-
148
- ## Install with OpenMC or other particle transport codes
149
-
150
- 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](https://svalinn.github.io/DAGMC/).
151
-
152
- To install OpenMC you can run ```mamba 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
153
- ```bash
154
- mamba install -c conda-forge -y "openmc=0.15.2=dagmc*nompi*"
155
- ```
156
-
157
- You could also install using this [wheel repo](https://github.com/shimwell/wheels)
158
-
159
- Another option would be to [install OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which would also need compiling with MOAB and DAGMC options.
160
-
161
-
162
- # Known incompatibilities
163
-
164
- The package requires newer versions of Linux. For example the package does not work on Ubuntu 18.04 or older.
165
-
166
- The package requires newer versions of pip. It is recommended to ensure that your version of pip is up to date. This can be done with ```python -m pip install --upgrade pip```
167
-
168
- Installing one of the package dependancies (Gmsh) with pip appears to result in errors when passing cad objects in memory between cadquery / ocp and gmsh. The default method of passing cad objects is via file so this should not impact most users. The conda install gmsh appears to work fine with in memory passing of cad objects as the version of OCP matches between Gmsh and CadQuery.
169
-
170
-
171
- # Usage
172
-
173
- For examples showing creation of DAGMC h5m files, vtk files and usage within OpenMC transport code see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
174
-
175
- For more examples see the CAD tasks in the [neutronics-workshop](https://github.com/fusion-energy/neutronics-workshop) and [model benchmark zoo](https://github.com/fusion-energy/model_benchmark_zoo)
176
-
177
- # Related software
178
-
179
- Also checkout these other software projects that also create DAGMC geometry [CAD-to-OpenMC](https://github.com/openmsr/CAD_to_OpenMC), [Stellarmesh](https://github.com/Thea-Energy/stellarmesh) and [Coreform Cubit](https://coreform.com/products/coreform-cubit/).
@@ -1,9 +0,0 @@
1
- _version.py,sha256=ICJcCYYRydywQ4LYVoe5Hg1g5gm82yoqqH0yhtrP2aM,704
2
- cad_to_dagmc/__init__.py,sha256=oCr1P0QnBsf6AH0RZujX7T7tdrb75NazdF70HtqXSfc,528
3
- cad_to_dagmc/core.py,sha256=i9CfNmDBCGati5YzfSA9ymwcgxeleDDN71ge5laxjr8,44105
4
- cad_to_dagmc/direct_mesh_plugin.py,sha256=iKPYtWQd35Ipxv6g8fZ-r7GFKd1VlCwrSfaNzrGFtf0,24131
5
- cad_to_dagmc-0.9.9.dist-info/licenses/LICENSE,sha256=B8kznH_777JVNZ3HOKDc4Tj24F7wJ68ledaNYeL9sCw,1070
6
- cad_to_dagmc-0.9.9.dist-info/METADATA,sha256=xhzOG-Pb2wBJB5_wHaMhNxRIREnJxVqslrFrFUlaLf0,8994
7
- cad_to_dagmc-0.9.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- cad_to_dagmc-0.9.9.dist-info/top_level.txt,sha256=zTi8C64SEBsE5WOtPovnxhOzt-E6Oc5nC3RW6M_5aEA,22
9
- cad_to_dagmc-0.9.9.dist-info/RECORD,,