This section describes the format of external datafiles used by LSP. They must be created prior to an LSP run, are specified in the input file, and must reside in the same directory as the input file.
The format of the method 2 (see section method 2)
scattering tables is as follows. The first line is a comment. The next
line gives the dimension of the lookup table (currently this must be 2;
i.e., scattered energy and scattered angle), followed on separate lines
by the number of scattered energies in the table (20 in the example below),
the minimum scattered energy (2041.5 eV), the maximum scattered energy
(5.0e5 eV), which is equal to the incident energy, the number of
scattered angles in the table (18), the minimum scattered angle (0), and
the maximum scattered angle (pi).
# Scatter lookup table for Cu
2
20
2041.5
5.0e5
18
0
3.14159
Next is a comment line followed by the lookup table itself.
# Table: 2.0415 0.0 0.173 ... ...
The method 3 (see section method 3) backscattering
table is a 4-dimensional lookup table.
The low-energy tail of the scattered distribution is calculated using
the formulation due to Vesey (Ref.[12]).
The format of the backscattering data file is as follows. The head of the file can have any number of comment lines beginning with `#'. The first line not beginning with `#' is the number of incident energies in the table:
# # Number of incident energies 7
This is followed by one comment line and the list of incident energies in units of eV:
# Incident energies (eV) 500 1000 2000 ... ...
Next is one comment line followed by the number of incident angles in the table, then one comment line, and the list of incident angles in radians:
# Number of incident angles 19 # Incident angles (rad) 0 0.087266462599716474 0.17453292519943295 0.26179938779914941 ... ...
This ends the header section of the table.
# Backscattered electrons for styrene # Generated using invert1.pl styrene00.00.dist styrene00.00.lookup 20 20 # Total yield fraction: 0.0244459144416445
# Relative yield fraction from extrapolation: 0.00629612126033918 # Fitting parameters A, m (normalized to give relative yield): 0.00291911818959786 0.148920337349297
Next follows one comment line, the dimension of the lookup table (2, i.e., energy and angle), the number of scattered energies in the table (20 in the example below), the minimum scattered energy (2041.5 eV), the maximum scattered energy (5.0e5 eV), which is equal to the incident energy, the number of scattered angles in the table (20), the minimum scattered angle (pi/2), and the maximum scattered angle (pi).
# Table dimensions:
2
20
2041.5
5.0e5
20
1.5708
3.14159
Next is a comment line followed by the lookup table itself.
# Table: 2041.5 1.5708 1.79096 ... ...
The part of the scattered distribution below the minimum table energy (2041.5 eV in this example) is obtained from the analytic extrapolation. For energies smaller than the lowest incident energy in the table, the scattered energy distribution for the lowest incident energy is used, scaled to the actual incident particle energy.
The cross section file used by method 4 (see section method 4) is generated by the XGEN program, part of the ITS
code family (Ref.[5]). A sample input file for XGEN is:
MATERIAL TA TITLE 20 MEV standard codes cross sections for Tantalum ENERGY 20
This input file will generate cross section data for electron energy
loss and scattering in tantalum for electron energies below 20 MeV. For
ITS version 3.0, the XGEN program writes this data to a text file named
`fort.11'. The name of this file (which may be changed to something
more meaningful) is specified by the xgen_data_file parameter in
the method 4 input.
Consult the user's manual for the ITS 3.0 codes (Ref.[6]) for more information on the XGEN program. ITS can be licensed from the Radiation Safety Information Computational Center at Oak Ridge National Laboratory (`http://epicws.epm.ornl.gov/rsic.html').
The datafile produced by the BFIELD code is written in the following order:
(int) nx1 (number of grid-points in axial direction) (int) nx2 (number of grid-points in radial direction) (float) dx1 (axial grid size) (float) dx2 (radial grid size) (float) x1s (axial starting point) (float) x2s (radial starting point) (float) Bz[nx2][nx1] (axial field values) (float) Br[nx2][nx1] (radial field values)
where the field values are in normalized code units (value in gauss divided by 1704.5), and spatial dimensions are in cm. This file may be either formatted ASCII or binary type. If it is the latter, it must be indicated where the file is specified on input (see section External Fields Input).
The ASCII file format produced by the ATHETA code (SNL) can be generated using the following FORTRAN code:
Open (Unit=25,File='ATHETA.DAT',Form='FORMATTED',Status='UNKNOWN')
Write (25,5) NK+1, NL+1
5 Format (2I5)
Write (25,10) (RPOS(K),K = 1,NK)
Write (25,10) (ZPOS(L),L = 1,NL)
Write (25,10) ((BRFLD(L,K),K = 1,NK),L = 1,NL)
Write (25,10) ((BZFLD(L,K),K = 1,NK),L = 1,NL)
10 Format(6(1PE12.4))
where NK, NL are the number of grid-points in the
radial and axial directions, RPOS, ZPOS are the radial and
axial grid coordinates in meters and BRFLD, BZFLD are the
radial and axial components of the magnetic field in Tesla. LSP
interpolates the values onto the 2-D or 3-D simulation grid. See section External Fields Input.
The ASCII file produced by the MAG3D code (NRL) contains Bx,
By, Bz data in cartesian coordinates as follows:
nxmax nymax nzmax
40 40 40
x y z Bx By Bz
-10.0000 -10.0000 -10.0000 412.227 -412.227 1.34749
-9.48718 -10.0000 -10.0000 426.651 -426.651 1.33026
-8.97436 -10.0000 -10.0000 441.449 -441.449 1.28552
. . . . . .
. . . . . .
. . . . . .
8.97436 10.0000 10.0000 -450.803 450.803 -0.0855465
9.48718 10.0000 10.0000 -435.347 435.347 -0.0926784
10.0000 10.0000 10.0000 -420.296 420.296 -0.0983440
where the field values are in units of kilogauss, and the spatial coordinates are in cm. See section External Fields Input.
The binary file produced by the MAFCO code contains Bx,
By, Bz data in cartesian or cylindrical coordinates in a format
similar to an LSP field dump, so that it may be displayed by the P4 utility.
Field values are in units of gauss, and the spatial coordinates are in cm.
The user-supplied particle data file for the fileread injection model
(see section fileread) is in XDR binary format and is created by
a previously run LSP simulation using an instance of particle extraction
available in the [Particle Extraction] section of input.
See section Particle Extraction Input. It contains the data necessary to continue
a beam transport problem in a downstream region of space not contained in the
first simulation.
There are presently three types of data files used to characterize interactions between particle species: those for ionization events (see section ionization), those for charge-exchange events, and those for random montecarlo scattering (see section Particle Interaction Input).
For ionization, the file format is as follows:
# Table of interactions for p+ on neutral H2 # Type Num-energy / Charge Mass (twice) 1 200 1 1.836000e+03 0 3.672000e+03 # Energy dEdx Sigma-ion Nu-mom 4.690980e+02 4.004441e-14 0.000000e+00 9.094049e-20 5.045765e+02 4.575827e-14 0.000000e+00 9.962914e-20 . . (for 200 energy values) .
Header lines beginning with # are ignored. The first integer (1)
identifies this as an "ionization" table. The second integer (200)
gives the number of energy values in the table. The next two lines give
the charge state and mass of the interacting species (normalized to the
values for a positron). These values must match exactly those specified
in the [Particle Species] section (see section Particle Species Input).
Following this is one or more comment lines beginning with # and
finally the table of values with the following columns: energy (eV),
energy loss rate (eV*cm^3/cm), ionization cross section (cm^2),
momentum-transfer frequency (cm^3/cm).
For particle energies lower (higher) than the minimum (maximum) energy in the table, the values for the minimum (maximum) energy are used. If the values are independent of energy, a single entry in the table is sufficient.
For charge-exchange, the file format is:
# Table of interactions for neutral H2 on p+ # Type Num-energy / Charge Mass (twice) 2 200 0 3.672000e+03 1 1.836000e+03 # Energy Nu-cx Nu-mom 4.690980e+02 8.536466e-20 5.575825e-21 5.045765e+02 9.405332e-20 5.575825e-21 . . (for 200 energy values) .
The first integer (2) identifies this as a "charge-exchange" table. The next two lines are the same as for the ionization table above. The table of values has the following columns: energy (eV), momentum-transfer frequency due to charge-exchange (cm^3/cm), and momentum-transfer frequency due to scattering (cm^3/cm).
For montecarlo scattering, the file format is as follows:
# Table of interactions for e- on neutral He (Montecarlo type) # Type Num-energy / Charge Mass (twice) 3 460 -1 1.000000e+00 0 7.344000e+03 # number of inelastic processes (nproc) 7 # Eaniso Eioniz Bparam Delta_E_1 ... Delta_E_nproc 0.000000E+00 0.246000E+02 0.000000E+00 0.198000E+02 ... 0.240000E+02 # Energy Sigma_el Sigma_ioniz Sigma_1 ... Sigma_nproc 0.000000E+00 0.495000E-15 0.000000E+00 0.000000E+00 ... 0.000000E+00 0.100000E+00 0.579524E-15 0.000000E+00 0.000000E+00 ... 0.000000E+00 . . (for 460 energy values) .
The primary output data files have the following format for each particle:
WEIGHT X Y Z Vx Vy Vz
where WEIGHT is the charge weight of the macro-particle, the X/Y/Z coordinates
are in cm, and the V's are the gamma-beta velocity components. The data can be
spread onto discrete files, depending on the extraction_dump_interval
or its related control parameters. The resulting files will have names like
`primNNNN.dat', where `NNNN' is the timestep on which the data is
finalized. If no dump interval or dump time is specified, all of the data will
remain on a file named `primaries.dat'.
The photon output data files have the following format for each photon:
WEIGHT ENERGY X Y Z Vx Vy Vz
where WEIGHT is the charge weight of the originating macro-particle, ENERGY is
in MeV, the X/Y/Z coordinates are in cm, and the V's are actually the unit
direction vector components. The data can be spread onto discrete files,
depending on the extraction_dump_interval or its related control
parameters. The resulting files will have names like `photNNNN.dat',
where `NNNN' is the timestep on which the data is finalized. If no dump
interval or dump time is specified, all of the data will remain on a file
named `photons.dat'.
The hysteresis data file contains a series of B-H curves used for the
hysteresis volume model (see section Volume Models Input). The file format
is as follows:
# B-H curves for metglas, smoothed trapezoidal functions # number of dB/dt values 6 # number of data points 251 # alpha value 5.0 # dB/dt values in Gauss/ns 0. 8.0 18.0 27.0 45.0 62.0 # single B and multiple H values in units of Gauss and Oersted -1.6232E+04 -2.7323E+01 . . . -2.7323E+01 . . (for 251 B-field values) .
Note that there are six values of H-field for each value of B-field, making six distinctive B-H curves, one for each value of dB/dt. The total collection of data should cover the complete range of possible values relevant to the desired hysteresis behavior. During the simulation, values of H-field as a function of B and dB/dt are determined by interpolation from these curves. The alpha parameter is the slope of H versus B at the origin which is needed to correctly determine the shape of "minor loop" curves, since the data are for the "major loop" only.
Go to the first, previous, next, last section, table of contents.