# Input is : # First line = appropriate line from table29 # Next line(s) = temperature (if none, tabulate the ionization rate) # Note: first exponential integral computed with polynomial approxomation # from J.Jin (http://jin.ece.uiuc.edu/routines/routines.html) function E1(x) { # Compute first exponential integral #print "#Compute E1(" x ")"; if (x<0) return(0./0.); # NaN if (x == 0) return(1./0.); # Inf if (x < 1) return ( -log(x)+ \ ((((1.07857e-3*x-9.76004e-3)*x+5.519968e-2)*x -0.24991055)*x \ +0.99999193)*x-0.57721566); es1 = (((x+8.5733287401)*x+18.059016973)*x +8.6347608925)*x+0.2677737343; es2 = (((x+9.5733223454)*x+25.6329561486)*x+21.0996530827)*x+3.9584969228; return(exp(-x)/x*es1/es2); } function title() { print "#======================"; printf "#%9s %-10s# \n", " T[K] ", "R(T)[cm3/s]" print "#======================"; } BEGIN { k = 8.617e-5; # Boltzmann in eV/K f = 2. } /^#/ { print; next } /^ *$/ { next } # First Line contains the ion, next lines contain a temperature { if (Z<1) { # First line = Z Ion Nspl I Tmin xi {rho}i Z = $1; Ion = $2; Ns = $3+0; I = $4+0; Tmin = $5+0; for (i=1; i<=Ns; i++) X[i] = $(i+5)+0; for (i=1; i<=Ns; i++) Y[i] = $(i+5+Ns)*1.e-6; print "# Element=" Z "." Ion " I=" I "eV Tmin=" Tmin " Ns=" Ns; next } #print "#Input=" $0; if (nT == 0) title(); nT += 1; # Number of temperature(s) computed. T = $1+0; if (T < Tmin) { print "#***T too small:", T " < " Tmin; next } t = k*T/I; x = 1.0 - log(f)/log(t+f); #printf "#T=%-10.3e t=%-10.3e x=%-7.4f\n", T, t, x; # Find the point X[Is] w