Prepared by D. McCune 10 Feb 1992

SUMMARY OF MONTE CARLO FAST ION CODE SCALAR "BALANCE" MULTIGRAPHS
OUTPUT BY TRANSP.

The TRANSP Monte Carlo code outputs several diagnostic "balance"
multigraphs which measure the degree to which the code is keeping
proper account of fast ion population, energy, and momentum.  These
outputs may be plotted using the RPLOT program.  For more information
on RPLOT see the manual "Accessing TRANSP Output:  A User's Guide", 
available from D. McCune.

The Monte Carlo code balance outputs are viewed in RPLOT as scalar
multigraphs, i.e. a grouping of logically related scalar functions
of time.  Note-- some of the outputs described below may not be
present in a particular TRANSP run.  Logic in the output system
suppresses output where possible, i.e. "fishbone" losses are not
output if the run does not use the "fishbone" loss model.

Tracking the Population:  Fast Ion Particle Balance
===================================================

SBBAL -- traditional fast ion particle balance -- summed over all species

balance =  fusion ion source + deposition source + cx recapture source
           - orbit loss - thermalization 
           - "ripple" loss - "fishbone" loss
           - cx loss (neutralization inside the plasma)
           - cx loss (neutralization beyond the plasma boundary)
           - d/dt( fast ion population )

SBBAL gives the particle balance summed over all fast ion species.
There can be up to three fast ion species in any one TRANSP run.  A
separate particle balance multigraph SBBAL_x is prepared for each
such species.  The presence of such a multigraph indicates the
presence of the species in the run (i.e. if the run includes 
Monte Carlo modeling of fusion tritons, then the multigraph SFBAL_T
is included in the run output).

Here is a list of SBBAL_x multigraphs that may be output by TRANSP:

light beam ions:
SBBAL_H -- ptcl balance, H beams
SBBAL_D -- ptcl balance, D beams
SBBAL_T -- ptcl balance, T beams
SBBAL_3 -- ptcl balance, He3 beams
SBBAL_4 -- ptcl balance, He4 beams

fusion product ions:
SFBAL_4 -- ptcl balance, He4 (alpha) fusion product ions
SFBAL_T -- ptcl balance, DD fusion tritons
SFBAL_3 -- ptcl balance, DD fusion He3 ions

heavy beam ions:
SBBAL_N -- ptcl balance, Neon beams
SBBAL_A -- ptcl balance, Argon beams
SBBAL_K -- ptcl balance, Krypton beams
SBBAL_X -- ptcl balance, Xenon beams
SBBAL_Z -- ptcl balance, generic high Z beams

As will be seen, several sets of multigraph packages use the _x label
extension scheme for naming of species-specific packages.

PPPL experience with the SBBAL balances is that generally they show good 
particle conservation, to an accuracy of order 1% averaged over a typical
beam pulse.  There are known sources of error:  the numerical "phasing" 
of d/dt(beam ion population) relative to when the sources and sinks are 
counted, and Monte Carlo splitting / Russian roulette numerical methods 
in the model.  These features cause the balance to not come out to zero 
precisely.

However, the code outputs "subsidiary" particle balances which use
a different definition of d/dt(beam ion population) and which take
explicit account of Monte Carlo Russian roulette / splitting methods
in the model.

The following subsidiary particle balance outputs are available ("x"
denotes a species code, consistent with the SBBAL_x multigraph names
shown above):

all beam species "x":
SBDEPB_x  -- deposition particle balance
SBORBA_x  -- orbit particle balance

all beam species "x" except heavy ion species:
SBDEPS_x  -- deposition processes
SBCX0B_x  -- charge exchange neutral particle balance
SBRCAP_x  -- charge exchange neutral recapture processes
SBCXSN_x  -- fast ion charge exchange loss processes

all fusion product species "x":
SFDEPB_x  -- deposition particle balance
SFORBA_x  -- orbit particle balance
SFCX0B_x  -- charge exchange neutral particle balance
SFRCAP_x  -- charge exchange neutral recapture processes
SFCXSN_x  -- fast ion charge exchange loss processes

The old SBBAL particle balances are most similar to the new orbit particle
balances SBORBA_x/SFORBA_x.  However, the new balances are defined so
that (if the Monte Carlo model is functioning properly) the evaluated
balance should come out to zero very accurately-- at least 4 orders of
magnitude smaller than the deposition source, as a guideline.

The SBORBA_x/SFORBA_x particle balance is defined as:

  balance = #deposited (actual Monte Carlo ions)
            +deposition russian roulette
            - orbit loss - thermalization 
            - "ripple" loss - "fishbone" loss
            - cx neutrals escaping
            - cx russian roulette 
            - orbit russian roulette
            - d/dt( actual Monte Carlo fast ion population )

Russian Roulette terms are present as a consequence of peformance
considerations in the Monte Carlo model:  basically, there exists
code for consolidating or getting rid of ions of very low weight, so
that a lot of computer time is not spent on such ions.  All Russian
Roulette terms can change sign and should average to zero over time
and in the limit of a large number of Monte Carlo model ions selected
by the user (at the cost of computer time).

