ammarhakim / gkylzero

Lowest, compiled layer of Gkeyll infrastructure.
MIT License
22 stars 5 forks source link

[DR] Canonical PB formulation for GK neutrals #497

Open tnbernard opened 1 month ago

tnbernard commented 1 month ago

In order to run with dynamic neutrals in general geometries, we will implement @johnson452's canonical PB formulation. As the canonical PB capabilities are already in place, all that is needed is the Hamiltonian for the neutrals defined in terms of the metric coefficients:

Screenshot 2024-10-18 at 12 24 28 PM

Here we replace h^ij with the metric coefficients g^ij calculated from the mapping to field-line following coordinates. This will be carried out by the following:

  1. Create an updater to calculate the Hamiltonian, converting between a Gauss-Lobatto nodal basis and the modal basis to ensure continuity.
  2. Currently, the canonical PB kernels do not include the hybrid basis that is typically used in the gk app. Therefore, the gk_neut species app will be modified to use only the p=1 basis instead of the hybrid basis.

Work related to this DR is on the branch: https://github.com/ammarhakim/gkylzero/tree/gk-g0-app_neut_can_pb

tnbernard commented 1 month ago

After discussion on Monday Oct. 21, we concluded that the phase basis should be defined in the species app, as related to issue 498.

Several other changes will need to take place:

  1. Gk neut species will also need its own conf grid since a 3D conf grid will need to be defined regardless of the GK species conf grid dimension.
  2. A length will need to be set for the ignorable coordinates, i.e. y in an axisymmetric simulation. Will happen in the input file, like the other grid lower and upper values.
  3. Moments for the cross-species neutral collisions will need to be averaged along ignorable coordinates for the GK collisions and broadcast to higher dimensions for the neutral collisions when GK cdim < 3.