fusion-energy / neutronics-workshop

A workshop covering a range of fusion relevant analysis and simulations with OpenMC, DAGMC, Paramak and other open source fusion neutronics tools
MIT License
111 stars 50 forks source link

Adding meshsource example with a regular mesh #278

Closed shimwell closed 3 months ago

shimwell commented 4 months ago

this example shows users how to make a mesh source using a cylindrical mesh and a source term for each voxel.

this is a minimal example but a more realistic example could use the voxel location to look up properties of the plasma at each coordinate and customize the source energy and strength at each mesh voxel location

this could be combined with a function that looks up the location properties in the plasma and customizes (e.g temperature, strength) the source at that mexh voxel location for each source. For now I've put in a simple filter to set voxels with a radius below a limit to strength = 0

meshsource was added recently to the openmc develop branch and will be in the next release (which should be before TOFE conference)

Screenshot from 2024-03-29 22-38-17

shimwell commented 4 months ago

CI error failing is unrelated, I will fix in anther PR CadToDagmc.add_cadquery_object() got an unexpected keyword argument 'material_tags'