In this balance definition, the #deposited and d/dt terms reflect the
actual Monte Carlo population in the model.  The d/dt term is therefore
not identical to the d/dt(fast ion density) derived by finite differencing
the density obtained by summing over all orbits in a beam code timestep.
This latter definition is used in the SBBAL_x plots as well as in the 
rest of TRANSP e.g. in thermal plasma Zeff, quasi-neutrality and particle 
balance calculations.

For all fast ion species x, there are multigraphs SBDEPB_x (beam species)
and SFDEPB_x (fusion product species) which show the particle balance 
accuracy of the fast ion deposition model:

  balance = #injected - shinethrough - #deposited.

These multigraphs also show a term SFDEPRR which shows the number of
particles created or annihilated as part of the Monte Carlo model 
census control system.  This is a non-physical term required by the
implementation of the model control system, i.e. the specification 
that for performance reasons only a fixed number of Monte Carlo particles
(e.g. NPTCLS in the TRANSP namelist) will be used to model the entire 
specie fast ion population.

The SBDEPB and SFDEPB balances may not come out to zero precisely, but
should average to zero over time and tend to zero as the number of 
Monte Carlo model ions is increased.  The reason that the balance is
imperfect is that the "weight" of the sum of newly deposited ions is
renormalized to give the precise right amount of source of newly 
deposited beam power, not particles.

For light beam species, the magnitude of this imbalance can be seen
in the multigraph SBDEPS_x (for species x, x="H" ,"D", "T", "3", or 
"4", paralleling the labeling of SBBAL_x shown above).

SBDEPS_x contains the following terms:

  #deposited ("actual", as in the SBDEPB_x multigraph).
  #deposited "ideal"
  #deposited by impact ionization with thermal plasma species (ideal).
  #deposited by charge exchange with thermal plasma species (ideal).
  #deposited by beam-beam impact ionization (ideal).
  #deposited by beam-beam charge exchange (ideal).

The "ideal" numbers are obtained by summing deposition profiles computed
over a large number of randomly chosen beam neutral tracks; the "actual"
number shows the population of discreet model ions actually saved for 
subsequent orbitting.

For light ion species there is a particle balance of disposition of fast 
neutrals created by charge exchange.  The multigraph names are SBCX0B_x 
for beam ions, or SFCX0B_x for fusion product ions.  (Note:  fusion 
product charge exchange loss terms are not evaluated unless the TRANSP
namelist switch NLFATOM is set .TRUE.).  These plots evaluate

  balance = neutrals launched - neutrals escaping - neutrals recaptured
            - Russian roulette

and the balance should be very close to zero, i.e. at least 4 orders of
magnitude smaller than the number of neutrals launched.

The russian roulette term is present to protect the code from wasting
computer time following many ions of very low weight; such low weight
ions are sometimes created by the charge exchange recapture model.  The
Russian roulette term should average to zero over time, and tend the more
towards zero, the more active the charge exchange recapture model is in a
given simulation.

The charge exchange recapture process is further diagnosed by the 
scalar multigraphs SBRCAP_x (beam ions) and SFRCAP_x (fusion product ions).

SBRCAP_x/SFRCAP_x contain the functions:

  #recaptured ("actual", as in SBCX0B_x/SFCX0B_x)
  #recaptured ("ideal")
  #recaptured by impact ionization with thermal plasma species (ideal).
  #recaptured by charge exchange with thermal plasma species (ideal).
  #recaptured by beam-beam impact ionization (ideal).
  #recaptured by beam-beam charge exchange (ideal).

The "ideal" terms are integrated over the charge exchange fast neutral
tracks; the "actual" term shows the population actually returned for
further orbitting.

The process of generating charge exchange fast neutrals is diagnosed by
the multigraphs SBCXSN_x (for beam ions) and SFCXSN_x (for fusion product
ions).

SBCXSN_x/SFCXSN_x contain:

  #total fast ion sink (ideal)
  #total fast ion sink (actual neutrals launched:  see SBCX0B_x / SFCX0B_x)
  #sink due to charge exchange with wall neutrals (ideal)
  #sink due to charge exchange with beam halo neutrals (ideal)
  #sink due to charge exchange with 1st generation beam neutrals (ideal)
  #sink due to charge exchange with nth generation beam neutrals (ideal)

where "ideal" indicates that the quantity is integrated over fast ion 
orbit trajectories.

There is some possibility of validating beam-beam charge exchange modeling
by comparing numbers from these multigraphs.  However, one must be careful
to remember that cross-species charge exchange is a possibility.  Orbitting
ions will "see" the neutrals of all other species; fast neutrals will "see"
the ions of all other species.  Nevertheless, the following relations
should hold:

  sum over species( beam neutrals deposited by beam-beam cx)
    = sum over species( beam ion sink to 1st generation beam-beam cx)

and

  sum over species( fast cx neutrals recaptured by beam-beam cx)
    = sum over species( beam ion sink to nth generation beam-beam cx).

Because of implementation details, however, a comparison of these 
sums will tend to show a time lag of about one beam code timestep.

Fast Ion Power Balance
======================

