diff --git a/examples/xml/pincell/materials.xml b/examples/xml/pincell/materials.xml index 9f9afa3843..629dd7a6b2 100644 --- a/examples/xml/pincell/materials.xml +++ b/examples/xml/pincell/materials.xml @@ -9,11 +9,8 @@ - - - - - + + diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 18af461a79..1225c91ac2 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -2126,21 +2126,15 @@ contains integer :: i_library ! index in libraries array integer :: index_nuclide ! index in nuclides integer :: index_sab ! index in sab_tables - real(8) :: val ! value entered for density - real(8) :: temp_dble ! temporary double prec. real logical :: file_exists ! does materials.xml exist? - logical :: sum_density ! density is taken to be sum of nuclide densities character(20) :: name ! name of isotope, e.g. 92235.03c - character(MAX_WORD_LEN) :: units ! units on density character(MAX_LINE_LEN) :: filename ! absolute path to materials.xml character(MAX_LINE_LEN) :: temp_str ! temporary string when reading type(VectorChar) :: names ! temporary list of nuclide names - type(VectorReal) :: densities ! temporary list of nuclide densities type(VectorInt) :: list_iso_lab ! temporary list of isotropic lab scatterers type(Material), pointer :: mat => null() type(Node), pointer :: doc => null() type(Node), pointer :: node_mat => null() - type(Node), pointer :: node_dens => null() type(Node), pointer :: node_nuc => null() type(Node), pointer :: node_ele => null() type(Node), pointer :: node_sab => null() @@ -2207,70 +2201,6 @@ contains material_temps(i) = ERROR_REAL end if - ! ======================================================================= - ! READ AND PARSE TAG - - ! Get pointer to density element - if (check_for_node(node_mat, "density")) then - call get_node_ptr(node_mat, "density", node_dens) - else - call fatal_error("Must specify density element in material " & - // trim(to_str(mat % id))) - end if - - ! Initialize value to zero - val = ZERO - - ! Copy units - call get_node_value(node_dens, "units", units) - - if (units == 'sum') then - ! If the user gave the units as 'sum', then the total density of the - ! material is taken to be the sum of the atom fractions listed on the - ! nuclides - - sum_density = .true. - - else if (units == 'macro') then - if (check_for_node(node_dens, "value")) then - ! Copy value - call get_node_value(node_dens, "value", val) - else - val = ONE - end if - - ! Set density - mat % density = val - - sum_density = .false. - - else - ! Copy value - call get_node_value(node_dens, "value", val) - - ! Check for erroneous density - sum_density = .false. - if (val <= ZERO) then - call fatal_error("Need to specify a positive density on material " & - // trim(to_str(mat % id)) // ".") - end if - - ! Adjust material density based on specified units - select case(to_lower(units)) - case ('g/cc', 'g/cm3') - mat % density = -val - case ('kg/m3') - mat % density = -0.001_8 * val - case ('atom/b-cm') - mat % density = val - case ('atom/cm3', 'atom/cc') - mat % density = 1.0e-24_8 * val - case default - call fatal_error("Unkwown units '" // trim(units) & - // "' specified on material " // trim(to_str(mat % id))) - end select - end if - ! ======================================================================= ! READ AND PARSE TAGS @@ -2308,17 +2238,8 @@ contains call get_node_value(node_nuc, "name", name) name = trim(name) - ! save name and density to list + ! save name to list call names % push_back(name) - - ! Check if no atom/weight percents were specified or if both atom and - ! weight percents were specified - if (units == 'macro') then - call densities % push_back(ONE) - else - call fatal_error("Units can only be macro for macroscopic data " & - // trim(name)) - end if else ! Get pointer list of XML @@ -2356,33 +2277,9 @@ contains call get_node_value(node_nuc, "name", name) name = trim(name) - ! save name and density to list + ! save name to list call names % push_back(name) - ! Check if no atom/weight percents were specified or if both atom and - ! weight percents were specified - if (units == 'macro') then - call densities % push_back(ONE) - else - if (.not. check_for_node(node_nuc, "ao") .and. & - .not. check_for_node(node_nuc, "wo")) then - call fatal_error("No atom or weight percent specified for nuclide " & - // trim(name)) - elseif (check_for_node(node_nuc, "ao") .and. & - check_for_node(node_nuc, "wo")) then - call fatal_error("Cannot specify both atom and weight percents for a & - &nuclide: " // trim(name)) - end if - - ! Copy atom/weight percents - if (check_for_node(node_nuc, "ao")) then - call get_node_value(node_nuc, "ao", temp_dble) - call densities % push_back(temp_dble) - else - call get_node_value(node_nuc, "wo", temp_dble) - call densities % push_back(-temp_dble) - end if - end if end do INDIVIDUAL_NUCLIDES end if @@ -2418,14 +2315,7 @@ contains n_nuc_ele = names % size() ! Expand element into naturally-occurring isotopes - if (check_for_node(node_ele, "ao")) then - call get_node_value(node_ele, "ao", temp_dble) - call expand_natural_element(name, temp_dble, names, & - densities) - else - call fatal_error("The ability to expand a natural element based on & - &weight percentage is not yet supported.") - end if + call expand_natural_element_names(name, names) ! Compute number of new nuclides from the natural element expansion n_nuc_ele = names % size() - n_nuc_ele @@ -2494,7 +2384,6 @@ contains ! Copy name and atom/weight percent mat % names(j) = name - mat % atom_density(j) = densities % data(j) ! Cast integer isotropic lab scattering flag to boolean if (run_CE) then @@ -2507,20 +2396,8 @@ contains end do ALL_NUCLIDES - ! Check to make sure either all atom percents or all weight percents are - ! given - if (.not. (all(mat % atom_density >= ZERO) .or. & - all(mat % atom_density <= ZERO))) then - call fatal_error("Cannot mix atom and weight percents in material " & - // to_str(mat % id)) - end if - - ! Determine density if it is a sum value - if (sum_density) mat % density = sum(mat % atom_density) - ! Clear lists call names % clear() - call densities % clear() call list_iso_lab % clear() ! ======================================================================= @@ -4703,11 +4580,9 @@ contains ! evaluations of particular isotopes don't exist. !=============================================================================== - subroutine expand_natural_element(name, density, names, densities) - character(*), intent(in) :: name - real(8), intent(in) :: density + subroutine expand_natural_element_names(name, names) + character(*), intent(in) :: name type(VectorChar), intent(inout) :: names - type(VectorReal), intent(inout) :: densities character(2) :: element_name @@ -4716,669 +4591,417 @@ contains select case (to_lower(element_name)) case ('h') call names % push_back('H1') - call densities % push_back(density * 0.999885_8) call names % push_back('H2') - call densities % push_back(density * 0.000115_8) case ('he') call names % push_back('He3') - call densities % push_back(density * 0.00000134_8) call names % push_back('He4') - call densities % push_back(density * 0.99999866_8) case ('li') call names % push_back('Li6') - call densities % push_back(density * 0.0759_8) call names % push_back('Li7') - call densities % push_back(density * 0.9241_8) case ('be') call names % push_back('Be9') - call densities % push_back(density) case ('b') call names % push_back('B10') - call densities % push_back(density * 0.199_8) call names % push_back('B11') - call densities % push_back(density * 0.801_8) case ('c') ! No evaluations split up Carbon into isotopes yet call names % push_back('C0') - call densities % push_back(density) case ('n') call names % push_back('N14') - call densities % push_back(density * 0.99636_8) call names % push_back('N15') - call densities % push_back(density * 0.00364_8) case ('o') if (default_expand == JEFF_32) then call names % push_back('O16') - call densities % push_back(density * 0.99757_8) call names % push_back('O17') - call densities % push_back(density * 0.00038_8) call names % push_back('O18') - call densities % push_back(density * 0.00205_8) elseif (default_expand >= JENDL_32 .and. default_expand <= JENDL_40) then call names % push_back('O16') - call densities % push_back(density) else call names % push_back('O16') - call densities % push_back(density * 0.99962_8) call names % push_back('O17') - call densities % push_back(density * 0.00038_8) end if case ('f') call names % push_back('F19') - call densities % push_back(density) case ('ne') call names % push_back('Ne20') - call densities % push_back(density * 0.9048_8) call names % push_back('Ne21') - call densities % push_back(density * 0.0027_8) call names % push_back('Ne22') - call densities % push_back(density * 0.0925_8) case ('na') call names % push_back('Na23') - call densities % push_back(density) case ('mg') call names % push_back('Mg24') - call densities % push_back(density * 0.7899_8) call names % push_back('Mg25') - call densities % push_back(density * 0.1000_8) call names % push_back('Mg26') - call densities % push_back(density * 0.1101_8) case ('al') call names % push_back('Al27') - call densities % push_back(density) case ('si') call names % push_back('Si28') - call densities % push_back(density * 0.92223_8) call names % push_back('Si29') - call densities % push_back(density * 0.04685_8) call names % push_back('Si30') - call densities % push_back(density * 0.03092_8) case ('p') call names % push_back('P31') - call densities % push_back(density) case ('s') call names % push_back('S32') - call densities % push_back(density * 0.9499_8) call names % push_back('S33') - call densities % push_back(density * 0.0075_8) call names % push_back('S34') - call densities % push_back(density * 0.0425_8) call names % push_back('S36') - call densities % push_back(density * 0.0001_8) case ('cl') call names % push_back('Cl35') - call densities % push_back(density * 0.7576_8) call names % push_back('Cl37') - call densities % push_back(density * 0.2424_8) case ('ar') call names % push_back('Ar36') - call densities % push_back(density * 0.003336_8) call names % push_back('Ar38') - call densities % push_back(density * 0.000629_8) call names % push_back('Ar40') - call densities % push_back(density * 0.996035_8) case ('k') call names % push_back('K39') - call densities % push_back(density * 0.932581_8) call names % push_back('K40') - call densities % push_back(density * 0.000117_8) call names % push_back('K41') - call densities % push_back(density * 0.067302_8) case ('ca') call names % push_back('Ca40') - call densities % push_back(density * 0.96941_8) call names % push_back('Ca42') - call densities % push_back(density * 0.00647_8) call names % push_back('Ca43') - call densities % push_back(density * 0.00135_8) call names % push_back('Ca44') - call densities % push_back(density * 0.02086_8) call names % push_back('Ca46') - call densities % push_back(density * 0.00004_8) call names % push_back('Ca48') - call densities % push_back(density * 0.00187_8) case ('sc') call names % push_back('Sc45') - call densities % push_back(density) case ('ti') call names % push_back('Ti46') - call densities % push_back(density * 0.0825_8) call names % push_back('Ti47') - call densities % push_back(density * 0.0744_8) call names % push_back('Ti48') - call densities % push_back(density * 0.7372_8) call names % push_back('Ti49') - call densities % push_back(density * 0.0541_8) call names % push_back('Ti50') - call densities % push_back(density * 0.0518_8) case ('v') if (default_expand == ENDF_BVII0 .or. default_expand == JEFF_311 & .or. default_expand == JEFF_32 .or. & (default_expand >= JENDL_32 .and. default_expand <= JENDL_33)) then call names % push_back('V0') - call densities % push_back(density) else call names % push_back('V50') - call densities % push_back(density * 0.0025_8) call names % push_back('V51') - call densities % push_back(density * 0.9975_8) end if case ('cr') call names % push_back('Cr50') - call densities % push_back(density * 0.04345_8) call names % push_back('Cr52') - call densities % push_back(density * 0.83789_8) call names % push_back('Cr53') - call densities % push_back(density * 0.09501_8) call names % push_back('Cr54') - call densities % push_back(density * 0.02365_8) case ('mn') call names % push_back('Mn55') - call densities % push_back(density) case ('fe') call names % push_back('Fe54') - call densities % push_back(density * 0.05845_8) call names % push_back('Fe56') - call densities % push_back(density * 0.91754_8) call names % push_back('Fe57') - call densities % push_back(density * 0.02119_8) call names % push_back('Fe58') - call densities % push_back(density * 0.00282_8) case ('co') call names % push_back('Co59') - call densities % push_back(density) case ('ni') call names % push_back('Ni58') - call densities % push_back(density * 0.68077_8) call names % push_back('Ni60') - call densities % push_back(density * 0.26223_8) call names % push_back('Ni61') - call densities % push_back(density * 0.011399_8) call names % push_back('Ni62') - call densities % push_back(density * 0.036346_8) call names % push_back('Ni64') - call densities % push_back(density * 0.009255_8) case ('cu') call names % push_back('Cu63') - call densities % push_back(density * 0.6915_8) call names % push_back('Cu65') - call densities % push_back(density * 0.3085_8) case ('zn') if (default_expand == ENDF_BVII0 .or. default_expand == & JEFF_311 .or. default_expand == JEFF_312) then call names % push_back('Zn0') - call densities % push_back(density) else call names % push_back('Zn64') - call densities % push_back(density * 0.4917_8) call names % push_back('Zn66') - call densities % push_back(density * 0.2773_8) call names % push_back('Zn67') - call densities % push_back(density * 0.0404_8) call names % push_back('Zn68') - call densities % push_back(density * 0.1845_8) call names % push_back('Zn70') - call densities % push_back(density * 0.0061_8) end if case ('ga') if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then call names % push_back('Ga0') - call densities % push_back(density) else call names % push_back('Ga69') - call densities % push_back(density * 0.60108_8) call names % push_back('Ga71') - call densities % push_back(density * 0.39892_8) end if case ('ge') call names % push_back('Ge70') - call densities % push_back(density * 0.2057_8) call names % push_back('Ge72') - call densities % push_back(density * 0.2745_8) call names % push_back('Ge73') - call densities % push_back(density * 0.0775_8) call names % push_back('Ge74') - call densities % push_back(density * 0.3650_8) call names % push_back('Ge76') - call densities % push_back(density * 0.0773_8) case ('as') call names % push_back('As75') - call densities % push_back(density) case ('se') call names % push_back('Se74') - call densities % push_back(density * 0.0089_8) call names % push_back('Se76') - call densities % push_back(density * 0.0937_8) call names % push_back('Se77') - call densities % push_back(density * 0.0763_8) call names % push_back('Se78') - call densities % push_back(density * 0.2377_8) call names % push_back('Se80') - call densities % push_back(density * 0.4961_8) call names % push_back('Se82') - call densities % push_back(density * 0.0873_8) case ('br') call names % push_back('Br79') - call densities % push_back(density * 0.5069_8) call names % push_back('Br81') - call densities % push_back(density * 0.4931_8) case ('kr') call names % push_back('Kr78') - call densities % push_back(density * 0.00355_8) call names % push_back('Kr80') - call densities % push_back(density * 0.02286_8) call names % push_back('Kr82') - call densities % push_back(density * 0.11593_8) call names % push_back('Kr83') - call densities % push_back(density * 0.11500_8) call names % push_back('Kr84') - call densities % push_back(density * 0.56987_8) call names % push_back('Kr86') - call densities % push_back(density * 0.17279_8) case ('rb') call names % push_back('Rb85') - call densities % push_back(density * 0.7217_8) call names % push_back('Rb87') - call densities % push_back(density * 0.2783_8) case ('sr') call names % push_back('Sr84') - call densities % push_back(density * 0.0056_8) call names % push_back('Sr86') - call densities % push_back(density * 0.0986_8) call names % push_back('Sr87') - call densities % push_back(density * 0.0700_8) call names % push_back('Sr88') - call densities % push_back(density * 0.8258_8) case ('y') call names % push_back('Y89') - call densities % push_back(density) case ('zr') call names % push_back('Zr90') - call densities % push_back(density * 0.5145_8) call names % push_back('Zr91') - call densities % push_back(density * 0.1122_8) call names % push_back('Zr92') - call densities % push_back(density * 0.1715_8) call names % push_back('Zr94') - call densities % push_back(density * 0.1738_8) call names % push_back('Zr96') - call densities % push_back(density * 0.0280_8) case ('nb') call names % push_back('Nb93') - call densities % push_back(density) case ('mo') call names % push_back('Mo92') - call densities % push_back(density * 0.1453_8) call names % push_back('Mo94') - call densities % push_back(density * 0.0915_8) call names % push_back('Mo95') - call densities % push_back(density * 0.1584_8) call names % push_back('Mo96') - call densities % push_back(density * 0.1667_8) call names % push_back('Mo97') - call densities % push_back(density * 0.0960_8) call names % push_back('Mo98') - call densities % push_back(density * 0.2439_8) call names % push_back('Mo100') - call densities % push_back(density * 0.0982_8) case ('ru') call names % push_back('Ru96') - call densities % push_back(density * 0.0554_8) call names % push_back('Ru98') - call densities % push_back(density * 0.0187_8) call names % push_back('Ru99') - call densities % push_back(density * 0.1276_8) call names % push_back('Ru100') - call densities % push_back(density * 0.1260_8) call names % push_back('Ru101') - call densities % push_back(density * 0.1706_8) call names % push_back('Ru102') - call densities % push_back(density * 0.3155_8) call names % push_back('Ru104') - call densities % push_back(density * 0.1862_8) case ('rh') call names % push_back('Rh103') - call densities % push_back(density) case ('pd') call names % push_back('Pd102') - call densities % push_back(density * 0.0102_8) call names % push_back('Pd104') - call densities % push_back(density * 0.1114_8) call names % push_back('Pd105') - call densities % push_back(density * 0.2233_8) call names % push_back('Pd106') - call densities % push_back(density * 0.2733_8) call names % push_back('Pd108') - call densities % push_back(density * 0.2646_8) call names % push_back('Pd110') - call densities % push_back(density * 0.1172_8) case ('ag') call names % push_back('Ag107') - call densities % push_back(density * 0.51839_8) call names % push_back('Ag109') - call densities % push_back(density * 0.48161_8) case ('cd') call names % push_back('Cd106') - call densities % push_back(density * 0.0125_8) call names % push_back('Cd108') - call densities % push_back(density * 0.0089_8) call names % push_back('Cd110') - call densities % push_back(density * 0.1249_8) call names % push_back('Cd111') - call densities % push_back(density * 0.1280_8) call names % push_back('Cd112') - call densities % push_back(density * 0.2413_8) call names % push_back('Cd113') - call densities % push_back(density * 0.1222_8) call names % push_back('Cd114') - call densities % push_back(density * 0.2873_8) call names % push_back('Cd116') - call densities % push_back(density * 0.0749_8) case ('in') call names % push_back('In113') - call densities % push_back(density * 0.0429_8) call names % push_back('In115') - call densities % push_back(density * 0.9571_8) case ('sn') call names % push_back('Sn112') - call densities % push_back(density * 0.0097_8) call names % push_back('Sn114') - call densities % push_back(density * 0.0066_8) call names % push_back('Sn115') - call densities % push_back(density * 0.0034_8) call names % push_back('Sn116') - call densities % push_back(density * 0.1454_8) call names % push_back('Sn117') - call densities % push_back(density * 0.0768_8) call names % push_back('Sn118') - call densities % push_back(density * 0.2422_8) call names % push_back('Sn119') - call densities % push_back(density * 0.0859_8) call names % push_back('Sn120') - call densities % push_back(density * 0.3258_8) call names % push_back('Sn122') - call densities % push_back(density * 0.0463_8) call names % push_back('Sn124') - call densities % push_back(density * 0.0579_8) case ('sb') call names % push_back('Sb121') - call densities % push_back(density * 0.5721_8) call names % push_back('Sb123') - call densities % push_back(density * 0.4279_8) case ('te') call names % push_back('Te120') - call densities % push_back(density * 0.0009_8) call names % push_back('Te122') - call densities % push_back(density * 0.0255_8) call names % push_back('Te123') - call densities % push_back(density * 0.0089_8) call names % push_back('Te124') - call densities % push_back(density * 0.0474_8) call names % push_back('Te125') - call densities % push_back(density * 0.0707_8) call names % push_back('Te126') - call densities % push_back(density * 0.1884_8) call names % push_back('Te128') - call densities % push_back(density * 0.3174_8) call names % push_back('Te130') - call densities % push_back(density * 0.3408_8) case ('i') call names % push_back('I127') - call densities % push_back(density) case ('xe') call names % push_back('Xe124') - call densities % push_back(density * 0.000952_8) call names % push_back('Xe126') - call densities % push_back(density * 0.000890_8) call names % push_back('Xe128') - call densities % push_back(density * 0.019102_8) call names % push_back('Xe129') - call densities % push_back(density * 0.264006_8) call names % push_back('Xe130') - call densities % push_back(density * 0.040710_8) call names % push_back('Xe131') - call densities % push_back(density * 0.212324_8) call names % push_back('Xe132') - call densities % push_back(density * 0.269086_8) call names % push_back('Xe134') - call densities % push_back(density * 0.104357_8) call names % push_back('Xe136') - call densities % push_back(density * 0.088573_8) case ('cs') call names % push_back('Cs133') - call densities % push_back(density) case ('ba') call names % push_back('Ba130') - call densities % push_back(density * 0.00106_8) call names % push_back('Ba132') - call densities % push_back(density * 0.00101_8) call names % push_back('Ba134') - call densities % push_back(density * 0.02417_8) call names % push_back('Ba135') - call densities % push_back(density * 0.06592_8) call names % push_back('Ba136') - call densities % push_back(density * 0.07854_8) call names % push_back('Ba137') - call densities % push_back(density * 0.11232_8) call names % push_back('Ba138') - call densities % push_back(density * 0.71698_8) case ('la') call names % push_back('La138') - call densities % push_back(density * 0.0008881_8) call names % push_back('La139') - call densities % push_back(density * 0.9991119_8) case ('ce') call names % push_back('Ce136') - call densities % push_back(density * 0.00185_8) call names % push_back('Ce138') - call densities % push_back(density * 0.00251_8) call names % push_back('Ce140') - call densities % push_back(density * 0.88450_8) call names % push_back('Ce142') - call densities % push_back(density * 0.11114_8) case ('pr') call names % push_back('Pr141') - call densities % push_back(density) case ('nd') call names % push_back('Nd142') - call densities % push_back(density * 0.27152_8) call names % push_back('Nd143') - call densities % push_back(density * 0.12174_8) call names % push_back('Nd144') - call densities % push_back(density * 0.23798_8) call names % push_back('Nd145') - call densities % push_back(density * 0.08293_8) call names % push_back('Nd146') - call densities % push_back(density * 0.17189_8) call names % push_back('Nd148') - call densities % push_back(density * 0.05756_8) call names % push_back('Nd150') - call densities % push_back(density * 0.05638_8) case ('sm') call names % push_back('Sm144') - call densities % push_back(density * 0.0307_8) call names % push_back('Sm147') - call densities % push_back(density * 0.1499_8) call names % push_back('Sm148') - call densities % push_back(density * 0.1124_8) call names % push_back('Sm149') - call densities % push_back(density * 0.1382_8) call names % push_back('Sm150') - call densities % push_back(density * 0.0738_8) call names % push_back('Sm152') - call densities % push_back(density * 0.2675_8) call names % push_back('Sm154') - call densities % push_back(density * 0.2275_8) case ('eu') call names % push_back('Eu151') - call densities % push_back(density * 0.4781_8) call names % push_back('Eu153') - call densities % push_back(density * 0.5219_8) case ('gd') call names % push_back('Gd152') - call densities % push_back(density * 0.0020_8) call names % push_back('Gd154') - call densities % push_back(density * 0.0218_8) call names % push_back('Gd155') - call densities % push_back(density * 0.1480_8) call names % push_back('Gd156') - call densities % push_back(density * 0.2047_8) call names % push_back('Gd157') - call densities % push_back(density * 0.1565_8) call names % push_back('Gd158') - call densities % push_back(density * 0.2484_8) call names % push_back('Gd160') - call densities % push_back(density * 0.2186_8) case ('tb') call names % push_back('Tb159') - call densities % push_back(density) case ('dy') call names % push_back('Dy156') - call densities % push_back(density * 0.00056_8) call names % push_back('Dy158') - call densities % push_back(density * 0.00095_8) call names % push_back('Dy160') - call densities % push_back(density * 0.02329_8) call names % push_back('Dy161') - call densities % push_back(density * 0.18889_8) call names % push_back('Dy162') - call densities % push_back(density * 0.25475_8) call names % push_back('Dy163') - call densities % push_back(density * 0.24896_8) call names % push_back('Dy164') - call densities % push_back(density * 0.28260_8) case ('ho') call names % push_back('Ho165') - call densities % push_back(density) case ('er') call names % push_back('Er162') - call densities % push_back(density * 0.00139_8) call names % push_back('Er164') - call densities % push_back(density * 0.01601_8) call names % push_back('Er166') - call densities % push_back(density * 0.33503_8) call names % push_back('Er167') - call densities % push_back(density * 0.22869_8) call names % push_back('Er168') - call densities % push_back(density * 0.26978_8) call names % push_back('Er170') - call densities % push_back(density * 0.14910_8) case ('tm') call names % push_back('Tm169') - call densities % push_back(density) case ('yb') call names % push_back('Yb168') - call densities % push_back(density * 0.00123_8) call names % push_back('Yb170') - call densities % push_back(density * 0.02982_8) call names % push_back('Yb171') - call densities % push_back(density * 0.1409_8) call names % push_back('Yb172') - call densities % push_back(density * 0.2168_8) call names % push_back('Yb173') - call densities % push_back(density * 0.16103_8) call names % push_back('Yb174') - call densities % push_back(density * 0.32026_8) call names % push_back('Yb176') - call densities % push_back(density * 0.12996_8) case ('lu') call names % push_back('Lu175') - call densities % push_back(density * 0.97401_8) call names % push_back('Lu176') - call densities % push_back(density * 0.02599_8) case ('hf') call names % push_back('Hf174') - call densities % push_back(density * 0.0016_8) call names % push_back('Hf176') - call densities % push_back(density * 0.0526_8) call names % push_back('Hf177') - call densities % push_back(density * 0.1860_8) call names % push_back('Hf178') - call densities % push_back(density * 0.2728_8) call names % push_back('Hf179') - call densities % push_back(density * 0.1362_8) call names % push_back('Hf180') - call densities % push_back(density * 0.3508_8) case ('ta') if (default_expand == ENDF_BVII0 .or. & (default_expand >= JEFF_311 .and. default_expand <= JEFF_312) .or. & (default_expand >= JENDL_32 .and. default_expand <= JENDL_40)) then call names % push_back('Ta181') - call densities % push_back(density) else call names % push_back('Ta180') - call densities % push_back(density * 0.0001201_8) call names % push_back('Ta181') - call densities % push_back(density * 0.9998799_8) end if case ('w') @@ -5387,145 +5010,2292 @@ contains (default_expand >= JENDL_32 .and. default_expand <= JENDL_33)) then ! Combine W-180 with W-182 call names % push_back('W182') - call densities % push_back(density * 0.2662_8) call names % push_back('W183') - call densities % push_back(density * 0.1431_8) call names % push_back('W184') - call densities % push_back(density * 0.3064_8) call names % push_back('W186') - call densities % push_back(density * 0.2843_8) else call names % push_back('W180') - call densities % push_back(density * 0.0012_8) call names % push_back('W182') - call densities % push_back(density * 0.2650_8) call names % push_back('W183') - call densities % push_back(density * 0.1431_8) call names % push_back('W184') - call densities % push_back(density * 0.3064_8) call names % push_back('W186') - call densities % push_back(density * 0.2843_8) end if case ('re') call names % push_back('Re185') - call densities % push_back(density * 0.3740_8) call names % push_back('Re187') - call densities % push_back(density * 0.6260_8) case ('os') if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then call names % push_back('Os0') - call densities % push_back(density) else call names % push_back('Os184') - call densities % push_back(density * 0.0002_8) call names % push_back('Os186') - call densities % push_back(density * 0.0159_8) call names % push_back('Os187') - call densities % push_back(density * 0.0196_8) call names % push_back('Os188') - call densities % push_back(density * 0.1324_8) call names % push_back('Os189') - call densities % push_back(density * 0.1615_8) call names % push_back('Os190') - call densities % push_back(density * 0.2626_8) call names % push_back('Os192') - call densities % push_back(density * 0.4078_8) end if case ('ir') call names % push_back('Ir191') - call densities % push_back(density * 0.373_8) call names % push_back('Ir193') - call densities % push_back(density * 0.627_8) case ('pt') if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then call names % push_back('Pt0') - call densities % push_back(density) else call names % push_back('Pt190') - call densities % push_back(density * 0.00012_8) call names % push_back('Pt192') - call densities % push_back(density * 0.00782_8) call names % push_back('Pt194') - call densities % push_back(density * 0.3286_8) call names % push_back('Pt195') - call densities % push_back(density * 0.3378_8) call names % push_back('Pt196') - call densities % push_back(density * 0.2521_8) call names % push_back('Pt198') - call densities % push_back(density * 0.07356_8) end if case ('au') call names % push_back('Au197') - call densities % push_back(density) case ('hg') call names % push_back('Hg196') - call densities % push_back(density * 0.0015_8) call names % push_back('Hg198') - call densities % push_back(density * 0.0997_8) call names % push_back('Hg199') - call densities % push_back(density * 0.1687_8) call names % push_back('Hg200') - call densities % push_back(density * 0.2310_8) call names % push_back('Hg201') - call densities % push_back(density * 0.1318_8) call names % push_back('Hg202') - call densities % push_back(density * 0.2986_8) call names % push_back('Hg204') - call densities % push_back(density * 0.0687_8) case ('tl') if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then call names % push_back('Tl0') - call densities % push_back(density) else call names % push_back('Tl203') - call densities % push_back(density * 0.2952_8) call names % push_back('Tl205') - call densities % push_back(density * 0.7048_8) end if case ('pb') call names % push_back('Pb204') - call densities % push_back(density * 0.014_8) call names % push_back('Pb206') - call densities % push_back(density * 0.241_8) call names % push_back('Pb207') - call densities % push_back(density * 0.221_8) call names % push_back('Pb208') - call densities % push_back(density * 0.524_8) case ('bi') call names % push_back('Bi209') - call densities % push_back(density) case ('th') call names % push_back('Th232') - call densities % push_back(density) case ('pa') call names % push_back('Pa231') - call densities % push_back(density) case ('u') call names % push_back('U234') - call densities % push_back(density * 0.000054_8) call names % push_back('U235') - call densities % push_back(density * 0.007204_8) call names % push_back('U238') - call densities % push_back(density * 0.992742_8) case default call fatal_error("Cannot expand element: " // name) end select - end subroutine expand_natural_element + end subroutine expand_natural_element_names + + + subroutine expand_natural_element_densities(name, expand_by, density, & + enrichment, densities) + character(*), intent(in) :: name + character(*), intent(in) :: expand_by + real(8), intent(in) :: density + real(8), intent(in) :: enrichment + type(VectorReal), intent(inout) :: densities + + integer :: i + integer :: n_isotopes + character(2) :: element_name + real(8) :: element_awr + real(8), allocatable :: awr(:) + real(8), allocatable :: mf(:) + + element_name = name(1:2) + + select case (to_lower(element_name)) + case ('h') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.999885_8 + mf(2) = 0.000115_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('h1')) % awr + awr(2) = nuclides(nuclide_dict % get_key('h2')) % awr + end if + + case ('he') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00000134_8 + mf(2) = 0.99999866_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('he3')) % awr + awr(2) = nuclides(nuclide_dict % get_key('he4')) % awr + end if + + case ('li') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0759_8 + mf(2) = 0.9241_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('li6')) % awr + awr(2) = nuclides(nuclide_dict % get_key('li7')) % awr + end if + + case ('be') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('be9')) % awr + end if + + case ('b') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.199_8 + mf(2) = 0.801_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('b10')) % awr + awr(2) = nuclides(nuclide_dict % get_key('b11')) % awr + end if + + case ('c') + + ! No evaluations split up Carbon into isotopes yet + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('c0')) % awr + end if + + case ('n') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.99636_8 + mf(2) = 0.00364_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('n14')) % awr + awr(2) = nuclides(nuclide_dict % get_key('n15')) % awr + end if + + case ('o') + if (default_expand == JEFF_32) then + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.99757_8 + mf(2) = 0.00038_8 + mf(3) = 0.00205_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('o16')) % awr + awr(2) = nuclides(nuclide_dict % get_key('o17')) % awr + awr(3) = nuclides(nuclide_dict % get_key('o18')) % awr + end if + elseif (default_expand >= JENDL_32 .and. default_expand <= JENDL_40) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('o16')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.99962_8 + mf(2) = 0.00038_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('o16')) % awr + awr(2) = nuclides(nuclide_dict % get_key('o17')) % awr + end if + end if + + case ('f') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('f19')) % awr + end if + + case ('ne') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.9048_8 + mf(2) = 0.0027_8 + mf(3) = 0.0925_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ne20')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ne21')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ne22')) % awr + end if + + case ('na') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('na23')) % awr + end if + + case ('mg') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.7899_8 + mf(2) = 0.1000_8 + mf(3) = 0.1101_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('mg24')) % awr + awr(2) = nuclides(nuclide_dict % get_key('mg25')) % awr + awr(3) = nuclides(nuclide_dict % get_key('mg26')) % awr + end if + + case ('al') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('al27')) % awr + end if + + case ('si') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.92223_8 + mf(2) = 0.04685_8 + mf(3) = 0.03092_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('si28')) % awr + awr(2) = nuclides(nuclide_dict % get_key('si29')) % awr + awr(3) = nuclides(nuclide_dict % get_key('si30')) % awr + end if + + case ('p') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('p31')) % awr + end if + + case ('s') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.9499_8 + mf(2) = 0.0075_8 + mf(3) = 0.0425_8 + mf(4) = 0.0001_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('s32')) % awr + awr(2) = nuclides(nuclide_dict % get_key('s33')) % awr + awr(3) = nuclides(nuclide_dict % get_key('s34')) % awr + awr(4) = nuclides(nuclide_dict % get_key('s36')) % awr + end if + + case ('cl') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.7576_8 + mf(2) = 0.2424_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('cl35')) % awr + awr(2) = nuclides(nuclide_dict % get_key('cl37')) % awr + end if + + case ('ar') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.003336_8 + mf(2) = 0.000629_8 + mf(3) = 0.996035_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ar36')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ar38')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ar40')) % awr + end if + + case ('k') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.932581_8 + mf(2) = 0.000117_8 + mf(3) = 0.067302_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('k39')) % awr + awr(2) = nuclides(nuclide_dict % get_key('k40')) % awr + awr(3) = nuclides(nuclide_dict % get_key('k41')) % awr + end if + + case ('ca') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.96941_8 + mf(2) = 0.00647_8 + mf(3) = 0.00135_8 + mf(4) = 0.02086_8 + mf(5) = 0.00004_8 + mf(6) = 0.00187_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ca40')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ca42')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ca43')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ca44')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ca46')) % awr + awr(6) = nuclides(nuclide_dict % get_key('ca48')) % awr + end if + + case ('sc') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('sc45')) % awr + end if + + case ('ti') + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0825_8 + mf(2) = 0.0744_8 + mf(3) = 0.7372_8 + mf(4) = 0.0541_8 + mf(5) = 0.0518_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ti46')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ti47')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ti48')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ti49')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ti50')) % awr + end if + + case ('v') + if (default_expand == ENDF_BVII0 .or. default_expand == JEFF_311 & + .or. default_expand == JEFF_32 .or. & + (default_expand >= JENDL_32 .and. default_expand <= JENDL_33)) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('v0')) % awr + end if + + else + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0025_8 + mf(2) = 0.9975_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('v50')) % awr + awr(2) = nuclides(nuclide_dict % get_key('v51')) % awr + end if + end if + + case ('cr') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.04345_8 + mf(2) = 0.83789_8 + mf(3) = 0.09501_8 + mf(4) = 0.02365_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('cr50')) % awr + awr(2) = nuclides(nuclide_dict % get_key('cr52')) % awr + awr(3) = nuclides(nuclide_dict % get_key('cr53')) % awr + awr(4) = nuclides(nuclide_dict % get_key('cr54')) % awr + end if + + case ('mn') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('mn55')) % awr + end if + + case ('fe') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.05845_8 + mf(2) = 0.91754_8 + mf(3) = 0.02119_8 + mf(4) = 0.00282_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('fe54')) % awr + awr(2) = nuclides(nuclide_dict % get_key('fe56')) % awr + awr(3) = nuclides(nuclide_dict % get_key('fe57')) % awr + awr(4) = nuclides(nuclide_dict % get_key('fe58')) % awr + end if + + case ('co') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('co59')) % awr + end if + + case ('ni') + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.68077_8 + mf(2) = 0.26223_8 + mf(3) = 0.011399_8 + mf(4) = 0.036346_8 + mf(5) = 0.009255_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ni58')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ni60')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ni61')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ni62')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ni64')) % awr + end if + + case ('cu') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.6915_8 + mf(2) = 0.3085_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('cu63')) % awr + awr(2) = nuclides(nuclide_dict % get_key('cu65')) % awr + end if + + case ('zn') + if (default_expand == ENDF_BVII0 .or. default_expand == & + JEFF_311 .or. default_expand == JEFF_312) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('zn0')) % awr + end if + + else + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.4917_8 + mf(2) = 0.2773_8 + mf(3) = 0.0404_8 + mf(4) = 0.1845_8 + mf(5) = 0.0061_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('zn64')) % awr + awr(2) = nuclides(nuclide_dict % get_key('zn66')) % awr + awr(3) = nuclides(nuclide_dict % get_key('zn67')) % awr + awr(4) = nuclides(nuclide_dict % get_key('zn68')) % awr + awr(5) = nuclides(nuclide_dict % get_key('zn70')) % awr + end if + end if + + case ('ga') + if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ga0')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.60108_8 + mf(2) = 0.39892_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ga69')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ga71')) % awr + end if + end if + + case ('ge') + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.2057_8 + mf(2) = 0.2745_8 + mf(3) = 0.0775_8 + mf(4) = 0.3650_8 + mf(5) = 0.0773_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ge70')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ge72')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ge73')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ge74')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ge76')) % awr + end if + + case ('as') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('as75')) % awr + end if + + case ('se') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0089_8 + mf(2) = 0.0937_8 + mf(3) = 0.0763_8 + mf(4) = 0.2377_8 + mf(5) = 0.4961_8 + mf(6) = 0.0873_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('se74')) % awr + awr(2) = nuclides(nuclide_dict % get_key('se76')) % awr + awr(3) = nuclides(nuclide_dict % get_key('se77')) % awr + awr(4) = nuclides(nuclide_dict % get_key('se78')) % awr + awr(5) = nuclides(nuclide_dict % get_key('se80')) % awr + awr(6) = nuclides(nuclide_dict % get_key('se82')) % awr + end if + + case ('br') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.5069_8 + mf(2) = 0.4931_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('br79')) % awr + awr(2) = nuclides(nuclide_dict % get_key('br81')) % awr + end if + + case ('kr') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00355_8 + mf(2) = 0.02286_8 + mf(3) = 0.11593_8 + mf(4) = 0.11500_8 + mf(5) = 0.56987_8 + mf(6) = 0.17279_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('kr78')) % awr + awr(2) = nuclides(nuclide_dict % get_key('kr80')) % awr + awr(3) = nuclides(nuclide_dict % get_key('kr82')) % awr + awr(4) = nuclides(nuclide_dict % get_key('kr83')) % awr + awr(5) = nuclides(nuclide_dict % get_key('kr84')) % awr + awr(6) = nuclides(nuclide_dict % get_key('kr86')) % awr + end if + + case ('rb') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.7217_8 + mf(2) = 0.2783_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('rb85')) % awr + awr(2) = nuclides(nuclide_dict % get_key('rb87')) % awr + end if + + case ('sr') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0056_8 + mf(2) = 0.0986_8 + mf(3) = 0.0700_8 + mf(4) = 0.8258_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('sr84')) % awr + awr(2) = nuclides(nuclide_dict % get_key('sr86')) % awr + awr(3) = nuclides(nuclide_dict % get_key('sr87')) % awr + awr(4) = nuclides(nuclide_dict % get_key('sr88')) % awr + end if + + case ('y') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('y89')) % awr + end if + + case ('zr') + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.5145_8 + mf(2) = 0.1122_8 + mf(3) = 0.1715_8 + mf(4) = 0.1738_8 + mf(5) = 0.0280_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('zr90')) % awr + awr(2) = nuclides(nuclide_dict % get_key('zr91')) % awr + awr(3) = nuclides(nuclide_dict % get_key('zr92')) % awr + awr(4) = nuclides(nuclide_dict % get_key('zr94')) % awr + awr(5) = nuclides(nuclide_dict % get_key('zr96')) % awr + end if + + case ('nb') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('nb93')) % awr + end if + + case ('mo') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.1453_8 + mf(2) = 0.0915_8 + mf(3) = 0.1584_8 + mf(4) = 0.1667_8 + mf(5) = 0.0960_8 + mf(6) = 0.2439_8 + mf(7) = 0.0982_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('mo92')) % awr + awr(2) = nuclides(nuclide_dict % get_key('mo94')) % awr + awr(3) = nuclides(nuclide_dict % get_key('mo95')) % awr + awr(4) = nuclides(nuclide_dict % get_key('mo96')) % awr + awr(5) = nuclides(nuclide_dict % get_key('mo97')) % awr + awr(6) = nuclides(nuclide_dict % get_key('mo98')) % awr + awr(7) = nuclides(nuclide_dict % get_key('mo100')) % awr + end if + + case ('ru') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0554_8 + mf(2) = 0.0187_8 + mf(3) = 0.1276_8 + mf(4) = 0.1260_8 + mf(5) = 0.1706_8 + mf(6) = 0.3155_8 + mf(7) = 0.1862_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ru96')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ru98')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ru99')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ru100')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ru101')) % awr + awr(6) = nuclides(nuclide_dict % get_key('ru102')) % awr + awr(7) = nuclides(nuclide_dict % get_key('ru104')) % awr + end if + + case ('rh') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('rh103')) % awr + end if + + case ('pd') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0102_8 + mf(2) = 0.1114_8 + mf(3) = 0.2233_8 + mf(4) = 0.2733_8 + mf(5) = 0.2646_8 + mf(6) = 0.1172_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pd102')) % awr + awr(2) = nuclides(nuclide_dict % get_key('pd104')) % awr + awr(3) = nuclides(nuclide_dict % get_key('pd105')) % awr + awr(4) = nuclides(nuclide_dict % get_key('pd106')) % awr + awr(5) = nuclides(nuclide_dict % get_key('pd108')) % awr + awr(6) = nuclides(nuclide_dict % get_key('pd110')) % awr + end if + + case ('ag') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.51839_8 + mf(2) = 0.48161_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ag107')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ag109')) % awr + end if + + case ('cd') + + ! Set the number of isotopes in this element + n_isotopes = 8 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0125_8 + mf(2) = 0.0089_8 + mf(3) = 0.1249_8 + mf(4) = 0.1280_8 + mf(5) = 0.2413_8 + mf(6) = 0.1222_8 + mf(7) = 0.2873_8 + mf(8) = 0.0749_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('cd106')) % awr + awr(2) = nuclides(nuclide_dict % get_key('cd108')) % awr + awr(3) = nuclides(nuclide_dict % get_key('cd110')) % awr + awr(4) = nuclides(nuclide_dict % get_key('cd111')) % awr + awr(5) = nuclides(nuclide_dict % get_key('cd112')) % awr + awr(6) = nuclides(nuclide_dict % get_key('cd113')) % awr + awr(7) = nuclides(nuclide_dict % get_key('cd114')) % awr + awr(8) = nuclides(nuclide_dict % get_key('cd116')) % awr + end if + + case ('in') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0429_8 + mf(2) = 0.9571_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('in113')) % awr + awr(2) = nuclides(nuclide_dict % get_key('in115')) % awr + end if + + case ('sn') + + ! Set the number of isotopes in this element + n_isotopes = 10 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0097_8 + mf(2) = 0.0066_8 + mf(3) = 0.0034_8 + mf(4) = 0.1454_8 + mf(5) = 0.0768_8 + mf(6) = 0.2422_8 + mf(7) = 0.0859_8 + mf(8) = 0.3258_8 + mf(9) = 0.0463_8 + mf(10) = 0.0579_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('sn112')) % awr + awr(2) = nuclides(nuclide_dict % get_key('sn114')) % awr + awr(3) = nuclides(nuclide_dict % get_key('sn115')) % awr + awr(4) = nuclides(nuclide_dict % get_key('sn116')) % awr + awr(5) = nuclides(nuclide_dict % get_key('sn117')) % awr + awr(6) = nuclides(nuclide_dict % get_key('sn118')) % awr + awr(7) = nuclides(nuclide_dict % get_key('sn119')) % awr + awr(8) = nuclides(nuclide_dict % get_key('sn120')) % awr + awr(9) = nuclides(nuclide_dict % get_key('sn122')) % awr + awr(10) = nuclides(nuclide_dict % get_key('sn124')) % awr + end if + + case ('sb') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.5721_8 + mf(2) = 0.4279_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('sb121')) % awr + awr(2) = nuclides(nuclide_dict % get_key('sb123')) % awr + end if + + case ('te') + + ! Set the number of isotopes in this element + n_isotopes = 8 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0009_8 + mf(2) = 0.0255_8 + mf(3) = 0.0089_8 + mf(4) = 0.0474_8 + mf(5) = 0.0707_8 + mf(6) = 0.1884_8 + mf(7) = 0.3174_8 + mf(8) = 0.3408_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('te120')) % awr + awr(2) = nuclides(nuclide_dict % get_key('te122')) % awr + awr(3) = nuclides(nuclide_dict % get_key('te123')) % awr + awr(4) = nuclides(nuclide_dict % get_key('te124')) % awr + awr(5) = nuclides(nuclide_dict % get_key('te125')) % awr + awr(6) = nuclides(nuclide_dict % get_key('te126')) % awr + awr(7) = nuclides(nuclide_dict % get_key('te128')) % awr + awr(8) = nuclides(nuclide_dict % get_key('te130')) % awr + end if + + case ('i') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('i127')) % awr + end if + + case ('xe') + + ! Set the number of isotopes in this element + n_isotopes = 9 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.000952_8 + mf(2) = 0.000890_8 + mf(3) = 0.019102_8 + mf(4) = 0.264006_8 + mf(5) = 0.040710_8 + mf(6) = 0.212324_8 + mf(7) = 0.269086_8 + mf(8) = 0.104357_8 + mf(9) = 0.088573_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('xe124')) % awr + awr(2) = nuclides(nuclide_dict % get_key('xe126')) % awr + awr(3) = nuclides(nuclide_dict % get_key('xe128')) % awr + awr(4) = nuclides(nuclide_dict % get_key('xe129')) % awr + awr(5) = nuclides(nuclide_dict % get_key('xe130')) % awr + awr(6) = nuclides(nuclide_dict % get_key('xe131')) % awr + awr(7) = nuclides(nuclide_dict % get_key('xe132')) % awr + awr(8) = nuclides(nuclide_dict % get_key('xe134')) % awr + awr(9) = nuclides(nuclide_dict % get_key('xe136')) % awr + end if + + case ('cs') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('cs133')) % awr + end if + + case ('ba') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00106_8 + mf(2) = 0.00101_8 + mf(3) = 0.02417_8 + mf(4) = 0.06592_8 + mf(5) = 0.07854_8 + mf(6) = 0.11232_8 + mf(7) = 0.71698_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ba130')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ba132')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ba134')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ba135')) % awr + awr(5) = nuclides(nuclide_dict % get_key('ba136')) % awr + awr(6) = nuclides(nuclide_dict % get_key('ba137')) % awr + awr(7) = nuclides(nuclide_dict % get_key('ba138')) % awr + end if + + case ('la') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0008881_8 + mf(2) = 0.9991119_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('la138')) % awr + awr(2) = nuclides(nuclide_dict % get_key('la139')) % awr + end if + + case ('ce') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00185_8 + mf(2) = 0.00251_8 + mf(3) = 0.88450_8 + mf(4) = 0.11114_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ce136')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ce138')) % awr + awr(3) = nuclides(nuclide_dict % get_key('ce140')) % awr + awr(4) = nuclides(nuclide_dict % get_key('ce142')) % awr + end if + + case ('pr') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pr141')) % awr + end if + + case ('nd') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.27152_8 + mf(2) = 0.12174_8 + mf(3) = 0.23798_8 + mf(4) = 0.08293_8 + mf(5) = 0.17189_8 + mf(6) = 0.05756_8 + mf(7) = 0.05638_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('nd142')) % awr + awr(2) = nuclides(nuclide_dict % get_key('nd143')) % awr + awr(3) = nuclides(nuclide_dict % get_key('nd144')) % awr + awr(4) = nuclides(nuclide_dict % get_key('nd145')) % awr + awr(5) = nuclides(nuclide_dict % get_key('nd146')) % awr + awr(6) = nuclides(nuclide_dict % get_key('nd148')) % awr + awr(7) = nuclides(nuclide_dict % get_key('nd150')) % awr + end if + + case ('sm') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0307_8 + mf(2) = 0.1499_8 + mf(3) = 0.1124_8 + mf(4) = 0.1382_8 + mf(5) = 0.0738_8 + mf(6) = 0.2675_8 + mf(7) = 0.2275_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('sm144')) % awr + awr(2) = nuclides(nuclide_dict % get_key('sm147')) % awr + awr(3) = nuclides(nuclide_dict % get_key('sm148')) % awr + awr(4) = nuclides(nuclide_dict % get_key('sm149')) % awr + awr(5) = nuclides(nuclide_dict % get_key('sm150')) % awr + awr(6) = nuclides(nuclide_dict % get_key('sm152')) % awr + awr(7) = nuclides(nuclide_dict % get_key('sm154')) % awr + end if + + case ('eu') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.4781_8 + mf(2) = 0.5219_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('eu151')) % awr + awr(2) = nuclides(nuclide_dict % get_key('eu153')) % awr + end if + + case ('gd') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0020_8 + mf(2) = 0.0218_8 + mf(3) = 0.1480_8 + mf(4) = 0.2047_8 + mf(5) = 0.1565_8 + mf(6) = 0.2484_8 + mf(7) = 0.2186_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('gd152')) % awr + awr(2) = nuclides(nuclide_dict % get_key('gd154')) % awr + awr(3) = nuclides(nuclide_dict % get_key('gd155')) % awr + awr(4) = nuclides(nuclide_dict % get_key('gd156')) % awr + awr(5) = nuclides(nuclide_dict % get_key('gd157')) % awr + awr(6) = nuclides(nuclide_dict % get_key('gd158')) % awr + awr(7) = nuclides(nuclide_dict % get_key('gd160')) % awr + end if + + case ('tb') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('tb159')) % awr + end if + + case ('dy') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00056_8 + mf(2) = 0.00095_8 + mf(3) = 0.02329_8 + mf(4) = 0.18889_8 + mf(5) = 0.25475_8 + mf(6) = 0.24896_8 + mf(7) = 0.28260_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('dy156')) % awr + awr(2) = nuclides(nuclide_dict % get_key('dy158')) % awr + awr(3) = nuclides(nuclide_dict % get_key('dy160')) % awr + awr(4) = nuclides(nuclide_dict % get_key('dy161')) % awr + awr(5) = nuclides(nuclide_dict % get_key('dy162')) % awr + awr(6) = nuclides(nuclide_dict % get_key('dy163')) % awr + awr(7) = nuclides(nuclide_dict % get_key('dy164')) % awr + end if + + case ('ho') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ho165')) % awr + end if + + case ('er') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00139_8 + mf(2) = 0.01601_8 + mf(3) = 0.33503_8 + mf(4) = 0.22869_8 + mf(5) = 0.26978_8 + mf(6) = 0.14910_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('er162')) % awr + awr(2) = nuclides(nuclide_dict % get_key('er164')) % awr + awr(3) = nuclides(nuclide_dict % get_key('er166')) % awr + awr(4) = nuclides(nuclide_dict % get_key('er167')) % awr + awr(5) = nuclides(nuclide_dict % get_key('er168')) % awr + awr(6) = nuclides(nuclide_dict % get_key('er170')) % awr + end if + + case ('tm') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('tm169')) % awr + end if + + case ('yb') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00123_8 + mf(2) = 0.02982_8 + mf(3) = 0.1409_8 + mf(4) = 0.2168_8 + mf(5) = 0.16103_8 + mf(6) = 0.32026_8 + mf(7) = 0.12996_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('yb168')) % awr + awr(2) = nuclides(nuclide_dict % get_key('yb170')) % awr + awr(3) = nuclides(nuclide_dict % get_key('yb171')) % awr + awr(4) = nuclides(nuclide_dict % get_key('yb172')) % awr + awr(5) = nuclides(nuclide_dict % get_key('yb173')) % awr + awr(6) = nuclides(nuclide_dict % get_key('yb174')) % awr + awr(7) = nuclides(nuclide_dict % get_key('yb176')) % awr + end if + + case ('lu') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.97401_8 + mf(2) = 0.02599_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('lu175')) % awr + awr(2) = nuclides(nuclide_dict % get_key('lu176')) % awr + end if + + case ('hf') + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0016_8 + mf(2) = 0.0526_8 + mf(3) = 0.1860_8 + mf(4) = 0.2728_8 + mf(5) = 0.1362_8 + mf(6) = 0.3508_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('hf174')) % awr + awr(2) = nuclides(nuclide_dict % get_key('hf176')) % awr + awr(3) = nuclides(nuclide_dict % get_key('hf177')) % awr + awr(4) = nuclides(nuclide_dict % get_key('hf178')) % awr + awr(5) = nuclides(nuclide_dict % get_key('hf179')) % awr + awr(6) = nuclides(nuclide_dict % get_key('hf180')) % awr + end if + + case ('ta') + if (default_expand == ENDF_BVII0 .or. & + (default_expand >= JEFF_311 .and. default_expand <= JEFF_312) .or. & + (default_expand >= JENDL_32 .and. default_expand <= JENDL_40)) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ta181')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0001201_8 + mf(2) = 0.9998799_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ta180')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ta181')) % awr + end if + end if + + case ('w') + if (default_expand == ENDF_BVII0 .or. default_expand == JEFF_311 & + .or. default_expand == JEFF_312 .or. & + (default_expand >= JENDL_32 .and. default_expand <= JENDL_33)) then + ! Combine W-180 with W-182 + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.2662_8 + mf(2) = 0.1431_8 + mf(3) = 0.3064_8 + mf(4) = 0.2843_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('w182')) % awr + awr(2) = nuclides(nuclide_dict % get_key('w183')) % awr + awr(3) = nuclides(nuclide_dict % get_key('w184')) % awr + awr(4) = nuclides(nuclide_dict % get_key('w186')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 5 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0012_8 + mf(2) = 0.2650_8 + mf(3) = 0.1431_8 + mf(4) = 0.3064_8 + mf(5) = 0.2843_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('w180')) % awr + awr(2) = nuclides(nuclide_dict % get_key('w182')) % awr + awr(3) = nuclides(nuclide_dict % get_key('w183')) % awr + awr(4) = nuclides(nuclide_dict % get_key('w184')) % awr + awr(5) = nuclides(nuclide_dict % get_key('w186')) % awr + end if + end if + + case ('re') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.3740_8 + mf(2) = 0.6260_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('re185')) % awr + awr(2) = nuclides(nuclide_dict % get_key('re187')) % awr + end if + + case ('os') + if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('os0')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0002_8 + mf(2) = 0.0159_8 + mf(3) = 0.0196_8 + mf(4) = 0.1324_8 + mf(5) = 0.1615_8 + mf(6) = 0.2626_8 + mf(7) = 0.4078_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('os184')) % awr + awr(2) = nuclides(nuclide_dict % get_key('os186')) % awr + awr(3) = nuclides(nuclide_dict % get_key('os187')) % awr + awr(4) = nuclides(nuclide_dict % get_key('os188')) % awr + awr(5) = nuclides(nuclide_dict % get_key('os189')) % awr + awr(6) = nuclides(nuclide_dict % get_key('os190')) % awr + awr(7) = nuclides(nuclide_dict % get_key('os192')) % awr + end if + end if + + case ('ir') + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.373_8 + mf(2) = 0.627_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('ir191')) % awr + awr(2) = nuclides(nuclide_dict % get_key('ir193')) % awr + end if + + case ('pt') + if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pt0')) % awr + end if + + else + + ! Set the number of isotopes in this element + n_isotopes = 6 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.00012_8 + mf(2) = 0.00782_8 + mf(3) = 0.3286_8 + mf(4) = 0.3378_8 + mf(5) = 0.2521_8 + mf(6) = 0.07356_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pt190')) % awr + awr(2) = nuclides(nuclide_dict % get_key('pt192')) % awr + awr(3) = nuclides(nuclide_dict % get_key('pt194')) % awr + awr(4) = nuclides(nuclide_dict % get_key('pt195')) % awr + awr(5) = nuclides(nuclide_dict % get_key('pt196')) % awr + awr(6) = nuclides(nuclide_dict % get_key('pt198')) % awr + end if + end if + + case ('au') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('au197')) % awr + end if + + case ('hg') + + ! Set the number of isotopes in this element + n_isotopes = 7 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.0015_8 + mf(2) = 0.0997_8 + mf(3) = 0.1687_8 + mf(4) = 0.2310_8 + mf(5) = 0.1318_8 + mf(6) = 0.2986_8 + mf(7) = 0.0687_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('hg196')) % awr + awr(2) = nuclides(nuclide_dict % get_key('hg198')) % awr + awr(3) = nuclides(nuclide_dict % get_key('hg199')) % awr + awr(4) = nuclides(nuclide_dict % get_key('hg200')) % awr + awr(5) = nuclides(nuclide_dict % get_key('hg201')) % awr + awr(6) = nuclides(nuclide_dict % get_key('hg202')) % awr + awr(7) = nuclides(nuclide_dict % get_key('hg204')) % awr + end if + + case ('tl') + if (default_expand == JEFF_311 .or. default_expand == JEFF_312) then + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('tl0')) % awr + end if + else + + ! Set the number of isotopes in this element + n_isotopes = 2 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.2952_8 + mf(2) = 0.7048_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('tl203')) % awr + awr(2) = nuclides(nuclide_dict % get_key('tl205')) % awr + end if + end if + + case ('pb') + + ! Set the number of isotopes in this element + n_isotopes = 4 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.014_8 + mf(2) = 0.241_8 + mf(3) = 0.221_8 + mf(4) = 0.524_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pb204')) % awr + awr(2) = nuclides(nuclide_dict % get_key('pb206')) % awr + awr(3) = nuclides(nuclide_dict % get_key('pb207')) % awr + awr(4) = nuclides(nuclide_dict % get_key('pb208')) % awr + end if + + case ('bi') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('bi209')) % awr + end if + + case ('th') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('th232')) % awr + end if + + case ('pa') + + ! Set the number of isotopes in this element + n_isotopes = 1 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = ONE + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('pa231')) % awr + end if + + case ('u') + + ! Set the number of isotopes in this element + n_isotopes = 3 + + ! Allocate and initialize array for the atomic weight ratios + allocate(awr(n_isotopes)) + awr = ONE + + ! Allocate and initialize array for mole fractions + allocate(mf(n_isotopes)) + mf(1) = 0.000054_8 + mf(2) = 0.007204_8 + mf(3) = 0.992742_8 + + ! Get the atomic weight ratios + if (expand_by == "wo") then + awr(1) = nuclides(nuclide_dict % get_key('u234')) % awr + awr(2) = nuclides(nuclide_dict % get_key('u235')) % awr + awr(3) = nuclides(nuclide_dict % get_key('u238')) % awr + end if + + ! Modify mole fractions in enrichment provided + if (enrichment /= -ONE) then + + ! Calculate the mass fractions of isotopes + mf(1) = 0.008 * enrichment + mf(2) = enrichment + mf(3) = 1.0 - 1.008 * enrichment + + ! Convert the mass fractions to mole fractions + do i = 1, n_isotopes + mf(i) = mf(i) / awr(i) + end do + + ! Normalize the mole fractions to ONE + element_awr = sum(mf(:)) + + do i = 1, n_isotopes + mf(i) = mf(i) / element_awr + end do + end if + + case default + call fatal_error("Cannot expand element: " // name) + + end select + + if (expand_by == "wo") then + + ! Compute the element awr + element_awr = ZERO + do i = 1, n_isotopes + element_awr = element_awr + awr(i) * mf(i) + end do + + ! Normalize the awr to the element awr + do i = 1, n_isotopes + awr(i) = awr(i) / element_awr + end do + end if + + do i = 1, n_isotopes + call densities % push_back(density * mf(i) * awr(i)) + end do + + ! Deallocate arrays + deallocate(awr) + deallocate(mf) + + end subroutine expand_natural_element_densities !=============================================================================== ! GENERATE_RPN implements the shunting-yard algorithm to generate a Reverse @@ -5619,13 +7389,256 @@ contains !=============================================================================== subroutine normalize_ao() - integer :: i ! index in materials array - integer :: j ! index over nuclides in material - real(8) :: sum_percent ! summation - real(8) :: awr ! atomic weight ratio - real(8) :: x ! atom percent - logical :: percent_in_atom ! nuclides specified in atom percent? - logical :: density_in_atom ! density specified in atom/b-cm? + integer :: i ! index in materials array + integer :: j ! index over nuclides in material + real(8) :: sum_percent ! summation + real(8) :: awr ! atomic weight ratio + real(8) :: x ! atom percent + logical :: percent_in_atom ! nuclides specified in atom percent? + logical :: density_in_atom ! density specified in atom/b-cm? + logical :: file_exists ! does materials.xml exist? + character(20) :: name ! name of isotope, e.g. 92235.03c + character(MAX_WORD_LEN) :: units ! units on density + character(MAX_LINE_LEN) :: filename ! materials.xml filename + real(8) :: val ! value entered for density + real(8) :: temp_dble ! temporary double prec. real + real(8) :: enrichment ! enrichment + logical :: sum_density ! density is sum of nuclide densities + type(VectorReal) :: densities ! temporary list of nuclide densities + type(Material), pointer :: mat => null() + type(Node), pointer :: doc => null() + type(Node), pointer :: node_mat => null() + type(Node), pointer :: node_dens => null() + type(Node), pointer :: node_nuc => null() + type(Node), pointer :: node_ele => null() + type(NodeList), pointer :: node_mat_list => null() + type(NodeList), pointer :: node_nuc_list => null() + type(NodeList), pointer :: node_macro_list => null() + type(NodeList), pointer :: node_ele_list => null() + + ! Display output message + call write_message("Reading material densities from XML file...", 5) + + ! Check is materials.xml exists + filename = trim(path_input) // "materials.xml" + inquire(FILE=filename, EXIST=file_exists) + if (.not. file_exists) then + call fatal_error("Material XML file '" // trim(filename) // "' does not & + &exist!") + end if + + ! Parse materials.xml file + call open_xmldoc(doc, filename) + + ! Get pointer to list of XML + call get_node_list(doc, "material", node_mat_list) + + do i = 1, n_materials + mat => materials(i) + + ! Get pointer to i-th material node + call get_list_item(node_mat_list, i, node_mat) + + ! Get pointer to density element + if (check_for_node(node_mat, "density")) then + call get_node_ptr(node_mat, "density", node_dens) + else + call fatal_error("Must specify density element in material " & + // trim(to_str(mat % id))) + end if + + ! Copy units + call get_node_value(node_dens, "units", units) + + if (units == 'sum') then + ! If the user gave the units as 'sum', then the total density of the + ! material is taken to be the sum of the atom fractions listed on the + ! nuclides + + sum_density = .true. + + else if (units == 'macro') then + if (check_for_node(node_dens, "value")) then + ! Copy value + call get_node_value(node_dens, "value", val) + else + val = ONE + end if + + ! Set density + mat % density = val + + sum_density = .false. + + else + ! Copy value + call get_node_value(node_dens, "value", val) + + ! Check for erroneous density + sum_density = .false. + if (val <= ZERO) then + call fatal_error("Need to specify a positive density on material " & + // trim(to_str(mat % id)) // ".") + end if + ! Adjust material density based on specified units + select case(to_lower(units)) + case ('g/cc', 'g/cm3') + mat % density = -val + case ('kg/m3') + mat % density = -0.001_8 * val + case ('atom/b-cm') + mat % density = val + case ('atom/cm3', 'atom/cc') + mat % density = 1.0e-24_8 * val + case default + call fatal_error("Unkwown units '" // trim(units) & + // "' specified on material " // trim(to_str(mat % id))) + end select + end if + + ! ======================================================================== + ! READ IN NUCLIDE DENSITIES + + ! Get pointer list of XML + call get_node_list(node_mat, "macroscopic", node_macro_list) + if (get_list_size(node_macro_list) == 1) then + + call get_list_item(node_macro_list, 1, node_nuc) + + ! store nuclide name + call get_node_value(node_nuc, "name", name) + name = trim(name) + + ! Check if no atom/weight percents were specified or if both atom and + ! weight percents were specified + if (units == 'macro') then + call densities % push_back(ONE) + else + call fatal_error("Units can only be macro for macroscopic data " & + // trim(name)) + end if + else + + ! Get pointer list of XML + call get_node_list(node_mat, "nuclide", node_nuc_list) + + ! Create list of nuclides based on those specified plus natural elements + INDIVIDUAL_NUCLIDES: do j = 1, get_list_size(node_nuc_list) + + ! Combine nuclide identifier and cross section and copy into names + call get_list_item(node_nuc_list, j, node_nuc) + + ! store nuclide name + call get_node_value(node_nuc, "name", name) + name = trim(name) + + ! Check if no atom/weight percents were specified or if both atom and + ! weight percents were specified + if (units == 'macro') then + call densities % push_back(ONE) + else + if (.not. check_for_node(node_nuc, "ao") .and. & + .not. check_for_node(node_nuc, "wo")) then + call fatal_error("No atom or weight percent specified for & + &nuclide" // trim(name)) + elseif (check_for_node(node_nuc, "ao") .and. & + check_for_node(node_nuc, "wo")) then + call fatal_error("Cannot specify both atom and weight percents & + &for a nuclide: " // trim(name)) + end if + + ! If enrichment was provided, issue error + if (check_for_node(node_nuc, "enrichment")) then + call fatal_error("Cannot specify an enrichment for an isotope") + end if + + ! Copy atom/weight percents + if (check_for_node(node_nuc, "ao")) then + call get_node_value(node_nuc, "ao", temp_dble) + call densities % push_back(temp_dble) + else + call get_node_value(node_nuc, "wo", temp_dble) + call densities % push_back(-temp_dble) + end if + end if + end do INDIVIDUAL_NUCLIDES + end if + + ! ======================================================================= + ! READ AND PARSE TAGS + + ! Get pointer list of XML + call get_node_list(node_mat, "element", node_ele_list) + + NATURAL_ELEMENTS: do j = 1, get_list_size(node_ele_list) + call get_list_item(node_ele_list, j, node_ele) + + call get_node_value(node_ele, "name", name) + + ! Check if no atom/weight percents were specified or if both atom and + ! weight percents were specified + if (.not. check_for_node(node_ele, "ao") .and. & + .not. check_for_node(node_ele, "wo")) then + call fatal_error("No atom or weight percent specified for element " & + // trim(name)) + elseif (check_for_node(node_ele, "ao") .and. & + check_for_node(node_ele, "wo")) then + call fatal_error("Cannot specify both atom and weight percents for & + &element: " // trim(name)) + end if + + ! If enrichment was provided, issue error + if (check_for_node(node_ele, "enrichment")) then + + if (name /= 'U') then + call fatal_error("Enrichment is only supported for U") + end if + + call get_node_value(node_ele, "enrichment", enrichment) + + ! Check that enrichment is between ZERO and 1 / 1.008 + if (enrichment < ZERO .or. enrichment > 1 / 1.008) then + call fatal_error("U enrichment must be between 0 and 1/1.008") + end if + + else + enrichment = -ONE + end if + + ! Expand element into naturally-occurring isotopes + if (check_for_node(node_ele, "ao")) then + call get_node_value(node_ele, "ao", temp_dble) + call expand_natural_element_densities(name, "ao", temp_dble, & + enrichment, densities) + else + call get_node_value(node_ele, "wo", temp_dble) + call expand_natural_element_densities(name, "wo", -temp_dble, & + enrichment, densities) + end if + + end do NATURAL_ELEMENTS + + ! ======================================================================== + ! SET MATERIAL ATOM DENSITIES + + ALL_NUCLIDES: do j = 1, mat % n_nuclides + mat % atom_density(j) = densities % data(j) + end do ALL_NUCLIDES + + ! Check to make sure either all atom percents or all weight percents are + ! given + if (.not. (all(mat % atom_density >= ZERO) .or. & + all(mat % atom_density <= ZERO))) then + call fatal_error("Cannot mix atom and weight percents in material " & + // to_str(mat % id)) + end if + + ! Determine density if it is a sum value + if (sum_density) mat % density = sum(mat % atom_density) + + ! Clear lists + call densities % clear() + end do do i = 1, size(materials) associate (mat => materials(i))