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; withqbym=True(andcharge/massgiven) the charge/mass ratio is used instead. Should be used withqbym=Truefor 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
qbymis True.mass – Particle mass, required (and must be nonzero) when
qbymis True.inplace – mutate and return
datainstead 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
datacontains unevaluated modal coefficients; ifqbymis True andcharge/massare not both given (a nonzeromass).