Skip to content

Minimal example of dagmc unstructured mesh source in OpenMC #936

Answered by connoramoreno
shimwell asked this question in Q&A
Discussion options

You must be logged in to vote

Sure thing! Here's a typical fusion source definition I use. strengths is a list of source strength floats for each tetrahedron, ordered by tetrahedral ID. Let me know if you have any questions!

# Define run settings
settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.photon_transport = True
settings.particles = 10000
settings.batches = 30
settings.survival_biasing = True

# Define source mesh
mesh = openmc.UnstructuredMesh("SourceMesh.h5m", 'moab')

# Define fixed source
src = openmc.IndependentSource()
src.space = openmc.stats.MeshSpatial(
    mesh,
    strengths = strengths,
    volume_normalized = False
)
src.angle = openmc.stats.Isotropic()
src.energy = openmc.st…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@shimwell
Comment options

shimwell Jan 18, 2024
Maintainer Author

@connoramoreno
Comment options

@shimwell
Comment options

shimwell Jan 18, 2024
Maintainer Author

@connoramoreno
Comment options

Answer selected by shimwell
@shimwell
Comment options

shimwell Jan 18, 2024
Maintainer Author

@gonuke
Comment options

@pshriwise
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants