diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 1ad4b5f9c2..e0495226ba 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -69,37 +69,6 @@ deviation. *Default*: off -```` Element -------------------------- - -The ```` element indicates that a criticality calculation should be -performed. It has the following attributes/sub-elements: - - :batches: - The total number of batches, where each batch corresponds to multiple - fission source iterations. Batching is done to eliminate correlation between - realizations of random variables. - - *Default*: None - - :generations_per_batch: - The number of total fission source iterations per batch. - - *Default*: 1 - - :inactive: - The number of inactive batches. In general, the starting cycles in a - criticality calculation can not be used to contribute to tallies since the - fission source distribution and eigenvalue are generally not converged - immediately. - - *Default*: None - - :particles: - The number of neutrons to simulate per fission source iteration. - - *Default*: None - .. _cross_sections: ```` Element @@ -130,6 +99,37 @@ default. This element has the following attributes/sub-elements: *Default*: 1.0 +```` Element +------------------------ + +The ```` element indicates that a :math:`k`-eigenvalue calculation +should be performed. It has the following attributes/sub-elements: + + :batches: + The total number of batches, where each batch corresponds to multiple + fission source iterations. Batching is done to eliminate correlation between + realizations of random variables. + + *Default*: None + + :generations_per_batch: + The number of total fission source iterations per batch. + + *Default*: 1 + + :inactive: + The number of inactive batches. In general, the starting cycles in a + criticality calculation can not be used to contribute to tallies since the + fission source distribution and eigenvalue are generally not converged + immediately. + + *Default*: None + + :particles: + The number of neutrons to simulate per fission source iteration. + + *Default*: None + ```` Element ------------------------- diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES index 9b7f715b53..0d2e4e2def 100644 --- a/src/DEPENDENCIES +++ b/src/DEPENDENCIES @@ -90,23 +90,23 @@ cmfd_snes_solver.o: constants.o cmfd_snes_solver.o: global.o cmfd_snes_solver.o: string.o -criticality.o: cmfd_execute.o -criticality.o: constants.o -criticality.o: error.o -criticality.o: global.o -criticality.o: hdf5_interface.o -criticality.o: math.o -criticality.o: mesh.o -criticality.o: mesh_header.o -criticality.o: output.o -criticality.o: physics.o -criticality.o: random_lcg.o -criticality.o: search.o -criticality.o: source.o -criticality.o: state_point.o -criticality.o: string.o -criticality.o: tally.o -criticality.o: timing.o +eigenvalue.o: cmfd_execute.o +eigenvalue.o: constants.o +eigenvalue.o: error.o +eigenvalue.o: global.o +eigenvalue.o: hdf5_interface.o +eigenvalue.o: math.o +eigenvalue.o: mesh.o +eigenvalue.o: mesh_header.o +eigenvalue.o: output.o +eigenvalue.o: physics.o +eigenvalue.o: random_lcg.o +eigenvalue.o: search.o +eigenvalue.o: source.o +eigenvalue.o: state_point.o +eigenvalue.o: string.o +eigenvalue.o: tally.o +eigenvalue.o: timing.o cross_section.o: ace_header.o cross_section.o: constants.o @@ -243,7 +243,7 @@ interpolation.o: search.o interpolation.o: string.o main.o: constants.o -main.o: criticality.o +main.o: eigenvalue.o main.o: finalize.o main.o: fixed_source.o main.o: global.o diff --git a/src/OBJECTS b/src/OBJECTS index 324f16d761..1a0aac3828 100644 --- a/src/OBJECTS +++ b/src/OBJECTS @@ -14,10 +14,10 @@ cmfd_power_solver.o \ cmfd_prod_operator.o \ cmfd_snes_solver.o \ cross_section.o \ -criticality.o \ datatypes.o \ datatypes_header.o \ doppler.o \ +eigenvalue.o \ endf.o \ endf_header.o \ energy_grid.o \ diff --git a/src/bank_header.F90 b/src/bank_header.F90 index 2d49dead7e..1a91f86f7a 100644 --- a/src/bank_header.F90 +++ b/src/bank_header.F90 @@ -3,7 +3,7 @@ module bank_header implicit none !=============================================================================== -! BANK is used for storing fission sites in criticality calculations. Since all +! BANK is used for storing fission sites in eigenvalue calculations. Since all ! the state information of a neutron is not needed, this type allows sites to be ! stored with less memory !=============================================================================== diff --git a/src/constants.F90 b/src/constants.F90 index e1d8e853a8..fe025c7e8a 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -347,7 +347,7 @@ module constants ! Running modes integer, parameter :: & MODE_FIXEDSOURCE = 1, & ! Fixed source mode - MODE_CRITICALITY = 2, & ! Criticality mode + MODE_EIGENVALUE = 2, & ! K eigenvalue mode MODE_PLOTTING = 3, & ! Plotting mode MODE_TALLIES = 4 ! Tally results mode diff --git a/src/criticality.F90 b/src/eigenvalue.F90 similarity index 98% rename from src/criticality.F90 rename to src/eigenvalue.F90 index a19acdc6df..33e217f92f 100644 --- a/src/criticality.F90 +++ b/src/eigenvalue.F90 @@ -1,4 +1,4 @@ -module criticality +module eigenvalue #ifdef MPI use mpi @@ -29,15 +29,15 @@ module criticality contains !=============================================================================== -! RUN_CRITICALITY encompasses all the main logic where iterations are performed -! over the batches, generations, and histories. +! RUN_EIGENVALUE encompasses all the main logic where iterations are performed +! over the batches, generations, and histories in a k-eigenvalue calculation. !=============================================================================== - subroutine run_criticality() + subroutine run_eigenvalue() integer(8) :: i ! index over individual particles - if (master) call header("CRITICALITY TRANSPORT SIMULATION", level=1) + if (master) call header("K EIGENVALUE SIMULATION", level=1) ! Allocate particle allocate(p) @@ -99,7 +99,7 @@ contains if (master) call header("SIMULATION FINISHED", level=1) - end subroutine run_criticality + end subroutine run_eigenvalue !=============================================================================== ! INITIALIZE_BATCH @@ -692,4 +692,4 @@ contains end subroutine count_source_for_ufs -end module criticality +end module eigenvalue diff --git a/src/global.F90 b/src/global.F90 index 47d778bac2..41a016b10b 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -154,7 +154,7 @@ module global type(ListInt), pointer :: active_tallies => null() ! ============================================================================ - ! CRITICALITY SIMULATION VARIABLES + ! EIGENVALUE SIMULATION VARIABLES integer(8) :: n_particles = 0 ! # of particles per generation integer :: n_batches ! # of batches @@ -250,7 +250,7 @@ module global ! ============================================================================ ! MISCELLANEOUS VARIABLES - ! Mode to run in (fixed source, criticality, plotting, etc) + ! Mode to run in (fixed source, eigenvalue, plotting, etc) integer :: run_mode = NONE ! Restart run diff --git a/src/hdf5_interface.F90 b/src/hdf5_interface.F90 index c6ec49c4d5..a527197384 100644 --- a/src/hdf5_interface.F90 +++ b/src/hdf5_interface.F90 @@ -94,8 +94,8 @@ contains ! Write header information call hdf5_write_header() - ! Write criticality information - if (run_mode == MODE_CRITICALITY) then + ! Write eigenvalue information + if (run_mode == MODE_EIGENVALUE) then ! Need to write integer(8)'s using double instead since there is no H5LT ! call for making a dataset of type long call hdf5_write_double(hdf5_output_file, "n_particles", real(n_particles,8)) @@ -865,8 +865,8 @@ contains ! Write out current batch number call hdf5_write_integer(hdf5_state_point, "current_batch", current_batch) - ! Write out information for criticality run - if (run_mode == MODE_CRITICALITY) then + ! Write out information for eigenvalue run + if (run_mode == MODE_EIGENVALUE) then call hdf5_write_integer(hdf5_state_point, "n_inactive", n_inactive) call hdf5_write_integer(hdf5_state_point, "gen_per_batch", gen_per_batch) @@ -1132,8 +1132,8 @@ contains ! Read batch number to restart at call hdf5_read_integer(hdf5_state_point, "current_batch", restart_batch) - ! Read information specific to criticality run - if (mode == MODE_CRITICALITY) then + ! Read information specific to eigenvalue run + if (mode == MODE_EIGENVALUE) then call hdf5_read_integer(hdf5_state_point, "n_inactive", n_inactive) call hdf5_read_integer(hdf5_state_point, "gen_per_batch", gen_per_batch) diff --git a/src/initialize.F90 b/src/initialize.F90 index cdd85dfdb8..d25da7ddc5 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -120,7 +120,7 @@ contains ! Allocate banks and create source particles -- for a fixed source ! calculation, the external source distribution is sampled during the ! run, not at initialization - if (run_mode == MODE_CRITICALITY) then + if (run_mode == MODE_EIGENVALUE) then call allocate_banks() if (.not. restart_run) call initialize_source() end if diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 621856834d..3cb5460988 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -102,32 +102,41 @@ contains end if ! Make sure that either criticality or fixed source was specified - if (criticality_ % batches == 0 .and. fixed_source_ % batches == 0) then - message = "Number of batches on or " & - // "tag was zero." + if (eigenvalue_ % batches == 0 .and. fixed_source_ % batches == 0 & + .and. criticality_ % batches == 0) then + message = "Number of batches on or & + &tag was zero." call fatal_error() end if - ! Criticality information + ! Check for old tag if (criticality_ % batches > 0) then + eigenvalue_ = criticality_ + message = "The element has been deprecated and & + &replaced by ." + call warning() + end if + + ! Eigenvalue information + if (eigenvalue_ % batches > 0) then ! Set run mode - if (run_mode == NONE) run_mode = MODE_CRITICALITY + if (run_mode == NONE) run_mode = MODE_EIGENVALUE ! Check number of particles - if (len_trim(criticality_ % particles) == 0) then + if (len_trim(eigenvalue_ % particles) == 0) then message = "Need to specify number of particles per cycles." call fatal_error() end if ! If the number of particles was specified as a command-line argument, we ! don't set it here - if (n_particles == 0) n_particles = str_to_int(criticality_ % particles) + if (n_particles == 0) n_particles = str_to_int(eigenvalue_ % particles) ! Copy batch and generation information - n_batches = criticality_ % batches - n_inactive = criticality_ % inactive + n_batches = eigenvalue_ % batches + n_inactive = eigenvalue_ % inactive n_active = n_batches - n_inactive - gen_per_batch = criticality_ % generations_per_batch + gen_per_batch = eigenvalue_ % generations_per_batch ! Allocate array for batch keff and entropy allocate(k_batch(n_batches)) diff --git a/src/main.F90 b/src/main.F90 index 89cc7e8570..c5875d5d0d 100644 --- a/src/main.F90 +++ b/src/main.F90 @@ -1,7 +1,7 @@ program main use constants - use criticality, only: run_criticality + use eigenvalue, only: run_eigenvalue use finalize, only: finalize_run use fixed_source, only: run_fixedsource use global @@ -17,8 +17,8 @@ program main select case (run_mode) case (MODE_FIXEDSOURCE) call run_fixedsource() - case (MODE_CRITICALITY) - call run_criticality() + case (MODE_EIGENVALUE) + call run_eigenvalue() case (MODE_PLOTTING) call run_plot() case (MODE_TALLIES) diff --git a/src/output.F90 b/src/output.F90 index 04cfcb8a9a..4be436291a 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -1078,13 +1078,13 @@ contains ! Display problem summary call header("PROBLEM SUMMARY", unit=UNIT_SUMMARY) select case(run_mode) - case (MODE_CRITICALITY) - write(UNIT_SUMMARY,100) 'Problem type:', 'Criticality' + case (MODE_EIGENVALUE) + write(UNIT_SUMMARY,100) 'Problem type:', 'k eigenvalue' write(UNIT_SUMMARY,101) 'Number of Batches:', n_batches write(UNIT_SUMMARY,101) 'Number of Inactive Batches:', n_inactive write(UNIT_SUMMARY,101) 'Generations per Batch:', gen_per_batch case (MODE_FIXEDSOURCE) - write(UNIT_SUMMARY,100) 'Problem type:', 'External Source' + write(UNIT_SUMMARY,100) 'Problem type:', 'fixed source' end select write(UNIT_SUMMARY,101) 'Number of Particles:', n_particles diff --git a/src/source_header.F90 b/src/source_header.F90 index cb0eb290c3..11c74d110c 100644 --- a/src/source_header.F90 +++ b/src/source_header.F90 @@ -4,7 +4,7 @@ module source_header !=============================================================================== ! EXTSOURCE describes an external source of neutrons for a fixed-source problem -! or for the starting source in a criticality problem +! or for the starting source in a k eigenvalue problem !=============================================================================== type ExtSource diff --git a/src/state_point.F90 b/src/state_point.F90 index 72ec8463ab..566ce04ad2 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -120,7 +120,7 @@ contains ! ========================================================================== ! SOURCE BANK - if (run_mode == MODE_CRITICALITY) then + if (run_mode == MODE_EIGENVALUE) then if (source_separate) then ! If the user has specified that the source sites should be written in ! a separate file, we make a call to the appropriate subroutine to @@ -179,8 +179,8 @@ contains ! Write out current batch number write(UNIT_STATE) current_batch - ! Write out information for criticality run - if (run_mode == MODE_CRITICALITY) then + ! Write out information for eigenvalue run + if (run_mode == MODE_EIGENVALUE) then write(UNIT_STATE) n_inactive, gen_per_batch write(UNIT_STATE) k_batch(1:current_batch) write(UNIT_STATE) entropy(1:current_batch) @@ -281,7 +281,7 @@ contains end if ! Write out source bank - if (run_mode == MODE_CRITICALITY) then + if (run_mode == MODE_EIGENVALUE) then if (source_separate) then ! If the user has specified that the source sites should be written in ! a separate file, we make a call to the appropriate subroutine to @@ -349,8 +349,8 @@ contains call MPI_FILE_WRITE(fh, current_batch, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) - ! Write out information for criticality run - if (run_mode == MODE_CRITICALITY) then + ! Write out information for eigenvalue run + if (run_mode == MODE_EIGENVALUE) then call MPI_FILE_WRITE(fh, n_inactive, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) call MPI_FILE_WRITE(fh, gen_per_batch, 1, MPI_INTEGER, & @@ -644,8 +644,8 @@ contains call MPI_FILE_READ_ALL(fh, restart_batch, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) - ! Read information specific to criticality run - if (mode == MODE_CRITICALITY) then + ! Read information specific to eigenvalue run + if (mode == MODE_EIGENVALUE) then call MPI_FILE_READ_ALL(fh, n_inactive, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) call MPI_FILE_READ_ALL(fh, gen_per_batch, 1, MPI_INTEGER, & @@ -781,7 +781,7 @@ contains ! ========================================================================== ! SOURCE BANK - if (run_mode == MODE_CRITICALITY) then + if (run_mode == MODE_EIGENVALUE) then ! Get current offset for master if (master) call MPI_FILE_GET_POSITION(fh, offset, mpi_err) @@ -841,8 +841,8 @@ contains ! Read batch number to restart at read(UNIT_STATE) restart_batch - ! Read information specific to criticality run - if (mode == MODE_CRITICALITY) then + ! Read information specific to eigenvalue run + if (mode == MODE_EIGENVALUE) then read(UNIT_STATE) n_inactive, gen_per_batch read(UNIT_STATE) k_batch(1:restart_batch) read(UNIT_STATE) entropy(1:restart_batch) @@ -966,8 +966,8 @@ contains end if end if - ! Read source bank for criticality run - if (mode == MODE_CRITICALITY .and. run_mode /= MODE_TALLIES) then + ! Read source bank for eigenvalue run + if (mode == MODE_EIGENVALUE .and. run_mode /= MODE_TALLIES) then read(UNIT_STATE) source_bank end if @@ -995,7 +995,7 @@ contains call write_message(1) end if - ! For criticality calculations, turn on tallies if we've reached active + ! For eigenvalue calculations, turn on tallies if we've reached active ! batches if (current_batch == n_inactive) then tallies_on = .true. diff --git a/src/tally.F90 b/src/tally.F90 index f52766b0e8..e271cad727 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -1506,7 +1506,7 @@ contains curr_ptr => curr_ptr % next end do - if (run_mode == MODE_CRITICALITY) then + if (run_mode == MODE_EIGENVALUE) then ! Before accumulating scores for global_tallies, we need to get the ! current batch estimate of k_analog for displaying to output if (active_batches) k_batch(current_batch) = global_tallies(K_ANALOG) % value diff --git a/src/templates/settings.rnc b/src/templates/settings.rnc index 772a182e96..a2d75254fd 100644 --- a/src/templates/settings.rnc +++ b/src/templates/settings.rnc @@ -2,7 +2,7 @@ element settings { element confidence_intervals { ( "on" | "off" ) }? & ( - element criticality { + element eigenvalue { (element batches { xsd:positiveInteger } | attribute batches { xsd:positiveInteger }) & (element inactive { xsd:nonNegativeInteger } | diff --git a/src/templates/settings_t.xml b/src/templates/settings_t.xml index 2a220b7269..c897c99f83 100644 --- a/src/templates/settings_t.xml +++ b/src/templates/settings_t.xml @@ -42,9 +42,9 @@ - + @@ -60,4 +60,7 @@ + + +