diff --git a/doc/content/getting_started/eigenvalue.md b/doc/content/getting_started/eigenvalue.md index 3fae3451bf..2afa31018a 100644 --- a/doc/content/getting_started/eigenvalue.md +++ b/doc/content/getting_started/eigenvalue.md @@ -19,11 +19,34 @@ respectively. style=width:35%;text-align:center;margin-left:auto;margin-right:auto; For multiplication factor ($k$) eigenvalue calculations, Moltres relies on the -`InversePowerMethod` or `NonlinearEigen` executioners from MOOSE. These executioners solve the +`Eigenvalue` executioner from MOOSE. These executioners solve the neutron diffusion equations set up as an eigenvalue problem to find $k$ and the neutron flux distribution, which occur as the absolute minimum eigenvalue $1/k$ and the corresponding -eigenvector of the system. The mathematical background and documentation for these executioners can -be found [here](https://mooseframework.inl.gov/source/executioners/InversePowerMethod.html). This -tutorial uses the `InversePowerMethod` executioner which applies the inverse power method. +eigenvector of the system. +The MOOSE Action system allows us to streamline and simplify creating input files for Moltres +simulations. You will have encountered the `PrecursorAction` object in Tutorial 2a for setting up +input parameters for delayed neutron precursors. `PrecursorAction` automatically sets up the +required Variables, Kernels, BCs, etc. governing precursor production, decay, and drift. Otherwise, +users will need to fill in every input object for six or eight precursor groups, which would +undoubtedly result in a very long input file prone to typos and user error. Similarly, we created +NtAction for neutron group fluxes since many reactor simulations involve more than two neutron +energy groups. +Both `nts.i` and `nts-action.i` set up the same eigenvalue problem for a 2-D axisymmetric MSRE +model. The model parameters are as follows: + +- Two neutron energy groups +- Six delayed neutron precursor groups +- Vacuum boundary conditions along the top, bottom and outer boundaries of the axisymmetric + cylinder +- Uniform temperature of 900K +- Uniform salt flow upwards along the fuel channels at 18.085cm/s +- No salt looping (precursors that flow out of the core without decaying are considered lost) + + +Both input files produce the same neutron flux and precursor distributions. You may compare them to +identify the objects that NtAction automatically initializes, and appreciate how much cleaner +`nts-action.i` looks compared to `nts.i`. + +Results and discussion to come at a later date. diff --git a/doc/content/getting_started/input_syntax.md b/doc/content/getting_started/input_syntax.md index d2d6435dc7..306ba960cb 100644 --- a/doc/content/getting_started/input_syntax.md +++ b/doc/content/getting_started/input_syntax.md @@ -179,6 +179,21 @@ extension). To generate a mesh for use with Moltres, a typical bash command is dimension of the mesh, the argument following `-o` is the name of the output `.msh` file, and the last argument is the input `.geo` file. +## Problem Block id=problem + +The `Problem` block is used to indicate the type of problem we are solving. MOOSE automatically +identifies which problem class is suitable for your simulation type (e.g., `FEProblem` or +`EigenProblem`). However, for this particular input file, we want to set the `bx_norm` parameter +for determining the eigenvalue estimate during each iteration of the eigensolver. Therefore, this +input file requires us to indicate the problem type and the `bx_norm` parameter. + +``` +[Problem] + type = EigenProblem + bx_norm = bnorm +[] +``` + ## Variables Block id=variables The `Variables` block is used to indicate the primary solution variables, or @@ -195,12 +210,10 @@ kernel and BC term must be associated with one primary variable from the [group1] order = FIRST family = LAGRANGE - initial_condition = 1 [] [group2] order = FIRST family = LAGRANGE - initial_condition = 1 [] [] ``` @@ -314,7 +327,7 @@ Kernels can be optionally restricted to specific subdomains within the model by that is solved may differ in different mesh regions. The equations that are modeled are represented below, followed by the input required to construct these equations. In the `group1` and `group2` neutron flux equations below and in the input that -follows, notice that the fission kernel (`CoupledFissionEigenKernel`) +follows, notice that the fission kernel (`CoupledFissionKernel`) is only included in the fuel region ('0'), and is not included in the moderator region ('1') since there is no fuel in the moderator region. Also, the `DelayedNeutronSource` kernel, which contributes neutrons from the precursor group equations, is only @@ -328,10 +341,14 @@ included as part of the `group1` or fast group equation. + \underbrace{\Sigma_g^r \phi_g}_{SigmaR} - \underbrace{\nabla \cdot D_g \nabla \phi_g}_{GroupDiffusion} - \underbrace{\sum_{g \ne g'}^G \Sigma_{g'\rightarrow g}^s \phi_{g'}}_{InScatter} - - \underbrace{\chi_g^p \sum_{g' = 1}^G (1 - \beta) \nu \Sigma_{f,g'} \phi_{g'}}_{\substack{CoupledFissionKernel\\ \textrm{'Fuel' region only}}} + - \underbrace{\chi_g^p \sum_{g' = 1}^G (1 - \beta) \frac{\nu \Sigma_{f,g'}}{k} \phi_{g'}}_{\substack{CoupledFissionKernel\\ \textrm{'Fuel' region only}}} - \underbrace{\chi_g^d \sum_i^I \lambda_i C_i}_{\substack{DelayedNeutronSource\\ \textrm{'Fuel' region only} \\ \textrm{Not in group2 Eqn}}} = 0 +The `extra_vector_tags = eigen` parameter indicates all kernels to be scaled by the $1/k$ +eigenvalue in this eigenvalue problem. This parameter is omitted for non-eigenvalue problems +discussed in the other tutorial problems. + ``` [Kernels] #--------------------------------------------------------------------- @@ -353,10 +370,11 @@ included as part of the `group1` or fast group equation. group_number = 1 [] [fission_source_group1] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group1 group_number = 1 block = '0' + extra_vector_tags = 'eigen' [] [delayed_group1] type = DelayedNeutronSource @@ -379,10 +397,11 @@ included as part of the `group1` or fast group equation. group_number = 2 [] [fission_source_group2] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group2 group_number = 2 block = '0' + extra_vector_tags = 'eigen' [] [inscatter_group2] type = InScatter @@ -479,37 +498,19 @@ basic instructions. ``` [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - - normalization = 'powernorm' - normal_factor = 8e6 - - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1. - l_max_its = 100 - eig_check_tol = 1e-7 + type = Eigenvalue + initial_eigenvalue = 1 + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' automatic_scaling = true compute_scaling_once = false resid_vs_jac_scaling_param = 0.1 - off_diagonals_in_auto_scaling = false - - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -pc_factor_shift_type' - petsc_options_value = 'lu NONZERO' line_search = none [] - -[Preconditioning] - [./SMP] - type = SMP - full = true - [../] -[] ``` ## Postprocessors Block id=postprocessors @@ -518,17 +519,23 @@ A `PostProcessor` computes a single scalar value during the simulations. General postprocessor documentation can be found [here](https://www.mooseframework.org/syntax/Postprocessors/index.html). -The `bnorm`, `tot_fissions`, and `powernorm` parameters calculate the total number of fission -neutrons, fission interactions, and fission heat, respectively. The `bnorm` parameter is required -by the `InversePowerMethod` executioner as a normalization term for inverse power iterations. The -other two may be used to normalize the flux solution at the end of the calculation through the -`normalization` and `normal_factor` parameters in the `Executioner` block. The `group1diff` -postprocessor is also required by the `InversePowerMethod` executioner for Chebyshev acceleration. -The rest of the postprocessors calculate the integral sum or maximum values of the `group1` and -`group2` flux variables. +`k_eff` retrieves the real part of the computed eigenvalue which is taken to be the $k$ +multiplication factor. The `bnorm`, `tot_fissions`, and `powernorm` postprocessor objects calculate +the total number of fission neutrons, fission interactions, and fission heat, respectively. The +`bnorm` parameter is required by the `Eigenvalue` executioner as an estimate for $k$ in each +iteration. The other two may be used to normalize the flux solution at the end of +the calculation through the `normalization` and `normal_factor` parameters in the `Executioner` +block. The rest of the postprocessors calculate the integral sum, diff, or maximum values +of the `group1` and `group2` flux variables. ``` [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor execute_on = linear @@ -601,8 +608,9 @@ values during the simulation, which may be desired when running test runs. ## Debug Block id=debug -This simply tells Moltres to print the variable residual norms during the -non-linear solve. +This parameter tells Moltres to print the variable residual norms during the +non-linear solve. Residual information is useful for debugging convergence issues by identifying +which variable is exhibiting slow or no convergence behavior. ``` [Debug] diff --git a/doc/content/source/kernels/CoupledFissionEigenKernel.md b/doc/content/source/kernels/CoupledFissionEigenKernel.md deleted file mode 100644 index 7aa1c54ff1..0000000000 --- a/doc/content/source/kernels/CoupledFissionEigenKernel.md +++ /dev/null @@ -1,21 +0,0 @@ -# CoupledFissionEigenKernel - -!syntax description /Kernels/CoupledFissionEigenKernel - -## Overview - -This object adds the $\frac{\chi_g^p}{k} \sum_{g' = 1}^G (1 - \beta) \nu \Sigma_{g'}^f \phi_{g'}$ -neutron source term of the multigroup neutron diffusion equations for the $k$-eigenvalue problem. -If `account_delayed=false` (i.e. -no delayed neutron precursor modeling), the $\frac{\chi_g^t}{k} \sum_{g' = 1}^G \nu \Sigma_{g'}^f -\phi_{g'}$ form is used instead. - -## Example Input File Syntax - -!! Describe and include an example of how to use the CoupledFissionEigenKernel object. - -!syntax parameters /Kernels/CoupledFissionEigenKernel - -!syntax inputs /Kernels/CoupledFissionEigenKernel - -!syntax children /Kernels/CoupledFissionEigenKernel diff --git a/doc/content/source/kernels/PrecursorEigenSource.md b/doc/content/source/kernels/PrecursorEigenSource.md deleted file mode 100644 index f8c41734b8..0000000000 --- a/doc/content/source/kernels/PrecursorEigenSource.md +++ /dev/null @@ -1,18 +0,0 @@ -# PrecursorSource - -!syntax description /Kernels/PrecursorSource - -## Overview - -This object adds the $\frac{1}{k}\sum_{g'= 1}^G \beta_i \nu \Sigma_{g'}^f \phi_{g'}$ precursor -source term of the delayed neutron precursor equation for the $k$-eigenvalue problem. - -## Example Input File Syntax - -!! Describe and include an example of how to use the PrecursorSource object. - -!syntax parameters /Kernels/PrecursorSource - -!syntax inputs /Kernels/PrecursorSource - -!syntax children /Kernels/PrecursorSource diff --git a/doc/content/source/kernels/SelfFissionEigenKernel.md b/doc/content/source/kernels/SelfFissionEigenKernel.md deleted file mode 100644 index 8094116a2f..0000000000 --- a/doc/content/source/kernels/SelfFissionEigenKernel.md +++ /dev/null @@ -1,23 +0,0 @@ -# SelfFissionEigenKernel - -!alert construction title=Undocumented Class -The SelfFissionEigenKernel has not been documented. The content listed below should be used as a starting point for -documenting the class, which includes the typical automatic documentation associated with a -MooseObject; however, what is contained is ultimately determined by what is necessary to make the -documentation clear for users. - -!syntax description /Kernels/SelfFissionEigenKernel - -## Overview - -!! Replace these lines with information regarding the SelfFissionEigenKernel object. - -## Example Input File Syntax - -!! Describe and include an example of how to use the SelfFissionEigenKernel object. - -!syntax parameters /Kernels/SelfFissionEigenKernel - -!syntax inputs /Kernels/SelfFissionEigenKernel - -!syntax children /Kernels/SelfFissionEigenKernel diff --git a/include/actions/NtAction.h b/include/actions/NtAction.h index 2d5ad53d73..dd5ff841ff 100644 --- a/include/actions/NtAction.h +++ b/include/actions/NtAction.h @@ -36,4 +36,36 @@ class NtAction : public VariableNotAMooseObjectAction /// number of energy groups unsigned int _num_groups; + + /** + * Adds non-source neutronics kernel + * + * @param op The zero-based index for the precursor group the kernel acts on + * @param var_name The name of the variable the kernel acts on + * @param kernel_type The kernel type to be added + * @param all_var_names Vector of the names of all group flux variables + */ + void addNtKernel(const unsigned & op, + const std::string & var_name, + const std::string & kernel_type, + const std::vector & all_var_names); + + /** + * Adds CoupledFissionKernel kernel + * + * @param op The zero-based index for the precursor group the kernel acts on + * @param var_name The name of the variable the kernel acts on + * @param all_var_names Vector of the names of all group flux variables + */ + void addCoupledFissionKernel(const unsigned & op, + const std::string & var_name, + const std::vector & all_var_names); + + /** + * Adds DelayedNeutronSource kernel + * + * @param op The zero-based index for the precursor group the kernel acts on + * @param var_name The name of the variable the kernel acts on + */ + void addDelayedNeutronSource(const unsigned & op, const std::string & var_name); }; diff --git a/include/kernels/CoupledFissionEigenKernel.h b/include/kernels/CoupledFissionEigenKernel.h deleted file mode 100644 index a5dbd82aa1..0000000000 --- a/include/kernels/CoupledFissionEigenKernel.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "EigenKernel.h" -#include "ScalarTransportBase.h" - -/** - * Computes the fission source normalized by eigenvalue. In other words: - * \f[ - * \frac{1}{k} \sum_g \nu \Sigma_{g,f} \phi_g - * \f] - */ -class CoupledFissionEigenKernel : public EigenKernel, public ScalarTransportBase -{ -public: - CoupledFissionEigenKernel(const InputParameters & parameters); - - static InputParameters validParams(); - -protected: - virtual Real computeQpResidual() override; - virtual Real computeQpJacobian() override; - virtual Real computeQpOffDiagJacobian(unsigned int jvar) override; - - const MaterialProperty> & _nsf; - const MaterialProperty> & _chi_t; - const MaterialProperty> & _chi_p; - const MaterialProperty & _beta; - unsigned int _group; - unsigned int _num_groups; - std::vector _group_fluxes; - std::vector _flux_ids; - bool _account_delayed; -}; diff --git a/include/kernels/PrecursorEigenSource.h b/include/kernels/PrecursorEigenSource.h deleted file mode 100644 index e742aeae81..0000000000 --- a/include/kernels/PrecursorEigenSource.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "EigenKernel.h" -#include "ScalarTransportBase.h" - -/** - * This object computes the residual and Jacobian contribution for the precursor source term in the - * delayed neutron precursor equation for k-eigenvalue problems. - */ -class PrecursorEigenSource : public EigenKernel, public ScalarTransportBase -{ -public: - PrecursorEigenSource(const InputParameters & parameters); - - static InputParameters validParams(); - -protected: - virtual Real computeQpResidual() override; - virtual Real computeQpJacobian() override; - virtual Real computeQpOffDiagJacobian(unsigned int jvar) override; - - const MaterialProperty> & _nsf; - const MaterialProperty> & _d_nsf_d_temp; - unsigned int _num_groups; - const MaterialProperty> & _beta_eff; - const MaterialProperty> & _d_beta_eff_d_temp; - unsigned int _precursor_group; - const VariableValue & _temp; - unsigned int _temp_id; - std::vector _group_fluxes; - std::vector _flux_ids; - Real _prec_scale; -}; diff --git a/include/kernels/SelfFissionEigenKernel.h b/include/kernels/SelfFissionEigenKernel.h deleted file mode 100644 index 3370d59c05..0000000000 --- a/include/kernels/SelfFissionEigenKernel.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "EigenKernel.h" - -class SelfFissionEigenKernel : public EigenKernel -{ -public: - SelfFissionEigenKernel(const InputParameters & parameters); - - static InputParameters validParams(); - -protected: - virtual Real computeQpResidual() override; - virtual Real computeQpJacobian() override; - - const MaterialProperty & _nu_f; - const MaterialProperty & _sigma_f; -}; diff --git a/include/postprocessors/ElmIntegTotFissNtsPostprocessor.h b/include/postprocessors/ElmIntegTotFissNtsPostprocessor.h index c39fa9bdc2..a23cee8310 100644 --- a/include/postprocessors/ElmIntegTotFissNtsPostprocessor.h +++ b/include/postprocessors/ElmIntegTotFissNtsPostprocessor.h @@ -4,7 +4,12 @@ #include "MooseVariableInterface.h" class ElmIntegTotFissNtsPostprocessor : public ElementIntegralPostprocessor -/* public MooseVariableInterface */ +/** + * This class computes the postprocessor value for the total number of + * neutrons produced in one neutron generation from fission and delayed + * neutron precursors if specified. + * \f$ \sum_g \nu \Sigma_{g,f} \phi_g + \sum_i \lambda_i C_i \f$ + */ { public: ElmIntegTotFissNtsPostprocessor(const InputParameters & parameters); @@ -15,10 +20,10 @@ class ElmIntegTotFissNtsPostprocessor : public ElementIntegralPostprocessor virtual Real computeQpIntegral() override; // The number of neutron energy groups. - int _num_groups; + unsigned int _num_groups; // The number of precursor groups. - int _num_precursor_groups; + unsigned int _num_precursor_groups; // Whether to account for delayed neutrons bool _account_delayed; diff --git a/include/postprocessors/ElmIntegTotFissPostprocessor.h b/include/postprocessors/ElmIntegTotFissPostprocessor.h index e73b614177..ea3e80819d 100644 --- a/include/postprocessors/ElmIntegTotFissPostprocessor.h +++ b/include/postprocessors/ElmIntegTotFissPostprocessor.h @@ -14,7 +14,7 @@ class ElmIntegTotFissPostprocessor : public ElementIntegralPostprocessor, public virtual Real computeQpIntegral() override; virtual Real computeFluxMultiplier(int index); - int _num_groups; + unsigned int _num_groups; const MaterialProperty> & _fissxs; std::vector _vars; Real _nt_scale; diff --git a/moose b/moose index e9f5f109e6..b38351138b 160000 --- a/moose +++ b/moose @@ -1 +1 @@ -Subproject commit e9f5f109e610453316f89158ccedd8f0f4747199 +Subproject commit b38351138bf10bd150c21926f36a6a286e278a66 diff --git a/problems/2017_annals_pub_msre_compare/2group_eigen.i b/problems/2017_annals_pub_msre_compare/2group_eigen.i index f5f65a3ed5..3c177a7cc6 100644 --- a/problems/2017_annals_pub_msre_compare/2group_eigen.i +++ b/problems/2017_annals_pub_msre_compare/2group_eigen.i @@ -39,14 +39,10 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - xdiff = 'group1diff' - - bx_norm = 'bnorm' - k0 = 1.5 - l_max_its = 100 - + type = Eigenvalue + eigen_tol = 1e-6 + normalization = bnorm + normal_factor = 1 solve_type = 'PJFNK' # solve_type = 'NEWTON' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' diff --git a/problems/2017_annals_pub_msre_compare/4group_eigen.i b/problems/2017_annals_pub_msre_compare/4group_eigen.i index 178315950b..0f420de43c 100644 --- a/problems/2017_annals_pub_msre_compare/4group_eigen.i +++ b/problems/2017_annals_pub_msre_compare/4group_eigen.i @@ -37,14 +37,10 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - xdiff = 'group1diff' - - bx_norm = 'bnorm' - k0 = 1.5 - l_max_its = 100 - + type = Eigenvalue + eigen_tol = 1e-6 + normalization = bnorm + normal_factor = 1 solve_type = 'PJFNK' # solve_type = 'NEWTON' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' diff --git a/problems/2021-cnrs-benchmark/phase-0/README.MD b/problems/2021-cnrs-benchmark/phase-0/README.MD index 2f8af7078f..c6c1ed5d28 100644 --- a/problems/2021-cnrs-benchmark/phase-0/README.MD +++ b/problems/2021-cnrs-benchmark/phase-0/README.MD @@ -2,25 +2,17 @@ The input files for the Phase 0 results in our journal article [2] were run on a 200-by-200 uniform structured mesh on the Blue Waters supercomputer with 256 -MPI processes on -sixteen XK or eight XE computing nodes. We recommend having at least 32GB of -RAM to run Steps 0.2 and 0.3 on a quad-core desktop with four MPI threads, -possibly more if running on a cluster with more computing cores. +MPI processes on sixteen XK or eight XE computing nodes. All three steps can +also be easily run on general-purpose dual/quad-core computers with 16GB RAM. Sample command to run the input files: ```mpirun -n 4 $MOLTRES/moltres-opt -i nts.i``` -Otherwise, on a general dual/quad-core computer with 8GB of RAM, we recommend -running on a coarser 40-by-40 mesh to reduce the memory requirements with the -following preconditioner settings in the ```Executioner``` block of the input -file on a dual-core/quad-core computer with 8GB of RAM: +Otherwise, if you intend to run these input files on a less capable computer +for tutorial purposes, we recommend running on a coarser 40-by-40 mesh to +reduce the CPU and memory requirements. -``` -petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' -petsc_options_value = 'asm lu 200 1 NONZERO' -``` - -The Step 0.2 reactivity results on the different mesh resolutions are: +The expected Step 0.2 reactivity results on the different mesh resolutions are: - 200-by-200 mesh: 465.6 pcm - 40-by-40 mesh: 460.7 pcm @@ -68,6 +60,6 @@ centerline dedicated to molten salt fast reactors", Annals of Nuclear Energy, vol. 142, July 2020, 107428. -[2] Park S. M., Munk M., & Huff K. D., "Verification of Moltres for Multiphysics +[2] Park S. M. & Munk M., "Verification of Moltres for Multiphysics Simulations of Fast-Spectrum Molten Salt Reactors", Annals of Nuclear Energy, vol. 173, August 2022, 109111. diff --git a/problems/2021-cnrs-benchmark/phase-0/nts.i b/problems/2021-cnrs-benchmark/phase-0/nts.i index a879c62ab8..77aef3d979 100644 --- a/problems/2021-cnrs-benchmark/phase-0/nts.i +++ b/problems/2021-cnrs-benchmark/phase-0/nts.i @@ -15,9 +15,9 @@ type = GeneratedMesh dim = 2 - nx = 200 - ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + nx = 50 + ny = 50 + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -29,7 +29,8 @@ [] [Problem] - type = FEProblem + type = EigenProblem + bx_norm = bnorm [] [Nt] @@ -37,7 +38,6 @@ vacuum_boundaries = 'bottom left right top' create_temperature_var = false eigen = true - scaling = 1e3 [] [Precursors] @@ -53,7 +53,6 @@ order = CONSTANT loop_precursors = false transient = false - scaling = 1e3 eigen = true [] [] @@ -67,8 +66,7 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 + type = Eigenvalue # fission power normalization settings normalization = 'powernorm' @@ -78,32 +76,32 @@ # We divide the total power=1e9W by 100 because our length units are in cm. # Our domain = 2m x 2m x 0.01m - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1.00400 - l_max_its = 100 - eig_check_tol = 1e-7 + initial_eigenvalue = 0.99600 + free_power_iterations = 2 + eigen_tol = 1e-7 - solve_type = 'NEWTON' + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package' petsc_options_value = 'lu NONZERO superlu_dist' - ## Use the settings below instead if running on a desktop/small cluster + ## Use the settings below instead if running on computing cluster/supercomputer with a finer mesh + # petsc_options_iname = '-pc_type -pc_hypre_type' + # petsc_options_value = 'hypre boomeramg' + ## Alternative PETSc settings if Hypre BoomerAMG is not installed # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' # petsc_options_value = 'asm lu 200 1 NONZERO' line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor execute_on = linear @@ -153,6 +151,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [aa] type = LineValueSampler variable = 'group1 group2 group3 group4 group5 group6' @@ -174,7 +176,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-0/temperature.i b/problems/2021-cnrs-benchmark/phase-0/temperature.i index 07f1e49f75..ad63e1211b 100644 --- a/problems/2021-cnrs-benchmark/phase-0/temperature.i +++ b/problems/2021-cnrs-benchmark/phase-0/temperature.i @@ -23,7 +23,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -125,7 +125,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [vel_pressure] type = INSADMomentumPressure variable = vel - p = p + pressure = p [] [vel_supg] type = INSADMomentumSUPG @@ -280,9 +280,6 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [] -[Postprocessors] -[] - [VectorPostprocessors] [aa] type = LineValueSampler diff --git a/problems/2021-cnrs-benchmark/phase-0/vel-field.i b/problems/2021-cnrs-benchmark/phase-0/vel-field.i index 52110536dc..0e28e96ccd 100644 --- a/problems/2021-cnrs-benchmark/phase-0/vel-field.i +++ b/problems/2021-cnrs-benchmark/phase-0/vel-field.i @@ -15,7 +15,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -49,11 +49,11 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [AuxVariables] - [vel_x] + [velx] family = LAGRANGE order = FIRST [] - [vel_y] + [vely] family = LAGRANGE order = FIRST [] @@ -79,7 +79,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [momentum_pressure] type = INSADMomentumPressure variable = vel - p = p + pressure = p [] [momentum_supg] type = INSADMomentumSUPG @@ -89,15 +89,15 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [AuxKernels] - [vel_x] + [velx] type = VectorVariableComponentAux - variable = vel_x + variable = velx vector_variable = vel component = 'x' [] - [vel_y] + [vely] type = VectorVariableComponentAux - variable = vel_y + variable = vely vector_variable = vel component = 'y' [] @@ -160,7 +160,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [VectorPostprocessors] [aa] type = LineValueSampler - variable = 'vel_x vel_y' + variable = 'velx vely' start_point = '0 100 0' end_point = '200 100 0' num_points = 201 @@ -170,7 +170,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [bb] type = LineValueSampler - variable = 'vel_x vel_y' + variable = 'velx vely' start_point = '100 0 0' end_point = '100 200 0' num_points = 201 diff --git a/problems/2021-cnrs-benchmark/phase-1/README.MD b/problems/2021-cnrs-benchmark/phase-1/README.MD index 26ed0945d5..3ee187ab2f 100644 --- a/problems/2021-cnrs-benchmark/phase-1/README.MD +++ b/problems/2021-cnrs-benchmark/phase-1/README.MD @@ -118,6 +118,6 @@ precursor concentrations of the full coupling solution dedicated to molten salt fast reactors", Annals of Nuclear Energy, vol. 142, July 2020, 107428. -[2] Park S. M., Munk M., & Huff K. D., "Verification of Moltres for Multiphysics +[2] Park S. M. & Munk M., "Verification of Moltres for Multiphysics Simulations of Fast-Spectrum Molten Salt Reactors", Annals of Nuclear Energy, vol. 173, August 2022, 109111. diff --git a/problems/2021-cnrs-benchmark/phase-1/buoyancy-nts.i b/problems/2021-cnrs-benchmark/phase-1/buoyancy-nts.i index adb08b1f4c..d316a46432 100644 --- a/problems/2021-cnrs-benchmark/phase-1/buoyancy-nts.i +++ b/problems/2021-cnrs-benchmark/phase-1/buoyancy-nts.i @@ -15,7 +15,7 @@ nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -27,7 +27,8 @@ [] [Problem] - type = FEProblem + type = EigenProblem + bx_norm = bnorm [] [Nt] @@ -35,13 +36,12 @@ vacuum_boundaries = 'bottom left right top' create_temperature_var = false eigen = true - scaling = 1e3 [] [Precursors] [pres] var_name_base = pre - outlet_boundaries = 'bottom' + outlet_boundaries = '' constant_velocity_values = false uvel = vel_x vvel = vel_y @@ -51,7 +51,6 @@ loop_precursors = false transient = false eigen = true - scaling = 1e3 [] [] @@ -93,39 +92,35 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 + type = Eigenvalue # fission power normalization normalization = 'powernorm' normal_factor = 1e7 # Watts, 1e9 / 100 - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1.00400 - l_max_its = 100 - eig_check_tol = 1e-6 + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' - - ## Use the settings below instead if running on a desktop/small cluster - # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' - # petsc_options_value = 'asm lu 200 1 NONZERO' + initial_eigenvalue = 0.99600 + nl_abs_tol = 1e-11 + free_power_iterations = 2 + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor execute_on = linear @@ -175,6 +170,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [pre_elemental] type = ElementValueSampler variable = 'pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' @@ -193,7 +192,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-1/buoyancy.i b/problems/2021-cnrs-benchmark/phase-1/buoyancy.i index b3486f523a..9d070728f6 100644 --- a/problems/2021-cnrs-benchmark/phase-1/buoyancy.i +++ b/problems/2021-cnrs-benchmark/phase-1/buoyancy.i @@ -20,7 +20,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -46,7 +46,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [temp] family = LAGRANGE order = FIRST - scaling = 1e-3 + initial_condition = 900 [] [vel] family = LAGRANGE_VEC @@ -70,6 +70,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [heat] family = MONOMIAL order = FIRST + initial_condition = 250 [] [] @@ -179,15 +180,9 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [no_slip] type = VectorDirichletBC variable = vel - boundary = 'bottom left right' + boundary = 'bottom left right top' values = '0 0 0' [] - [lid] - type = VectorDirichletBC - variable = vel - boundary = 'top' - values = '50 0 0' - [] [pressure_pin] type = DirichletBC variable = p @@ -220,16 +215,18 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient type = Transient end_time = 2000 - solve_type = 'NEWTON' + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' + petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' + petsc_options_value = 'asm lu 200 1 NONZERO' + line_search = none - ## Use the settings below instead if running on a desktop/small cluster - # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' - # petsc_options_value = 'asm lu 200 1 NONZERO' + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 - nl_abs_tol = 1e-8 + nl_abs_tol = 1e-10 dtmin = 1e-1 dtmax = 10 @@ -245,16 +242,6 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [] [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - -[Postprocessors] -[] - [VectorPostprocessors] [vel_aa] type = LineValueSampler @@ -302,7 +289,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [ntsApp] type = FullSolveMultiApp app_type = MoltresApp - execute_on = timestep_begin + execute_on = timestep_end positions = '0 0 0' input_files = 'buoyancy-nts.i' [] @@ -310,25 +297,25 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [Transfers] [to_sub_temp] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = temp variable = temp [] [to_sub_vel_x] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = velx variable = vel_x [] [to_sub_vel_y] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = vely variable = vel_y [] [from_sub] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer from_multi_app = ntsApp source_variable = heat variable = heat @@ -346,7 +333,3 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient execute_on = FINAL [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-1/circ-fuel.i b/problems/2021-cnrs-benchmark/phase-1/circ-fuel.i index 71e95bb0f5..dbdf63bd04 100644 --- a/problems/2021-cnrs-benchmark/phase-1/circ-fuel.i +++ b/problems/2021-cnrs-benchmark/phase-1/circ-fuel.i @@ -30,7 +30,8 @@ [] [Problem] - type = FEProblem + type = EigenProblem + bx_norm = bnorm [] [Nt] @@ -52,6 +53,7 @@ order = CONSTANT loop_precursors = false transient = false + eigen = true [] [] @@ -100,8 +102,7 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 + type = Eigenvalue # fission power normalization normalization = 'powernorm' @@ -111,32 +112,30 @@ # We divide the total power=1e9W by 100 because our length units are in cm. # Our domain = 2m x 2m x 0.01m - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1.00400 - l_max_its = 100 - eig_check_tol = 1e-7 + initial_eigenvalue = 0.99600 + eigen_tol = 1e-7 - solve_type = 'NEWTON' + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' - ## Use the settings below instead if running on a desktop/small cluster + ## Alternative PETSc settings if Hypre BoomerAMG is not installed + # petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package' + # petsc_options_value = 'lu NONZERO superlu_dist' # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' # petsc_options_value = 'asm lu 200 1 NONZERO' line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor execute_on = linear @@ -186,6 +185,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [pre_elemental] type = ElementValueSampler variable = 'pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' @@ -204,7 +207,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-1/full-coupling-nts.i b/problems/2021-cnrs-benchmark/phase-1/full-coupling-nts.i index 4867f25411..8da6d21052 100644 --- a/problems/2021-cnrs-benchmark/phase-1/full-coupling-nts.i +++ b/problems/2021-cnrs-benchmark/phase-1/full-coupling-nts.i @@ -15,7 +15,7 @@ nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -27,7 +27,8 @@ [] [Problem] - type = FEProblem + type = EigenProblem + bx_norm = bnorm [] [Nt] @@ -35,13 +36,12 @@ vacuum_boundaries = 'bottom left right top' create_temperature_var = false eigen = true - scaling = 1e3 [] [Precursors] [pres] var_name_base = pre - outlet_boundaries = 'bottom' + outlet_boundaries = '' constant_velocity_values = false uvel = vel_x vvel = vel_y @@ -51,7 +51,6 @@ loop_precursors = false transient = false eigen = true - scaling = 1e3 [] [] @@ -93,42 +92,40 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 + type = Eigenvalue # fission power normalization - # 1e7 corresponds to 1 GW / 100cm - # Change to 2e6, 4e6, 6e6 or 8e6 for different power output - # at 0.2GW, 0.4GW, 0.6GW or 0.8GW normalization = 'powernorm' normal_factor = 1e7 # Watts, 1e9 / 100 - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1.00400 - l_max_its = 100 - eig_check_tol = 1e-6 + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' - - ## Use the settings below instead if running on a desktop/small cluster - # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' - # petsc_options_value = 'asm lu 200 1 NONZERO' + initial_eigenvalue = 0.99600 + nl_abs_tol = 1e-11 + free_power_iterations = 2 + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [max_temp] + type = NodalExtremeValue + value_type = max + variable = temp + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor execute_on = linear @@ -178,6 +175,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [pre_elemental] type = ElementValueSampler variable = 'pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' @@ -196,7 +197,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-1/full-coupling.i b/problems/2021-cnrs-benchmark/phase-1/full-coupling.i index 4ba8b6f840..9b1a434948 100644 --- a/problems/2021-cnrs-benchmark/phase-1/full-coupling.i +++ b/problems/2021-cnrs-benchmark/phase-1/full-coupling.i @@ -1,3 +1,5 @@ +# Step 1.4: Full coupling input file + density = .002 # kg cm-3 cp = 3075 # J kg-1 K-1, 6.15 / 2.0e-3 k = .005 # W cm-1 K-1 @@ -18,7 +20,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient nx = 200 ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster + ## Use a 40-by-40 mesh instead if running on a less capable computer # nx = 40 # ny = 40 @@ -44,7 +46,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [temp] family = LAGRANGE order = FIRST - scaling = 1e-3 + initial_condition = 900 [] [vel] family = LAGRANGE_VEC @@ -68,6 +70,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [heat] family = MONOMIAL order = FIRST + initial_condition = 250 [] [] @@ -184,7 +187,7 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient type = VectorDirichletBC variable = vel boundary = 'top' - # '50 0 0' corresponds to vel_x = 50 cm s-1 along the top boundary. + # '50 0 0' corresponds to velx = 50 cm s-1 along the top boundary. # Change to 10, 20, 30, 40 for different velocity boundary conditions # at U_lid = 0.1, 0.2, 0.3, 0.4 m s-1. values = '50 0 0' @@ -221,17 +224,18 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient type = Transient end_time = 2000 - solve_type = 'NEWTON' + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' + petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' + petsc_options_value = 'asm lu 200 1 NONZERO' line_search = none - ## Use the settings below instead if running on a desktop/small cluster - # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' - # petsc_options_value = 'asm lu 200 1 NONZERO' + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 - nl_abs_tol = 1e-8 + nl_abs_tol = 1e-10 dtmin = 1e-1 dtmax = 10 @@ -241,30 +245,17 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient dt = 1e-1 cutback_factor = .5 growth_factor = 1.5 - optimal_iterations = 10 + optimal_iterations = 20 iteration_window = 4 linear_iteration_ratio = 1000 [] [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - -[Postprocessors] -[] - -[VectorPostprocessors] -[] - [MultiApps] [ntsApp] type = FullSolveMultiApp app_type = MoltresApp - execute_on = timestep_begin + execute_on = timestep_end positions = '0 0 0' input_files = 'full-coupling-nts.i' [] @@ -272,25 +263,25 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient [Transfers] [to_sub_temp] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = temp variable = temp [] [to_sub_vel_x] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = velx variable = vel_x [] [to_sub_vel_y] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer to_multi_app = ntsApp source_variable = vely variable = vel_y [] [from_sub] - type = MultiAppProjectionTransfer + type = MultiAppCopyTransfer from_multi_app = ntsApp source_variable = heat variable = heat @@ -304,7 +295,3 @@ t_alpha = 2e-4 # K-1, Thermal expansion coefficient type = Exodus [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-1/power-coupling-nts.i b/problems/2021-cnrs-benchmark/phase-1/power-coupling-nts.i new file mode 100644 index 0000000000..ed566c5ba9 --- /dev/null +++ b/problems/2021-cnrs-benchmark/phase-1/power-coupling-nts.i @@ -0,0 +1,253 @@ +[GlobalParams] + num_groups = 6 + num_precursor_groups = 8 + use_exp_form = false + group_fluxes = 'group1 group2 group3 group4 group5 group6' + pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' + temperature = temp + sss2_input = true + account_delayed = true +[] + +[Mesh] + type = GeneratedMesh + dim = 2 + + nx = 200 + ny = 200 + ## Use a 40-by-40 mesh instead if running on a less capable computer + # nx = 40 + # ny = 40 + + xmin = 0 + xmax = 200 + ymin = 0 + ymax = 200 + elem_type = QUAD4 +[] + +[Problem] + type = EigenProblem + bx_norm = bnorm +[] + +[Nt] + var_name_base = group + vacuum_boundaries = 'bottom left right top' + create_temperature_var = false + eigen = true +[] + +[Precursors] + [pres] + var_name_base = pre + outlet_boundaries = '' + constant_velocity_values = false + uvel = ux + vvel = uy + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + loop_precursors = false + transient = false + eigen = true + [] +[] + +[AuxVariables] + [temp] + family = LAGRANGE + order = FIRST + initial_condition = 900 + [] + [ux] + family = LAGRANGE + order = FIRST + [] + [uy] + family = LAGRANGE + order = FIRST + [] + [heat] + family = MONOMIAL + order = FIRST + [] +[] + +[UserObjects] + [velocities] + type = SolutionUserObject + mesh = '../phase-0/vel-field_exodus.e' + system_variables = 'vel_x vel_y' + timestep = LATEST + execute_on = INITIAL + [] +[] + +[AuxKernels] + [ux] + type = SolutionAux + variable = ux + from_variable = vel_x + solution = velocities + [] + [uy] + type = SolutionAux + variable = uy + from_variable = vel_y + solution = velocities + [] + [heat_source] + type = FissionHeatSourceAux + variable = heat + tot_fission_heat = powernorm + power = 1e7 + [] +[] + +[Functions] + [velxf] + type = SolutionFunction + from_variable = vel_x + solution = velocities + [] + [velyf] + type = SolutionFunction + from_variable = vel_y + solution = velocities + [] +[] + +[Materials] + [fuel] + type = GenericMoltresMaterial + property_tables_root = '../../../property_file_dir/cnrs-benchmark/benchmark_' + interp_type = 'spline' + [] +[] + +[Executioner] + type = Eigenvalue + + # fission power normalization + normalization = 'powernorm' + normal_factor = 1e7 # Watts, 1e9 / 100 + # Tiberga et al. assumes the depth of their 2D domain is 1m. + # Tiberga et al. domain = 2m x 2m x 1m + # We divide the total power=1e9W by 100 because our length units are in cm. + # Our domain = 2m x 2m x 0.01m + + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 + scaling_group_variables = 'group1 group2 group3 group4 group5 group6; + pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' + + initial_eigenvalue = 1.00 + free_power_iterations = 2 + + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' + + ## Alternative PETSc settings if Hypre BoomerAMG is not installed + # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' + # petsc_options_value = 'asm lu 200 1 NONZERO' + + line_search = none +[] + +[Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [bnorm] + type = ElmIntegTotFissNtsPostprocessor + execute_on = linear + [] + [tot_fissions] + type = ElmIntegTotFissPostprocessor + execute_on = linear + [] + [powernorm] + type = ElmIntegTotFissHeatPostprocessor + execute_on = linear + [] + [group1norm] + type = ElementIntegralVariablePostprocessor + variable = group1 + execute_on = linear + [] + [group1max] + type = NodalExtremeValue + value_type = max + variable = group1 + execute_on = timestep_end + [] + [group1diff] + type = ElementL2Diff + variable = group1 + execute_on = 'linear timestep_end' + use_displaced_mesh = false + [] + [group2norm] + type = ElementIntegralVariablePostprocessor + variable = group2 + execute_on = linear + [] + [group2max] + type = NodalExtremeValue + value_type = max + variable = group2 + execute_on = timestep_end + [] + [group2diff] + type = ElementL2Diff + variable = group2 + execute_on = 'linear timestep_end' + use_displaced_mesh = false + [] +[] + +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] + [flux_aa] + type = LineValueSampler + variable = 'group1 group2 group3 group4 group5 group6' + start_point = '0 100 0' + end_point = '200 100 0' + num_points = 201 + sort_by = x + execute_on = FINAL + outputs = 'csv' + [] + [flux_bb] + type = LineValueSampler + variable = 'group1 group2 group3 group4 group5 group6' + start_point = '100 0 0' + end_point = '100 200 0' + num_points = 201 + sort_by = y + execute_on = FINAL + outputs = 'csv' + [] +[] + +[Outputs] + perf_graph = true + print_linear_residuals = true + [exodus] + type = Exodus + [] + [csv] + type = CSV + [] +[] diff --git a/problems/2021-cnrs-benchmark/phase-1/power-coupling.i b/problems/2021-cnrs-benchmark/phase-1/power-coupling.i index 552071a2fc..e95188ce3b 100644 --- a/problems/2021-cnrs-benchmark/phase-1/power-coupling.i +++ b/problems/2021-cnrs-benchmark/phase-1/power-coupling.i @@ -5,81 +5,42 @@ density = .002 # kg cm-3 cp = 3075 # J kg-1 K-1, 6.15 / 2.0e-3 k = .005 # W cm-1 K-1 gamma = 1 # W cm-3 K-1, Volumetric heat transfer coefficient -viscosity = .5 # dynamic viscosity, mu = nu * rho, kg cm-1 s-1 -alpha = 1 # INS SUPG and PSPG stabilization parameter - -[GlobalParams] - num_groups = 6 - num_precursor_groups = 8 - use_exp_form = false - group_fluxes = 'group1 group2 group3 group4 group5 group6' - pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6 pre7 pre8' - temperature = temp - sss2_input = true - account_delayed = true -[] +viscosity = .5 # dynamic viscosity +alpha = 1 # SUPG stabilization parameter [Mesh] - type = GeneratedMesh - dim = 2 + [square] + type = GeneratedMeshGenerator + dim = 2 - nx = 200 - ny = 200 - ## Use a 40-by-40 mesh instead if running on a desktop/small cluster - # nx = 40 - # ny = 40 - - xmin = 0 - xmax = 200 - ymin = 0 - ymax = 200 - elem_type = QUAD4 -[] + nx = 200 + ny = 200 + ## Use a 40-by-40 mesh instead if running on a less capable computer + # nx = 40 + # ny = 40 -[Problem] - type = FEProblem + xmin = 0 + xmax = 200 + ymin = 0 + ymax = 200 + elem_type = QUAD4 + [] [] [Variables] [temp] family = LAGRANGE order = FIRST - scaling = 1e-3 initial_condition = 900 [] [] -[Nt] - var_name_base = group - vacuum_boundaries = 'bottom left right top' - create_temperature_var = false - eigen = true - scaling = 1e3 -[] - -[Precursors] - [pres] - var_name_base = pre - outlet_boundaries = '' - constant_velocity_values = false - uvel = ux - vvel = uy - nt_exp_form = false - family = MONOMIAL - order = CONSTANT - loop_precursors = false - transient = false - eigen = true - scaling = 1e3 - [] -[] - [AuxVariables] - [ux] + [velx] family = LAGRANGE order = FIRST [] - [uy] + [vely] family = LAGRANGE order = FIRST [] @@ -94,6 +55,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [heat] family = MONOMIAL order = FIRST + initial_condition = 250 [] [] @@ -130,6 +92,7 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [temp_sink] type = INSADEnergyAmbientConvection variable = temp + # alpha is the heat transfer coefficient. alpha = ${gamma} T_ambient = 900 [] @@ -138,13 +101,13 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [AuxKernels] [ux] type = SolutionAux - variable = ux + variable = velx from_variable = vel_x solution = velocities [] [uy] type = SolutionAux - variable = uy + variable = vely from_variable = vel_y solution = velocities [] @@ -154,12 +117,6 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter from_variable = p solution = velocities [] - [heat_source] - type = FissionHeatSourceAux - variable = heat - tot_fission_heat = powernorm - power = 1e7 - [] [] [Functions] @@ -185,19 +142,12 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [Materials] - [fuel] - type = GenericMoltresMaterial - property_tables_root = '../../../property_file_dir/cnrs-benchmark/benchmark_' - interp_type = 'spline' - prop_names = 'k rho cp' - prop_values = '${k} ${density} ${cp}' - [] [ad_mat] type = ADGenericConstantMaterial prop_names = 'ad_k ad_rho ad_cp ad_mu' prop_values = '${k} ${density} ${cp} ${viscosity}' [] - [ins_mat] + [ins_temp] type = INSADStabilized3Eqn k_name = 'ad_k' rho_name = 'ad_rho' @@ -211,90 +161,21 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter [] [Executioner] - type = NonlinearEigen - - # fission power normalization - normalization = 'powernorm' - normal_factor = 1e7 # Watts, 1e9 / 100 - # Tiberga et al. assumes the depth of their 2D domain is 1m. - # Tiberga et al. domain = 2m x 2m x 1m - # We divide the total power=1e9W by 100 because our length units are in cm. - # Our domain = 2m x 2m x 0.01m - - bx_norm = 'bnorm' - k0 = 1.00 - l_max_its = 1000 - nl_max_its = 5000 - nl_abs_tol = 1e-6 - - free_power_iterations = 4 + type = Steady - solve_type = 'NEWTON' + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_gasm_overlap -sub_pc_factor_shift_type -pc_gasm_blocks -sub_pc_factor_mat_solver_type' - petsc_options_value = 'gasm lu 200 1 NONZERO 16 superlu_dist' - - ## Use the settings below instead if running on a desktop/small cluster - # petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' - # petsc_options_value = 'asm lu 200 1 NONZERO' - + petsc_options_iname = '-pc_type -sub_pc_type -ksp_gmres_restart -pc_asm_overlap -sub_pc_factor_shift_type' + petsc_options_value = 'asm lu 200 1 NONZERO' line_search = none -[] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] + automatic_scaling = true + compute_scaling_once = false + off_diagonals_in_auto_scaling = true + resid_vs_jac_scaling_param = .1 -[Postprocessors] - [bnorm] - type = ElmIntegTotFissNtsPostprocessor - execute_on = linear - [] - [tot_fissions] - type = ElmIntegTotFissPostprocessor - execute_on = linear - [] - [powernorm] - type = ElmIntegTotFissHeatPostprocessor - execute_on = linear - [] - [group1norm] - type = ElementIntegralVariablePostprocessor - variable = group1 - execute_on = linear - [] - [group1max] - type = NodalExtremeValue - value_type = max - variable = group1 - execute_on = timestep_end - [] - [group1diff] - type = ElementL2Diff - variable = group1 - execute_on = 'linear timestep_end' - use_displaced_mesh = false - [] - [group2norm] - type = ElementIntegralVariablePostprocessor - variable = group2 - execute_on = linear - [] - [group2max] - type = NodalExtremeValue - value_type = max - variable = group2 - execute_on = timestep_end - [] - [group2diff] - type = ElementL2Diff - variable = group2 - execute_on = 'linear timestep_end' - use_displaced_mesh = false - [] + nl_abs_tol = 1e-10 + fixed_point_max_its = 10 [] [VectorPostprocessors] @@ -318,25 +199,29 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter execute_on = FINAL outputs = 'csv' [] - [flux_aa] - type = LineValueSampler - variable = 'group1 group2 group3 group4 group5 group6' - start_point = '0 100 0' - end_point = '200 100 0' - num_points = 201 - sort_by = x - execute_on = FINAL - outputs = 'csv' +[] + +[MultiApps] + [ntsApp] + type = FullSolveMultiApp + app_type = MoltresApp + execute_on = timestep_end + input_files = 'power-coupling-nts.i' [] - [flux_bb] - type = LineValueSampler - variable = 'group1 group2 group3 group4 group5 group6' - start_point = '100 0 0' - end_point = '100 200 0' - num_points = 201 - sort_by = y - execute_on = FINAL - outputs = 'csv' +[] + +[Transfers] + [to_sub] + type = MultiAppCopyTransfer + to_multi_app = ntsApp + source_variable = temp + variable = temp + [] + [from_sub] + type = MultiAppCopyTransfer + from_multi_app = ntsApp + source_variable = heat + variable = heat [] [] @@ -350,7 +235,3 @@ alpha = 1 # INS SUPG and PSPG stabilization parameter type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/problems/2021-cnrs-benchmark/phase-2/README.MD b/problems/2021-cnrs-benchmark/phase-2/README.MD index 137aafb40c..2e2db085db 100644 --- a/problems/2021-cnrs-benchmark/phase-2/README.MD +++ b/problems/2021-cnrs-benchmark/phase-2/README.MD @@ -46,6 +46,6 @@ every timestep dedicated to molten salt fast reactors", Annals of Nuclear Energy, vol. 142, July 2020, 107428. -[2] Park S. M., Munk M., & Huff K. D., "Verification of Moltres for Multiphysics +[2] Park S. M. & Munk M., "Verification of Moltres for Multiphysics Simulations of Fast-Spectrum Molten Salt Reactors", Annals of Nuclear Energy, vol. 173, August 2022, 109111. diff --git a/src/actions/NtAction.C b/src/actions/NtAction.C index f05bfaa6fc..d9fd95f9f1 100644 --- a/src/actions/NtAction.C +++ b/src/actions/NtAction.C @@ -119,154 +119,28 @@ NtAction::act() if (_current_task == "add_kernel") { - // Set up time derivatives if (!getParam("eigen")) - { - InputParameters params = _factory.getValidParams("NtTimeDerivative"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - std::string kernel_name = "NtTimeDerivative_" + var_name; - _problem->addKernel("NtTimeDerivative", kernel_name, params); - } - + addNtKernel(op, var_name, "NtTimeDerivative", all_var_names); // Set up GroupDiffusion - - { - InputParameters params = _factory.getValidParams("GroupDiffusion"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - std::string kernel_name = "GroupDiffusion_" + var_name; - _problem->addKernel("GroupDiffusion", kernel_name, params); - } - + addNtKernel(op, var_name, "GroupDiffusion", all_var_names); // Set up SigmaR - - { - InputParameters params = _factory.getValidParams("SigmaR"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - std::string kernel_name = "SigmaR_" + var_name; - _problem->addKernel("SigmaR", kernel_name, params); - } - + addNtKernel(op, var_name, "SigmaR", all_var_names); // Set up InScatter if (_num_groups != 1) - { - InputParameters params = _factory.getValidParams("InScatter"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - params.set("num_groups") = _num_groups; - params.set("sss2_input") = getParam("sss2_input"); - params.set>("group_fluxes") = all_var_names; - - std::string kernel_name = "InScatter_" + var_name; - _problem->addKernel("InScatter", kernel_name, params); - } - + addNtKernel(op, var_name, "InScatter", all_var_names); // Set up CoupledFissionKernel - if (!getParam("eigen")) - { - InputParameters params = _factory.getValidParams("CoupledFissionKernel"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - params.set("num_groups") = _num_groups; - params.set>("group_fluxes") = all_var_names; - params.set("account_delayed") = getParam("account_delayed"); - params.set("eigenvalue_scaling") = getParam("eigenvalue_scaling"); - - std::string kernel_name = "CoupledFissionKernel_" + var_name; - _problem->addKernel("CoupledFissionKernel", kernel_name, params); - } - else - { - InputParameters params = _factory.getValidParams("CoupledFissionEigenKernel"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("block")) - params.set>("block") = - getParam>("block"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature"}; - params.applySpecificParameters(parameters(), include); - - params.set("num_groups") = _num_groups; - params.set>("group_fluxes") = all_var_names; - params.set("account_delayed") = getParam("account_delayed"); - - std::string kernel_name = "CoupledFissionEigenKernel_" + var_name; - _problem->addKernel("CoupledFissionEigenKernel", kernel_name, params); - } - + addCoupledFissionKernel(op, var_name, all_var_names); // Set up DelayedNeutronSource - if (getParam("account_delayed")) - { - InputParameters params = _factory.getValidParams("DelayedNeutronSource"); - params.set("variable") = var_name; - params.set("group_number") = op; - if (isParamValid("pre_blocks")) - params.set>("block") = - getParam>("pre_blocks"); - if (isParamValid("use_exp_form")) - params.set("use_exp_form") = getParam("use_exp_form"); - std::vector include = {"temperature", "pre_concs"}; - params.applySpecificParameters(parameters(), include); - params.set("num_precursor_groups") = _num_precursor_groups; - - std::string kernel_name = "DelayedNeutronSource_" + var_name; - _problem->addKernel("DelayedNeutronSource", kernel_name, params); - } + addDelayedNeutronSource(op, var_name); } if (_current_task == "add_bc") { if (isParamValid("vacuum_boundaries")) { - // Set up vacuum boundary conditions - InputParameters params = _factory.getValidParams("VacuumConcBC"); params.set>("boundary") = getParam>("vacuum_boundaries"); @@ -283,7 +157,6 @@ NtAction::act() if (getParam("jac_test") && isParamValid("nt_ic_function")) mooseError("jac_test creates RandomICs. So are you sure you want to pass an initial " "condition function?"); - if (getParam("jac_test")) { InputParameters params = _factory.getValidParams("RandomIC"); @@ -328,11 +201,8 @@ NtAction::act() if (getParam("use_exp_form")) { - std::string aux_var_name = var_name + "_lin"; - // Set up nodal aux variables - if (_current_task == "add_aux_variable") { std::set blocks = getSubdomainIDs(); @@ -342,9 +212,7 @@ NtAction::act() else _problem->addAuxVariable(aux_var_name, fe_type, &blocks); } - // Set up aux kernels - if (_current_task == "add_aux_kernel") { InputParameters params = _factory.getValidParams("Density"); @@ -363,9 +231,7 @@ NtAction::act() if (getParam("create_temperature_var")) { std::string temp_var = "temp"; - // // See whether we want to use an old solution - // if (getParam("init_temperature_from_file")) { if (_current_task == "check_copy_nodal_vars") @@ -395,3 +261,72 @@ NtAction::act() } } } + +void +NtAction::addNtKernel(const unsigned & op, + const std::string & var_name, + const std::string & kernel_type, + const std::vector & all_var_names) +{ + InputParameters params = _factory.getValidParams(kernel_type); + params.set("variable") = var_name; + params.set("group_number") = op; + if (isParamValid("block")) + params.set>("block") = + getParam>("block"); + if (isParamValid("use_exp_form")) + params.set("use_exp_form") = getParam("use_exp_form"); + std::vector include = {"temperature"}; + params.applySpecificParameters(parameters(), include); + if (kernel_type == "InScatter") + { + params.set("num_groups") = _num_groups; + params.set("sss2_input") = getParam("sss2_input"); + params.set>("group_fluxes") = all_var_names; + } + std::string kernel_name = kernel_type + "_" + var_name; + _problem->addKernel(kernel_type, kernel_name, params); +} + +void +NtAction::addCoupledFissionKernel(const unsigned & op, + const std::string & var_name, + const std::vector & all_var_names) +{ + InputParameters params = _factory.getValidParams("CoupledFissionKernel"); + params.set("variable") = var_name; + params.set("group_number") = op; + if (isParamValid("block")) + params.set>("block") = + getParam>("block"); + if (isParamValid("use_exp_form")) + params.set("use_exp_form") = getParam("use_exp_form"); + std::vector include = {"temperature"}; + params.applySpecificParameters(parameters(), include); + params.set("num_groups") = _num_groups; + params.set>("group_fluxes") = all_var_names; + params.set("account_delayed") = getParam("account_delayed"); + params.set("eigenvalue_scaling") = getParam("eigenvalue_scaling"); + if (getParam("eigen")) + params.set>("extra_vector_tags") = {"eigen"}; + std::string kernel_name = "CoupledFissionKernel_" + var_name; + _problem->addKernel("CoupledFissionKernel", kernel_name, params); +} + +void +NtAction::addDelayedNeutronSource(const unsigned & op, const std::string & var_name) +{ + InputParameters params = _factory.getValidParams("DelayedNeutronSource"); + params.set("variable") = var_name; + params.set("group_number") = op; + if (isParamValid("pre_blocks")) + params.set>("block") = + getParam>("pre_blocks"); + if (isParamValid("use_exp_form")) + params.set("use_exp_form") = getParam("use_exp_form"); + std::vector include = {"temperature", "pre_concs"}; + params.applySpecificParameters(parameters(), include); + params.set("num_precursor_groups") = _num_precursor_groups; + std::string kernel_name = "DelayedNeutronSource_" + var_name; + _problem->addKernel("DelayedNeutronSource", kernel_name, params); +} diff --git a/src/actions/PrecursorAction.C b/src/actions/PrecursorAction.C index 95dfc652b5..656b91f6f1 100644 --- a/src/actions/PrecursorAction.C +++ b/src/actions/PrecursorAction.C @@ -193,33 +193,19 @@ PrecursorAction::act() void PrecursorAction::addPrecursorSource(const unsigned & op, const std::string & var_name) { + InputParameters params = _factory.getValidParams("PrecursorSource"); + setVarNameAndBlock(params, var_name); + params.set("num_groups") = _num_groups; + params.set("precursor_group_number") = op; + std::vector include = {"temperature", "group_fluxes"}; + params.applySpecificParameters(parameters(), include); + params.set("use_exp_form") = getParam("nt_exp_form"); + params.set("eigenvalue_scaling") = getParam("eigenvalue_scaling"); if (getParam("eigen")) - { - InputParameters params = _factory.getValidParams("PrecursorEigenSource"); - setVarNameAndBlock(params, var_name); - params.set("num_groups") = _num_groups; - params.set("precursor_group_number") = op; - std::vector include = {"temperature", "group_fluxes"}; - params.applySpecificParameters(parameters(), include); - params.set("use_exp_form") = getParam("nt_exp_form"); - - std::string kernel_name = "PrecursorEigenSource_" + var_name + "_" + _object_suffix; - _problem->addKernel("PrecursorEigenSource", kernel_name, params); - } - else - { - InputParameters params = _factory.getValidParams("PrecursorSource"); - setVarNameAndBlock(params, var_name); - params.set("num_groups") = _num_groups; - params.set("precursor_group_number") = op; - std::vector include = {"temperature", "group_fluxes"}; - params.applySpecificParameters(parameters(), include); - params.set("use_exp_form") = getParam("nt_exp_form"); - params.set("eigenvalue_scaling") = getParam("eigenvalue_scaling"); - - std::string kernel_name = "PrecursorSource_" + var_name + "_" + _object_suffix; - _problem->addKernel("PrecursorSource", kernel_name, params); - } + params.set>("extra_vector_tags") = {"eigen"}; + + std::string kernel_name = "PrecursorSource_" + var_name + "_" + _object_suffix; + _problem->addKernel("PrecursorSource", kernel_name, params); } void diff --git a/src/kernels/CoupledFissionEigenKernel.C b/src/kernels/CoupledFissionEigenKernel.C deleted file mode 100644 index ae0f8ce160..0000000000 --- a/src/kernels/CoupledFissionEigenKernel.C +++ /dev/null @@ -1,120 +0,0 @@ -#include "CoupledFissionEigenKernel.h" - -registerMooseObject("MoltresApp", CoupledFissionEigenKernel); - -InputParameters -CoupledFissionEigenKernel::validParams() -{ - InputParameters params = EigenKernel::validParams(); - params += ScalarTransportBase::validParams(); - params.addRequiredParam("group_number", "The current energy group"); - params.addRequiredParam("num_groups", "The total numer of energy groups"); - params.addRequiredCoupledVar("group_fluxes", "All the variables that hold the group fluxes. " - "These MUST be listed by decreasing " - "energy/increasing group number."); - params.addRequiredParam("account_delayed", "Whether to account for delayed neutrons."); - return params; -} - -CoupledFissionEigenKernel::CoupledFissionEigenKernel(const InputParameters & parameters) - : EigenKernel(parameters), - ScalarTransportBase(parameters), - _nsf(getMaterialProperty>("nsf")), - _chi_t(getMaterialProperty>("chi_t")), - _chi_p(getMaterialProperty>("chi_p")), - _beta(getMaterialProperty("beta")), - _group(getParam("group_number") - 1), - _num_groups(getParam("num_groups")), - _account_delayed(getParam("account_delayed")) -{ - unsigned int n = coupledComponents("group_fluxes"); - if (!(n == _num_groups)) - { - mooseError("The number of coupled variables doesn't match the number of groups."); - } - _group_fluxes.resize(n); - _flux_ids.resize(n); - for (unsigned int i = 0; i < _group_fluxes.size(); ++i) - { - _group_fluxes[i] = &coupledValue("group_fluxes", i); - _flux_ids[i] = coupled("group_fluxes", i); - } -} - -Real -CoupledFissionEigenKernel::computeQpResidual() -{ - Real r = 0; - for (unsigned int i = 0; i < _num_groups; ++i) - { - if (_account_delayed) - { - r += -_test[_i][_qp] * _chi_p[_qp][_group] * _nsf[_qp][i] * - computeConcentration((*_group_fluxes[i]), _qp); - } - else - { - r += -_test[_i][_qp] * _chi_t[_qp][_group] * _nsf[_qp][i] * - computeConcentration((*_group_fluxes[i]), _qp); - } - } - - if (_account_delayed) - r *= (1. - _beta[_qp]); - - return r; -} - -Real -CoupledFissionEigenKernel::computeQpJacobian() -{ - Real jac = 0; - for (unsigned int i = 0; i < _num_groups; ++i) - { - if (i == _group) - { - if (_account_delayed) - { - jac += -_test[_i][_qp] * _chi_p[_qp][_group] * _nsf[_qp][i] * - computeConcentrationDerivative((*_group_fluxes[i]), _phi, _j, _qp); - } - else - { - jac += -_test[_i][_qp] * _chi_t[_qp][_group] * _nsf[_qp][i] * - computeConcentrationDerivative((*_group_fluxes[i]), _phi, _j, _qp); - } - if (_account_delayed) - jac *= (1. - _beta[_qp]); - break; - } - } - - return jac; -} - -Real -CoupledFissionEigenKernel::computeQpOffDiagJacobian(unsigned int jvar) -{ - Real jac = 0; - for (unsigned int i = 0; i < _num_groups; ++i) - { - if (jvar == _flux_ids[i]) - { - if (_account_delayed) - { - jac += -_test[_i][_qp] * _chi_p[_qp][_group] * _nsf[_qp][i] * - computeConcentrationDerivative((*_group_fluxes[i]), _phi, _j, _qp); - } - else - { - jac += -_test[_i][_qp] * _chi_t[_qp][_group] * _nsf[_qp][i] * - computeConcentrationDerivative((*_group_fluxes[i]), _phi, _j, _qp); - } - if (_account_delayed) - jac *= (1. - _beta[_qp]); - break; - } - } - - return jac; -} diff --git a/src/kernels/PrecursorEigenSource.C b/src/kernels/PrecursorEigenSource.C deleted file mode 100644 index be43e9b90b..0000000000 --- a/src/kernels/PrecursorEigenSource.C +++ /dev/null @@ -1,89 +0,0 @@ -#include "PrecursorEigenSource.h" - -registerMooseObject("MoltresApp", PrecursorEigenSource); - -InputParameters -PrecursorEigenSource::validParams() -{ - InputParameters params = EigenKernel::validParams(); - params += ScalarTransportBase::validParams(); - params.addClassDescription("Computes the precursor source term in the delayed neutron precursor " - "equation for the k-eigenvalue problem."); - params.addRequiredParam("num_groups", "The total number of energy groups"); - params.addRequiredCoupledVar("group_fluxes", "All the variables that hold the group fluxes. " - "These MUST be listed by decreasing " - "energy/increasing group number."); - params.addParam("precursor_group_number", - "What precursor group this kernel is acting on."); - params.addCoupledVar( - "temperature", 800, "The temperature used to interpolate material properties."); - params.addParam("prec_scale", 1, "Thefactor by which the neutron fluxes are scaled."); - return params; -} - -PrecursorEigenSource::PrecursorEigenSource(const InputParameters & parameters) - : EigenKernel(parameters), - ScalarTransportBase(parameters), - _nsf(getMaterialProperty>("nsf")), - _d_nsf_d_temp(getMaterialProperty>("d_nsf_d_temp")), - _num_groups(getParam("num_groups")), - _beta_eff(getMaterialProperty>("beta_eff")), - _d_beta_eff_d_temp(getMaterialProperty>("d_beta_eff_d_temp")), - _precursor_group(getParam("precursor_group_number") - 1), - _temp(coupledValue("temperature")), - _temp_id(coupled("temperature")), - _prec_scale(getParam("prec_scale")) -{ - _group_fluxes.resize(_num_groups); - _flux_ids.resize(_num_groups); - for (unsigned int i = 0; i < _group_fluxes.size(); ++i) - { - _group_fluxes[i] = &coupledValue("group_fluxes", i); - _flux_ids[i] = coupled("group_fluxes", i); - } -} - -Real -PrecursorEigenSource::computeQpResidual() -{ - Real r = 0; - for (unsigned int i = 0; i < _num_groups; ++i) - { - r += -_test[_i][_qp] * _beta_eff[_qp][_precursor_group] * _nsf[_qp][i] * - computeConcentration((*_group_fluxes[i]), _qp) * _prec_scale; - } - - return r; -} - -Real -PrecursorEigenSource::computeQpJacobian() -{ - return 0; -} - -Real -PrecursorEigenSource::computeQpOffDiagJacobian(unsigned int jvar) -{ - Real jac = 0; - for (unsigned int i = 0; i < _num_groups; ++i) - if (jvar == _flux_ids[i]) - { - jac = -_test[_i][_qp] * _beta_eff[_qp][_precursor_group] * _nsf[_qp][i] * - computeConcentrationDerivative((*_group_fluxes[i]), _phi, _j, _qp) * _prec_scale; - return jac; - } - - if (jvar == _temp_id) - { - for (unsigned int i = 0; i < _num_groups; ++i) - jac += -_test[_i][_qp] * - (_beta_eff[_qp][_precursor_group] * _d_nsf_d_temp[_qp][i] * _phi[_j][_qp] * - computeConcentration((*_group_fluxes[i]), _qp) * _prec_scale + - _d_beta_eff_d_temp[_qp][_precursor_group] * _phi[_j][_qp] * _nsf[_qp][i] * - computeConcentration((*_group_fluxes[i]), _qp) * _prec_scale); - return jac; - } - - return 0; -} diff --git a/src/kernels/SelfFissionEigenKernel.C b/src/kernels/SelfFissionEigenKernel.C deleted file mode 100644 index cb7c6c46c3..0000000000 --- a/src/kernels/SelfFissionEigenKernel.C +++ /dev/null @@ -1,33 +0,0 @@ -#include "SelfFissionEigenKernel.h" - -registerMooseObject("MoltresApp", SelfFissionEigenKernel); - -InputParameters -SelfFissionEigenKernel::validParams() -{ - InputParameters params = EigenKernel::validParams(); - params.addRequiredParam("nu_f", - "The number of neutrons produced per fission."); - params.addRequiredParam("sigma_f", - "The macroscopic fission cross section."); - return params; -} - -SelfFissionEigenKernel::SelfFissionEigenKernel(const InputParameters & parameters) - : EigenKernel(parameters), - _nu_f(getMaterialProperty("nu_f")), - _sigma_f(getMaterialProperty("sigma_f")) -{ -} - -Real -SelfFissionEigenKernel::computeQpResidual() -{ - return -_nu_f[_qp] * _sigma_f[_qp] * _u[_qp] * _test[_i][_qp]; -} - -Real -SelfFissionEigenKernel::computeQpJacobian() -{ - return -_nu_f[_qp] * _sigma_f[_qp] * _phi[_j][_qp] * _test[_i][_qp]; -} diff --git a/src/postprocessors/ElmIntegTotFissNtsPostprocessor.C b/src/postprocessors/ElmIntegTotFissNtsPostprocessor.C index b9ff710b38..06754cef3b 100644 --- a/src/postprocessors/ElmIntegTotFissNtsPostprocessor.C +++ b/src/postprocessors/ElmIntegTotFissNtsPostprocessor.C @@ -12,8 +12,8 @@ ElmIntegTotFissNtsPostprocessor::validParams() params.addCoupledVar("pre_concs", "All the variables that hold the precursor " "concentrations. These MUST be listed by increasing " "group number."); - params.addRequiredParam("num_groups", "The number of energy groups."); - params.addParam("num_precursor_groups", 0, "The number of precursor groups."); + params.addRequiredParam("num_groups", "The number of energy groups."); + params.addParam("num_precursor_groups", 0, "The number of precursor groups."); params.addRequiredParam("account_delayed", "Whether to account for delayed neutrons."); return params; } @@ -21,15 +21,15 @@ ElmIntegTotFissNtsPostprocessor::validParams() ElmIntegTotFissNtsPostprocessor::ElmIntegTotFissNtsPostprocessor(const InputParameters & parameters) : ElementIntegralPostprocessor(parameters), // MooseVariableInterface(this, false), - _num_groups(getParam("num_groups")), - _num_precursor_groups(getParam("num_precursor_groups")), + _num_groups(getParam("num_groups")), + _num_precursor_groups(getParam("num_precursor_groups")), _account_delayed(getParam("account_delayed")), _nsf(getMaterialProperty>("nsf")), _decay_constant(getMaterialProperty>("decay_constant")), _vars(getCoupledMooseVars()) { addMooseVariableDependency(_vars); - int n = coupledComponents("group_fluxes"); + unsigned int n = coupledComponents("group_fluxes"); if (!(n == _num_groups)) mooseError("The number of group flux variables doesn't match the number of energy groups."); @@ -41,7 +41,7 @@ ElmIntegTotFissNtsPostprocessor::ElmIntegTotFissNtsPostprocessor(const InputPara if (_account_delayed) { - int m = coupledComponents("pre_concs"); + unsigned int m = coupledComponents("pre_concs"); if (m == 0) { mooseError("account_delayed flag set to true but no precursor groups specified." @@ -64,12 +64,12 @@ Real ElmIntegTotFissNtsPostprocessor::computeQpIntegral() { Real sum = 0; - for (int i = 0; i < _num_groups; ++i) + for (unsigned int i = 0; i < _num_groups; ++i) sum += _nsf[_qp][i] * (*_group_fluxes[i])[_qp]; if (_account_delayed) { - for (int i = 0; i < _num_precursor_groups; ++i) + for (unsigned int i = 0; i < _num_precursor_groups; ++i) sum += _decay_constant[_qp][i] * (*_pre_concs[i])[_qp]; } diff --git a/src/postprocessors/ElmIntegTotFissPostprocessor.C b/src/postprocessors/ElmIntegTotFissPostprocessor.C index 3dac15afbb..bdfde5ccd0 100644 --- a/src/postprocessors/ElmIntegTotFissPostprocessor.C +++ b/src/postprocessors/ElmIntegTotFissPostprocessor.C @@ -10,7 +10,7 @@ ElmIntegTotFissPostprocessor::validParams() params.addRequiredCoupledVar( "group_fluxes", "The group fluxes. MUST be arranged by decreasing energy/increasing group number."); - params.addRequiredParam("num_groups", "The number of energy groups."); + params.addRequiredParam("num_groups", "The number of energy groups."); params.addParam("nt_scale", 1, "Scaling of the neutron fluxes to aid convergence."); return params; } @@ -18,13 +18,13 @@ ElmIntegTotFissPostprocessor::validParams() ElmIntegTotFissPostprocessor::ElmIntegTotFissPostprocessor(const InputParameters & parameters) : ElementIntegralPostprocessor(parameters), ScalarTransportBase(parameters), - _num_groups(getParam("num_groups")), + _num_groups(getParam("num_groups")), _fissxs(getMaterialProperty>("fissxs")), _vars(getCoupledMooseVars()), _nt_scale(getParam("nt_scale")) { addMooseVariableDependency(_vars); - int n = coupledComponents("group_fluxes"); + unsigned int n = coupledComponents("group_fluxes"); if (!(n == _num_groups)) mooseError("The number of coupled variables doesn't match the number of groups."); @@ -39,7 +39,7 @@ Real ElmIntegTotFissPostprocessor::computeQpIntegral() { Real sum = 0; - for (int i = 0; i < _num_groups; ++i) + for (unsigned int i = 0; i < _num_groups; ++i) sum += computeFluxMultiplier(i) * computeConcentration((*_group_fluxes[i]), _qp) * _nt_scale; return sum; diff --git a/tests/coupled/coupled_eigenvalue.i b/tests/coupled/coupled_eigenvalue.i index 914cf1c8e0..083c8c9d14 100644 --- a/tests/coupled/coupled_eigenvalue.i +++ b/tests/coupled/coupled_eigenvalue.i @@ -11,6 +11,11 @@ flow_velocity = 21.7 # cm/s. See MSRE-properties.ods account_delayed = true [] +[Problem] + type = EigenProblem + bx_norm = fiss_neutrons +[] + [Mesh] coord_type = RZ file = '2d_lattice_structured.msh' @@ -59,22 +64,18 @@ flow_velocity = 21.7 # cm/s. See MSRE-properties.ods [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - xdiff = 'group1diff' - - bx_norm = 'bnorm' - k0 = 1 + type = Eigenvalue + initial_eigenvalue = 1 l_max_its = 100 - eig_check_tol = 1e-7 - - normal_factor = 1e7 + eigen_tol = 1e-7 + free_power_iterations = 2 normalization = powernorm - + normal_factor = 1e7 solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type' - petsc_options_value = 'asm lu' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' + line_search = none [] [Preconditioning] @@ -85,7 +86,13 @@ flow_velocity = 21.7 # cm/s. See MSRE-properties.ods [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor block = 'fuel' execute_on = linear @@ -134,6 +141,13 @@ flow_velocity = 21.7 # cm/s. See MSRE-properties.ods [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true @@ -142,28 +156,3 @@ flow_velocity = 21.7 # cm/s. See MSRE-properties.ods file_base = 'coupled_eigenvalue' [] [] - -[Debug] - show_var_residual_norms = true -[] - -# [ICs] -# [./temp_ic] -# type = RandomIC -# variable = temp -# min = 922 -# max = 1022 -# [../] -# [./group1_ic] -# type = RandomIC -# variable = group1 -# min = .5 -# max = 1.5 -# [../] -# [./group2_ic] -# type = RandomIC -# variable = group2 -# min = .5 -# max = 1.5 -# [../] -# [] diff --git a/tests/coupled/gold/coupled_eigenvalue.e b/tests/coupled/gold/coupled_eigenvalue.e index d27e8ae2f9..3a45b9c468 100644 Binary files a/tests/coupled/gold/coupled_eigenvalue.e and b/tests/coupled/gold/coupled_eigenvalue.e differ diff --git a/tests/materials/gmm_linear.i b/tests/materials/gmm_linear.i index ccc6be89ee..c960c6a2c7 100644 --- a/tests/materials/gmm_linear.i +++ b/tests/materials/gmm_linear.i @@ -30,13 +30,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - #solve_type = 'PJFNK' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +46,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +68,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/gmm_monotone_cubic.i b/tests/materials/gmm_monotone_cubic.i index 2fa9ca4297..6502cf9d0b 100644 --- a/tests/materials/gmm_monotone_cubic.i +++ b/tests/materials/gmm_monotone_cubic.i @@ -30,13 +30,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - #solve_type = 'PJFNK' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +46,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +68,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/gmm_none.i b/tests/materials/gmm_none.i index 304a8821d1..09f36ac197 100644 --- a/tests/materials/gmm_none.i +++ b/tests/materials/gmm_none.i @@ -30,12 +30,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - solve_type = 'PJFNK' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 + solve_type = 'NEWTON' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -48,7 +46,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -64,6 +68,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/gmm_spline.i b/tests/materials/gmm_spline.i index 8a90c82c9a..0af9eb4524 100644 --- a/tests/materials/gmm_spline.i +++ b/tests/materials/gmm_spline.i @@ -30,13 +30,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - #solve_type = 'PJFNK' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +46,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +68,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/gold/gmm_linear_out.e b/tests/materials/gold/gmm_linear_out.e index e9c694f46d..c42a891e33 100644 Binary files a/tests/materials/gold/gmm_linear_out.e and b/tests/materials/gold/gmm_linear_out.e differ diff --git a/tests/materials/gold/gmm_monotone_cubic_out.e b/tests/materials/gold/gmm_monotone_cubic_out.e index 3a83afb589..2433b8384f 100644 Binary files a/tests/materials/gold/gmm_monotone_cubic_out.e and b/tests/materials/gold/gmm_monotone_cubic_out.e differ diff --git a/tests/materials/gold/gmm_none_out.e b/tests/materials/gold/gmm_none_out.e index aeb15510da..2e0d94e212 100644 Binary files a/tests/materials/gold/gmm_none_out.e and b/tests/materials/gold/gmm_none_out.e differ diff --git a/tests/materials/gold/gmm_spline_out.e b/tests/materials/gold/gmm_spline_out.e index 61e9bbc983..e6515743a9 100644 Binary files a/tests/materials/gold/gmm_spline_out.e and b/tests/materials/gold/gmm_spline_out.e differ diff --git a/tests/materials/gold/mjm_linear_out.e b/tests/materials/gold/mjm_linear_out.e index f03cb94e49..b190413563 100644 Binary files a/tests/materials/gold/mjm_linear_out.e and b/tests/materials/gold/mjm_linear_out.e differ diff --git a/tests/materials/gold/mjm_monotone_cubic_out.e b/tests/materials/gold/mjm_monotone_cubic_out.e index b4958013d8..3b62580ea1 100644 Binary files a/tests/materials/gold/mjm_monotone_cubic_out.e and b/tests/materials/gold/mjm_monotone_cubic_out.e differ diff --git a/tests/materials/gold/mjm_none_out.e b/tests/materials/gold/mjm_none_out.e index 2d46a28bf4..36c0f4a2b1 100644 Binary files a/tests/materials/gold/mjm_none_out.e and b/tests/materials/gold/mjm_none_out.e differ diff --git a/tests/materials/gold/mjm_spline_out.e b/tests/materials/gold/mjm_spline_out.e index 4e97b697fd..4b7cf99244 100644 Binary files a/tests/materials/gold/mjm_spline_out.e and b/tests/materials/gold/mjm_spline_out.e differ diff --git a/tests/materials/mjm_linear.i b/tests/materials/mjm_linear.i index eb025e3e69..2e259fef35 100644 --- a/tests/materials/mjm_linear.i +++ b/tests/materials/mjm_linear.i @@ -31,12 +31,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - solve_type = 'PJFNK' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 + solve_type = 'NEWTON' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +47,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +69,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/mjm_monotone_cubic.i b/tests/materials/mjm_monotone_cubic.i index ccdd4fa04c..37b77ff36d 100644 --- a/tests/materials/mjm_monotone_cubic.i +++ b/tests/materials/mjm_monotone_cubic.i @@ -31,12 +31,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - solve_type = 'PJFNK' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 + solve_type = 'NEWTON' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +47,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +69,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/mjm_none.i b/tests/materials/mjm_none.i index fe0daad25a..2e6aefb3a2 100644 --- a/tests/materials/mjm_none.i +++ b/tests/materials/mjm_none.i @@ -31,12 +31,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - solve_type = 'PJFNK' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 + solve_type = 'NEWTON' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +47,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +69,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/materials/mjm_spline.i b/tests/materials/mjm_spline.i index 888835e123..51811e0ea4 100644 --- a/tests/materials/mjm_spline.i +++ b/tests/materials/mjm_spline.i @@ -31,12 +31,10 @@ [] [Executioner] - type = InversePowerMethod - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1 - solve_type = 'PJFNK' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + type = Eigenvalue + initial_eigenvalue = 1 + nl_abs_tol = 1e-12 + solve_type = 'NEWTON' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' [] @@ -49,7 +47,13 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] @@ -65,6 +69,13 @@ [] [] +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] +[] + [Outputs] perf_graph = true print_linear_residuals = true diff --git a/tests/nts/gold/nts_out.e b/tests/nts/gold/nts_out.e index edb6aa4d56..a8ff188fc8 100644 Binary files a/tests/nts/gold/nts_out.e and b/tests/nts/gold/nts_out.e differ diff --git a/tests/nts/nts.i b/tests/nts/nts.i index 4080322843..7f1d68f932 100644 --- a/tests/nts/nts.i +++ b/tests/nts/nts.i @@ -8,6 +8,11 @@ account_delayed = false [] +[Problem] + type = EigenProblem + bx_norm = fiss_neutrons +[] + [Mesh] coord_type = RZ file = '2d_lattice_structured_smaller.msh' @@ -36,16 +41,12 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - xdiff = 'group1diff' - - bx_norm = 'bnorm' - k0 = 1.5 - l_max_its = 100 - - # solve_type = 'PJFNK' - solve_type = 'NEWTON' + type = Eigenvalue + eigen_tol = 1e-6 + free_power_iterations = 2 + normalization = fiss_neutrons + normal_factor = 1 + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type -sub_pc_type' petsc_options_value = 'asm lu' @@ -59,47 +60,35 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] - [tot_fissions] + [tot_fiss] type = ElmIntegTotFissPostprocessor execute_on = linear [] [group1norm] type = ElementIntegralVariablePostprocessor variable = group1 - execute_on = linear - [] - [group1max] - type = NodalExtremeValue - value_type = max - variable = group1 - execute_on = timestep_end - [] - [group1diff] - type = ElementL2Diff - variable = group1 - execute_on = 'linear timestep_end' - use_displaced_mesh = false [] [group2norm] type = ElementIntegralVariablePostprocessor variable = group2 - execute_on = linear - [] - [group2max] - type = NodalExtremeValue - value_type = max - variable = group2 - execute_on = timestep_end [] - [group2diff] - type = ElementL2Diff - variable = group2 - execute_on = 'linear timestep_end' - use_displaced_mesh = false +[] + +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + contains_complete_history = true [] [] diff --git a/tests/nts/nts_no_action.i b/tests/nts/nts_no_action.i index 1b24943a25..0bbff7d8bd 100644 --- a/tests/nts/nts_no_action.i +++ b/tests/nts/nts_no_action.i @@ -8,11 +8,19 @@ account_delayed = false [] +[Problem] + type = EigenProblem + bx_norm = fiss_neutrons +[] + [Mesh] - coord_type = RZ file = '2d_lattice_structured_smaller.msh' [] +[Problem] + coord_type = RZ +[] + [Variables] [group1] [] @@ -33,9 +41,10 @@ group_number = 1 [] [fission_source_group1] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group1 group_number = 1 + extra_vector_tags = 'eigen' [] [inscatter_group1] type = InScatter @@ -53,9 +62,10 @@ group_number = 2 [] [fission_source_group2] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group2 group_number = 2 + extra_vector_tags = 'eigen' [] [inscatter_group2] type = InScatter @@ -93,16 +103,12 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - xdiff = 'group1diff' - - bx_norm = 'bnorm' - k0 = 1.5 - l_max_its = 100 - - # solve_type = 'PJFNK' - solve_type = 'NEWTON' + type = Eigenvalue + eigen_tol = 1e-6 + free_power_iterations = 2 + normalization = fiss_neutrons + normal_factor = 1 + solve_type = 'PJFNK' petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' petsc_options_iname = '-pc_type -sub_pc_type' petsc_options_value = 'asm lu' @@ -116,47 +122,35 @@ [] [Postprocessors] - [bnorm] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] + [fiss_neutrons] type = ElmIntegTotFissNtsPostprocessor execute_on = linear [] - [tot_fissions] + [tot_fiss] type = ElmIntegTotFissPostprocessor execute_on = linear [] [group1norm] type = ElementIntegralVariablePostprocessor variable = group1 - execute_on = linear - [] - [group1max] - type = NodalExtremeValue - value_type = max - variable = group1 - execute_on = timestep_end - [] - [group1diff] - type = ElementL2Diff - variable = group1 - execute_on = 'linear timestep_end' - use_displaced_mesh = false [] [group2norm] type = ElementIntegralVariablePostprocessor variable = group2 - execute_on = linear - [] - [group2max] - type = NodalExtremeValue - value_type = max - variable = group2 - execute_on = timestep_end [] - [group2diff] - type = ElementL2Diff - variable = group2 - execute_on = 'linear timestep_end' - use_displaced_mesh = false +[] + +[VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + contains_complete_history = true [] [] diff --git a/tutorial/eigenvalue/nts-action.i b/tutorial/eigenvalue/nts-action.i index 3c62e3a7c7..e4951a81ce 100644 --- a/tutorial/eigenvalue/nts-action.i +++ b/tutorial/eigenvalue/nts-action.i @@ -17,6 +17,11 @@ [] [] +[Problem] + type = EigenProblem + bx_norm = bnorm +[] + [Nt] var_name_base = group vacuum_boundaries = 'fuel_bottom mod_bottom right fuel_top mod_top' @@ -65,38 +70,27 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - - # normalization = 'powernorm' - # normal_factor = 8e6 - - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1. - l_max_its = 100 - eig_check_tol = 1e-7 + type = Eigenvalue + initial_eigenvalue = 1 + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' automatic_scaling = true compute_scaling_once = false resid_vs_jac_scaling_param = 0.1 - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package' - petsc_options_value = 'lu NONZERO superlu_dist' - line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor block = 0 @@ -147,6 +141,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [centerline_flux] type = LineValueSampler variable = 'group1 group2' @@ -177,7 +175,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[] diff --git a/tutorial/eigenvalue/nts.i b/tutorial/eigenvalue/nts.i index 0188b9fe1f..dc16fdb991 100644 --- a/tutorial/eigenvalue/nts.i +++ b/tutorial/eigenvalue/nts.i @@ -17,16 +17,19 @@ [] [] +[Problem] + type = EigenProblem + bx_norm = bnorm +[] + [Variables] [group1] order = FIRST family = LAGRANGE - initial_condition = 1 [] [group2] order = FIRST family = LAGRANGE - initial_condition = 1 [] [] @@ -68,10 +71,11 @@ group_number = 1 [] [fission_source_group1] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group1 group_number = 1 block = '0' + extra_vector_tags = 'eigen' [] [delayed_group1] type = DelayedNeutronSource @@ -94,10 +98,11 @@ group_number = 2 [] [fission_source_group2] - type = CoupledFissionEigenKernel + type = CoupledFissionKernel variable = group2 group_number = 2 block = '0' + extra_vector_tags = 'eigen' [] [inscatter_group2] type = InScatter @@ -141,38 +146,27 @@ [] [Executioner] - type = InversePowerMethod - max_power_iterations = 50 - - # normalization = 'powernorm' - # normal_factor = 8e6 - - xdiff = 'group1diff' - bx_norm = 'bnorm' - k0 = 1. - l_max_its = 100 - eig_check_tol = 1e-7 + type = Eigenvalue + initial_eigenvalue = 1 + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type -pc_hypre_type' + petsc_options_value = 'hypre boomeramg' automatic_scaling = true compute_scaling_once = false resid_vs_jac_scaling_param = 0.1 - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package' - petsc_options_value = 'lu NONZERO superlu_dist' - line_search = none [] -[Preconditioning] - [SMP] - type = SMP - full = true - [] -[] - [Postprocessors] + [k_eff] + type = VectorPostprocessorComponent + index = 0 + vectorpostprocessor = k_vpp + vector_name = eigen_values_real + [] [bnorm] type = ElmIntegTotFissNtsPostprocessor block = 0 @@ -223,6 +217,10 @@ [] [VectorPostprocessors] + [k_vpp] + type = Eigenvalues + inverse_eigenvalue = true + [] [centerline_flux] type = LineValueSampler variable = 'group1 group2' @@ -253,7 +251,3 @@ type = CSV [] [] - -[Debug] - show_var_residual_norms = true -[]