Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying pip install cq from commit #27

Merged
merged 6 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ models (CSG) for comparing neutronics simulations with both geometry types.

| Model | Testing Status |
|---|---|
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374951-5e711a8b-a3db-4476-8f56-03a620d74b93.png" width="100"></p> | [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374950-ef8696dd-adbc-4fd8-bd44-c5304e1d0709.png" width="100"></p> | [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374954-20dee8fb-5199-4fc2-86a7-00452b6bdc89.png" width="100"></p> | [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374951-5e711a8b-a3db-4476-8f56-03a620d74b93.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374950-ef8696dd-adbc-4fd8-bd44-c5304e1d0709.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374954-20dee8fb-5199-4fc2-86a7-00452b6bdc89.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/262374945-aea2582b-1d5f-40b1-a77b-bef79dce50da.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/284880533-c18e3345-52ec-4253-baa8-e1dbe2a52944.png" width="100"></p> | [![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) |
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/nestedcylinder.png" width="100"></p> | [![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) |
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/circulartorus.png" width="100"></p> | [![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)|
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/ellipticaltorus.png" width="100"></p> | [![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)|
| <p align="center"><img src="https://user-images.githubusercontent.com/8583900/284880533-c18e3345-52ec-4253-baa8-e1dbe2a52944.png" width="100"></p> | [![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) <br> [![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)|
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/nestedcylinder.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/circulartorus.png" width="100"></p> | [![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) <br> [![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) |
| <p align="center"><img src="https://raw.githubusercontent.com/fusion-energy/model_benchmark_zoo/main/examples/ellipticaltorus.png" width="100"></p> | [![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) <br> [![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

Expand Down Expand Up @@ -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```
Expand Down
2 changes: 1 addition & 1 deletion src/model_benchmark_zoo/sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/model_benchmark_zoo/two_touching_cuboids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading