diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index ff2ec68..f992353 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -19,7 +19,8 @@ runs: sudo apt-get upgrade -y sudo apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev libpangocairo-1.0-0 mamba activate - mamba install -y -c cadquery -c conda-forge moab gmsh python-gmsh cadquery=master "openmc=0.13.3=dagmc*nompi*" + mamba install -y -c conda-forge moab gmsh python-gmsh "openmc=0.14.0=dagmc*nompi*" + pip install git+https://github.com/CadQuery/cadquery.git@79e64e557e87d63b84c1c8a60c0df8e941a1a4a1 pip install cad_to_dagmc openmc_data_downloader pip install --pre CAD_to_OpenMC openmc_data_downloader -l ENDFB-7.1-NNDC -i Fe56 Be9 diff --git a/README.md b/README.md index 9b7285d..733b3ac 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ models (CSG) for comparing neutronics simulations with both geometry types. | Model | Testing Status | |---|---| -|

| [![cuboid](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_dagmc.yml) | -|

| [![sphere](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_dagmc.yml) | -|

| [![nested_sphere](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_dagmc.yml) | +|

| [![cuboid](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_dagmc.yml)
[![cuboid - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cuboid_cad_to_openmc.yml) | +|

| [![sphere](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_dagmc.yml)
[![sphere - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/sphere_cad_to_openmc.yml) | +|

| [![nested_sphere](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_dagmc.yml)
[![nested sphere - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_sphere_cad_to_openmc.yml) | |

| [![two_touching_cuboids](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/two_touching_cuboids_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/two_touching_cuboids_cad_to_dagmc.yml)
[![two touching cuboids - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/two_touching_cuboids_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/two_touching_cuboids_cad_to_openmc.yml) | -|

| [![cylinder](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_dagmc.yml) | -|

| [![nested_cylinder](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_dagmc.yml) | -|

| [![circular_torus](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_dagmc.yml)| -|

| [![elliptical_torus](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_dagmc.yml)| +|

| [![cylinder](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_dagmc.yml)
[![cylinder - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/cylinder_cad_to_openmc.yml)| +|

| [![nested_cylinder](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_dagmc.yml)
[![nested cylinder - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/nested_cylinder_cad_to_openmc.yml) | +|

| [![circular_torus](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_dagmc.yml)
[![circular torus - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/circular_torus_cad_to_openmc.yml) | +|

| [![elliptical_torus](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_dagmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_dagmc.yml)
[![elliptical torus - cad to openmc](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_openmc.yml/badge.svg)](https://github.com/fusion-energy/model_benchmark_zoo/actions/workflows/elliptical_torus_cad_to_openmc.yml) | # Installation prerequisite @@ -39,10 +39,17 @@ Activate the environment mamba activate new_env ``` -Install the dependencies, if this fails to solve the enivornmet you could also try [installing OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which might be prefered. +Install the dependencies, if this fails to solve the environment you could also try [installing OpenMC from source](https://docs.openmc.org/en/stable/quickinstall.html) which might be prefered. ```bash -mamba install -y -c cadquery -c conda-forge moab gmsh python-gmsh cadquery=master "openmc=0.13.3=dagmc*nompi*" +mamba install -y -c conda-forge moab gmsh python-gmsh "openmc=0.14.0=dagmc*nompi*" +``` + +CadQuery should then be installed, here is the mamba command and the pip command. +If the mamba command fails to solve the environment then try the pip command as this points to a specific version (before OCP 7.7.2 was made the default). +```bash +mamba install -y -c cadquery cadquery=master +pip install git+https://github.com/CadQuery/cadquery.git@79e64e557e87d63b84c1c8a60c0df8e941a1a4a1 ``` Then you can install the cad_to_dagmc package with ```pip``` diff --git a/src/model_benchmark_zoo/sphere.py b/src/model_benchmark_zoo/sphere.py index 8d0f8d2..48546fc 100644 --- a/src/model_benchmark_zoo/sphere.py +++ b/src/model_benchmark_zoo/sphere.py @@ -12,7 +12,7 @@ def csg_model(self): cell = openmc.Cell(region=region) cell.fill = self.materials[0] geometry = openmc.Geometry([cell]) - materials = openmc.Geometry([self.materials[0]]) + materials = openmc.Materials([self.materials[0]]) model = openmc.Model(geometry=geometry, materials=materials) # TODO return openmc.model object return model diff --git a/src/model_benchmark_zoo/two_touching_cuboids.py b/src/model_benchmark_zoo/two_touching_cuboids.py index 24c61f2..56ef9fa 100644 --- a/src/model_benchmark_zoo/two_touching_cuboids.py +++ b/src/model_benchmark_zoo/two_touching_cuboids.py @@ -35,7 +35,8 @@ def csg_model(self): cell2.fill = self.materials[1] geometry = openmc.Geometry([cell1, cell2]) - model = openmc.Model(geometry=geometry) + materials = openmc.Materials([self.materials[0], self.materials[1]]) + model = openmc.Model(geometry=geometry, materials=materials) return model def cadquery_assembly(self):