5 NLTE Models: PRO2

5.1 The Method

The program PRO2 (Werner 1986Werner et al. 2003Rauch & Deetjen 2003Werner et al. 2012) calculates plane parallel NLTE model atmospheres in radiative and hydrostatic equilibrium. It is based on the “Accelerated Lambda Iteration (ALI) method (Werner & Husfeld 1985). It consists mainly out of two iteration cycles. The “outer” cycle is called “Scharmer iteration” (this name is taken from Scharmer 1981 who worked on solutions of radiative transfer problems using approximate lambda operators) and iterates the radiation field according to

  n     *  n           *     n-1
J n = Λ  S n + (Λ  - Λ  ) .S n

The source function Sn of the actual iteration n is depending on the radiation field Jn which is to be calculated. To calculate Sn, the non-linear statistical equations have to be solved under consideration of the radiative and hydrostatic equilibrium. This is done in the “inner” iteration cycle by a [quasi-] Newton-Raphson iteration. In the following this procedure is called “linearizations”.

5.2 The PARAMETERs

For the compilation of PRO2 the files PARA.INC, PARA1.INC, and PARA3.INC have to be adjusted to the used atomic data file ATOMS (Sect. 2) and the frequency grid FGRID.

Example parameter files look like:

PARA.INC

PARAMETER(NLMAX= 229,NIONMAX= 79,NATOMAX= 17,
> NFMAX=7999,LTEMAX =931,NLATOM =229
)

PARA1.INC

PARAMETER(NRBBMAX=249,NRBFMAX= 229,NCBBMAX=599,NCBFMAX=229,
> NRFFMAX= 61,NCBXMAX=4999,NRLLMAX= 1,NRLUMAX= 1,
> NRBBMAD=999,NRBFMAD= 6,NCBBMAD= 6,NCBFMAD= 2,
> NRFFMAD= 2,NCBXMAD= 8,NRLLMAD= 1,NRLUMAD= 1 )

PARA3.INC

PARAMETER(NRDIMAX=1,NRDIMAD=1,NSIG=599999
)

The PARAMETER denote maximum numbers of e.g. elements etc. (see below) which can be treated with PRO2 if the files are used for its compilation, respectively.

parametermaximum numbers of


NLMAX NLTE levels
NIONMAX ions
NATOMAX elements
NFMAX frequency points
LTEMAX LTE levels
NLATOM NLTE levels (block-matrix method, for one element, set value equal to NLMAX)
NRBBMAX radiative bound-bound transitions
NRBFMAX radiative bound-free transitions
NCBBMAX collisional bound-bound transitions
NCBFMAX collisional bound-free transitions
NRFFMAX radiative free-free transitions
NCBXMAX collisional bound-bound transitions (to LTE levels)
NRLLMAX radiative transitions within a band of a complex ion
NRLUMAX radiative transitions low-->up of complex ions
NRBBMAD data points in formula used for RBB
NRBFMAD data points in formula used for RBF
NCBBMAD data points in formula used for CBB
NCBFMAD data points in formula used for CBF
NRFFMAD data points in formula used for RFF
NCBXMAD data points in formula used for CBX
NRLLMAD data points in formula used for RLL
NRLUMAD data points in formula used for RLU
NRDIMAX radiative di-electronic transitions
NRDIMAD data points in formula used for RDI
NSIG size of array SIGBF (NRBF× frequency points)


NSIG uses the number of frequency points between the thresholds and the maximum energy. This reduces the size of he array SIGBF and saves core memory.

These PARAMETERS are given in the output of ATOMS2 and SETF2 (please use e.g. grep para to extract them for this output). The PARAMETER NSIG is named there NRBFMAW. In the PARAMETER files used for the compilation of LINE1, NSIG has to be eliminated from PARA3.INC and NRBFMAW has to be added in PARA1.INC accordingly.

5.3 Input and Output Files

The program PRO2 expects the following input files (only those which are marked with “*” are necessary):

