diff --git a/problems/072017_dg_temperature/2d_lattice_structured.geo b/problems/072017_dg_temperature/2d_lattice_structured.geo new file mode 100644 index 000000000..adde7c12e --- /dev/null +++ b/problems/072017_dg_temperature/2d_lattice_structured.geo @@ -0,0 +1,78 @@ +Geometry.CopyMeshingMethod = 1; +R = 72.5; +H = 153; +num_segments = 14; +pitch = R / num_segments; +x = .237952211; +fuel_rad = x * pitch; +graph_rad = pitch; +lc = 1; +lx = .4; +ly = 10; + +Point(1) = {0, 0, 0, lc}; +Point(2) = {fuel_rad, 0, 0, lc}; +Point(3) = {graph_rad, 0, 0, lc}; +Point(4) = {0, H, 0, lc}; +Point(5) = {fuel_rad, H, 0, lc}; +Point(6) = {graph_rad, H, 0, lc}; +// fuel top +Line(1) = {4, 5}; +// graph top +Line(2) = {5, 6}; +// graph right edge +Line(3) = {6, 3}; +// graph bottom +Line(4) = {3, 2}; +// fuel bottom +Line(5) = {1, 2}; +// fuel-graph interface +Line(6) = {2, 5}; +// fuel left edge +Line(7) = {4, 1}; + +// Fuel +Line Loop(8) = {1, -6, -5, -7}; +Plane Surface(9) = {8}; + +// Moderator +Line Loop(10) = {2, 3, 4, 6}; +Plane Surface(11) = {10}; + +// Structured +Transfinite Line{1, 5} = fuel_rad/lx; +Transfinite Line{2, 4} = (graph_rad - fuel_rad)/lx; +Transfinite Line{3, 6, 7} = H/ly; +Transfinite Surface{9}; +Transfinite Surface{11}; +Recombine Surface{9}; +Recombine Surface{11}; + +fuel_surfaces[] = {9}; +moder_surfaces[] = {11}; +fuel_tops[] = {1}; +fuel_bottoms[] = {5}; +moder_bottoms[] = {4}; +moder_tops[] = {2}; +For xindex In {1:num_segments-1} +new_f_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{9}; } +}; +fuel_surfaces += new_f_surface; +new_m_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{11}; } +}; +moder_surfaces += new_m_surface; +fuel_tops += {13 + (xindex - 1) * 8}; +moder_tops += {17 + (xindex - 1) * 8}; +fuel_bottoms += {15 + (xindex - 1) * 8}; +moder_bottoms += {19 + (xindex - 1) * 8}; +EndFor // xindex + +Physical Surface("fuel") = { fuel_surfaces[] }; +Physical Surface("moder") = { moder_surfaces[] }; +Physical Line("fuel_tops") = { fuel_tops[] }; +Physical Line("moder_tops") = { moder_tops[] }; +Physical Line("fuel_bottoms") = { fuel_bottoms[] }; +Physical Line("moder_bottoms") = { moder_bottoms[] }; +Physical Line("outer_wall") = { 18 + 8 * (num_segments - 2) }; diff --git a/problems/072017_dg_temperature/auto_diff_rho.i b/problems/072017_dg_temperature/auto_diff_rho.i new file mode 100644 index 000000000..237aa4d36 --- /dev/null +++ b/problems/072017_dg_temperature/auto_diff_rho.i @@ -0,0 +1,400 @@ +flow_velocity=21.7 # cm/s. See MSRE-properties.ods +nt_scale=1e13 +ini_temp=922 +diri_temp=922 +sigma_val=.6 + +[GlobalParams] + num_groups = 2 + num_precursor_groups = 6 + use_exp_form = false + group_fluxes = 'group1 group2' + temperature = temp + sss2_input = false + pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6' + account_delayed = true + gamma = .0144 # Cammi .0144 + nt_scale = ${nt_scale} +[] + +[Mesh] + file = '2d_lattice_structured.msh' +[] + +[Problem] + coord_type = RZ +[] + +[Variables] + [./group1] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./group2] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./temp] + initial_condition = ${ini_temp} + scaling = 1e-4 + order = FIRST + family = MONOMIAL + [../] +[] + +[AuxVariables] + [./power_density] + order = CONSTANT + family = MONOMIAL + [../] +[] + +[PrecursorKernel] + [./pres] + var_name_base = pre + block = 'fuel' + outlet_boundaries = 'fuel_tops' + u_def = 0 + v_def = ${flow_velocity} + w_def = 0 + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + # jac_test = true + [../] +[] + +[Kernels] + # Neutronics + [./time_group1] + type = NtTimeDerivative + variable = group1 + group_number = 1 + [../] + [./diff_group1] + type = GroupDiffusion + variable = group1 + group_number = 1 + [../] + [./sigma_r_group1] + type = SigmaR + variable = group1 + group_number = 1 + [../] + [./fission_source_group1] + type = CoupledFissionKernel + variable = group1 + group_number = 1 + [../] + [./delayed_group1] + type = DelayedNeutronSource + variable = group1 + [../] + [./inscatter_group1] + type = InScatter + variable = group1 + group_number = 1 + [../] + [./diff_group2] + type = GroupDiffusion + variable = group2 + group_number = 2 + [../] + [./sigma_r_group2] + type = SigmaR + variable = group2 + group_number = 2 + [../] + [./time_group2] + type = NtTimeDerivative + variable = group2 + group_number = 2 + [../] + [./fission_source_group2] + type = CoupledFissionKernel + variable = group2 + group_number = 2 + [../] + [./inscatter_group2] + type = InScatter + variable = group2 + group_number = 2 + [../] + + # Temperature + [./temp_time_derivative] + type = MatINSTemperatureTimeDerivative + variable = temp + [../] + [./temp_source_fuel] + type = TransientFissionHeatSource + variable = temp + block = 'fuel' + [../] + [./temp_source_mod] + type = GammaHeatSource + variable = temp + block = 'moder' + average_fission_heat = 'average_fission_heat' + [../] + [./temp_diffusion] + type = MatDiffusion + D_name = 'k' + variable = temp + [../] + [./temp_advection_fuel] + type = ConservativeTemperatureAdvection + velocity = '0 ${flow_velocity} 0' + variable = temp + block = 'fuel' + [../] +[] + +[DGKernels] + [./temp_advection_fuel] + block = 'fuel' + type = DGTemperatureAdvection + variable = temp + velocity = '0 ${flow_velocity} 0' + [../] + [./temp_diffusion] + type = DGDiffusion + variable = temp + sigma = ${sigma_val} + epsilon = -1 + diff = 'k' + [../] +[] + +[BCs] + [./vacuum_group1] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group1 + [../] + [./vacuum_group2] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group2 + [../] + [./temp_dirichlet_diffusion_inlet] + boundary = 'fuel_bottoms' + type = DGDiffusionPostprocessorDirichletBC + variable = temp + sigma = ${sigma_val} + epsilon = -1 + D_name = 'k' + postprocessor = coreEndTemp + offset = -50 + [../] + [./temp_advection_inlet] + boundary = 'fuel_bottoms' + type = PostprocessorTemperatureInflowBC + variable = temp + uu = 0 + vv = ${flow_velocity} + ww = 0 + postprocessor = coreEndTemp + offset = -50 + [../] + # [./temp_diri_cg] + # boundary = 'moder_bottoms fuel_bottoms outer_wall' + # type = FunctionDirichletBC + # function = 'temp_bc_func' + # variable = temp + # [../] + [./temp_advection_outlet] + boundary = 'fuel_tops' + type = TemperatureOutflowBC + variable = temp + velocity = '0 ${flow_velocity} 0' + [../] +[] + +[AuxKernels] + [./fuel] + block = 'fuel' + type = FissionHeatSourceTransientAux + variable = power_density + [../] + [./moderator] + block = 'moder' + type = ModeratorHeatSourceTransientAux + average_fission_heat = 'average_fission_heat' + variable = power_density + [../] +[] + +[Functions] + [./temp_bc_func] + type = ParsedFunction + value = '${ini_temp} - (${ini_temp} - ${diri_temp}) * tanh(t/1e-2)' + [../] +[] + +[Materials] + [./fuel] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_fuel_' + interp_type = 'spline' + block = 'fuel' + prop_names = 'k cp' + prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_fuel] + type = DerivativeParsedMaterial + f_name = rho + function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'fuel' + [../] + [./moder] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_mod_' + interp_type = 'spline' + prop_names = 'k cp' + prop_values = '.312 1760' # Cammi 2011 at 908 K + block = 'moder' + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_moder] + type = DerivativeParsedMaterial + f_name = rho + function = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'moder' + [../] +[] + +[Executioner] + type = Transient + end_time = 10000 + + nl_rel_tol = 1e-6 + nl_abs_tol = 6e-6 + + solve_type = 'PJFNK' + line_search = none + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + + nl_max_its = 30 + l_max_its = 100 + + dtmin = 1e-5 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Postprocessors] + [./group1_current] + type = IntegralNewVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./group1_old] + type = IntegralOldVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./multiplication] + type = DivisionPostprocessor + value1 = group1_current + value2 = group1_old + outputs = 'console csv' + [../] + [./temp_fuel] + type = ElementAverageValue + variable = temp + block = 'fuel' + outputs = 'csv console' + [../] + [./temp_moder] + type = ElementAverageValue + variable = temp + block = 'moder' + outputs = 'csv console' + [../] + [./average_fission_heat] + type = AverageFissionHeat + execute_on = 'linear nonlinear' + outputs = 'csv console' + block = 'fuel' + [../] + [./coreEndTemp] + type = SideAverageValue + variable = temp + boundary = 'fuel_tops' + outputs = 'csv console' + execute_on = 'linear nonlinear' + [../] +[] + +[VectorPostprocessors] + [./outlet_temps] + type = LineValueSampler + start_point = '0 153 0' + end_point = '72.5 153 0' + num_points = 1000 + variable = temp + sort_by = 'x' + outputs = 'csv' + [../] +[] + +[Outputs] + print_perf_log = true + print_linear_residuals = true + [./csv] + type = CSV + execute_on = 'final' + [../] + exodus = true +[] + +[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/problems/LOSCA/HXFailure/auto_diff_rho.i b/problems/LOSCA/HXFailure/auto_diff_rho.i index 690a0154f..a96e1b7ea 100644 --- a/problems/LOSCA/HXFailure/auto_diff_rho.i +++ b/problems/LOSCA/HXFailure/auto_diff_rho.i @@ -54,6 +54,7 @@ diri_temp=922 nt_exp_form = false family = MONOMIAL order = CONSTANT + init_from_file = true [../] [] @@ -156,14 +157,8 @@ diri_temp=922 boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' variable = group2 [../] - [./temp_neu_cg] - boundary = 'moder_bottoms outer_wall' - type = DirichletBC - value = 900.0 # 900 kelvin - variable = temp - [../] [./fuel_bottoms_looped] - boundary = 'fuel_bottoms' + boundary = 'fuel_bottoms outer_wall' type = PostprocessorDirichletBC postprocessor = inlet_mean_temp variable = temp @@ -215,15 +210,14 @@ diri_temp=922 type = Transient end_time = 10000 - nl_rel_tol = 1e-5 + nl_rel_tol = 1e-6 nl_abs_tol = 1e-5 - solve_type = 'NEWTON' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'asm lu 1 preonly 1e-3' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + solve_type = 'PJFNK' + petsc_options = '-pc_type' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' nl_max_its = 30 l_max_its = 100 diff --git a/problems/LOSCA/HXFailure/sub.i b/problems/LOSCA/HXFailure/sub.i index 19dc30509..8e9e776aa 100644 --- a/problems/LOSCA/HXFailure/sub.i +++ b/problems/LOSCA/HXFailure/sub.i @@ -38,7 +38,8 @@ diri_temp=922 w_def = 0 nt_exp_form = false family = MONOMIAL - order = FIRST + order = CONSTANT + init_from_file = true [../] [] @@ -86,7 +87,7 @@ diri_temp=922 type = DiracHX variable = temp point = '250 0 0' - power = 8e3 + power = 4e3 [../] [] @@ -94,10 +95,10 @@ diri_temp=922 [BCs] [./fuel_bottoms_looped] boundary = 'left' - type = PostprocessorTempInflowBC + type = PostprocessorTemperatureInflowBC postprocessor = coreEndTemp variable = temp - velocity = '${flow_velocity} 0 0' + uu = ${flow_velocity} [../] # [./diri] # boundary = 'left' @@ -153,26 +154,25 @@ diri_temp=922 nl_rel_tol = 1e-6 nl_abs_tol = 1e-6 - 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 -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'asm lu 1 preonly 1e-3' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' nl_max_its = 30 l_max_its = 100 - # dtmin = 1e-5 - # # dtmax = 1 - # # dt = 1e-3 - # [./TimeStepper] - # type = IterationAdaptiveDT - # dt = 1e-3 - # cutback_factor = 0.4 - # growth_factor = 1.2 - # optimal_iterations = 20 - # [../] + dtmin = 1e-5 + # dtmax = 1 + # dt = 1e-3 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] [] [Preconditioning] diff --git a/problems/LOSCA/README.md b/problems/LOSCA/README.md index dbde886fd..939cf9a8b 100644 --- a/problems/LOSCA/README.md +++ b/problems/LOSCA/README.md @@ -5,13 +5,12 @@ Simulates a loss of secondary cooling accident in 2D MSRE-like system. # To simulate HX failure transient: -1) run the input files in this directory until they come to steady-state. ctrl-c'ing out of the sim - may be good since the temperature appears to very gently oscillate in steady-state, thus never making - it to the 10000 s mark. -2) the input in HXFailure will look in the above directory for the correct output files to kick the simulation - off on steady-state. +1. Mesh the geo file: `gmsh -2 2d_lattice_structured.geo` -3) The HXFailAdiabatic case is just like HXFailure, but instead of holding vessel walls at 900K, the vessel walls are - held at inlet temperature. This models perfect heat conduction between the downcomer and core with zero conduction - to the outside world. Ideally, some asymtotic temperature should be reached given that the reactor has a negative temperature - coefficient of reactivity for all temperatures over operating temp. +2. Run the master input file `auto_diff_rho.i` in this directory: + `mpirun -np 8 moltres-opt -i auto_diff_rho.i` + +3. `cd` into the `HXFailure` directory and run the master input file + (same name: `auto_diff_rho.i`). This input file in HXFailure will look + in the above directory for the correct output files to kick the + simulation off on steady-state. diff --git a/problems/LOSCA/auto_diff_rho.i b/problems/LOSCA/auto_diff_rho.i index 23fd886a4..d9bbdb514 100644 --- a/problems/LOSCA/auto_diff_rho.i +++ b/problems/LOSCA/auto_diff_rho.i @@ -14,7 +14,7 @@ diri_temp=922 [] [Mesh] - file = steady.e # '2d_lattice_structured.msh' + file = '2d_lattice_structured.msh' [../] [Problem] @@ -25,21 +25,18 @@ diri_temp=922 [./group1] order = FIRST family = LAGRANGE - initial_from_file_var = group1 - initial_from_file_timestep = LATEST scaling = 1e4 + initial_condition = 1 [../] [./group2] order = FIRST family = LAGRANGE scaling = 1e4 - initial_from_file_var = group2 - initial_from_file_timestep = LATEST + initial_condition = 1 [../] [./temp] scaling = 1e-4 - initial_from_file_var = temp - initial_from_file_timestep = LATEST + initial_condition = 930 [../] [] @@ -156,14 +153,8 @@ diri_temp=922 boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' variable = group2 [../] - [./temp_neu_cg] - boundary = 'moder_bottoms outer_wall' - type = DirichletBC - value = 900.0 # 900 kelvin - variable = temp - [../] [./fuel_bottoms_looped] - boundary = 'fuel_bottoms' + boundary = 'fuel_bottoms outer_wall' type = PostprocessorDirichletBC postprocessor = inlet_mean_temp variable = temp @@ -218,12 +209,11 @@ diri_temp=922 nl_rel_tol = 1e-5 nl_abs_tol = 1e-5 - 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 -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'asm lu 1 preonly 1e-3' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' nl_max_its = 30 l_max_its = 100 diff --git a/problems/LOSCA/sub.i b/problems/LOSCA/sub.i index e9fbcff56..c7d2a4588 100644 --- a/problems/LOSCA/sub.i +++ b/problems/LOSCA/sub.i @@ -40,7 +40,7 @@ diri_temp=922 w_def = 0 nt_exp_form = false family = MONOMIAL - order = FIRST + order = CONSTANT [../] [] @@ -96,10 +96,10 @@ diri_temp=922 [BCs] [./fuel_bottoms_looped] boundary = 'left' - type = PostprocessorTempInflowBC + type = PostprocessorTemperatureInflowBC postprocessor = coreEndTemp variable = temp - velocity = '${flow_velocity} 0 0' + uu = ${flow_velocity} [../] # [./diri] # boundary = 'left' @@ -115,21 +115,6 @@ diri_temp=922 [../] [] -[Functions] - [./heatRemovalFcn] - type = ParsedFunction - value = '4e3 * ( 1 - tanh( (t-50) ) )' # start losing cooling at t=50s -[] - -[Controls] - [./hxFuncCtrl] - type = RealFunctionControl - parameter = DiracKernels/heat_exchanger/power - function = heatRemovalFcn - execute_on = 'initial timestep_begin' - [../] -[] - [Materials] [./fuel] type = GenericMoltresMaterial @@ -154,26 +139,25 @@ diri_temp=922 nl_rel_tol = 1e-6 nl_abs_tol = 1e-6 - 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 -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'asm lu 1 preonly 1e-3' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' nl_max_its = 30 l_max_its = 100 - # dtmin = 1e-5 - # # dtmax = 1 - # # dt = 1e-3 - # [./TimeStepper] - # type = IterationAdaptiveDT - # dt = 1e-3 - # cutback_factor = 0.4 - # growth_factor = 1.2 - # optimal_iterations = 20 - # [../] + dtmin = 1e-5 + # dtmax = 1 + # dt = 1e-3 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] [] [Preconditioning] diff --git a/problems/constant_inlet_outlet_temp/2d_lattice_structured.geo b/problems/constant_inlet_outlet_temp/2d_lattice_structured.geo new file mode 100644 index 000000000..adde7c12e --- /dev/null +++ b/problems/constant_inlet_outlet_temp/2d_lattice_structured.geo @@ -0,0 +1,78 @@ +Geometry.CopyMeshingMethod = 1; +R = 72.5; +H = 153; +num_segments = 14; +pitch = R / num_segments; +x = .237952211; +fuel_rad = x * pitch; +graph_rad = pitch; +lc = 1; +lx = .4; +ly = 10; + +Point(1) = {0, 0, 0, lc}; +Point(2) = {fuel_rad, 0, 0, lc}; +Point(3) = {graph_rad, 0, 0, lc}; +Point(4) = {0, H, 0, lc}; +Point(5) = {fuel_rad, H, 0, lc}; +Point(6) = {graph_rad, H, 0, lc}; +// fuel top +Line(1) = {4, 5}; +// graph top +Line(2) = {5, 6}; +// graph right edge +Line(3) = {6, 3}; +// graph bottom +Line(4) = {3, 2}; +// fuel bottom +Line(5) = {1, 2}; +// fuel-graph interface +Line(6) = {2, 5}; +// fuel left edge +Line(7) = {4, 1}; + +// Fuel +Line Loop(8) = {1, -6, -5, -7}; +Plane Surface(9) = {8}; + +// Moderator +Line Loop(10) = {2, 3, 4, 6}; +Plane Surface(11) = {10}; + +// Structured +Transfinite Line{1, 5} = fuel_rad/lx; +Transfinite Line{2, 4} = (graph_rad - fuel_rad)/lx; +Transfinite Line{3, 6, 7} = H/ly; +Transfinite Surface{9}; +Transfinite Surface{11}; +Recombine Surface{9}; +Recombine Surface{11}; + +fuel_surfaces[] = {9}; +moder_surfaces[] = {11}; +fuel_tops[] = {1}; +fuel_bottoms[] = {5}; +moder_bottoms[] = {4}; +moder_tops[] = {2}; +For xindex In {1:num_segments-1} +new_f_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{9}; } +}; +fuel_surfaces += new_f_surface; +new_m_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{11}; } +}; +moder_surfaces += new_m_surface; +fuel_tops += {13 + (xindex - 1) * 8}; +moder_tops += {17 + (xindex - 1) * 8}; +fuel_bottoms += {15 + (xindex - 1) * 8}; +moder_bottoms += {19 + (xindex - 1) * 8}; +EndFor // xindex + +Physical Surface("fuel") = { fuel_surfaces[] }; +Physical Surface("moder") = { moder_surfaces[] }; +Physical Line("fuel_tops") = { fuel_tops[] }; +Physical Line("moder_tops") = { moder_tops[] }; +Physical Line("fuel_bottoms") = { fuel_bottoms[] }; +Physical Line("moder_bottoms") = { moder_bottoms[] }; +Physical Line("outer_wall") = { 18 + 8 * (num_segments - 2) }; diff --git a/problems/constant_inlet_outlet_temp/auto_diff_rho.i b/problems/constant_inlet_outlet_temp/auto_diff_rho.i new file mode 100644 index 000000000..10181c8c3 --- /dev/null +++ b/problems/constant_inlet_outlet_temp/auto_diff_rho.i @@ -0,0 +1,353 @@ +flow_velocity=21.7 # cm/s. See MSRE-properties.ods +nt_scale=1e13 +ini_temp=922 +diri_temp=922 + +[GlobalParams] + num_groups = 2 + num_precursor_groups = 6 + use_exp_form = false + group_fluxes = 'group1 group2' + temperature = temp + sss2_input = false + pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6' + account_delayed = true + gamma = .0144 # Cammi .0144 + nt_scale = ${nt_scale} +[] + +[Mesh] + file = '2d_lattice_structured.msh' +[] + +[Problem] + coord_type = RZ +[] + +[Variables] + [./group1] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./group2] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./temp] + initial_condition = ${ini_temp} + scaling = 1e-4 + [../] +[] + +[AuxVariables] + [./power_density] + order = CONSTANT + family = MONOMIAL + [../] +[] + +[PrecursorKernel] + [./pres] + var_name_base = pre + block = 'fuel' + outlet_boundaries = 'fuel_tops' + u_def = 0 + v_def = ${flow_velocity} + w_def = 0 + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + # jac_test = true + [../] +[] + +[Kernels] + # Neutronics + [./time_group1] + type = NtTimeDerivative + variable = group1 + group_number = 1 + [../] + [./diff_group1] + type = GroupDiffusion + variable = group1 + group_number = 1 + [../] + [./sigma_r_group1] + type = SigmaR + variable = group1 + group_number = 1 + [../] + [./fission_source_group1] + type = CoupledFissionKernel + variable = group1 + group_number = 1 + [../] + [./delayed_group1] + type = DelayedNeutronSource + variable = group1 + [../] + [./inscatter_group1] + type = InScatter + variable = group1 + group_number = 1 + [../] + [./diff_group2] + type = GroupDiffusion + variable = group2 + group_number = 2 + [../] + [./sigma_r_group2] + type = SigmaR + variable = group2 + group_number = 2 + [../] + [./time_group2] + type = NtTimeDerivative + variable = group2 + group_number = 2 + [../] + [./fission_source_group2] + type = CoupledFissionKernel + variable = group2 + group_number = 2 + [../] + [./inscatter_group2] + type = InScatter + variable = group2 + group_number = 2 + [../] + + # Temperature + [./temp_time_derivative] + type = MatINSTemperatureTimeDerivative + variable = temp + [../] + [./temp_source_fuel] + type = TransientFissionHeatSource + variable = temp + block = 'fuel' + [../] + [./temp_source_mod] + type = GammaHeatSource + variable = temp + block = 'moder' + average_fission_heat = 'average_fission_heat' + [../] + [./temp_diffusion] + type = MatDiffusion + D_name = 'k' + variable = temp + [../] + [./temp_advection_fuel] + type = ConservativeTemperatureAdvection + velocity = '0 ${flow_velocity} 0' + variable = temp + block = 'fuel' + [../] +[] + +[BCs] + [./vacuum_group1] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group1 + [../] + [./vacuum_group2] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group2 + [../] + [./temp_diri_cg] + boundary = 'moder_bottoms fuel_bottoms outer_wall' + type = FlexiblePostprocessorDirichletBC + postprocessor = coreEndTemp + offset = -50 + variable = temp + [../] + # [./temp_diri_cg] + # boundary = 'moder_bottoms fuel_bottoms outer_wall' + # type = FunctionDirichletBC + # function = 'temp_bc_func' + # variable = temp + # [../] + [./temp_advection_outlet] + boundary = 'fuel_tops' + type = TemperatureOutflowBC + variable = temp + velocity = '0 ${flow_velocity} 0' + [../] +[] + +[AuxKernels] + [./fuel] + block = 'fuel' + type = FissionHeatSourceTransientAux + variable = power_density + [../] + [./moderator] + block = 'moder' + type = ModeratorHeatSourceTransientAux + average_fission_heat = 'average_fission_heat' + variable = power_density + [../] +[] + +[Functions] + [./temp_bc_func] + type = ParsedFunction + value = '${ini_temp} - (${ini_temp} - ${diri_temp}) * tanh(t/1e-2)' + [../] +[] + +[Materials] + [./fuel] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_fuel_' + interp_type = 'spline' + block = 'fuel' + prop_names = 'k cp' + prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_fuel] + type = DerivativeParsedMaterial + f_name = rho + function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'fuel' + [../] + [./moder] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_mod_' + interp_type = 'spline' + prop_names = 'k cp' + prop_values = '.312 1760' # Cammi 2011 at 908 K + block = 'moder' + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_moder] + type = DerivativeParsedMaterial + f_name = rho + function = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'moder' + [../] +[] + +[Executioner] + type = Transient + end_time = 10000 + + nl_rel_tol = 1e-6 + nl_abs_tol = 6e-6 + + solve_type = 'PJFNK' + line_search = none + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + + nl_max_its = 30 + l_max_its = 100 + + dtmin = 1e-5 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Postprocessors] + [./group1_current] + type = IntegralNewVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./group1_old] + type = IntegralOldVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./multiplication] + type = DivisionPostprocessor + value1 = group1_current + value2 = group1_old + outputs = 'console csv' + [../] + [./temp_fuel] + type = ElementAverageValue + variable = temp + block = 'fuel' + outputs = 'csv console' + [../] + [./temp_moder] + type = ElementAverageValue + variable = temp + block = 'moder' + outputs = 'csv console' + [../] + [./average_fission_heat] + type = AverageFissionHeat + execute_on = 'linear nonlinear' + outputs = 'csv console' + block = 'fuel' + [../] + [./coreEndTemp] + type = SideAverageValue + variable = temp + boundary = 'fuel_tops' + outputs = 'csv console' + execute_on = 'linear nonlinear' + [../] +[] + +[Outputs] + print_perf_log = true + print_linear_residuals = true + csv = true + exodus = true +[] + +[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/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/2d_lattice_structured.geo b/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/2d_lattice_structured.geo new file mode 100644 index 000000000..adde7c12e --- /dev/null +++ b/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/2d_lattice_structured.geo @@ -0,0 +1,78 @@ +Geometry.CopyMeshingMethod = 1; +R = 72.5; +H = 153; +num_segments = 14; +pitch = R / num_segments; +x = .237952211; +fuel_rad = x * pitch; +graph_rad = pitch; +lc = 1; +lx = .4; +ly = 10; + +Point(1) = {0, 0, 0, lc}; +Point(2) = {fuel_rad, 0, 0, lc}; +Point(3) = {graph_rad, 0, 0, lc}; +Point(4) = {0, H, 0, lc}; +Point(5) = {fuel_rad, H, 0, lc}; +Point(6) = {graph_rad, H, 0, lc}; +// fuel top +Line(1) = {4, 5}; +// graph top +Line(2) = {5, 6}; +// graph right edge +Line(3) = {6, 3}; +// graph bottom +Line(4) = {3, 2}; +// fuel bottom +Line(5) = {1, 2}; +// fuel-graph interface +Line(6) = {2, 5}; +// fuel left edge +Line(7) = {4, 1}; + +// Fuel +Line Loop(8) = {1, -6, -5, -7}; +Plane Surface(9) = {8}; + +// Moderator +Line Loop(10) = {2, 3, 4, 6}; +Plane Surface(11) = {10}; + +// Structured +Transfinite Line{1, 5} = fuel_rad/lx; +Transfinite Line{2, 4} = (graph_rad - fuel_rad)/lx; +Transfinite Line{3, 6, 7} = H/ly; +Transfinite Surface{9}; +Transfinite Surface{11}; +Recombine Surface{9}; +Recombine Surface{11}; + +fuel_surfaces[] = {9}; +moder_surfaces[] = {11}; +fuel_tops[] = {1}; +fuel_bottoms[] = {5}; +moder_bottoms[] = {4}; +moder_tops[] = {2}; +For xindex In {1:num_segments-1} +new_f_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{9}; } +}; +fuel_surfaces += new_f_surface; +new_m_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{11}; } +}; +moder_surfaces += new_m_surface; +fuel_tops += {13 + (xindex - 1) * 8}; +moder_tops += {17 + (xindex - 1) * 8}; +fuel_bottoms += {15 + (xindex - 1) * 8}; +moder_bottoms += {19 + (xindex - 1) * 8}; +EndFor // xindex + +Physical Surface("fuel") = { fuel_surfaces[] }; +Physical Surface("moder") = { moder_surfaces[] }; +Physical Line("fuel_tops") = { fuel_tops[] }; +Physical Line("moder_tops") = { moder_tops[] }; +Physical Line("fuel_bottoms") = { fuel_bottoms[] }; +Physical Line("moder_bottoms") = { moder_bottoms[] }; +Physical Line("outer_wall") = { 18 + 8 * (num_segments - 2) }; diff --git a/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/auto_diff_rho.i b/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/auto_diff_rho.i new file mode 100644 index 000000000..bb3a38156 --- /dev/null +++ b/problems/constant_inlet_outlet_temp_no_heat_flux_at_walls/auto_diff_rho.i @@ -0,0 +1,368 @@ +flow_velocity=21.7 # cm/s. See MSRE-properties.ods +nt_scale=1e13 +ini_temp=922 +diri_temp=922 + +[GlobalParams] + num_groups = 2 + num_precursor_groups = 6 + use_exp_form = false + group_fluxes = 'group1 group2' + temperature = temp + sss2_input = false + pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6' + account_delayed = true + gamma = .0144 # Cammi .0144 + nt_scale = ${nt_scale} +[] + +[Mesh] + file = '2d_lattice_structured.msh' +[] + +[Problem] + coord_type = RZ +[] + +[Variables] + [./group1] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./group2] + order = FIRST + family = LAGRANGE + initial_condition = 1 + scaling = 1e4 + [../] + [./temp] + initial_condition = ${ini_temp} + scaling = 1e-4 + [../] +[] + +[AuxVariables] + [./power_density] + order = CONSTANT + family = MONOMIAL + [../] +[] + +[PrecursorKernel] + [./pres] + var_name_base = pre + block = 'fuel' + outlet_boundaries = 'fuel_tops' + u_def = 0 + v_def = ${flow_velocity} + w_def = 0 + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + # jac_test = true + [../] +[] + +[Kernels] + # Neutronics + [./time_group1] + type = NtTimeDerivative + variable = group1 + group_number = 1 + [../] + [./diff_group1] + type = GroupDiffusion + variable = group1 + group_number = 1 + [../] + [./sigma_r_group1] + type = SigmaR + variable = group1 + group_number = 1 + [../] + [./fission_source_group1] + type = CoupledFissionKernel + variable = group1 + group_number = 1 + [../] + [./delayed_group1] + type = DelayedNeutronSource + variable = group1 + [../] + [./inscatter_group1] + type = InScatter + variable = group1 + group_number = 1 + [../] + [./diff_group2] + type = GroupDiffusion + variable = group2 + group_number = 2 + [../] + [./sigma_r_group2] + type = SigmaR + variable = group2 + group_number = 2 + [../] + [./time_group2] + type = NtTimeDerivative + variable = group2 + group_number = 2 + [../] + [./fission_source_group2] + type = CoupledFissionKernel + variable = group2 + group_number = 2 + [../] + [./inscatter_group2] + type = InScatter + variable = group2 + group_number = 2 + [../] + + # Temperature + [./temp_time_derivative] + type = MatINSTemperatureTimeDerivative + variable = temp + [../] + [./temp_source_fuel] + type = TransientFissionHeatSource + variable = temp + block = 'fuel' + [../] + [./temp_source_mod] + type = GammaHeatSource + variable = temp + block = 'moder' + average_fission_heat = 'average_fission_heat' + [../] + [./temp_diffusion] + type = MatDiffusion + D_name = 'k' + variable = temp + [../] + [./temp_advection_fuel] + type = ConservativeTemperatureAdvection + velocity = '0 ${flow_velocity} 0' + variable = temp + block = 'fuel' + [../] +[] + +[BCs] + [./vacuum_group1] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group1 + [../] + [./vacuum_group2] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group2 + [../] + [./temp_diri_cg] + boundary = 'fuel_bottoms' + type = FlexiblePostprocessorDirichletBC + postprocessor = coreEndTemp + offset = -50 + variable = temp + [../] + # [./temp_diri_cg] + # boundary = 'moder_bottoms fuel_bottoms outer_wall' + # type = FunctionDirichletBC + # function = 'temp_bc_func' + # variable = temp + # [../] + [./temp_advection_outlet] + boundary = 'fuel_tops' + type = TemperatureOutflowBC + variable = temp + velocity = '0 ${flow_velocity} 0' + [../] +[] + +[AuxKernels] + [./fuel] + block = 'fuel' + type = FissionHeatSourceTransientAux + variable = power_density + [../] + [./moderator] + block = 'moder' + type = ModeratorHeatSourceTransientAux + average_fission_heat = 'average_fission_heat' + variable = power_density + [../] +[] + +[Functions] + [./temp_bc_func] + type = ParsedFunction + value = '${ini_temp} - (${ini_temp} - ${diri_temp}) * tanh(t/1e-2)' + [../] +[] + +[Materials] + [./fuel] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_fuel_' + interp_type = 'spline' + block = 'fuel' + prop_names = 'k cp' + prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_fuel] + type = DerivativeParsedMaterial + f_name = rho + function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'fuel' + [../] + [./moder] + type = GenericMoltresMaterial + property_tables_root = '../../property_file_dir/newt_msre_mod_' + interp_type = 'spline' + prop_names = 'k cp' + prop_values = '.312 1760' # Cammi 2011 at 908 K + block = 'moder' + peak_power_density = peak_power_density + controller_gain = 0 + [../] + [./rho_moder] + type = DerivativeParsedMaterial + f_name = rho + function = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'moder' + [../] +[] + +[Executioner] + type = Transient + end_time = 10000 + + nl_rel_tol = 1e-6 + nl_abs_tol = 6e-6 + + solve_type = 'PJFNK' + line_search = none + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + + nl_max_its = 30 + l_max_its = 100 + + dtmin = 1e-5 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Postprocessors] + [./group1_current] + type = IntegralNewVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./group1_old] + type = IntegralOldVariablePostprocessor + variable = group1 + outputs = 'console csv' + [../] + [./multiplication] + type = DivisionPostprocessor + value1 = group1_current + value2 = group1_old + outputs = 'console csv' + [../] + [./temp_fuel] + type = ElementAverageValue + variable = temp + block = 'fuel' + outputs = 'csv console' + [../] + [./temp_moder] + type = ElementAverageValue + variable = temp + block = 'moder' + outputs = 'csv console' + [../] + [./average_fission_heat] + type = AverageFissionHeat + execute_on = 'linear nonlinear' + outputs = 'csv console' + block = 'fuel' + [../] + [./coreEndTemp] + type = SideAverageValue + variable = temp + boundary = 'fuel_tops' + outputs = 'csv console' + execute_on = 'linear nonlinear' + [../] +[] + +[VectorPostprocessors] + [./outlet_temps] + type = LineValueSampler + start_point = '0 153 0' + end_point = '72.5 153 0' + num_points = 1000 + variable = temp + sort_by = 'x' + outputs = 'csv' + [../] +[] + +[Outputs] + print_perf_log = true + print_linear_residuals = true + exodus = true + [./csv] + type = CSV + execute_on = 'final' + [../] +[] + +[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/problems/publication_level_cases/LOSCA/2d_lattice_structured.geo b/problems/publication_level_cases/LOSCA/2d_lattice_structured.geo new file mode 100644 index 000000000..099cb7228 --- /dev/null +++ b/problems/publication_level_cases/LOSCA/2d_lattice_structured.geo @@ -0,0 +1,78 @@ +Geometry.CopyMeshingMethod = 1; +R = 72.5; +H = 2*R + 6.75; +num_segments = 14; +pitch = R / num_segments; +x = .237952211; +fuel_rad = x * pitch; +graph_rad = pitch; +lc = 1; +lx = .4; +ly = 10; + +Point(1) = {0, 0, 0, lc}; +Point(2) = {fuel_rad, 0, 0, lc}; +Point(3) = {graph_rad, 0, 0, lc}; +Point(4) = {0, H, 0, lc}; +Point(5) = {fuel_rad, H, 0, lc}; +Point(6) = {graph_rad, H, 0, lc}; +// fuel top +Line(1) = {4, 5}; +// graph top +Line(2) = {5, 6}; +// graph right edge +Line(3) = {6, 3}; +// graph bottom +Line(4) = {3, 2}; +// fuel bottom +Line(5) = {1, 2}; +// fuel-graph interface +Line(6) = {2, 5}; +// fuel left edge +Line(7) = {4, 1}; + +// Fuel +Line Loop(8) = {1, -6, -5, -7}; +Plane Surface(9) = {8}; + +// Moderator +Line Loop(10) = {2, 3, 4, 6}; +Plane Surface(11) = {10}; + +// Structured +Transfinite Line{1, 5} = fuel_rad/lx; +Transfinite Line{2, 4} = (graph_rad - fuel_rad)/lx; +Transfinite Line{3, 6, 7} = H/ly; +Transfinite Surface{9}; +Transfinite Surface{11}; +Recombine Surface{9}; +Recombine Surface{11}; + +fuel_surfaces[] = {9}; +moder_surfaces[] = {11}; +fuel_tops[] = {1}; +fuel_bottoms[] = {5}; +moder_bottoms[] = {4}; +moder_tops[] = {2}; +For xindex In {1:num_segments-1} +new_f_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{9}; } +}; +fuel_surfaces += new_f_surface; +new_m_surface = Translate {xindex*pitch, 0, 0} { + Duplicata { Surface{11}; } +}; +moder_surfaces += new_m_surface; +fuel_tops += {13 + (xindex - 1) * 8}; +moder_tops += {17 + (xindex - 1) * 8}; +fuel_bottoms += {15 + (xindex - 1) * 8}; +moder_bottoms += {19 + (xindex - 1) * 8}; +EndFor // xindex + +Physical Surface("fuel") = { fuel_surfaces[] }; +Physical Surface("moder") = { moder_surfaces[] }; +Physical Line("fuel_tops") = { fuel_tops[] }; +Physical Line("moder_tops") = { moder_tops[] }; +Physical Line("fuel_bottoms") = { fuel_bottoms[] }; +Physical Line("moder_bottoms") = { moder_bottoms[] }; +Physical Line("outer_wall") = { 18 + 8 * (num_segments - 2) }; diff --git a/problems/publication_level_cases/HXFailPerfConduct/auto_diff_rho.i b/problems/publication_level_cases/LOSCA/HXFail/auto_diff_rho.i similarity index 90% rename from problems/publication_level_cases/HXFailPerfConduct/auto_diff_rho.i rename to problems/publication_level_cases/LOSCA/HXFail/auto_diff_rho.i index 5f49af935..b31fb74ef 100644 --- a/problems/publication_level_cases/HXFailPerfConduct/auto_diff_rho.i +++ b/problems/publication_level_cases/LOSCA/HXFail/auto_diff_rho.i @@ -54,6 +54,7 @@ diri_temp=922 nt_exp_form = false family = MONOMIAL order = CONSTANT + init_from_file = true [../] [] @@ -156,14 +157,8 @@ diri_temp=922 boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' variable = group2 [../] - [./temp_neu_cg] - boundary = 'moder_bottoms outer_wall' - type = PostprocessorDirichletBC - postprocessor = inlet_mean_temp - variable = temp - [../] [./fuel_bottoms_looped] - boundary = 'fuel_bottoms' + boundary = 'fuel_bottoms outer_wall' type = PostprocessorDirichletBC postprocessor = inlet_mean_temp variable = temp @@ -179,7 +174,7 @@ diri_temp=922 [Materials] [./fuel] type = GenericMoltresMaterial - property_tables_root = '../../../property_file_dir/newt_msre_fuel_' + property_tables_root = '../../../../property_file_dir/newt_msre_fuel_' interp_type = 'spline' block = 'fuel' prop_names = 'k cp' @@ -195,7 +190,7 @@ diri_temp=922 [../] [./moder] type = GenericMoltresMaterial - property_tables_root = '../../../property_file_dir/newt_msre_mod_' + property_tables_root = '../../../../property_file_dir/newt_msre_mod_' interp_type = 'spline' prop_names = 'k cp' prop_values = '.312 1760' # Cammi 2011 at 908 K @@ -213,20 +208,16 @@ diri_temp=922 [Executioner] type = Transient - end_time = 600 + end_time = 10000 - nl_rel_tol = 1e-5 + nl_rel_tol = 1e-6 nl_abs_tol = 1e-5 solve_type = 'PJFNK' - line_search = 'none' - petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' - # petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - # petsc_options_value = 'asm lu 1 preonly 1e-3' + petsc_options = '-pc_type' petsc_options_iname = '-pc_type' petsc_options_value = 'lu' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + line_search = 'none' nl_max_its = 30 l_max_its = 100 diff --git a/problems/publication_level_cases/HXFailPerfConduct/sub.i b/problems/publication_level_cases/LOSCA/HXFail/sub.i similarity index 83% rename from problems/publication_level_cases/HXFailPerfConduct/sub.i rename to problems/publication_level_cases/LOSCA/HXFail/sub.i index 19dc30509..050c106b4 100644 --- a/problems/publication_level_cases/HXFailPerfConduct/sub.i +++ b/problems/publication_level_cases/LOSCA/HXFail/sub.i @@ -38,7 +38,8 @@ diri_temp=922 w_def = 0 nt_exp_form = false family = MONOMIAL - order = FIRST + order = CONSTANT + init_from_file = true [../] [] @@ -86,7 +87,7 @@ diri_temp=922 type = DiracHX variable = temp point = '250 0 0' - power = 8e3 + power = 4e3 [../] [] @@ -94,10 +95,10 @@ diri_temp=922 [BCs] [./fuel_bottoms_looped] boundary = 'left' - type = PostprocessorTempInflowBC + type = PostprocessorTemperatureInflowBC postprocessor = coreEndTemp variable = temp - velocity = '${flow_velocity} 0 0' + uu = ${flow_velocity} [../] # [./diri] # boundary = 'left' @@ -132,7 +133,7 @@ diri_temp=922 [Materials] [./fuel] type = GenericMoltresMaterial - property_tables_root = '../../../property_file_dir/newt_msre_fuel_' + property_tables_root = '../../../../property_file_dir/newt_msre_fuel_' interp_type = 'spline' prop_names = 'k cp' prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K @@ -153,26 +154,25 @@ diri_temp=922 nl_rel_tol = 1e-6 nl_abs_tol = 1e-6 - 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 -pc_asm_overlap -sub_ksp_type -snes_linesearch_minlambda' - petsc_options_value = 'asm lu 1 preonly 1e-3' - # petsc_options_iname = '-snes_type' - # petsc_options_value = 'test' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' nl_max_its = 30 l_max_its = 100 - # dtmin = 1e-5 - # # dtmax = 1 - # # dt = 1e-3 - # [./TimeStepper] - # type = IterationAdaptiveDT - # dt = 1e-3 - # cutback_factor = 0.4 - # growth_factor = 1.2 - # optimal_iterations = 20 - # [../] + dtmin = 1e-5 + # dtmax = 1 + # dt = 1e-3 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] [] [Preconditioning] diff --git a/problems/publication_level_cases/LOSCA/README.md b/problems/publication_level_cases/LOSCA/README.md new file mode 100644 index 000000000..939cf9a8b --- /dev/null +++ b/problems/publication_level_cases/LOSCA/README.md @@ -0,0 +1,16 @@ +Simulates a loss of secondary cooling accident in 2D MSRE-like system. + - uses multiapp to simulate primary loop as 1D problem + - HX is a dirac kernel that removes heat + - dirac HX heat removal rate is controllable, so this is set through a function to simulate LOSCA + +# To simulate HX failure transient: + +1. Mesh the geo file: `gmsh -2 2d_lattice_structured.geo` + +2. Run the master input file `auto_diff_rho.i` in this directory: + `mpirun -np 8 moltres-opt -i auto_diff_rho.i` + +3. `cd` into the `HXFailure` directory and run the master input file + (same name: `auto_diff_rho.i`). This input file in HXFailure will look + in the above directory for the correct output files to kick the + simulation off on steady-state. diff --git a/problems/publication_level_cases/LOSCA/auto_diff_rho.i b/problems/publication_level_cases/LOSCA/auto_diff_rho.i new file mode 100644 index 000000000..25030262e --- /dev/null +++ b/problems/publication_level_cases/LOSCA/auto_diff_rho.i @@ -0,0 +1,318 @@ +flow_velocity=21.7 # cm/s. See MSRE-properties.ods +nt_scale=1e13 +ini_temp=922 +diri_temp=922 + +[GlobalParams] + num_groups = 2 + num_precursor_groups = 6 + use_exp_form = false + group_fluxes = 'group1 group2' + temperature = temp + sss2_input = false pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6' + account_delayed = true +[] + +[Mesh] + file = '2d_lattice_structured.msh' +[../] + +[Problem] + coord_type = RZ +[] + +[Variables] + [./group1] + order = FIRST + family = LAGRANGE + scaling = 1e4 + initial_condition = 1 + [../] + [./group2] + order = FIRST + family = LAGRANGE + scaling = 1e4 + initial_condition = 1 + [../] + [./temp] + scaling = 1e-4 + initial_condition = 930 + [../] +[] + +[PrecursorKernel] + [./core] + var_name_base = pre + block = 'fuel' + outlet_boundaries = 'fuel_tops' + u_def = 0 + v_def = ${flow_velocity} + w_def = 0 + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + [../] +[] + +[Kernels] + # Neutronics + [./time_group1] + type = NtTimeDerivative + variable = group1 + group_number = 1 + [../] + [./diff_group1] + type = GroupDiffusion + variable = group1 + group_number = 1 + [../] + [./sigma_r_group1] + type = SigmaR + variable = group1 + group_number = 1 + [../] + [./fission_source_group1] + type = CoupledFissionKernel + variable = group1 + group_number = 1 + [../] + [./delayed_group1] + type = DelayedNeutronSource + variable = group1 + [../] + [./inscatter_group1] + type = InScatter + variable = group1 + group_number = 1 + [../] + [./diff_group2] + type = GroupDiffusion + variable = group2 + group_number = 2 + [../] + [./sigma_r_group2] + type = SigmaR + variable = group2 + group_number = 2 + [../] + [./time_group2] + type = NtTimeDerivative + variable = group2 + group_number = 2 + [../] + [./fission_source_group2] + type = CoupledFissionKernel + variable = group2 + group_number = 2 + [../] + [./inscatter_group2] + type = InScatter + variable = group2 + group_number = 2 + [../] + + # Temperature + [./temp_time_derivative] + type = MatINSTemperatureTimeDerivative + variable = temp + [../] + [./temp_source_fuel] + type = TransientFissionHeatSource + variable = temp + nt_scale=${nt_scale} + block = 'fuel' + [../] + # [./temp_source_mod] + # type = GammaHeatSource + # variable = temp + # gamma = .0144 # Cammi .0144 + # block = 'moder' + # average_fission_heat = 'average_fission_heat' + # [../] + [./temp_diffusion] + type = MatDiffusion + D_name = 'k' + variable = temp + [../] + [./temp_advection_fuel] + type = ConservativeTemperatureAdvection + velocity = '0 ${flow_velocity} 0' + variable = temp + block = 'fuel' + [../] +[] + +[BCs] + [./vacuum_group1] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group1 + [../] + [./vacuum_group2] + type = VacuumConcBC + boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall' + variable = group2 + [../] + [./fuel_bottoms_looped] + boundary = 'fuel_bottoms outer_wall' + type = PostprocessorDirichletBC + postprocessor = inlet_mean_temp + variable = temp + [../] + [./temp_advection_outlet] + boundary = 'fuel_tops' + type = TemperatureOutflowBC + variable = temp + velocity = '0 ${flow_velocity} 0' + [../] +[] + +[Materials] + [./fuel] + type = GenericMoltresMaterial + property_tables_root = '../../../property_file_dir/newt_msre_fuel_' + interp_type = 'spline' + block = 'fuel' + prop_names = 'k cp' + prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K + [../] + [./rho_fuel] + type = DerivativeParsedMaterial + f_name = rho + function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'fuel' + [../] + [./moder] + type = GenericMoltresMaterial + property_tables_root = '../../../property_file_dir/newt_msre_mod_' + interp_type = 'spline' + prop_names = 'k cp' + prop_values = '.312 1760' # Cammi 2011 at 908 K + block = 'moder' + [../] + [./rho_moder] + type = DerivativeParsedMaterial + f_name = rho + function = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))' + args = 'temp' + derivative_order = 1 + block = 'moder' + [../] +[] + +[Executioner] + type = Transient + end_time = 10000 + + nl_rel_tol = 1e-5 + nl_abs_tol = 1e-5 + + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' + + nl_max_its = 30 + l_max_its = 100 + + dtmin = 1e-5 + # dtmax = 1 + # dt = 1e-3 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Postprocessors] + [./group1_current] + type = IntegralNewVariablePostprocessor + variable = group1 + outputs = 'console exodus' + [../] + [./group1_old] + type = IntegralOldVariablePostprocessor + variable = group1 + outputs = 'console exodus' + [../] + [./multiplication] + type = DivisionPostprocessor + value1 = group1_current + value2 = group1_old + outputs = 'console exodus' + [../] + [./temp_fuel] + type = ElementAverageValue + variable = temp + block = 'fuel' + outputs = 'exodus console' + [../] + [./coreEndTemp] + type = SideAverageValue + variable = temp + boundary = 'fuel_tops' + outputs = 'exodus console' + [../] + # MULTIAPP + [./inlet_mean_temp] + type = Receiver + initialize_old = true + execute_on = 'timestep_begin' + [../] +[] + +[Outputs] + print_perf_log = true + print_linear_residuals = true + [./exodus] + type = Exodus + file_base = 'auto_diff_rho' + execute_on = 'timestep_end' + [../] +[] + +[Debug] + show_var_residual_norms = true +[] + +[MultiApps] + [./loopApp] + type = TransientMultiApp + app_type = MoltresApp + execute_on = timestep_begin + positions = '100.0 100.0 0.0' + input_files = 'sub.i' + [../] +[] + +# connect inlet and outlet to multiapp +[Transfers] + [./from_loop] + type = MultiAppPostprocessorTransfer + multi_app = loopApp + from_postprocessor = loopEndTemp + to_postprocessor = inlet_mean_temp + direction = from_multiapp + reduction_type = maximum + [../] + [./to_loop] + type = MultiAppPostprocessorTransfer + multi_app = loopApp + from_postprocessor = coreEndTemp + to_postprocessor = coreEndTemp + direction = to_multiapp + [../] +[] diff --git a/problems/publication_level_cases/LOSCA/sub.i b/problems/publication_level_cases/LOSCA/sub.i new file mode 100644 index 000000000..d3a86b2f9 --- /dev/null +++ b/problems/publication_level_cases/LOSCA/sub.i @@ -0,0 +1,216 @@ +flow_velocity=21.7 # cm/s. See MSRE-properties.ods +nt_scale=1e13 +ini_temp=922 +diri_temp=922 + +[GlobalParams] + num_groups = 0 + num_precursor_groups = 6 + use_exp_form = false + group_fluxes = '' + temperature = temp + sss2_input = false + pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6' + # account_delayed = true +[] + +[Mesh] + type = GeneratedMesh + dim = 1 + nx = 600 + xmax = 500 + elem_type = EDGE2 +[../] + +[Variables] + [./temp] + initial_condition = 930 #approx steady outlet of other problem + scaling = 1e-4 + family = MONOMIAL + order = CONSTANT + [../] +[] + +[PrecursorKernel] + [./core] + var_name_base = pre + outlet_boundaries = 'right' + u_def = ${flow_velocity} + v_def = 0 + w_def = 0 + nt_exp_form = false + family = MONOMIAL + order = CONSTANT + [../] +[] + +[Kernels] + # Temperature + [./temp_time_derivative] + type = MatINSTemperatureTimeDerivative + variable = temp + [../] + # [./temp_source_fuel] + # type = TransientFissionHeatSource + # variable = temp + # nt_scale=${nt_scale} + # [../] + # [./temp_source_mod] + # type = GammaHeatSource + # variable = temp + # gamma = .0144 # Cammi .0144 + # block = 'moder' + # average_fission_heat = 'average_fission_heat' + # [../] + # [./temp_diffusion] + # type = MatDiffusion + # D_name = 'k' + # variable = temp + # [../] + # [./temp_advection_fuel] + # type = ConservativeTemperatureAdvection + # velocity = '${flow_velocity} 0 0' + # variable = temp + # [../] +[] + +[DGKernels] + [./temp_adv] + type = DGTemperatureAdvection + variable = temp + velocity = '${flow_velocity} 0 0' + [../] +[] + + +[DiracKernels] + [./heat_exchanger] + type = DiracHX + variable = temp + power = 4e3 # see controls + point = '250 0 0' + [../] +[] + + +[BCs] + [./fuel_bottoms_looped] + boundary = 'left' + type = PostprocessorTemperatureInflowBC + postprocessor = coreEndTemp + variable = temp + uu = ${flow_velocity} + [../] + # [./diri] + # boundary = 'left' + # type = DirichletBC + # variable = temp + # value = 930 + # [../] + [./temp_advection_outlet] + boundary = 'right' + type = TemperatureOutflowBC + variable = temp + velocity = '${flow_velocity} 0 0' + [../] +[] + +[Materials] + [./fuel] + type = GenericMoltresMaterial + property_tables_root = '../../../property_file_dir/newt_msre_fuel_' + interp_type = 'spline' + prop_names = 'k cp' + prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K + [../] + [./rho_fuel] + type = DerivativeParsedMaterial + f_name = rho + function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))' + args = 'temp' + derivative_order = 1 + [../] +[] + +[Executioner] + type = Transient + end_time = 10000 + + nl_rel_tol = 1e-6 + nl_abs_tol = 1e-6 + + solve_type = 'PJFNK' + petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor' + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + line_search = 'none' + + nl_max_its = 30 + l_max_its = 100 + + dtmin = 1e-5 + # dtmax = 1 + # dt = 1e-3 + [./TimeStepper] + type = IterationAdaptiveDT + dt = 1e-3 + cutback_factor = 0.4 + growth_factor = 1.2 + optimal_iterations = 20 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Postprocessors] + [./temp_fuel] + type = ElementAverageValue + variable = temp + outputs = 'exodus console' + [../] + [./loopEndTemp] + type = SideAverageValue + variable = temp + boundary = 'right' + [../] + [./coreEndTemp] + type = Receiver + [../] +[] + +[Outputs] + print_perf_log = true + print_linear_residuals = true + [./exodus] + type = Exodus + file_base = 'sub' + execute_on = 'timestep_begin' + [../] +[] + +[Debug] + show_var_residual_norms = true +[] + +# connect inlet and outlet to multiapp +# [Transfers] +# [./to_core] +# type = MultiAppPostprocessorTransfer +# multi_app = MoltresApp +# from_postprocessor = loopEndTemp +# to_postprocessor = inlet_mean_temp +# direction = to_multiapp +# [../] +# [./from_core] +# type = MultiAppPostprocessorTransfer +# multi_app = MoltresApp +# from_postprocessor = coreEndTemp +# to_postprocessor = coreEndTemp +# direction = to_multiapp +# [../] +# [] diff --git a/squirrel b/squirrel index ade9ff4f1..db4f6bbae 160000 --- a/squirrel +++ b/squirrel @@ -1 +1 @@ -Subproject commit ade9ff4f13dfbfb43acc512253ad79ebe583050a +Subproject commit db4f6bbaecdfbf99dc31a0e7e7df7f5643475eda diff --git a/tests/diracHX/sub.i b/tests/diracHX/sub.i index d7329abc3..59096a34c 100644 --- a/tests/diracHX/sub.i +++ b/tests/diracHX/sub.i @@ -102,7 +102,9 @@ diri_temp=922 boundary = 'left' type = TemperatureInflowBC variable = temp - velocity = '${flow_velocity} 0 0' + uu = ${flow_velocity} + vv = 0 + ww = 0 inlet_conc = 930 [../] [./temp_advection_outlet]