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
momentummoments by thedensitymoment, component-wise. The two inputs are assumed to share the same grid; the result carries thedensitydataset’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
densityinstead 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.