ATOMS*
atomic-data file (Sect. 2)

DATEN*
contains all input cards, used as a here document for STDIN (file name can be freely chosen)

FGRID*
frequency grid (Sect. 3)

MODIN*
start model (Sect. 4)

RBF_CUTOFF
optional input file, that can be used to set specific bound-free absorption cross-section equal to 0, starting at a given frequency.
Example:

cat > RBF_CUTOFF << eos
LOW |~|  |~|  |~|  |~|  |~|  |~|  |~| UP |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~| CUTOFF-FREQUENCY
C432S |~|  |~|  |~|  |~|  |~| C522S |~|  |~|  |~|  |~|  |~| 1.0E16
HE28 |~|  |~|  |~|  |~|  |~|  |~| HE31 |~|  |~|  |~|  |~|  |~|  |~| 1.2E17

The first record in RBF_CUTOFF (in the above example !) is optional.

The program PRO2 creates the following output files:

MODOUT
(output model)

NEGDENS
Indicates that negative density values exist in MODOUT. MODOUT can be read by LINE1 and transformed into a formatted version. This model may be edited then.

STOP
Indicates that a model converged. PRO2 will stop immediately in case that this file exists in the working directory because it assumes convergence then (cf. Sect. 10). This can be used to stop PRO2 calculations (e.g. to restart the jobs with a changed input file DATEN.

5.4 Input Options

The program PRO2 can be controlled by a number of input options. Some of them are initialized with a default value (indicated by *) and can be omitted if no other values shall be requested. Indispensable blanks are indicated by  |~| . Numerical data can be inserted format free.


. whatever
commented by “.” in the first column, disregarded by PRO2


ABUNDANCE |~| AA x
introduces the abundance of the element AA (flushed to the left). The input x is the number ratio relative to hydrogen. If the start model contains already the element AA, this card is disregarded.


ABUNDANCE |~| AA |~| x |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~| MASS |~| FRACTION
introduces the abundance of the element AA (flushed to the left). The input x is the mass fraction. If the start model contains already the element AA, this card is disregarded.


ACCELERATION |~| OF |~| CONVERGENCE |~| FROM |~| ITERATION 999*
the Ng method for acceleration of convergence is used, starting from iteration 999. After every 4th iteration, all photospheric parameters are extrapolated from the previous iterations.


BROYDEN=0*,  |~|  |~|  |~| SWITCH-LIMITS |~|  |~| 0-->1, |~| 1-->2, |~| 2-->1 |~| : 1.E-33* 1.E-33* 1.E+33*
This option invokes a quasi-Newton method (“Broyden method”) instead of the Newton-Raphson iteration of the linearized equations.

The three switch-limits e1, e2, e3 indicate

While in the case of diagonal operator the switches occur locally following local criteria, the tridiagonal operators require global judgement and used the highest relative correction found in the whole atmosphere. Informations about the switches can be printed to STDOUT (see below).


CHANGE |~| EFFECTIVE TEMPERATURE |~| x
generally, PRO2 takes the information about Teff from the start model (Sect. 4). With this card, the another Teff can be chosen. This works in small steps and takes much less time than the calculation of a new model with almost the same parameters.


CHANGE |~| LOGG |~| x
like CHANGE EFFECTIVE TEMPERATURE, but for a new value of the surface gravity g


CHANGE |~| ABUNDANCE |~| AA |~| x |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~| MASS |~| FRACTION
like CHANGE EFFECTIVE TEMPERATURE, see ABUNDANCE for MASS FRACTION.


COMMENT:
With this card any comment can be printed at the beginning of the output.


DEPTH |~| DEPENDENT |~| LINE |~| PROFILES, |~| LINEARIZATION: |~| XXXXX
This option XXXXX = FIRST or EACH |~| is indispensable if depth dependent line profiles shall be calculated. FIRST saves a lot of computational time.


ERRNEW=1.E-10*
limit for the relative corrections to stop the linearizations


ERRSCH=1.E-04*
limit for the relative corrections to stop the Scharmer iteration


FORMAL |~| SOLUTION
PRO2 carries out two formal solutions (with/without line opacities) and saves the line profile in the file LINES.


FREQUENCY |~| GRID |~| FORMATTED
The frequency grid FGRID (input) is formatted.


STEP |~| UP |~| F-VALUES: |~| *****-START: |~| IIII |~| x1 x2 x3
The oscillator strengths of all lines of a selected ion IIII are reduced by a factor of x1 at the beginning of the iterations and stepped up by a factor of x2 every x3 Scharmer iterations.

For ***** the two possibilities INPUT or MODEL can be requested. With INPUT, PRO2 uses the values of x1, x2, and x3 as requested in the card; with MODEL, PRO2 reads these values from the start model (Sect. 4) if a previous PRO2 has not reached unity for all step-up values and thus, written them to the output model.


STEP |~| UP |~| F-VALUES: |~| NO |~| KANTOROVICH |~| RESET |~| AFTER |~| STEP |~| UP
In general, after each increase of f-values, the Broyden/Kantorovich method is reset. This card suppresses this reset.


STEP |~| UP |~| F-VALUES: |~| LIMIT |~| FOR |~| ABS. |~| REL. |~| NG |~| CORRECTION |~| x
In case that the absolute relative total density correction exceeds x (default value: 0.1), the next step up is skipped.


GAMMA=1*
The value defines the optical depth tn = g which separates the region of the line wing for which the core and the wing approximations shall be used.


IGNORE |~| CPU |~| TIME |~| LIMIT
set the security time (necessary to complete the job) equal 0. This can only be used if it is sure that the requested number of iterations can be completed within the jobs run time limit.


INCREASE |~| COLLISIONAL |~| RATES |~| BY |~| FACTOR |~| x
The collisional rates can be increased in order to simulate a LTE model atmosphere. The factor x has to be > 10+30, in order to guarantee that collisions dominate the photosphere ...


INNER |~| BOUNDARY: |~| LAMBDA-ITERATION


INPUT-MODEL |~| FORMATTED


ITMAX=1*
maximum number of Scharmer iterations


JACOBI |~| FRESH-UP,INTERVAL 5*
calculation of the Jacobian every 5th Scharmer iteration. Only valid in case of Broyden or Kantorovich method.


KANTOROVICH=2, |~|  |~|  |~| SWITCH LIMITS |~|  |~| 0-->1, |~| 1-->2, |~| 2-->1 |~| : 1.E33* 0.1* 1.0*
like the BROYDEN card.


LINEARIZE |~| HYDROSTATIC |~| EQUATION
With this option the hydrostatic equation is solved simultaneously with the statistical equation and not (default) solved subsequently.


NO |~| RENORMALIZATION |~| OF |~| COMPLEX |~| LINE |~| CROSS |~| SECTIONS
undoes a previously made re-normalization of the sample cross-sections for iron group elements


NO |~| TEMPERATURE |~| CORRECTION
the radiative equilibrium is omitted from the linearization


T-CORRECTION |~| ONLY |~| IN |~| LOG |~| M |~| INTERVAL: |~| mmin mmax
the temperature correction is restricted to the selected log m interval.


T-CORRECTION |~| PROFILE: |~| X
the temperature correction is damped by simple functions (ND = total number of depth points)

X


1 depth point / ND
2(depth point / ND)2
3  V~ ----------------
  depthpoint/N  D


LAMBDA=3*
selects the Λ operator

Λ = 3 diagonal operator by Olson & Kunasz
Λ = 4tridiagonal operator by Olson & Kunasz

Both operators are generally parameter-free. In practice, it is less time consuming to do a Λ iteration in the optical thin case. This can be done by requesting a special GAMMA parameter (see above).

In order to accelerate the convergence, both operator switch to core saturation if tn > 100.


LINEARIZATION |~| MODE: |~| BLOCK-MATRIX-ITERATION, |~| XX YY ZZ
with this option, only the occupation numbers of the given elements (here XX YY ZZ) are iterated. In combination with the card SOLVE STATISTICAL EQUATIONS ONLY, a “classical” line formation iteration is done. In all depth points, XX is Newton-Raphson iterated (inclusive constraint equations) first, then YY, and at least ZZ. Attention: this option alone does not switch off the constraint equations!


LINEARIZATION |~| MODE: |~| BLOCK-MATRIX-ITERATION, |~| ALL
like LINEARIZATION MODE: BLOCK-MATRIX-ITERATION, XX YY ZZ. All elements are iterated in order of their appearance in the atomic data file ATOMS.


MICROTURBULENCE |~| [KM/S] 0.0*
with this option, the microturbulence pressure is considered in the hydrostatic equation but not in the calculation of the line profiles!


NEWMAX=1*
maximum number of linearizations


OCCUPATION |~| PROBABILITY |~| FORMALISM |~| FOR |~| AA
The Hummer-Mihalas (HM) formalism is used to calculate the level dissolution for AA = H1 or AA = <ion>.


OPACITY |~| PROJECT |~| RBF |~| DATA |~| : START |~| AT |~| EDGE
PRO2 can calculate bound-free cross-section using data from the Opacity Project (OP). Here the OP data set is used and the cross-sections start at the threshold energy of the respective level.


OPACITY |~| PROJECT |~| RBF |~| DATA: |~| FULL |~| DATA |~| SET
see above, the complete OP data set is used (which may start at lower energy the the level energy in order to simulate the transition from the line absorption to the continuous absorption at the series limit.


OPACITY |~| PROJECT |~| RBF |~| DATA: |~| ONLY |~| EDGE |~| VALUE
see above, a mean value of the OP data at the threshold energy is calculated, then the absorption cross-sections are calculated using the Seaton formula in hydrogenic approximation.


OPACITY |~| PROJECT |~| RBF |~| DATA: |~| MISSING |~| HYDROGENIC
see above, for those levels which are not found in the OP data set hydrogen-like threshold cross-sections are calculated. Then, the Seaton formula is used.


OPACITY |~| PROJECT |~| RBF |~| DATA: |~| HYDROGENIC
see above, all bound-free transitions, which are found in the atomic data file ATOMS and request explicitly the use of OP data are calculated with hydrogen-like threshold cross-sections and the Seaton formula.


OUTPUT-MODEL |~| FORMATTED


RADIATIVE |~| EQUILIBRIUM: |~| DIFFERENTIAL/INTEGRAL |~| FORM
The radiative equilibrium is calculated using a combination of the differential and the integral method.


READ |~| NEW |~| TEMPERATURE |~| STRUCTURE
A temperature structure is read in from file TEMPERATURE.IN. This temperature may be interpolated from other models in order to speed up the calculation of “in-between” models. TEMPERATURE.IN is an ASCII table with log m and T, however, the log m values are ignored.


REDUCE |~| LOG |~| CVEC |~| x
This options scales the inhomogeneity vector of the linearized equations. This is useful to overcome numerical instabilities and to avoid too-large corrections in the beginning of the iterations. This card has to be inactivated to get a finally converged model.


SAVING |~| MODEL: |~| EACH |~| ITERATION
a temporary model (MODTMP) is saved in the working directory $TMPDIR. An example how to save this temporary model automatically in case of a failed model calculation is given in Sect. D.8.5. An

ln -sf MODTMP ${name}

before the start of the model calculation, where ${name} is the assigned name of the output model helps to identify the model.


SET |~| TEMPERATURE t log m1 log m2 [scaling factor]
within log m1 < log m < log m2, the model temperature is set to

  

  • t
  • cubic-spline interpolation of t
  • linear interpolation of t
  • t read from model TIN
  • t is temperature value of next depth point with log m > log m2.
  • like t = -3, but an additional third argument (scaling factor) has to be given that is multiplied to the TIN temperature


SHIFT |~| EDGE |~| BBBBBBBBBBFFFFFFFFFF x
The absorption threshold of the level BBBBBBBBBBFFFFFFFFFF given in the TMAP code (Sect. 2.1) is artificially shifted to the frequency point x. Attention: The given frequency x has to fit exactly a point within the frequency grid FGRID! All shifts are printed to STDOUT.


SKIP |~| ATOM |~| AA |~| BELOW x
the element AA (flushed to the left) with occupation numbers less than x are eliminated from the statistical equations


SKIP |~| ION |~| III |~| BELOW x
ion III (flushed to the left) with occupation numbers less than x are eliminated from the statistical equations


SKIP |~| LEVELS |~| BELOW x
levels with occupation numbers less than x are eliminated from the statistical equations


SKIP |~| OCCDRVF |~| AFTER |~| 1ST |~| LINEARIZATION
The derivations of the source functions are only calculated once (in the 1st linearization) and are then kept fixed. Attention: This saves an enormous amount of computational time in case of many NLTE levels and many frequency points but it works well only in the case of almost converged models.


SOLVE |~| STATISTICAL |~| EQUATIONS |~| ONLY
switches off the constraint equations for ne, nH, ng, T


SOLVE |~| STATISTICAL |~| EQUATIONS |~| ONLY |~|  |~|  |~| RE-SOLVE PARTICLE CONSERVATION
switches off the constraint equations for ne, nH, ng, T within the Newton-Raphson iteration. The hydrostatic and particle conservation equations are then solved subsequently.


SWITCH |~| OFF |~| LINES
All line transitions are ignored. Attention: sample lines of iron-group elements can not be switched off.


TIME |~| LIMIT 2000*
cpu time for the job to calculate. Only valid on non-CRAY machines


TRANSITION |~| IN |~| DETAILED |~| RADIATIVE |~| BALANCE |~| XXXXXXXXXXYYYYYYYYYY
With this option, the radiative transition XXXXXXXXXXYYYYYYYYYY given in the TMAP code (Sect. 2.1) is calculated in detailed radiative equilibrium. Thus, this transition is eliminated from the statistical equations but not from the calculation of the opacities and emissivities.


UNSOELD-LUCY |~| TEMPERATURE |~| CORRECTION |~| DAMP= x
With this option, the radiative equilibrium is eliminated from the linearization. The temperature structure is calculated after the linearizations with the Unsöld-Lucy temperature correction method. The damping factor x is used to avoid over-corrections and numerical instabilities.


UPPER |~| AND |~| LOWER |~| LIMITS |~| FOR |~| RELATIVE |~| T-CORRECTION |~| t1 t2
The relative temperature corrections (iteration i) are limited to the range Ti . t1 < Ti+1 < Ti . t2 at all depth points.

5.5 Output Options

The following PRINT and PLOT cards create output on STDOUTt and plot data files, respectively. The plot files are written in WRPLOT readable format. The option should be easily understandable ... Generally, for XXXX EACH or LAST can be inserted. ii indicates an I2 format specifier (FORTRAN).

5.5.1 Output to STDOUT


PRINT |~| ABUNDANCES

PRINT |~| BROYDEN |~| INFORMATIONS

PRINT |~| CORRECTIONS |~| OF |~| LAST |~| LINEARIZATION,ITERATION:LAST,DEPTH |~| INCREMENT: i

PRINT |~| CORRECTIONS |~| OF |~| TOTAL |~| DENSITIES,ITERATION:LAST,DEPTH |~| INCREMENT: i
in the case of non-linearization of the hydrostatic equation (default, see above)


PRINT |~| CP-TIME/ITERATION,XXXX

PRINT |~| DATA |~| FOR |~| DIELECTRONIC |~| RECOMBINATIONS
prints especially the frequencies which are selected by PRO2.


PRINT |~| DEPARTURE |~| COEFFICIENTS,ITERATION:XXXX,DEPTH |~| INCREMENT:15

PRINT |~| EMERGENT |~| FLUX,ITERATION:XXXX
prints also Teff, which is an sensitive control parameter


PRINT |~| FREQUENCY |~| GRID

PRINT |~| INFORMATION |~| ABOUT |~| INPUT |~| SAMPLE |~| CROSS |~| SECTIONS

PRINT |~| INPUT |~| MODEL,DEPTH |~| INCREMENT:ii

PRINT |~| INPUT |~| MODEL,DEPTH |~| INCREMENT:ii |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~|  |~| (STRUCTURE |~| ONLY)

PRINT |~| INTEGRATED |~| SURFACE |~| FLUX,ITERATION:XXXX

PRINT |~| KANTOROVICH |~| INFORMATIONS

PRINT |~| LEVELS
prints level names, energies, and statistical weights of all LTE / NLTE levels


PRINT |~| LEVEL |~| SKIP |~| INFORMATION

PRINT |~| MAX. |~| REL. |~| CORRECTIONS |~| EVERY |~| ii |~| ITERATIONS

PRINT |~| OCCUPATION |~| PROBABILITIES,ITERATION:XXXX,DEPTH |~| INCREMENT:ii

PRINT |~| OPACITY |~| PROJECT |~| INFORMATION

PRINT |~| OUTPUT |~| MODEL,ITERATION:XXXX,DEPTH |~| INCREMENT:ii
prints temperature and density structure, and all occupation numbers of the NLTE levels


PRINT |~| OUTPUT |~| MODEL,ITERATION:XXXX,DEPTH |~| INCREMENT:ii |~|  |~|  |~| (STRUCTURE |~| ONLY)
prints temperature and density structure


PRINT |~| MODEL |~| ATOMS |~| (OVERVIEW)

PRINT |~| NUMBER |~| OF |~| FUV |~| PHOTONS

PRINT |~| OPTIONS
prints the most important input parameters


PRINT |~| PARAMETER |~| NSIG
for the optimization of the PARAMETER NSIG, NRLUMAD, and NRLLMAD


PRINT |~| RADIATION |~| FIELD,ITERATION:XXXX,DEPTH |~| INCREMENT:ii

PRINT |~| RBF |~| CUTOFF |~| FREQUENCIES
prints the frequency where the RBF cross-section of a level is set equal 0


PRINT |~| ROSS,ITERATION:LAST
print the value of ROSS for the inner boundary condition


PRINT |~| TAUSCALES,ITERATION:XXX,DEPTH |~| INCREMENT:ii

PRINT |~| WARNINGS

LP-PLOT |~| OPTICALLY |~| THICK/THIN,ITERATION:XXXX
A plot of the t = 1 limit in the atmosphere is printed and saved in a file (PLLP).

5.5.2 Output into Plot Data Files


PLOT |~| CORRECTIONS
Plot data is written into file PLOTCORR.


PLOT |~| DEPARTURES xmin xmax ymin ymax
Plot data is written into file PRFLUX.


PLOT |~|  |~| EMERGENT |~| FLUX,ITERATION:XXXX
Same like PRINT card, output is written into file PRFLUX.


PLOT |~| FLUX xmin xmax ymin ymax
Plot data is written into file PRFLUX.


PLOT |~| IONIZATION |~| FRACTIONS AA xmin xmax ymin ymax
Plot data is written into file IONPLOT.


LP-PLOT |~| OPTICALLY |~| THICK/THIN,ITERATION:XXXX,FILE |~| ONLY
A plot of the t = 1 limit in the atmosphere is saved in the file PLLP only.


PLOT |~| RBF |~| CROSS |~| SECTIONS XXXXXXXXXXYYYYYYYYYY 0 0 0 0
The RBF cross section of level XXXXXXXXXXYYYYYYYYYY is saved in the file PLRBF.


PLOT |~| TEMPERATURE |~| STRATIFICATION
Plot data is written into file STRUCTURE.