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

Add example usage of the paramak_build python package #368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinm387
Copy link
Contributor

I'm adding an example to the workflows section about how to use the paramak_build Python package. This package takes a JSON file of the FUSE dd, and creates 3D CAD models and Monte Carlo neutronics models for OpenMC or MCNP. The motivation is to have it more widely known that we have these capabilities using FUSE outputs.

Let me know if there's anything else I should add, or whether this belongs somewhere else. Thanks!

@TimSlendebroek
Copy link
Contributor

@kevinm387 can you clear the outputs of the notebook when you commit it :)?

@orso82
Copy link
Member

orso82 commented Jul 17, 2023

@kevinm387 thank you for sharing the notebook. This is very useful!!

I would suggest we move these two files in the https://github.com/ProjectTorreyPines/paramak_build repository

Once that's done I'd like to be able for someone else in the team to replicate the results. How hard would that be? Is there some documentation about how to setup the environment correctly? Where do you run the notebook? is it on OMEGA?

Thanks again!

@kevinm387
Copy link
Contributor Author

Ok, I moved the example to the paramak_build repo. My thinking behind having it here was to make it more visible, as several examples exist in paramak_build already. But you're right, it still probably makes more sense to have it in that repository.

I also added some install instructions to the readme in that repo, as well as a link to this new example. Using conda or mamba, the environment can be set up in 3 or 4 commands, though it's a little ugly. The better way would be to set up a conda recipe. Do we want to do that? Currently I usually run this on my local machine, but it should be fine to run on Omega also.

@orso82
Copy link
Member

orso82 commented Jul 18, 2023

I tried the following

mamba create --name paramak python=3.9
mamba activate paramak
mamba install -c conda-forge -c cadquery -c fusion-energy numpy scipy matplotlib dagmc_h5m_file_inspector openmc-dagmc-wrapper neutronics_material_maker openmc paramak ipykernel

but it's not working for me

Looking for: ['numpy', 'scipy', 'matplotlib', 'dagmc_h5m_file_inspector', 'openmc-dagmc-wrapper', 'neutronics_material_maker', 'openmc', 'paramak', 'ipykernel']

conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache
cadquery/osx-64                                               No change
fusion-energy/noarch                                          No change
cadquery/noarch                                               No change
fusion-energy/osx-64                                          No change

Pinned packages:
  - python 3.9.*


Encountered problems while solving:
  - nothing provides requested dagmc_h5m_file_inspector
  - nothing provides requested openmc-dagmc-wrapper
  - nothing provides brep_to_h5m needed by paramak-0.7.1-py39h4e66e75_0

thoughts?

@orso82
Copy link
Member

orso82 commented Jul 18, 2023

It appears to be an issue that there is no CONDA recipe for OSX systems (Intel nor ARM).

I tried the following on OMEGA, which seems to work (note that in your instructions you had openmc-dagmc-wrapperin the mamba install, which does not exist):

mamba create --name paramak
mamba activate paramak
mamba install -c conda-forge -c cadquery -c fusion-energy numpy scipy matplotlib dagmc_h5m_file_inspector neutronics_material_maker openmc paramak ipykernel

pip install openmc_dagmc_wrapper openmc_tally_unit_converter cad_to_h5m

@kevinm387 can you update the documentation accordingly?

I still need to try running the notebook to confirm everything works.

@kevinm387
Copy link
Contributor Author

Apologies! That mistake is now corrected.

Also, for some reason, that first mamba command installs paramak version 0.8.2 by default, which has a bug and isn't the latest version. So I added paramak=0.8.7 to the mamba install command as well.

The install process and example notebook now run fine for me with these commands. Please let me know if you run into any other issues or see anything weird!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants