Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and improve MSFR input using multi-system #488

Open
wants to merge 9 commits into
base: devel
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion doc/content/msr/msfr/griffin_pgh_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
reactor:MSFR
geometry:core
simulation_type:multiphysics
input_features:multiapps;physics_syntax
input_features:multiapps;physics_syntax;multi_system
transient:steady_state;ULOF
V_and_V:demonstration
codes_used:BlueCrab;Griffin;Pronghorn;MOOSE_NavierStokes
Expand Down
4 changes: 2 additions & 2 deletions msr/msfr/steady/gold/run_ns_out.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
time,dT,max_v,total_fission_source,total_power,lambda
0,0,0,0,0,0
1,8.0022118056289,2.11563921499,63.033273173711,2999999199.1713,-1.6142430855352e-13
3,39.120841802076,2.0930985240354,63.033273173711,2999999199.1713,1.8852151426172e-13
2,23.911263351928,2.0616181188972,63.033273173711,2999999199.1713,2.0170763547067e-12
4,50.98597482476,2.0602959773526,63.033273173711,2999999199.1713,5.208356357055e-13
Binary file not shown.
Binary file modified msr/msfr/steady/restart/run_neutronics_restart.e
Binary file not shown.
Binary file removed msr/msfr/steady/restart/run_ns_coupled_restart.e
Binary file not shown.
8 changes: 2 additions & 6 deletions msr/msfr/steady/run_neutronics_base.i
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
## Molten Salt Fast Reactor - Euratom EVOL + Rosatom MARS Design ##
## Griffin Main Application input file base ##
## Griffin Main Application base input file ##
## Steady state neutronics model ##
## Neutron diffusion with delayed precursor source, no equivalence ##
################################################################################
Expand Down Expand Up @@ -46,11 +46,6 @@
order = CONSTANT
[]

[GlobalParams]
# No displacement modeled
# fixed_meshes = true
[]

################################################################################
# CROSS SECTIONS
################################################################################
Expand Down Expand Up @@ -130,4 +125,5 @@
print_linear_converged_reason = false
print_linear_residuals = false
print_nonlinear_converged_reason = false
hide = 'power_scaling'
[]
2 changes: 1 addition & 1 deletion msr/msfr/steady/run_neutronics_only.i
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
## Molten Salt Fast Reactor - Euratom EVOL + Rosatom MARS Design ##
## Griffin-only input file ##
## Griffin input file for decoupled calculations ##
## Steady state neutronics model ##
## Neutron diffusion with delayed precursor source, no equivalence ##
################################################################################
Expand Down
106 changes: 85 additions & 21 deletions msr/msfr/steady/run_ns.i
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ beta6 = 0.000184087
# Depending on the file chosen, the initialization of variables should be
# adjusted. The following variables can be initalized:
# - vel_x, vel_y, p from isothermal simulation
file = 'restart/run_ns_initial_restart.e'
# file = 'restart/run_ns_initial_restart.e'
# Below are initialization points created from this input file
# The variable IC should be set from_file_var for temperature and precursors
# - vel_x, vel_y, p, T_fluid, c_i from cosine heated simulation
# file = 'restart/run_ns_restart.e'
# - vel_x, vel_y, p, T_fluid, c_i from coupled multiphysics simulation
# file = 'restart/run_ns_coupled_restart.e'
file = 'restart/run_neutronics_out_ns0_restart.e'
[]
[hx_top]
type = ParsedGenerateSideset
Expand Down Expand Up @@ -109,9 +109,12 @@ beta6 = 0.000184087
# EQUATIONS: VARIABLES, KERNELS, BOUNDARY CONDITIONS
################################################################################

scalar_systems = 'prec1 prec2 prec3 prec4 prec5 prec6'

[Problem]
# velocity, pressure restarted, precursors are not
allow_initial_conditions_with_restart = true
nl_sys_names = 'nl0 ${scalar_systems}'
[]

[Physics]
Expand All @@ -125,6 +128,7 @@ beta6 = 0.000184087
# Variables, defined below for the Exodus restart
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
solve_for_dynamic_pressure = true

# Material properties
density = ${rho}
Expand All @@ -143,9 +147,12 @@ beta6 = 0.000184087
# Pressure pin for incompressible flow
pin_pressure = true
pinned_pressure_type = average
pinned_pressure_value = 1e5
# pressure pin for dynamic pressure: 0
# pressure pin for total pressure: 1e5
pinned_pressure_value = 0

# Numerical scheme
# time_derivative_contributes_to_RC_coefficients = false
momentum_advection_interpolation = 'upwind'
mass_advection_interpolation = 'upwind'

Expand Down Expand Up @@ -175,10 +182,12 @@ beta6 = 0.000184087
ambient_convection_blocks = 'hx'
ambient_convection_alpha = '${fparse 600 * 20e3}' # HX specifications
ambient_temperature = ${T_HX}

# Numerical parameters
energy_scaling = 100
[]
[ScalarTransport/salt]
block = 'fuel pump hx'
passive_scalar_advection_interpolation = 'upwind'

# Precursor advection, diffusion and source term
passive_scalar_names = 'c1 c2 c3 c4 c5 c6'
Expand All @@ -187,6 +196,10 @@ beta6 = 0.000184087
passive_scalar_coupled_source_coeff = '${beta1} ${lambda1_m}; ${beta2} ${lambda2_m};
${beta3} ${lambda3_m}; ${beta4} ${lambda4_m};
${beta5} ${lambda5_m}; ${beta6} ${lambda6_m}'

# Numerical parameters
passive_scalar_advection_interpolation = 'upwind'
system_names = '${scalar_systems}'
[]
[Turbulence/salt]
block = 'fuel pump hx'
Expand All @@ -197,7 +210,7 @@ beta6 = 0.000184087
# Turbulence parameters
turbulence_handling = 'mixing-length'
turbulent_prandtl = ${Pr_t}
passive_scalar_schmidt_number = '${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t}'
Sc_t = '${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t} ${Sc_t}'
von_karman_const = ${von_karman_const}
mixing_length_delta = 0.1
mixing_length_walls = 'shield_wall reflector_wall'
Expand Down Expand Up @@ -326,8 +339,8 @@ beta6 = 0.000184087
[Functions]
[dts]
type = PiecewiseConstant
x = '0 100'
y = '0.75 2.5'
x = '0 10 100'
y = '2 4 5'
[]
[]

Expand All @@ -336,23 +349,23 @@ beta6 = 0.000184087

# Time stepping parameters
start_time = 0.0
end_time = 200
end_time = 50
# end_time will depend on the restart file chosen
# though steady state detection can also be used
# from _initial/no heating : 150 - 200s enough
# from _ns/_ns_coupled/heated: 10s enough

[TimeStepper]
# This time stepper makes the time step grow exponentially
# It can only be used with proper initialization
type = IterationAdaptiveDT
dt = 1 # chosen to obtain convergence with first coupled iteration
growth_factor = 2
[]
# [TimeStepper]
# type = FunctionDT
# function = dts
# # This time stepper makes the time step grow exponentially
# # It can only be used with proper initialization
# type = IterationAdaptiveDT
# dt = 1 # chosen to obtain convergence with first coupled iteration
# growth_factor = 2
# []
[TimeStepper]
type = FunctionDT
function = dts
[]
steady_state_detection = true
steady_state_tolerance = 1e-8
steady_state_start_time = 10
Expand All @@ -362,17 +375,68 @@ beta6 = 0.000184087

# Solver parameters
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 50'
line_search = 'none'

nl_rel_tol = 1e-9
# nonlinear solver parameters
nl_rel_tol = 2e-8
nl_abs_tol = 2e-8
nl_abs_div_tol = 1e11
nl_max_its = 15

# linear solver parameters
l_max_its = 50

automatic_scaling = true
# resid_vs_jac_scaling_param = 1
[]

# Try a direct solve. The precursor advection problem should be linear
petsc_options_iname_prec = '-pc_type -pc_factor_shift_type'
petsc_options_value_prec = 'lu NONZERO'

[Preconditioning]
[flow]
type = SMP
full = true
nl_sys = "nl0"
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
[]
[scalar1]
type = SMP
nl_sys = "prec1"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[scalar2]
type = SMP
nl_sys = "prec2"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[scalar3]
type = SMP
nl_sys = "prec3"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[scalar4]
type = SMP
nl_sys = "prec4"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[scalar5]
type = SMP
nl_sys = "prec5"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[scalar6]
type = SMP
nl_sys = "prec6"
petsc_options_iname = ${petsc_options_iname_prec}
petsc_options_value = ${petsc_options_value_prec}
[]
[]

################################################################################
Expand Down
7 changes: 5 additions & 2 deletions msr/msfr/steady/run_ns_initial.i
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ pump_force = -20000. # [N / m^3]

