Open manauref opened 1 day ago
Isn't grad(z) just the Jacobian arising from the non-uniform coordinates? Why isn't the Jacobian there the total Jacobian (Jacobian from field line following coordinates * Jacobian from further coordinate transformation)?
It seems like if we were missing this grad(z), the flux would be wrong at every interface in a non-uniform grid simulation.
grad{z} is not the Jacobian from the nonuniform coordinates, but it's related to it. The J in the above equations contains the Jacobian of the nonuniform coordinates, but that's not enough. We need to incorporate grad{z}.
The "flux" here is the physical particle flux, which we need for the Boltzmann electron model. The flux at interior surfaces is a computational flux, and is not quite the same and doesn't require this grad{z} factor, principally because our weak form is an inner product in computational coordinates, not in physical coordinates.
In the GK solver we compute boundary fluxes for at least two purposes:
At least for purpose 1 we were using the presently boundary flux, which is really the z surface term of the GK scaled, e.g. in 1x2v:
where:
The above formula is incorrect if we want the physical particle flux through a surface (or in 1D, through a point). See Dhaeseleer's "Flux coordinates and magnetic field structure", equation 2.5.49a. We are missing a factor of the magnitude of the contravariant unit vector in z. The correct formula should be
One of the consequences of this error, which @Maxwell-Rosen has observed, is that in mirror sims with nonuniform z and Boltzmann electrons the sheath potential comes out different, compared to uniform z sims, and the difference is on the order of $\ln(\vert\nabla z\vert{\mathrm{uniform}}/\vert\nabla z{\mathrm{nonuniform}}\vert )$ .
Because of this extra factor of $|\nabla z|$ we can't use the collisionless GK boundary surf kernels, and we'll instead have to create new kernels for these calculations. I propose to change the bflux app and updater so that it uses such new kernels.