The scalar multigraph PBBAL contains a diagnostic check on global power
balance of the Monte Carlo model, summed over fast ion species.  The
power balance is defined as

  balance = injected power + fusion ion source power
            + power from the OH circuit + power from plasma compression
            - d/dt( fast ion stored energy )
            - shinethrough loss
            - thermal electron heating
            - thermal ion heating
            - thermalization power
            - cx loss (neutralization inside the plasma)
            - cx loss (neutralization outside the plasma boundary)
            - orbit loss
            - "fishbone" loss
            - "ripple" loss
            - heating assocated with anomolous diffusion
            - rotational "work done" terms:  collisional omega*torque,
                thermalization, and J X B omega*torque.

Because of the large number of terms, not all terms are shown in the
PBBAL multigraph.  PBBAL shows the injected power or fusion ion source
power, power from the OH circuit, power from plasma compression, 
d/dt( stored energy ), and the power balance.  PBBAL also includes 
a term measuring the "orbit integrator error".  If this term becomes
large, it indicates a break down of the Monte Carlo orbit integrator
due to choice of too large an orbit timestep-- a serious error.  The 
run should be redone with the value of namelist control DTN reduced.

Plasma heating powers are collected in the multigraph BHEAT:  ion heating,
electron heating, and direct thermalization power.

Assorted losses are assembled in the multigraph PBLOS:  shinethrough, 
charge exchange losses, orbit loss, etc.

If the target plasma is rotating, power terms associated with rotational
work down are gathered in the multigraph PBROT.  These terms are all
proportional to the plasma rotation velocity, and tend to be small
unless the plasma is spinning with great rapidity.

The multigraphs PBBAL, BHEAT, PBLOS, and PBROT are all summed over all
fast ion species.

For information on individual fast ion species the following multigraphs
are available (the "_x" name extension is as described in the section on
SBBAL/SBBAL_x, the fast ion particle balance, above):

PBBAL_x -- power balance, beam species "x"
PFBAL_x -- power balance, fusion product species "x"

BHEAT_x -- plasma heating terms, beam species "x"
FHEAT_x -- plasma heating terms, fusion product species "x"

PBLOS_x -- fast ion loss terms, beam species "x"
PFLOS_x -- fast ion loss terms, fusion product species "x"

PBROT_x -- fast ion rotational work, beam species "x"
PFROT_x -- fast ion rotational work, fusion product species "x"

The TRANSP fast ion model generally yields good power balance, to 
better than 1% averaged over an entire beam pulse, depending on the
statistics controls selected by the user and the effect of the
physics scenario on Monte Carlo statistics.  The power balance
improves as more Monte Carlo particles are added to the simulation.

Fast Ion Momentum Balance
=========================

Whether or not the plasma is rotating, the Monte Carlo code outputs
momentum balance data on all fast ion species modeled.  The global
momentum balance, summed over fast ion species, is in the scalar
multigraph BPHBA.  This graph shows the momentum balance

  balance  =  deposition source + OH acceleration
              - momentum to walls (cx loss)
              - momentum to limiter (orbit loss)
              - momentum to "fishbone" loss
              - momentum to "ripple" loss
              - anomolous diffusion loss
              - collisional torque to thermal plasma
              - JxB torque to thermal plasma
              - torque to plasma via thermalization
              - d/dt( stored fast ion momentum )

The BPHBA multigraph contains all these terms, and a term described
as "orbit torque error", which also shows up as a momentum imbalance.
If the "orbit torque error" term becomes large, it means that the
orbit integrator is using too large a timestep value; the case
should be rerun with the value of namelist control DTN reduced.

BPHBA is also available for each individual fast ion species (the
labeling extension _x used to identify the species is as described
under the section on SBBAL under particle balance, above).

BPHBA_x -- momentum balance, beam species "x".
FPHBA_x -- momentum balance, fusion product species "x".


The TRANSP fast ion model generally yields good momentum balance, but
with a high degree of Monte Carlo noise.  The large amount of noise is 
probably due to the fact that each Monte Carlo ion is tracked at
a point location.  Actual particle positions and velocities are
tracked (not orbit averages).  Therefore, for each ion there is a 
large variation of momentum exchange depending on the exact "phase"
of the ion orbit where it reaches the end of a given beam code
timestep.  If the code were re-organized to use orbit averages rather
than point positions for momentum balance, the variance of momentum
related outputs would be reduced, but, this would be a major change to
code architecture and it has not been attempted.

In cases where there is balanced or near balanced injection, the
cancellation of "co" and "counter" momentum sources is evaluated
by a Monte Carlo sum which will also yield noisy results.

In uni-directional injection cases, however, TRANSP generally obtains
reasonable momentum balances, of order 2% or less averaged over a
beam pulse, depending on statistics.


Much of the formulation for the angular momentum balance and power
associated with rotation work terms is developed in:

R.J. Goldston, in Basic Physical Processes of Toroidal Fusion
Plasmas (Proc. Course and Workshop Varenna, 1985) EUR-10418-EN, 
(CEC, Brussels, 1986) Vol. 1, p. 165.