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

Construct optical photon physics cross section tables #1300

Open
sethrj opened this issue Jun 30, 2024 · 2 comments
Open

Construct optical photon physics cross section tables #1300

sethrj opened this issue Jun 30, 2024 · 2 comments
Assignees
Labels
physics Particles, processes, and stepping algorithms

Comments

@sethrj
Copy link
Member

sethrj commented Jun 30, 2024

Split off from #886 . I think this could be a good opportunity to explore a new design for building physics tables that can be extended to satisfy #907 and #253 .

First, I think to keep the Model (or OpticalVolumeProcess) interface simple, we should have a single virtual method that takes or returns a relatively complicated object for the cross section construction. In ORANGE, for constructing surfaces and numerous other data structures from a "Solid" factory object, the model of passing in a Builder class (which has wrappers for the various CollectionBuilder methods) has worked really well.

So perhaps our class would have:

virtual void build(XsBuilder&) const = 0;

and XsBuilder would have:

  • Accessors for getting the optical material data, properties, cutoffs, etc.
  • Internally a GenericGridBuilder for adding the cross section data
  • A method like insert_xs(OpticalMaterialId, SpanReal energy, SpanReal xs) with error checking to make sure that it's called once per material for all materials

Then during construction, the OpticalPhysics will:

  • Construct a temporary XsBuilder
  • Loop over all OpticalVolumeProcess to construct the XS data
  • Generate total cross sections, etc.
@sethrj sethrj added the physics Particles, processes, and stepping algorithms label Jun 30, 2024
@hhollenb
Copy link
Contributor

hhollenb commented Jul 3, 2024

I made a rough draft of an idea I had for splitting out some of the builder functionality:

hhollenb#1

I'm not fully happy with it, but there might be something there that could be refactored into something useful.

@sethrj
Copy link
Member Author

sethrj commented Jul 3, 2024

Thanks @hhollenb ! There are some good ideas there but I'm not sure how we can make them reusable/general without sacrificing clarity/robustness...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physics Particles, processes, and stepping algorithms
Projects
Status: No status
Development

No branches or pull requests

2 participants