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 scattering #34

Merged
merged 7 commits into from
Oct 19, 2022
Merged

Add scattering #34

merged 7 commits into from
Oct 19, 2022

Conversation

brryan
Copy link
Collaborator

@brryan brryan commented Oct 14, 2022

This PR adds scattering and mean scattering variants (gray opacity only right now) to neutrinos

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems reasonable to me. I have some nitpicky comments below. But I also wanted to bring up a few broader comments which don't need to be addressed now:

  1. Are we distinguishing between elastic and inelastic scattering here?

  2. I think we should explicitly thread the angle dependence through at least somewhat here. It'll matter for inelastic scattering especially. But even for elastic, there's angle dependence. Often written in terms of my=cos(theta)

  3. I am increasingly uncomfortable about how much boiler plate we're introducing for a variant that just turns units on and off. I wonder if there's some way to just put the units directly in the underlying cgs object? Or use compile-time inheritance? That can be a discussion for another time though.

I'm willing to merge now, @brryan but I'd prefer to thread through the angle dependence sooner rather than later.

Also would be interested to hear what @lroberts36 thinks as far as whether or not this infrastructure captures everything needed in the neutrino case.

@brryan
Copy link
Collaborator Author

brryan commented Oct 19, 2022

OK @Yurlungur I think this is ready to go now if you're happy with it. Thanks for the careful review.

@Yurlungur Yurlungur merged commit 40b82d4 into main Oct 19, 2022
@Yurlungur Yurlungur deleted the brryan/add_scattering_opac branch October 19, 2022 20:29
@lroberts36
Copy link
Collaborator

Also would be interested to hear what @lroberts36 thinks as far as whether or not this infrastructure captures everything needed in the neutrino case.

The most general objects one would need are the scattering and absorption differential cross sections per volume for species $i$, which includes inelastic scattering (with energy exchange $q_0$)
$$\frac{1}{V}\frac{d \sigma_{\nu_i}}{d \Omega d q_0}(E_\nu, q_0, \mu, n_b, T, Y_e).$$
In the most general case there are only single differential cross-sections for the entire medium, since the neutrons, protons, electrons, etc. may be interacting with one another. In practice it may make sense to separate out electrons for scattering since $q_0 \sim E_\nu$ in that case.

For scattering, it looks like the current infrastructure is setup to return
$$\frac{d \sigma_{\nu_i}}{d \Omega}(E_\nu, \mu, n_b, T, Y_e) = \int_{-\infty}^{E_\nu} dq_0 \frac{d \sigma_{\nu_i}}{d \Omega d q_0},$$
with the energy integration being somewhat reasonable for nucleons since the group width is likely to be larger than the energy transfer to/from the nucleons. That being said, the nucleon scattering cross section are nearly isotropic and are well approximated by
$$\frac{d \sigma_{\nu_i}}{d \Omega} = \frac{\sigma_t(E_\nu, n_b, T, Y_e)}{4 \pi} (1 + \delta \mu),$$
where $\delta$ is a constant made up of various weak interaction coupling constants. As a result, it might be more efficient and accurate to store and return angular moments of both the inelastic and elastic scattering cross-sections
$$\sigma_{\nu_i, \ell} = 2 \pi \int_{-1}^{1} d\mu P_\ell(\mu) \frac{d \sigma_{\nu_i}}{d \Omega}.$$
Inelastic scattering from electrons is also well approximated by the first three moments (and explicit expressions for the moments are available in the literature). I guess this would really be an under the hood change, since we still probably want methods that get the cross-section as a function of $\mu$, independent of how they are stored.

It seems like including inelastic scattering will require some generalization of the infrastructure.

@Yurlungur

@Yurlungur
Copy link
Collaborator

Thanks @lroberts36 . In nubhlight, I used exactly the elastic scattering off of nucleons... Plus corrections for things like non-sphericity, shielding etc, which made it a bit nastier. Does inelastic scattering require a change to the API do you think? Or can it be hidden under the hood? Sounds like perhaps if we can use a moment approximation, the under-the-hood approach would work?

@lroberts36
Copy link
Collaborator

lroberts36 commented Oct 25, 2022

@Yurlungur I think inelastic scattering requires a extension of the API to include a method that takes $E_\nu$, $q_0$, $\mu$, and ( $n_b$, $T$, $Y_e$) and returns the differential cross section.

@Yurlungur
Copy link
Collaborator

Do you think that should be a new function or should the current functions be extended? I lean towards a new function specifically for inelastic, but I could be convinced the other way

@lroberts36
Copy link
Collaborator

I think it should be a separate function.

@brryan
Copy link
Collaborator Author

brryan commented Oct 25, 2022

This all seems reasonable to me

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