postgkyl.diagnostics.mom.ke_dke.ke_dke

postgkyl.diagnostics.mom.ke_dke.ke_dke(root_file_name, init_frame, final_frame, dim, vol, init_time, final_time, *, extension='gkyl')

Integrate kinetic energy and compute its negative rate of change.

The first four fluid components are rho, px, py, pz; total energy need not be present. The energy density is |momentum|**2 / (2*rho). Modal inputs use native weak multiplication/division and DG integration; point-value inputs use the matching numerical integration. Each frame’s own grid is used.

Parameters:
  • root_file_name – File-name stem before the frame number.

  • init_frame – First frame (inclusive).

  • final_frame – Last frame (inclusive).

  • dim – Spatial dimension (2 or 3), checked against every frame.

  • vol – Additional volume multiplier, for example an omitted physical thickness in a 2D simulation. Grid cell volumes are already integrated.

  • init_time – First-frame time used only when every frame lacks timestamps.

  • final_time – Last-frame time used only when every frame lacks timestamps; the fallback assumes uniform spacing across the frame intervals.

  • extension – Frame-file extension.

Returns:

One kinetic energy per frame and one dissipation rate per interval.

Raises:

ValueError – If dimensions, frame range, or timestamps are invalid. A mixture of present and absent timestamps is not sufficient to define the intervening physical time intervals.

CLI: mom_ke_dke_ke_dke