Closed johnson452 closed 1 month ago
Evidence of p2 energy conservation from the integrated moments for the annular sodshock case. What is shown is integrated density, momenta (R-direction), momenta (theta-direction), Energy vs time.
This design review is now implemented in main via PR: https://github.com/ammarhakim/gkylzero/pull/491
Branch: can_pb_total_energy_dynvec.
Summary: This branch corrects an inconsistency in the way canonical-pb handled BGK collisions in p2. Essentially the issue was calculating pressure in terms of the quantity "h^{ij}M{2ij}" where "M{2ij}" was not within the Serindipity basis. This has been corrected by replacing this term with "2E" where E = int (Hf dp).
In addition to this correction, a new moment routine was added to compute E = int (H*f dp), as well as integrated canonical-pb moments: [Density, Momenta, Energy]. (Described further in the attached notes). Integrated moments are accessed through the existing integrated moment infrastructure, and for can-pb Energy is from specifying the moment "MEnergy".
New functions zero/gkyl_mom_canonical_pb.h (Mirrored from the moments of gkyl_mom_vlasov_sr.h)
// Create new canonical-pb moment type object.
New Regression Tests regression/rt_can_pb_neut_bgk_sodshock_im_1x1v_p2.c regression/rt_can_pb_bgk_surf_annulus_sodshock_im.c
Tests of energy conservation p1, p2 with/without collisions for flat 1x1v sodshock and 2x2v annular disk sodshock (See regression tests)
Canonical_Poisson_Bracket-6.pdf