postgkyl.diagnostics.mom.five_moment.velocity

postgkyl.diagnostics.mom.five_moment.velocity(density, momentum, *, inplace=False, tag=None, label=None)

Velocity from separate density and momentum moments.

Computes the flow velocity by dividing the momentum moments by the density moment, component-wise. The two inputs are assumed to share the same grid; the result carries the density dataset’s grid.

Parameters:
  • density – Number/mass density moment (single component); the divisor. Must contain physical point values.

  • momentum – Momentum moment(s) to divide by the density. Must be NumPy-backed.

  • inplace – mutate and return density instead of a new dataset.

  • tag – optional tag for the returned dataset.

  • label – optional label for the returned dataset.

Returns:

A dataset of the velocity.

Raises:

ValueError – if either input contains unevaluated modal coefficients.

CLI: mom_five_moment_velocity