Changeset 1913

Show
Ignore:
Timestamp:
04/03/08 12:44:50 (8 months ago)
Author:
gary
Message:

these changes affect the predicted iso sequence lines. there are three major parts:

cont_createmesh.cpp the fine continuum did not extend down to the wavelength of HeI 10830 so line overlap was not being treated. Extended low energy limit to below this line. this caused some asserted 10830 lines to change.

do not print H-like or He-like lines that are produced from collapsed levels. Their emission has problems which will be documented in a trac ticket.

the data/LineList* files had H and He like lines from collapsed levels commented out. The code now predicts far fewer lines from H and He like species.

iso_level - now keep track of whether the l-mixing collisions out of p are fast enough to mix the levels. if not a comment is printed saying that the H, He lines are not accurate

prt_alltau.cpp - do not print He I line optical depths twice

parse_atom_iso.cpp - add print levels option to atom H-like levels print or atom He-like levels print to print sizes of all ions of H and He sequence. the command does not change the number of levels.

Location:
trunk
Files:
38 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/LineList_BLR.dat

    r486 r1913  
    132132BA C     0     total of integrated H balmer continuum 
    133133BaC   3646     total nuFnu of Balmer jump at 3646 (the head) 
    134 h  1  3835     total H-7 (H-Balmer) 
     134#h  1  3835     total H-7 (H-Balmer) 
    135135He 1  3889     total H-6 (H-Balmer) 
    136136ca2k  3934     total Ca II 3934 emission 
    137137ca2h  3969     total Ca II 3969 emission 
    138 h  1  3970     total H-epsilon 
     138#h  1  3970     total H-epsilon 
    139139h  1  4102     total H-delta 
    140140#inwd  4102     inward flux of H-delta 
  • trunk/data/LineList_HeH.dat

    r495 r1913  
    7979He 1 2.060m 
    8080He 1 2.112m 
    81 H  1 916.4A 
    82 H  1 917.2A 
    83 H  1 918.1A 
    84 H  1 919.4A 
    85 H  1 921.0A 
    86 H  1 923.2A 
    87 H  1 926.2A 
    88 H  1 930.8A 
    89 H  1 937.8A 
    90 H  1 949.7A 
    91 H  1 972.5A 
     81#H  1 916.4A 
     82#H  1 917.2A 
     83#H  1 918.1A 
     84#H  1 919.4A 
     85#H  1 921.0A 
     86#H  1 923.2A 
     87#H  1 926.2A 
     88#H  1 930.8A 
     89#H  1 937.8A 
     90#H  1 949.7A 
     91#H  1 972.5A 
    9292H  1 1026A 
    9393H  1 1216A 
    94 H  1 3671 
    95 H  1 3674 
    96 H  1 3676 
    97 H  1 3679 
    98 H  1 3683 
    99 H  1 3687 
    100 H  1 3692 
    101 H  1 3697 
    102 H  1 3704 
    103 H  1 3712 
    104 H  1 3722 
    105 H  1 3734 
    106 H  1 3750 
    107 H  1 3771 
    108 H  1 3798 
    109 H  1 3835 
    110 H  1 3889 
    111 H  1 3970 
     94#H  1 3671 
     95#H  1 3674 
     96#H  1 3676 
     97#H  1 3679 
     98#H  1 3683 
     99#H  1 3687 
     100#H  1 3692 
     101#H  1 3697 
     102#H  1 3704 
     103#H  1 3712 
     104#H  1 3722 
     105#H  1 3734 
     106#H  1 3750 
     107#H  1 3771 
     108#H  1 3798 
     109#H  1 3835 
     110#H  1 3889 
     111#H  1 3970 
    112112H  1 4102 
    113113H  1 4340 
    114114H  1 4861 
    115115H  1 6563A 
    116 H  1 8598A 
    117 H  1 8665A 
    118 H  1 8750A 
    119 H  1 8863A 
    120 H  1 9015A 
    121 H  1 9229A 
     116#H  1 8598A 
     117#H  1 8665A 
     118#H  1 8750A 
     119#H  1 8863A 
     120#H  1 9015A 
     121#H  1 9229A 
  • trunk/data/LineList_HII.dat

    r323 r1913  
    7474ca 2     8579 
    7575s  3     9069 
    76 H  1     9229 
     76#H  1     9229 
    7777s  3     9532 
    7878h  1     9546 
  • trunk/data/LineList_NLR.dat

    r13 r1913  
    133133Ca2k     3934 
    134134Ca2h     3969 
    135 h  1     3970     total H-epsilon 
     135#h  1     3970     total H-epsilon 
    136136S II     4070 
    137137S  2     4074 
     
    188188ca 2     8579 
    189189s  3     9069 
    190 H  1     9229 
     190#H  1     9229 
    191191s  3     9532 
    192 h  1     9546 
     192#h  1     9546 
    193193totl     9850 
    194194PA C     0 
     
    206206H  1     1.282m 
    207207H  1     1.094m 
    208 H  1     1.005m 
     208#H  1     1.005m 
    209209# 
    210210# Brackett series 
     
    212212H  1     4.051m 
    213213H  1     2.625m 
    214 H  1     2.166m  Brackett gamma 
    215 H  1     1.945m 
     214#H  1     2.166m  Brackett gamma 
     215#H  1     1.945m 
    216216# 
    217217# IR and coronal lines 
  • trunk/data/LineList_PDR.dat

    r491 r1913  
    1717H  1   1.875m   Paschen alpha   4-3 
    1818H  1   4.051m   Br alpha        5-4 
    19 H  1   2.166m   Br gamma 
    20 H  1   1.945m   Br delta 
     19#H  1   2.166m   Br gamma 
     20#H  1   1.945m   Br delta 
    2121H  1   7.458m   Pfund alpha     6-5 
    22 H  1   12.37m   Humphries alpha 7-6 
    23 H  1   19.06m   8-7 
     22#H  1   12.37m   Humphries alpha 7-6 
     23#H  1   19.06m   8-7 
    2424# 
    2525# some lines from the H+ region 
  • trunk/data/LineList_PDR_H2.dat

    r1413 r1913  
    1616H  1   1.875m   Paschen alpha   4-3 
    1717H  1   4.051m   Br alpha        5-4 
    18 H  1   2.166m   Br gamma 
    19 H  1   1.945m   Br delta 
     18#H  1   2.166m   Br gamma 
     19#H  1   1.945m   Br delta 
    2020H  1   7.458m   Pfund alpha     6-5 
    21 H  1   12.37m   Humphries alpha 7-6 
    22 H  1   19.06m   8-7 
     21#H  1   12.37m   Humphries alpha 7-6 
     22#H  1   19.06m   8-7 
    2323#  
    2424# strong optical lines from H+ region 
  • trunk/source/cont_createmesh.cpp

    r1815 r1913  
    447447 
    448448        /* frequency range in Rydberg needed for all resonance lines */ 
    449         rfield.fine_ener_lo = 0.1f; 
     449        rfield.fine_ener_lo = 0.05f; 
    450450        rfield.fine_ener_hi = 1500.f; 
    451451 
  • trunk/source/elements.txt

    r646 r1913  
    5050/* string giving ionization stage as roman numerals */ 
    5151elementnames.chIonRoman[LIMELM+3][7]; 
     52 
     53iso sequence names in iso.chISO 
    5254 
    5355these are saved in zerologic.c 
  • trunk/source/init_coreload.cpp

    r1891 r1913  
    228228        iso.n_HighestResolved_max[ipHE_LIKE][ipZINC] = 5; 
    229229 
     230        iso.chISO[ipH_LIKE] = "H-like "; 
     231        iso.chISO[ipHE_LIKE] = "He-like"; 
     232 
    230233        max_num_levels = 0; 
    231234        for( long ipISO = ipH_LIKE; ipISO < NISO; ipISO++ ) 
  • trunk/source/init_sim_postparse.cpp

    r1776 r1913  
    55#include "cddefines.h"  
    66#include "dense.h" 
     7#include "elementnames.h" 
    78#include "physconst.h" 
    89#include "mole.h" 
     
    7879        } 
    7980 
     81        if( iso.lgPrintNumberOfLevels ) 
     82        { 
     83                fprintf(ioQQQ,"\n\n Number of levels in ions treated by iso sequences.\n"); 
     84                fprintf(ioQQQ," ISO   Element  hi-n(l-resolved) #(l-resolved)  n(collapsed)\n"); 
     85                /* option to print number of levels for each element */ 
     86                for( long ipISO=ipH_LIKE; ipISO<NISO; ++ipISO ) 
     87                { 
     88                        for( long nelem=ipISO; nelem<LIMELM; ++nelem ) 
     89                        { 
     90                                /* print number of levels */ 
     91                                fprintf(ioQQQ," %s  %s    %4i            %4i           %4i \n", 
     92                                        iso.chISO[ipISO] , 
     93                                        elementnames.chElementSym[nelem], 
     94                                        iso.n_HighestResolved_max[ipISO][nelem], 
     95                                        iso.numLevels_max[ipISO][nelem]-iso.nCollapsed_max[ipISO][nelem], 
     96                                        iso.nCollapsed_max[ipISO][nelem]); 
     97                        } 
     98                } 
     99        } 
     100 
    80101        return; 
    81102} 
  • trunk/source/iso.h

    r1857 r1913  
    174174EXTERN struct t_iso  
    175175{ 
     176        bool lgPrintNumberOfLevels; 
     177 
    176178        const char *chISO[NISO]; 
    177179 
  • trunk/source/iso_create.cpp

    r1899 r1913  
    568568 
    569569        DEBUG_ENTRY( "iso_allocate()" ); 
    570  
    571         iso.chISO[ipH_LIKE] = "h-like "; 
    572         iso.chISO[ipHE_LIKE] = "he-like"; 
    573570 
    574571        iso.strkar.reserve( NISO ); 
  • trunk/source/iso_level.cpp

    r1868 r1913  
    4444 
    4545        int32 nerror; 
    46         double HighestPColOut[2] = {0.,0.}, 
     46        double HighestPColOut = 0., 
    4747                collider, 
    4848                sum_popn_ov_ion, 
     
    223223        else 
    224224        { 
     225                long SpinUsed[NISO] = {2,1}; 
     226                long indexNmaxP = 
     227                        iso.QuantumNumbers2Index[ipISO][nelem][ iso.n_HighestResolved_local[ipISO][nelem] ][1][SpinUsed[ipISO]]; 
     228 
    225229                strcpy( iso.chTypeAtomUsed[ipISO][nelem], "Popul" ); 
    226230                if( trace.lgTrace && (nelem == trace.ipIsoTrace[ipISO]) ) 
     
    280284 
    281285                                z[level][level] += RadDecay + pump_down + coll_down; 
    282                                 z[level][ipLo] = - (RadDecay + pump_down + coll_down); 
    283  
    284                                 if( ipISO == ipHE_LIKE ) 
    285                                 { 
    286                                         if ( nelem == ipHELIUM ) 
    287                                         { 
    288                                                 if( StElm[level].l == 1 &&  
    289                                                     StElm[level].n == iso.n_HighestResolved_local[ipISO][nelem] ) 
    290                                                 { 
    291                                                         if( StElm[level].S == 1 ) 
    292                                                         { 
    293                                                                 ASSERT( (int)(StElm[level].S >> 1) == 0 ); 
    294                                                         } 
    295                                                         else if( StElm[level].S == 3 ) 
    296                                                         { 
    297                                                                 ASSERT( (int)(StElm[level].S >> 1) == 1 );  
    298                                                         } 
    299  
    300                                                         HighestPColOut[StElm[level].S >> 1] += coll_down; 
    301                                                 } 
    302                                                                                           
    303                                                 if( StElm[ipLo].l == 1 && 
    304                                                     StElm[ipLo].n == iso.n_HighestResolved_local[ipISO][nelem] ) 
    305                                                 { 
    306                                                         if( StElm[ipLo].S == 1 ) 
    307                                                         { 
    308                                                                 ASSERT( (int)(StElm[ipLo].S >> 1) == 0 ); 
    309                                                         } 
    310                                                         else if( StElm[ipLo].S == 3 ) 
    311                                                         { 
    312                                                                 ASSERT( (int)(StElm[ipLo].S >> 1) == 1 );  
    313                                                         } 
    314                                                          
    315                                                         HighestPColOut[StElm[ipLo].S >> 1] += coll_up; 
    316                                                 } 
    317                                         } 
    318  
    319                                         /* find total collisions out of 2^3S to singlets. */ 
    320                                         if( (level == 1) && (ipLo==0) ) 
    321                                         { 
    322                                                 iso.qTot2S[ipISO][nelem] += coll_down/dense.EdenHCorr; 
    323                                         } 
    324                                         if( (ipLo == 1) && (ipISO==ipH_LIKE || (StElm[level].S==1)) ) 
    325                                         { 
    326                                                 iso.qTot2S[ipISO][nelem] += coll_up/dense.EdenHCorr; 
    327                                         } 
     286                                z[level][ipLo] = - (RadDecay + pump_down + coll_down);                                   
     287 
     288                                if( level == indexNmaxP ) 
     289                                { 
     290                                        HighestPColOut += coll_down; 
     291                                }                                 
     292                                if( ipLo == indexNmaxP ) 
     293                                { 
     294                                        HighestPColOut += coll_up; 
    328295                                } 
     296 
     297                                /* find total collisions out of 2^3S to singlets. */ 
     298                                if( (level == 1) && (ipLo==0) ) 
     299                                { 
     300                                        iso.qTot2S[ipISO][nelem] += coll_down/dense.EdenHCorr; 
     301                                } 
     302                                if( (ipLo == 1) && (ipISO==ipH_LIKE || (StElm[level].S==1)) ) 
     303                                { 
     304                                        iso.qTot2S[ipISO][nelem] += coll_up/dense.EdenHCorr; 
     305                                } 
     306                        } 
     307                } 
     308 
     309                if( ipISO == nelem ) 
     310                { 
     311                        /* iso.lgCritDensLMix[ipISO] is a flag used to print warning if density is 
     312                        * too low for first collapsed level to be l-mixed.  Check is if l-mixing collisions 
     313                        * out of highest resolved singlet P are greater than sum of transition probs out.       */ 
     314                        if( HighestPColOut < 1./StatesElem[ipISO][nelem][indexNmaxP].lifetime ) 
     315                        { 
     316                                iso.lgCritDensLMix[ipISO] = false; 
    329317                        } 
    330318                } 
     
    657645        if( ipISO == ipHE_LIKE ) 
    658646        { 
    659                 /* iso.lgCritDensLMix[ipISO] is a flag used to print warning if density is 
    660                  * too low for first collapsed level to be l-mixed.  Check is if l-mixing collisions 
    661                  * out of highest resolved singlet P are greater than sum of transition probs out.      */ 
    662                 if( ( (HighestPColOut[0] < 1./StatesElem[ipISO][ipHELIUM][iso.QuantumNumbers2Index[ipISO][ipHELIUM][iso.n_HighestResolved_max[ipISO][ipHELIUM]][1][1]].lifetime ) 
    663                         || (HighestPColOut[1] < 1./StatesElem[ipISO][ipHELIUM][iso.QuantumNumbers2Index[ipISO][ipHELIUM][iso.n_HighestResolved_max[ipISO][ipHELIUM]][1][3]].lifetime ) ) 
    664                         && nelem==ipHELIUM )  
    665                 { 
    666                         iso.lgCritDensLMix[ipISO] = false; 
    667                 } 
    668647 
    669648                if( nzone>0 && nelem==ipHELIUM ) 
  • trunk/source/parse_atom_iso.cpp

    r1790 r1913  
    154154                 * allocated for the hydrogen and helium lines.  Once done we must ignore all  
    155155                 * future changes in the number of levels */ 
    156                 if( !lgHydroMalloc ) 
     156                if( nMatch("PRIN",chCard) ) 
     157                { 
     158                        /* only print - do not change levels */ 
     159                        iso.lgPrintNumberOfLevels = true; 
     160                } 
     161                else if( !lgHydroMalloc ) 
    157162                { 
    158163                        i = 5; 
  • trunk/source/prt_alltau.cpp

    r1732 r1913  
    116116        PrintE93( ioQQQ , opac.TauTotalGeo[0][iso.ipIsoLevNIonCon[ipH_LIKE][1][ipH1s]-1]/fcon); 
    117117        fprintf( ioQQQ, "\n"); 
    118  
    119         if( dense.lgElmtOn[ipHELIUM] ) 
    120         { 
    121                 /* print optical depths of previous iteration with old atom */ 
    122  
    123                 /* these results are for new HeI as part of he iso sequence */ 
    124                 fprintf( ioQQQ, "  Line Optical Depths: 10830:"); 
    125                 fprintf( ioQQQ,PrintEfmt("%9.2e", (Transitions[ipHE_LIKE][ipHELIUM][ipHe2p3P0][ipHe2s3S].Emis->TauIn+ 
    126                         Transitions[ipHE_LIKE][ipHELIUM][ipHe2p3P1][ipHe2s3S].Emis->TauIn+ 
    127                         Transitions[ipHE_LIKE][ipHELIUM][ipHe2p3P2][ipHe2s3S].Emis->TauIn)/flin)); 
    128                 fprintf( ioQQQ, "  3889:"); 
    129                 fprintf( ioQQQ,PrintEfmt("%9.2e", Transitions[ipHE_LIKE][ipHELIUM][ipHe3p3P][ipHe2s3S].Emis->TauIn/flin)); 
    130                 fprintf( ioQQQ, "    5876:"); 
    131                 fprintf( ioQQQ,PrintEfmt("%9.2e", (Transitions[ipHE_LIKE][ipHELIUM][ipHe3d3D][ipHe2p3P0].Emis->TauIn+ 
    132                         Transitions[ipHE_LIKE][ipHELIUM][ipHe3d3D][ipHe2p3P1].Emis->TauIn+ 
    133                         Transitions[ipHE_LIKE][ipHELIUM][ipHe3d3D][ipHe2p3P2].Emis->TauIn)/flin)); 
    134                 fprintf( ioQQQ, " 7065:"); 
    135                 fprintf( ioQQQ,PrintEfmt("%9.2e", (Transitions[ipHE_LIKE][ipHELIUM][ipHe3s3S][ipHe2p3P0].Emis->TauIn+ 
    136                         Transitions[ipHE_LIKE][ipHELIUM][ipHe3s3S][ipHe2p3P1].Emis->TauIn+ 
    137                         Transitions[ipHE_LIKE][ipHELIUM][ipHe3s3S][ipHe2p3P2].Emis->TauIn)/flin)); 
    138                 fprintf( ioQQQ, "  2.06m:"); 
    139                 fprintf( ioQQQ,PrintEfmt("%9.2e", Transitions[ipHE_LIKE][ipHELIUM][ipHe2p1P][ipHe2s1S].Emis->TauIn/flin)); 
    140                 fprintf( ioQQQ, "  21c:"); 
    141                 fprintf( ioQQQ,PrintEfmt("%9.2e", HFLines[0].Emis->TauIn/flin)); 
    142                 /* the HeII 3 cm equivalent of H 21 cm */ 
    143                 fprintf( ioQQQ, "\n" ); 
    144         } 
    145118 
    146119        /* print optical depths of some metal lines */ 
     
    251224                /* ================================================================================*/ 
    252225 
    253  
    254226                fprintf( ioQQQ, "          Old He Is Lines:" ); 
    255227                fprintf( ioQQQ, " %4d",584 ); 
  • trunk/source/prt_comment.cpp

    r1896 r1913  
    834834        } 
    835835 
    836         if( !iso.lgCritDensLMix[ipHE_LIKE] && dense.lgElmtOn[ipHELIUM] ) 
    837         { 
    838                 sprintf( chLine, 
    839                         "   Critical density for l-mixing of He I not reached. " 
    840                         " More resolved levels are needed for accurate He I line ratios."); 
    841                 notein(chLine); 
     836        /* check for critical density for l-mixing */ 
     837        for( ipISO=ipH_LIKE; ipISO<NISO; ++ipISO ) 
     838        { 
     839                if( !iso.lgCritDensLMix[ipISO] && dense.lgElmtOn[ipISO] ) 
     840                { 
     841                        sprintf( chLine, 
     842                                "   The density is too low to l-mix the lowest %s I collapsed level. " 
     843                                " More resolved levels are needed for accurate line ratios.", 
     844                                elementnames.chElementSym[ipISO]); 
     845                        notein(chLine); 
     846                } 
    842847        } 
    843848 
     
    849854                        if( iso.lgLevelsLowered[ipISO][nelem] && dense.lgElmtOn[nelem] ) 
    850855                        { 
    851                                 sprintf( chLine, "  !Continuum was lowered into model %s-like %s due to high density.  Max n is %li", 
     856                                sprintf( chLine, "  !Continuum was lowered into model %s-like %s due to high density.  Highest n is %li", 
    852857                                        elementnames.chElementSym[ipISO], 
    853                                         elementnames.chElementNameShort[nelem], 
     858                                        elementnames.chElementSym[nelem], 
    854859                                        iso.n_HighestResolved_local[ipISO][nelem]+iso.nCollapsed_local[ipISO][nelem]); 
    855860                                bangin(chLine); 
  • trunk/source/prt_lines_hydro.cpp

    r1822 r1913  
    209209                if( dense.lgElmtOn[nelem] ) 
    210210                { 
    211                         for( ipHi=1; ipHi < iso.numLevels_max[ipISO][nelem]; ipHi++ ) 
     211                        //for( ipHi=1; ipHi < iso.numLevels_max[ipISO][nelem]; ipHi++ ) 
     212                        for( ipHi=1; ipHi < iso.numPrintLevels[ipISO][nelem]; ipHi++ ) 
    212213                        { 
    213214                                for( ipLo=0; ipLo < ipHi; ipLo++ ) 
     
    239240                { 
    240241                        /* bring nL - n'L' emission together as n-n' emission. */ 
    241                         for( ipHi=3; ipHi < iso.numLevels_max[ipH_LIKE][nelem]; ipHi++ ) 
     242                        for( ipHi=3; ipHi < iso.numPrintLevels[ipH_LIKE][nelem]; ipHi++ ) 
    242243                        { 
    243244                                long index_of_nHi_P; 
     
    446447                                        continue; 
    447448 
    448                                 /* >>chng 01 feb 23, do not print very highest level since edge 
    449                                  * effects distort the intensity */ 
    450                                 /* 06 aug 28, from numLevels_max to _local. */ 
    451                                 /* 06 dec 21, change from numLevels_max to _local was mistake for this entire file.  Undo. */ 
    452                                 for( ipHi=ipLo+1; ipHi < iso.numLevels_max[ipH_LIKE][nelem]-1; ipHi++ ) 
     449                                for( ipHi=ipLo+1; ipHi < iso.numPrintLevels[ipH_LIKE][nelem]; ipHi++ ) 
    453450