Skip to content

Add Scattering to ParticleTracker#2748

Draft
JaydenR2305 wants to merge 198 commits intoPlasmaPy:mainfrom
JaydenR2305:particle-scattering
Draft

Add Scattering to ParticleTracker#2748
JaydenR2305 wants to merge 198 commits intoPlasmaPy:mainfrom
JaydenR2305:particle-scattering

Conversation

@JaydenR2305
Copy link
Member

@JaydenR2305 JaydenR2305 commented Jul 8, 2024

Adds Coulomb scattering to the ParticleTracker

Merge #2712 and #2790 first

@github-actions github-actions bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Jun 18, 2025
return integral / factorial(n)


def Bethe_Moliere_scattering(
Copy link
Member

@pheuer pheuer Jun 30, 2025

Choose a reason for hiding this comment

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

I always just hear this called Moliere scattering- I think Bethe mostly just described Moliere's results in english? Either way, I think it's best to stick to that name and then just cite Bethe's paper

return Bethe_stopping_lite(I.si.value, n.si.value, v.si.value, z) * u.J / u.m


def _f_n_mol_integrand(
Copy link
Member

@pheuer pheuer Jun 30, 2025

Choose a reason for hiding this comment

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

This is probably old but you don't actually need to compute the integral, just type up the data in Table II and then interpolate over that to get f0, f1, f2, then plug those into Eq. 25 to get the angle probability distribution f(theta)dtheta

You could maybe try explicitly doing the integral if you want, just to test the table, but I think the table will be much faster and avoids numerical integration.

[1e-3 * 1e-40, 1e-3 * 0.2084, 1e-3 * 0.0237],
]

_f_mol_spline = make_interp_spline(_ϑ_tabulated, _f_mol_tabulated)
Copy link
Member

@pheuer pheuer Jul 21, 2025

Choose a reason for hiding this comment

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

Is this a 2D spline? Make sure it's treating the three columns independently, e.g. fitting them each with separate splines. Can you check the interpolator vs. the table data to make sure you have a good interpolation over the full range?

else:
f_n = [_f_mol_n(ϑ, i) for i in range(3)]

return np.sum(B_coefficient * f_n, axis=0)
Copy link
Member

Choose a reason for hiding this comment

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

If this is the full RHS of eq 25 should it include a factor of ϑ multiplying all of these terms?

return scattering_integrand
else:
# Eq. 30
theta_w = χ_c * np.sqrt(B)
Copy link
Member

Choose a reason for hiding this comment

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

Why not just use pi as the upper bound, and not rely on this approximation that neglects the higher order terms?

Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Figure out heuristic for including higher-order corrections when necessary

)

mean_squared, _mean_squared_error = quad(
lambda theta: theta**2
Copy link
Member

Choose a reason for hiding this comment

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

I don't entirely understand the theta**2 here for calculating the RMS. Is that because the theta is left off of eq. 25 earlier?

Shouldn't the scattering integrand be squared? https://en.wikipedia.org/wiki/Root_mean_square

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change For breaking changes, excluding deprecations and planned removals docs PlasmaPy Docs at http://docs.plasmapy.org feature For new functionality, excluding breaking changes plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage plasmapy.formulary Related to the plasmapy.formulary subpackage plasmapy.particles Related to the plasmapy.particles subpackage plasmapy.plasma Related to the plasmapy.plasma subpackage plasmapy.simulation Related to the plasmapy.simulation subpackage python Pull requests that update Python code testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants