postgkyl.diagnostics.mom.five_moment.ke

postgkyl.diagnostics.mom.five_moment.ke(data, *, gas_gamma=1.6666666666666667, num_moms=None, inplace=False, tag=None, label=None)

Kinetic (bulk-flow) energy density from fluid moment data.

Native data retains its representation and uses semantic component selection and arithmetic. On modal inputs, this computes the weak products of each momentum component, then weakly divides their sum by density. It never indexes modal coefficients as physical components.

Parameters:
  • data – Native DG or physical point-value fluid moments.

  • gas_gamma – Retained for API compatibility; bulk energy is independent of it.

  • num_moms – Number of moments (5 or 10); inferred from component count when None.

  • inplace – Mutate and return data instead of a new dataset.

  • tag – Optional tag for the returned dataset.

  • label – Optional label for the returned dataset.

Returns:

A single-component dataset of the bulk-flow energy density.

Raises:

ValueError – if the moment layout cannot be inferred, or modal data lacks native arithmetic support.

CLI: mom_five_moment_ke