D.7 Example: A model with hydrogen and helium
T = 100000 K, log g = 7 and number fractions H = 0.9 and He = 0.1
Basic H and He model atoms are provided by TMAD ( http://astro.uni-tuebingen.de/~TMAD).
These are combined then in ${AA}/H+He.
D.7.1 ATOMS2
- Copy the job file in /home/<user>/jobs/atoms2 to H+He.job. It needs a file H+He with
the atomic data in /home/<user>/adaten. Edit both files the test_atmos.job and the
test_atoms_lte.job (with emacs). Make sure you use the atomic data file H+He.
- After editing, execute the job file and create an output file for both jobs and check the
output files for error messages.
Table 5: | Example for the atoms2.job in the case of LTE and NLTE model atmosphere calculations |
|
|
|
| LTE model | NLTE model |
|
| #!/bin/sh | #!/bin/sh |
set +x;. ${HOME}/.jobstart | set +x;. ${HOME}/.jobstart |
# | # |
cat > options <<eos | cat > options <<eos |
AUTO ION H I 16 16 16 | AUTO ION H I 16 16 16 |
AUTO ION HE II 14 32 -14 | AUTO ION HE II 14 32 -14 |
CBB-AUTO-FILL | CBB-AUTO-FILL |
CBF-AUTO-FILL | CBF-AUTO-FILL |
CBX-AUTO-FILL | CBX-AUTO-FILL |
RBB-AUTO-FILL ( NONE) | .RBB-AUTO-FILL ( NONE) |
RBF-AUTO-FILL ( NOOP) | RBF-AUTO-FILL |
RDI-AUTO-FILL ( NONE) | RDI-AUTO-FILL ( NONE) |
END OPTIONS | END OPTIONS |
eos | eos |
# | # |
cp ${AA}/H+He PROATOM | cp ${AA}/H+He PROATOM |
expand options PROATOM > SOURCE | expand options PROATOM > SOURCE |
${BI}/atoms2${sys} | ${BI}/atoms2${sys} |
ls -l ATOMS | ls -l ATOMS |
# | # |
cp ATOMS ${AA}/H+He_lte.atoms2 | cp ATOMS ${AA}/H+He.atoms2 |
# | # |
set +x; ${HOME}/.jobend ${TMPDIR} | set +x; ${HOME}/.jobend ${TMPDIR} |
|
| |
|
D.7.2 SETF2
- Edit both files H+He_lte_setf2 and H+He_setf2 in /home/<user>/jobs/setf2. Set the
temperature on 100000K and make sure that it refers to H+He_lte.atoms2.
Table 6: | Example for a setf2.job in the case of LTE and NLTE model atmosphere
calculations |
|
|
|
| LTE model | NLTE model |
|
| #!/bin/sh | #!/bin/sh |
set +x;. ${HOME}/.jobstart | set +x;. ${HOME}/.jobstart |
# | # |
TT=0100000 | TT=0100000 |
# | # |
type='_lte' | type=' ' |
# | # |
cp ${AA}/H+He${type}.atoms2 ATOMS | cp ${AA}/H+He${type}.atoms2 ATOMS |
# | # |
${BI}/setf2${sys} << % | ${BI}/setf2${sys} << % |
$TT | $TT |
PRINT CHECK | PRINT CHECK |
1.30E+16 | 1.30E+16 |
-1 | -1 |
10 10 | 10 10 |
% | % |
# | # |
if test -s FGRID | if test -s FGRID |
then | then |
cp FGRID ${FF}/H+He_${TT}${type}.setf2 | cp FGRID ${FF}/H+He_${TT}${type}.setf2 |
else | else |
echo 'no FGRID created' | echo 'no FGRID created' |
fi | fi |
# | # |
set +x; ${HOME}/.jobend ${TMPDIR} | set +x; ${HOME}/.jobend ${TMPDIR} |
|
| |
|
- Run both jobs and create output files for them. The files H+He_100000(_lte).setf2 and are written
to /home/<user>/fgrids.
D.7.3 Parameter files
- Extract the parameters from the H+He_atoms.out file with
grep para H+He_atoms.out and from the output file H+He_setf2.out of the
frequency grid If you want to save the parameters you can write them in a file with
grep para H+He_atoms.out > object.out
- the parameter files for PRO2 can be found in /home/<user>/parameter/pro2
- copy the existing
parameter files to PARA_H+He.INC, PARA1_H+He.INC, PARA3_H+He.INC and adjust
them by using the parameters from H+He_atoms.out and H+He_setf2.out.
NOTICE: the values in the parameter files should be never 0!
- compile with ssh ait320 load pro2 H+He [P4/x64] (use P4 for 32bit machines, x64
for 64bit machines). The program /home/<user>/bimod/pro2_H+He.Linux_[P4/x64] is
created
D.7.4 LTE2
- Edit H+He_lte.job with emacs. Set T=100000K, logg=7 and H=0.9 and He=0.1. The input
files are H+He_lte.atoms2 and H+He_100000_lte.setf2.
- Start the job (an example is given below) and write its output into a file.
nice +19 H+He_lte.job
> H+He_lte.out The lte model is written to /home/<user>/model/H+He/lte. The file is
called
0100000_7.00_0.900_0.100.
#!/ bin/sh
set + x ; . ${ HOME }/. jobstart
# do not edit the beginning of this f i l e
# #######################
# # own job following ##
# #######################
#
# ------------
# common paths
# ------------
GRP =/ home/rauch/group
# ---------
# user part
# ---------
#
# directories etc .
#
code=lte2
mod = H + He
type=’_lte ’
#
jobdir= ${JO}/ l t e
f l x d i r= ${JO}/ l t e
#
# model parameters
H=0.900
HE=0.100
#
GGM =7.00
TTM =0100000
#
name = ${ TTM }_${ GGM }
fn= ${mod}
#
aa = ${ AA }/${fn}${type }. atoms2
f f= ${FF}/${fn}_${ TTM }${type }. setf2
#
if test ! -s ${ f f }
then
echo ’${ TTM } ’ > SDATEN
echo ’PRINT CHECK ’ >> SDATEN
echo ’1.30E+16’ >> SDATEN
echo ’1 ’ >> SDATEN
echo ’20 10 ’ >> SDATEN
cp ${aa} ATOMS
${BI}/ setf2$ { sys } < SDATEN 1>&1
if test -f FGRID
then
cp FGRID ${ f f }
chmod 600 ${ f f }
echo ’new frequency grid created ’
l s -l ${ f f }
else
echo ’no new frequency grid created ’
break
fi
rm *
fi
#
MO = ${ MO }/${mod}/ l t e /${name}_${ H }_${ HE }
#
if test ! -s ${ MO }
then
#
echo ’2 1 ${ H } ${ HE} ’ > normH
echo ’2 2 ${ H } ${ HE} ’ > normHE
#
HN =‘/home/rauch/bimod/normalize${ sys } < normH 2>/dev/ null 1>&1‘
HEN =‘/home/rauch/bimod/normalize${ sys } < normHE 2>/dev/ null 1>&1‘
#
cat > LDATEN << eos
T EFF ${ TTM }
LOG G ${ GGM }
DAMP =0.1
ITMAX =100
EPS=1.0E -6
TAU SCALE 86 90 -2
PRINT INTEGRATED EDDINGTON FLUX,ITERATION:LAST
PRINT TEMPERATURE CORRECTIONS,ITERATION:LAST,ALL DEPTHS
PRINT MODEL ATOMS ( OVERVIEW )
ABUNDANCE H ${ HN }
ABUNDANCE HE ${ HEN }
eos
#
cp ${aa} ATOMS
cp ${ f f } FGRID
#
${BI}/${code}${ sys } < LDATEN
#
if test -s MODELL
then
cp MODELL ${ MO }
chmod 600 ${ MO }
fi
fi
#
# do not edit the rest of this f i l e
# ####################
set + x ; ${ HOME }/. jobend ${ TMPDIR }
D.7.5 PRO2
- Edit the H+He_nlte.job in emacs. Adjust the temperature, log gand the abundances of the
used elements as before and check if the used files have the right name. The Input files are
H+He.atoms2, H+He_100000.setf2 and the model from LTE2 is the input model.
- Start the job (an example is given in table below) with
nice +19 H+He_nlte.job > H+He_nlte.out
- The output model is written to /home/$<$user$>$/model/H+He/.
#!/ bin/sh
set + x ; . ${ HOME }/. jobstart
# do not edit the beginning of this f i l e
# #######################
# # own job following ##
# #######################
#
# ------------
# common paths
# ------------
GRP =/ home/rauch/group
# ---------
# user part
# ---------
#
# directories etc .
#
code=pro2
mod = H + He
#
type =’’
#
jobdir= ${ HOME }/ jobs /pro2
f l x d i r= ${ HOME }/ jobs /pro2
#
IONFRAC = HE
#
# --- model parameters
#
fn= ${mod}
#
GGM =7.00
#
TTM =0140000
#
H=0.900
HE=0.100
#
name = ${ TTM }_${ GGM }
#
#
aa = ${ AA }/${fn}${type }. atoms2
f f= ${FF}/${fn}_${ TTM }${type }. setf2
#
if test ! -s ${ f f }
then
/home/rauch/prep_conts_man${ sys } > noCONTS_MAN << eos
5.0 2000.1 0.1
eos
echo ’${ TTM } ’ > SDATEN
echo ’PRINT CHECK ’ >> SDATEN
echo ’1.30E+16’ >> SDATEN
echo ’1 ’ >> SDATEN
echo ’4 10 ’ >> SDATEN
cp ${aa} ATOMS
${BI}/ setf2$ { sys } < SDATEN 2>/dev/ null 1>&1
if test -f FGRID
then
cp FGRID ${ f f }
chmod 600 ${ f f }
echo ’new frequency grid created ’
l s -l ${ f f }
else
echo ’no new frequency grid created ’
break
fi
rm *
fi
#
name = ${name}_${ H }_${ HE }
#
MI = ${ HOME }/models/${mod}/0100000_7 .00 _0 .900 _0 .100 _pro2
MO = ${ HOME }/models/${mod}/${name}_pro2
#
if test -s ${MI}
then
#
if test -s ${ MO }
then
MI = ${ MO }
fi
#
cat > DATEN << eos
COMMENT: test 4 TMAP
.
.CHANGE ABUNDANCE H ${ H } MASS FRACTION
.CHANGE ABUNDANCE HE ${ HE } MASS FRACTION
.
.CHANGE LOGG $GGM
.CHANGE EFFECTIVE TEMPERATURE $TT
.
LAMBDA =4
.
OCCUPATION PROBABILITY FORMALISM FOR H1
OCCUPATION PROBABILITY FORMALISM FOR HE1
OCCUPATION PROBABILITY FORMALISM FOR HE2
.
OPACITY PROJECT RBF DATA: START AT EDGE
OPACITY PROJECT RBF DATA: MISSING HYDROGENIC
.
.STEP UP F - VALUES: MODEL - START: H1 1.0E -03 1.5 1
.STEP UP F - VALUES: MODEL - START: HE1 1.0E -04 1.5 1
.STEP UP F - VALUES: MODEL - START: HE2 1.0E -03 1.5 1
.
ITMAX =20
.ERRSCH =1.0E -4
NEWMAX =2
.ERRNEW =1.E -8
.
RADIATIVE EQUILIBRIUM: DIFFERENTIAL/ INTEGRAL FORM
.INNER BOUNDARY: LAMBDA - ITERATION
.LINEARIZE HYDROSTATIC EQUATION
.
SKIP OCCDRVF AFTER 1ST LINEARIZATION
.
NO NEGATIVE POPULATION NUMBERS (LTE)
.
.SWITCH OFF LINES
.
DEPTH DEPENDENT LINE PROFILES, LINEARIZATION: FIRST
.
KANTOROVICH =2, SWITCH LIMITS 0-->1, 1-->2, 2-->1 : 0.1 0.01 0.5
.SOLVE STATISTICAL EQUATIONS ONLY RE - SOLVE PARTICLE CONSERVATION
.
.NO TEMPERATURE CORRECTION
.UNSOELD - LUCY TEMPERATURE CORRECTION DAMP =0.1 0.1 0.1
.UNSOELD - LUCY PARAMETERS PRINT LIMIT 0.1 TAU - WTS 0.1 1.
.
.REDUCE LOG CVEC -1
.
.PRINT OPTIONS
PRINT MODEL ATOMS ( OVERVIEW )
PRINT ABUNDANCES
PRINT MAX. REL. CORRECTIONS EVERY 1 ITERATIONS
PRINT INTEGRATED SURFACE FLUX,ITERATION:EACH
PRINT CP - TIME /ITERATION,EACH
PLOT EMERGENT FLUX,ITERATION:LAST
PRINT OUTPUT MODEL ,ITERATION:LAST,DEPTH INCREMENT:1 (STRUCTURE ONLY)
PRINT CORRECTIONS OF LAST LINEARIZATION,ITERATION:LAST,DEPTH INCREMENT:1
LP - PLOT OPTICALLY THICK /THIN,ITERATION:LAST, FILE ONLY
PLOT IONIZATION FRACTIONS ${ IONFRAC } -8.5 2.5 -10.0 0.5
.
MACHINE ‘ hostname ‘
eos
#
cp ${MI} MODIN; chmod 600 MODIN
cp ${aa} ATOMS
cp ${ f f } FGRID
/home/rauch/data/get_OP > /dev/ null
#
${BI}/${code}_${mod}${type}${ sys } < DATEN
#
if test -s MODOUT
then
echo ”new_
NLTE_ _
model _
${ MO } created ”
cp ${MI} ${MI}_ ‘ date +% y -% m -% d}_ % H :% M :%S ‘
cp MODOUT ${ MO
chmod 600 ${ MO
l s -l ${ MO
if test -s STOP
then
cp STOP ${ MO }. converged
fi
else
echo ”no _
new_
model _
${ MO } created ” > ${ MO }. f a i l e d
touch ${ MO }.failed@$HOSTNAME
echo ”no _
new_
model _
${ MO } created ”
if test -s MODTMP
then
echo ”model _
found _
from _
i t e r a t i o n _
before _
f a i l u r e ”
cp ${MI} ${MI}_ ‘ date +% y -% m -% d_ % H :% M :%S ‘
cp MODTMP ${ MO }_tmp
l s -l ${ MO }_tmp
fi
fi
#
if test -s IONPLOT
then
cp IONPLOT ${ jobdir }/${name}. ${ IONFRAC }_ion
fi
if test -s PLLP
then
cp PLLP ${ jobdir }/${name}. lp
fi
if test -s PLOTCORR
then
cp PLOTCORR ${ jobdir }/${name}. corr
fi
if test -s PRFLUX
then
cp PRFLUX ${ f l x d i r }/${name}. flux
fi
if test -s STRUCTURE
then
cp STRUCTURE ${ jobdir }/${name}.T -structure
fi
#
fi
#
# do not edit the rest of this f i l e
# ####################
set + x ; ${ HOME }/. jobend ${ TMPDIR }