Show
Ignore:
Timestamp:
04/07/08 15:54:08 (9 months ago)
Author:
rporter
Message:

trunk/data/h_iso_recomb.dat
trunk/data/he_iso_recomb.dat
--recompile these after small changes. h-like now closer to total rates given by Hummer & Storey.

trunk/source/atmdat_chianti.cpp
trunk/source/atmdat_lamda.cpp
trunk/source/cddefines.h
--atmolIndex is not used and is not general enough to be part of state structure anyway. Remove.

trunk/source/helike_cs.cpp - charge in VF01 treatment was hard-wired to 1, set to appropriate charge (thus far only relevant for alpha particles).

trunk/source/helike_recom.cpp - correct comment

trunk/source/helike_recom.h - block of defines was redundant to source in iso.h

trunk/source/init_coreload.cpp - lower most h-like resolved levels to 2, raise a few of the most abundant he-like from 3 to 5.

trunk/source/iso.h - change recomb file magic number declare three new functions, change a few comments

trunk/source/iso_collide.cpp - relocate case b modifications, add a TotalInsanity?

trunk/source/iso_continuum_lower.cpp - streamline iso-dependent items

trunk/source/iso_cool.cpp - remove dead code, change a few comments.

trunk/source/iso_create.cpp - minor cleanup and refactoring.

trunk/source/iso_ionize_recombine.cpp - cleanup

trunk/source/iso_level.cpp - cleanup

trunk/source/iso_photo.cpp - cleanup

trunk/source/iso_radiative_recomb.cpp - merge iso-dependent parts and minor cleanup.

trunk/source/iso_solve.cpp - add comment next to a fixit and remove unnecessary check on ipISO.

trunk/source/parse_commands.cpp - change comment

trunk/source/parse_print.cpp - change "print XX-like departure" parsing... use root of sequence as default.

trunk/source/parse_table.cpp - change .c to .cpp

trunk/source/prt_lines_helium.cpp - make minor change to term for collisional enhancement of case B.

trunk/source/prt_zone.cpp - replace 1 with ipHELIUM in several places

trunk/source/rt_line_all.cpp - disallow pumping to highest level of iso species unless continuum has been lowered.

trunk/source/rt_tau_init.cpp - generalize trace output

trunk/source/sanity_check.cpp - apply recomb sanity check to root of all iso sequences.

trunk/source/stars.cpp - change .c to .cpp

trunk/tsuite/auto/ - mostly minor changes in asserted quantities. More significant ones are as follows:
h_caseb_n8.in - h1 fraction changed by a factor of 2
limit_compton_hi_t.in - o8 fraction changed by an order of magnitude. This is now converged answer. Large number of collapsed levels helps in this case.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/iso_continuum_lower.cpp

    r1751 r1925  
    2121        ASSERT( ipISO <= 1 ); 
    2222 
    23         if( ipISO == ipH_LIKE ) 
    24                 eff_charge = nelem + 1; 
    25         else 
    26                 eff_charge = nelem; 
     23        eff_charge = nelem + 1 - ipISO; 
    2724 
    2825        /* Particle packing - the density here should be density of all nuclei in the plasma */ 
     
    8380                iso.n_HighestResolved_local[ipISO][nelem] = nc; 
    8481                iso.nCollapsed_local[ipISO][nelem] = 0; 
    85                 if( ipISO == ipH_LIKE ) 
    86                         iso.numLevels_local[ipISO][nelem] = (long)( 0.5 * nc * ( nc + 1 ) ); 
    87                 else if( ipISO ==ipHE_LIKE ) 
    88                         iso.numLevels_local[ipISO][nelem] = nc*nc + nc + 1; 
    89                 else 
    90                         TotalInsanity(); 
     82                iso.numLevels_local[ipISO][nelem] = iso_get_total_num_levels( ipISO, nc, 0 ); 
    9183        } 
    9284        /* Here is the case where the critical n lies among the one or more collapsed levels */ 
     
    9991                iso.n_HighestResolved_local[ipISO][nelem] = iso.n_HighestResolved_max[ipISO][nelem]; 
    10092                iso.nCollapsed_local[ipISO][nelem] = nc - iso.n_HighestResolved_local[ipISO][nelem]; 
    101                 if( ipISO == ipH_LIKE ) 
    102                 { 
    103                         iso.numLevels_local[ipISO][nelem] = (long)(  
    104                                 iso.n_HighestResolved_max[ipISO][nelem] * 0.5 * 
    105                                 ( iso.n_HighestResolved_max[ipISO][nelem] + 1 ) ) + iso.nCollapsed_local[ipISO][nelem]; 
    106                 } 
    107                 else if( ipISO ==ipHE_LIKE ) 
    108                 { 
    109                         iso.numLevels_local[ipISO][nelem] = iso.n_HighestResolved_local[ipISO][nelem]*iso.n_HighestResolved_local[ipISO][nelem] + 
    110                                 iso.n_HighestResolved_local[ipISO][nelem] + 1 + iso.nCollapsed_local[ipISO][nelem]; 
    111                 } 
    112                 else 
    113                         TotalInsanity(); 
     93                iso.numLevels_local[ipISO][nelem] =  
     94                        iso_get_total_num_levels( ipISO, iso.n_HighestResolved_max[ipISO][nelem], iso.nCollapsed_local[ipISO][nelem] ); 
    11495        } 
    11596        /* This is usually where control will flow, because in most conditions the continuum will not be lowered.