postgkyl.diagnostics.mom.multispecies.accumulate_current

postgkyl.diagnostics.mom.multispecies.accumulate_current(data, *, qbym=False, charge=None, mass=None, inplace=False, tag=None, label=None)

Accumulate current from species moments.

Scales the species’ momentum/flow moments by a per-species factor to form its contribution to the current. By default the factor is -1.0; with qbym=True (and charge/mass given) the charge/mass ratio is used instead. Should be used with qbym=True for fluid data.

Parameters:
  • data – A species dataset carrying the flow/momentum moments to scale; must contain physical point values.

  • qbym – When True, scale by the charge-to-mass ratio (q/m); otherwise scale by -1.0. Set True for fluid data.

  • charge – Particle charge, required when qbym is True.

  • mass – Particle mass, required (and must be nonzero) when qbym is True.

  • 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 dataset of the scaled current contribution.

Raises:

ValueError – if data contains unevaluated modal coefficients; if qbym is True and charge/mass are not both given (a nonzero mass).

CLI: mom_multispecies_accumulate_current