# Solver parameters
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 50'
# MUMPS default package is having issues in parallel
# petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_gmres_restart'
# petsc_options_value = 'lu NONZERO 50'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-6
Expand Down
7 changes: 4 additions & 3 deletions msr/msfr/steady/tests
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
executable_pattern = 'blue_crab*|fenix*'
cli_args = "Mesh/uniform_refine=0 Executioner/nl_abs_tol=1e-6 Executioner/fixed_point_max_its=2 "
"Executioner/accept_on_max_fixed_point_iteration=true "
"Outputs/file_base=multiphysics_out MSRNeutronicsFluidCoupling/fluid_cli_args='Executioner/num_steps=2'"
"Outputs/file_base=multiphysics_out MSRNeutronicsFluidCoupling/fluid_cli_args='Executioner/num_steps=2'
Outputs/hide=''"
# Fuel temperature is out of bounds for MGXS
allow_warnings = true
min_parallel = 8
Expand All @@ -47,9 +48,9 @@
prereq = neutronics_only_syntax
type = CSVDiff
input = 'run_neutronics_only.i'
csvdiff = run_neutronics_out.csv
csvdiff = run_neutronics_only_out.csv
executable_pattern = 'griffin*|blue_crab*|dire_wolf*|fenix*'
cli_args = "Executioner/nl_abs_tol=1 Outputs/file_base=run_neutronics_out"
cli_args = "Executioner/nl_abs_tol=1 Outputs/hide=''"
# Fuel temperature is out of bounds for MGXS
allow_warnings = true
[]
Expand Down
2 changes: 1 addition & 1 deletion msr/msfr/thermochemistry/thermo.i
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[restart]
type = FileMeshGenerator
use_for_exodus_restart = true
file = '../steady/restart/run_ns_coupled_restart.e'
file = '../steady/restart/run_neutronics_out_ns0_restart.e'
[]
[extraction]
type = ParsedGenerateSideset
Expand Down
8 changes: 4 additions & 4 deletions msr/msfr/transient/gold/multiphysics_out.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
time,power
0,2999942001.1213
0.25,2999940971.5066
0.375,2999534962.4532
time,total_power
0,3000000000
0.25,2999999608.6987
0.5,2999998895.6928
9 changes: 4 additions & 5 deletions msr/msfr/transient/gold/multiphysics_out_ns0.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time,dT,max_v,mdot,pump,total_fission_source,total_power,lambda
0,0,0,0,0,0,0,0
0.25,97.456561473038,2.0331713610724,19224.032911125,1,63.234417274834,2999910776.3276,-4.6775001612257e-14
0.375,97.434427595338,2.0333688082816,19222.316941561,1,63.234417274834,2999910776.3276,2.3349204967592e-14
0.375,97.434427074894,2.0333688079605,19222.316939046,1,63.225856915016,2999909746.7137,2.6772316080812e-13
time,dT,max_v,mdot,p_drop,pump,total_fission_source,total_power,lambda
0,0,2.0256344243068,0,-6965.8333264474,1,63.242544832291,2999968739.9724,0
0.25,97.567901304402,2.0259006516623,19229.81343812,-6972.5378516897,1,63.242545075603,2999968739.972,1.895118972607e-12
0.5,97.567763374176,2.0256954893142,19228.72336278,-6972.8360588559,1,63.24253683538,2999968348.6604,-6.1807877430368e-15
4 changes: 4 additions & 0 deletions msr/msfr/transient/gold/run_neutronics_only_out.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
time,total_power
0,3000000000
1,2990349099.9243
2,2990349099.9243
4 changes: 0 additions & 4 deletions msr/msfr/transient/gold/run_neutronics_out.csv

This file was deleted.

8 changes: 4 additions & 4 deletions msr/msfr/transient/gold/run_ns_out.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
time,dT,max_v,mdot,pump,total_fission_source,total_power,lambda
0,0,0,0,0,0,0,0
0.25,97.456562045785,2.0331714072906,19224.033374083,1,62.95369318597,2999968774.6072,2.6472935626393e-14
0.375,97.434428793294,2.033368885555,19222.317737993,1,62.95369318597,2999968774.6072,8.0752577583284e-14
time,dT,max_v,mdot,p_drop,pump,total_fission_source,total_power,lambda
0,0,2.0256344243068,0,-6965.8333264474,1,63.242544832291,2999968739.9724,0
0.25,97.567901304246,2.0259006516694,19229.813438148,-6972.5378516531,1,63.242544832291,2999968739.9724,4.0226890061244e-13
0.5,97.567763338336,2.0256954897433,19228.723366883,-6972.8360553993,1,63.242544832291,2999968739.9724,-5.479707121085e-13
29 changes: 11 additions & 18 deletions msr/msfr/transient/run_neutronics_base.i
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
## Molten Salt Fast Reactor - Euratom EVOL + Rosatom MARS Design ##
## Griffin Main Application base input file ##
## Griffin Main Application base input file ##
## Transient neutronics model ##
## Neutron diffusion with delayed precursor source, no equivalence ##
################################################################################
Expand Down Expand Up @@ -45,11 +45,19 @@
allow_initial_conditions_with_restart = true
[]

[PowerDensity]
power = 3e9
power_density_variable = power_density
power_scaling_postprocessor = power_scaling
family = MONOMIAL
order = CONSTANT
[]

[AuxVariables]
[power_density]
order = CONSTANT
family = MONOMIAL
# no need to initalize, initialized by auxkernels
# no need to initialize, initialized by auxkernels
# initial_from_file_var = 'power_density'
block = 'fuel pump hx'
[]
Expand Down Expand Up @@ -163,20 +171,5 @@
print_linear_converged_reason = false
print_linear_residuals = false
print_nonlinear_converged_reason = false
hide = 'dnp'
[]

[Postprocessors]
[power_scaling]
type = Receiver
outputs = none
default = 4.1682608293957647e+18
[]
[power]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_begin timestep_end'
outputs = all
block = 'fuel pump hx'
[]
hide = 'dnp power_scaling'
[]
Loading