Skip to content

In AddPlasma, fix for radial_numpercell_power#6804

Open
dpgrote wants to merge 1 commit intoBLAST-WarpX:developmentfrom
dpgrote:fix_radial_numpercell_power
Open

In AddPlasma, fix for radial_numpercell_power#6804
dpgrote wants to merge 1 commit intoBLAST-WarpX:developmentfrom
dpgrote:fix_radial_numpercell_power

Conversation

@dpgrote
Copy link
Copy Markdown
Member

@dpgrote dpgrote commented Apr 24, 2026

In AddPlasma and AddPlasmaFlux, when in a radial geometry, the radial variation of the particle weight can be adjusted by the input parameter radial_numpercell_power. The particle distribution and weights are adjusted accordingly. Though, when the minimum radius, rmin, is greater than zero, the weights of the particles was not correct. The weights did not account for the fact that the particles before the transformation are generated only in the range rmin to rmax whereas the existing formula assumed that particles were created in the range 0 to rmax (before transformation). The result is that fewer particles are generated than the weight is accounting for. Multiplying the weights by the factor rmax/(rmax - rmin) accounts for this difference.

This addresses the issue raised in #6798.

@dpgrote dpgrote added geometry: RZ axisymmetric 2D and quasi-3D component: initialization Changes related to the initialization of the simulation labels Apr 24, 2026
Copy link
Copy Markdown
Contributor

@JustinRayAngus JustinRayAngus left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

component: initialization Changes related to the initialization of the simulation geometry: RZ axisymmetric 2D and quasi-3D

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants