{"id":30907109,"url":"https://github.com/shimwell/neutronics_geomentry_comparision_simulation","last_synced_at":"2025-09-09T12:08:46.845Z","repository":{"id":41971962,"uuid":"477016511","full_name":"shimwell/neutronics_geomentry_comparision_simulation","owner":"shimwell","description":"The same neutronics geometry made using Constructive Solid Geometry (CSG) and DAGMC faceteted surface mesh at different resolutions to compare simulation results  ","archived":false,"fork":false,"pushed_at":"2022-04-21T10:40:57.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-12T17:43:48.152Z","etag":null,"topics":["csg","dagmc","geometry","mesh","neutronics","simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shimwell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-02T10:06:01.000Z","updated_at":"2022-04-03T21:44:38.000Z","dependencies_parsed_at":"2022-08-11T00:21:08.258Z","dependency_job_id":null,"html_url":"https://github.com/shimwell/neutronics_geomentry_comparision_simulation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/shimwell/neutronics_geomentry_comparision_simulation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimwell%2Fneutronics_geomentry_comparision_simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimwell%2Fneutronics_geomentry_comparision_simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimwell%2Fneutronics_geomentry_comparision_simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimwell%2Fneutronics_geomentry_comparision_simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimwell","download_url":"https://codeload.github.com/shimwell/neutronics_geomentry_comparision_simulation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimwell%2Fneutronics_geomentry_comparision_simulation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274292948,"owners_count":25258173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csg","dagmc","geometry","mesh","neutronics","simulation"],"created_at":"2025-09-09T12:08:39.671Z","updated_at":"2025-09-09T12:08:46.835Z","avatar_url":"https://github.com/shimwell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nThis example simulates a simplified model of an inertial confinement fusion reactor using two different neutronics geometries method.\n\n- A CAD model is made and automatically converted to a DAGMC geometry that is then used in OpenMC for a neutronics simulation.\n- A Constructive Solid Geometry (CSG) is made made in OpenMC and used for a neutronics simulation directly.\n\n\n# Prerequisites\n\nThis minimal example makes use of Conda to manage and install the packages.\n\nYou will need one of these conda distributions to be installed or work within a [Docker image](https://hub.docker.com/r/continuumio/miniconda3)\n\n- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)\n\n- [Anaconda](https://www.anaconda.com/)\n\n- [Miniforge](https://github.com/conda-forge/miniforge)\n\n- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)\n\n# First clone the repository\n```bash\ngit clone https://github.com/shimwell/neutronics_geomentry_comparision_simulation.git\ncd neutronics_geomentry_comparision_simulation\n```\n\n# Making the DAGMC model for OpenMC and Shift\n\nMake an environment for the model preparation\n```\nconda env create -f environment_cad.yml\nconda activate env_cad\n```\n\nThen run the script for making the DAGMC model.\n```bash\npython scripts/1_create_dagmc_geometry.py\n```\n\nOptionally you can inspect the DAGMC file at this stage by converting the h5m file to a vtk file and opening this with [Paraview](https://www.paraview.org/). There should be several h5m made, this example command converts just one of them. The geometries made for Shift should have graveyards while the openmc one won't.\n```\nmbconvert dagmc_10_openmc.h5m dagmc_10_openmc.vtk\nparaview dagmc.vtk\n```\n![DAGMC model image](https://user-images.githubusercontent.com/8583900/159698979-3665e14b-ca42-4df2-8a1e-deee6597efc0.png)\n\n# Simulating the model in OpenMC\n\nFirst make an environment for simulation.\n\n```\nconda env create -f environment_neutronics.yml\nconda activate env_neutronics\n```\n\nMake the DAGMC geometry\n```\npython scripts 1_create_dagmc_geometry.py\n```\n\nThen run the DAGMC simulation which will produce a statepoint file that contains the simulation outputs.\n```bash\npython python scripts/2_openmc_simulation_with_dagmc_geometry.py\n```\n\nThen run the CSG simulation which will produce a statepoint file that contains the simulation outputs.\n```bash\npython python scripts scripts/3_openmc_simulation_with_csg_geometry.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimwell%2Fneutronics_geomentry_comparision_simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimwell%2Fneutronics_geomentry_comparision_simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimwell%2Fneutronics_geomentry_comparision_simulation/lists"}