26 const double ditcrt[],
36 #define DICOEF(I_,J_) (*(dicoef+(I_)*(nelem+1)+(J_)))
37 #define DITE(I_,J_) (*(dite+(I_)*(nelem+1)+(J_)))
44 DielRecomRateCoef_HiT[
LIMELM] ,
45 DielRecomRateCoef_LowT[
LIMELM] ,
52 static bool lgNoiseNeedEval=
true;
86 for( ion=0; ion<=n; ++ion )
98 for( ion=0; ion<=n; ++ion )
100 RecNoise[n][ion] = 1.;
104 lgNoiseNeedEval =
false;
118 for( ion=0; ion <= limit; ion++ )
121 ChargeTransfer[ion] = 0.;
122 DielRecomRateCoef_LowT[ion] = 0.;
123 DielRecomRateCoef_HiT[ion] = 0.;
127 for( ion=limit+1; ion <
LIMELM; ion++ )
132 ChargeTransfer[ion] = -FLT_MAX;
133 DielRecomRateCoef_LowT[ion] = -FLT_MAX;
134 DielRecomRateCoef_HiT[ion] = -FLT_MAX;
137 DielRecomRateCoef_HiT[nelem] = 0.;
138 DielRecomRateCoef_HiT[nelem-1] = 0.;
140 DielRecomRateCoef_LowT[nelem] = 0.;
141 DielRecomRateCoef_LowT[nelem-1] = 0.;
148 for( ion=
dense.
IonLow[nelem]; ion <= limit; ion++ )
154 long n_bnd_elec_after_recomb = nelem+1 - ion;
158 ChargeTransfer[ion] =
185 DielRecomRateCoef_HiT[ion] = 0.;
192 else if(
phycon.
te > (ditcrt[ion]*0.1) )
203 DielRecomRateCoef_LowT[ion] = 0.;
204 if( ((n_bnd_elec_after_recomb-1) != 2) &&
205 ((n_bnd_elec_after_recomb-1) != 10) &&
206 ((n_bnd_elec_after_recomb-1) != 18) )
208 tefac = ff[ion]*t4m1;
210 if( ff[ion] != 0. && nelem!=
ipIRON )
217 factor = (((aa[ion]*t4m1+bb[ion])*t4m1+cc[ion])*t4m1+dd[ion])*
sexp(tefac);
223 DielRecomRateCoef_LowT[ion] = 0.;
231 if( (ff[ion] == 0.) && (ion <= 3) )
236 static double cludge[4]={3e-13,3e-12,1.5e-11,2.5e-11};
250 double fitcoef[3][3] =
253 {-52.5073,+5.19385,-0.126099} ,
255 {-10.9679,1.66397,-0.0605965} ,
257 {-3.95599,1.61884,-0.194540}
265 if( (n_bnd_elec_after_recomb>=4) && (n_bnd_elec_after_recomb<=11) )
267 else if( (n_bnd_elec_after_recomb>=12) && (n_bnd_elec_after_recomb<=19 ))
272 DielRecomRateCoef_LowT[ion] = fitcoef[nshell][0] +
273 fitcoef[nshell][1]*(ion+1) +
274 fitcoef[nshell][2]*
POW2(ion+1.);
275 DielRecomRateCoef_LowT[ion] = 1e-10*pow(10.,DielRecomRateCoef_LowT[ion]);
282 DielRecomRateCoef_LowT[ion] = 3e-12*pow(10.,(
double)(ion+1)*0.1);
292 DielRecomRateCoef_LowT[ion] *= RecNoise[nelem][ion];
319 # define FRAC_LINE 1.
338 " %s recombination coefficients fnzone:%.2f \tte\t%.4e\tne\t%.4e\n",
344 for( i=0; i < limit; i++ )
348 fprintf( ioOut,
" radiative used vs Z\n" );
350 for( i=0; i < limit; i++ )
354 fprintf( ioOut,
" old Verner vs Z\n" );
356 for( i=0; i < limit; i++ )
360 fprintf( ioOut,
" new Badnell vs Z\n" );
362 for( i=0; i < limit; i++ )
369 fprintf( ioOut,
" CT/n(H0)\n" );
371 for( i=0; i < limit; i++ )
375 fprintf( ioOut,
" 3body vs Z /ne\n" );
382 fprintf( ioOut,
" Grain vs Z /ne\n" );
384 for( i=0; i < limit; i++ )
386 fprintf( ioOut,
"%10.2e", DielRecomRateCoef_HiT[i] );
388 fprintf( ioOut,
" Burgess vs Z\n" );
390 for( i=0; i < limit; i++ )
394 fprintf( ioOut,
" old Nussbaumer Storey DR vs Z\n" );
396 for( i=0; i < limit; i++ )
400 fprintf( ioOut,
" new Badnell DR vs Z\n" );
402 for( i=0; i < limit; i++ )
404 fprintf( ioOut,
"%10.2e", DielRecomRateCoef_LowT[i] );
406 fprintf( ioOut,
" low T DR used vs Z\n" );
409 for( i=0; i < limit; i++ )
414 " total rec rate (with density) for %s\n",
416 for( i=0; i < limit; i++ )
421 " total rec rate / ne for %s\n\n",
428 fprintf( ioOut,
" R " );
429 for( i=11; i < limit; i++ )
433 fprintf( ioOut,
"\n" );
435 fprintf( ioOut,
" B " );
436 for( i=11; i < limit; i++ )
438 fprintf( ioOut,
"%10.2e", DielRecomRateCoef_HiT[i] );
440 fprintf( ioOut,
"\n" );
442 fprintf( ioOut,
" NS" );
443 for( i=11; i < limit; i++ )
445 fprintf( ioOut,
"%10.2e", DielRecomRateCoef_LowT[i] );
447 fprintf( ioOut,
"\n" );
449 fprintf( ioOut,
" " );
450 for( i=11; i < limit; i++ )
454 fprintf( ioOut,
"\n\n" );
476 double te1[
N1LIM]={ 5000., 10000., 20000.};
477 double te2[
N2LIM]={ 20000.,50000.,100000.,1e6};
479 double BreakEnergy = 100./13.0;
480 long int nelem, ion , i;
495 fprintf(io,
"X+i\\Te");
496 for( i=0; i<
N1LIM; ++i )
509 for( ion=0; ion<=nelem; ++ion )
517 sprintf(chOutput,
"%s",
520 if( chOutput[1]==
' ' )
521 chOutput[1] = chOutput[2];
525 sprintf(chString,
"0 ");
529 sprintf(chString,
"+ ");
533 sprintf(chString,
"+%li ",ion);
535 strcat( chOutput , chString );
536 fprintf(io,
"%5s",chOutput );
538 for( i=0; i<N1LIM; ++i )
544 fprintf(
ioQQQ,
"PROBLEM ConvBase returned error.\n");
554 fprintf(io,
"X+i\\Te");
555 for( i=0; i<
N2LIM; ++i )
568 for( ion=0; ion<=nelem; ++ion )
589 fprintf(io,
"+%li",ion);
592 for( i=0; i<N2LIM; ++i )
598 fprintf(
ioQQQ,
"PROBLEM ConvBase returned error.\n");