Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(*) Users can now provide
[output] fields = [..., ...]
parameter in the input with the desired fields to be written at runtime.Regular field components are addressed as
Ex
,Bz
,Jy
etc. To output all 3 components of the given field addEi
(where the code will automatically assumei=1,2,3
for E-field).Rho
andN
stand for the mass and the number densities.T
stands for the energy-stress tensor, which should be followed by two component identifiers. For instance,T01
orT0x
orTtx
stands for the momentum flux in the x-direction.T0i
will be automatically unraveled into 3 components withi=1,2,3
.Tij
will be unraveled into 6 independent components of the spatial part of the energy-momentum tensori=1,2,3; i<j<=3
.Tii
will be interpreted as only the diagonal components, i.e.,T11, T22, T33
. One may also provide only the particular components, e.g.,T23
,T11
, etc.All the particle-based moments (densities, and the energy-stress tensor) will be computed by default using the distributions of all massive particles. If needed, one can specify the particular species for which to compute
Rho
,N
and/orT
separately. Simply pad the definition by the species indices, separated by the underscore_
. For example,T03_2_4
computes the z-direction momentum flux for species 2 and 4,Tij_1
computes the stress-energy tensor components for the species 1.Usage example
Assume the simulation has 4 species (electrons/positrons + ions + photons) and we want to output all the B-field components, the Ez, the pair density, the photon density, the total pressure-tensor of the plasma, and the photon momentum flux in all directions. Our input file might look something like this.