Skip to content

Commit

Permalink
Add input file for msre steady state. Rename nts file. Set up coastdo…
Browse files Browse the repository at this point in the history
…wn velocity. Delete msre-static-no-prec.
  • Loading branch information
smpark7 committed Feb 4, 2022
1 parent ca3b90f commit a92b524
Show file tree
Hide file tree
Showing 7 changed files with 433 additions and 239 deletions.
48 changes: 21 additions & 27 deletions problems/2022-msre-transients/msre-coastdown-flow.i
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[Mesh]
[./mesh]
type = FileMeshGenerator
file = 'mesh-coarse.e'
file = 'msre-steady-state-flow_exodus.e'
use_for_exodus_restart = true
[]
[]

Expand All @@ -37,6 +38,7 @@
is_loopapp = false
inlet_boundaries = 'fuel_bottom'
block = 0
init_from_file = true
[../]
[]

Expand All @@ -58,19 +60,27 @@
family = LAGRANGE
order = FIRST
block = 0
initial_from_file_var = vel_x
initial_from_file_timestep = LATEST
[]
[./vel_y]
family = LAGRANGE
order = FIRST
block = 0
initial_from_file_var = vel_y
initial_from_file_timestep = LATEST
[]
[./group1]
family = LAGRANGE
order = FIRST
initial_from_file_var = group1
initial_from_file_timestep = LATEST
[]
[./group2]
family = LAGRANGE
order = FIRST
initial_from_file_var = group2
initial_from_file_timestep = LATEST
[]
[]

Expand All @@ -85,11 +95,6 @@
variable = p
block = 0
[]
# [./momentum_time]
# type = INSADMomentumTimeDerivative
# variable = vel
# block = 0
# []
[./momentum_advection]
type = INSADMomentumAdvection
variable = vel
Expand Down Expand Up @@ -128,8 +133,7 @@
[Functions]
[./vel_func]
type = ParsedFunction
value = '21.45'
# value = '21.45 * 0.01 * (41.55445426051471 * t^3 * exp(- 1.191429363538613 * t) + 153.9202791221457 * t^2 * exp(- 1.7549341949958999 * t)+ 109.09101346038737 * t * exp(- 1.7445792842120031 * t)+ 30.185886583872634 * exp(- 0.13241539751519363 * t) + 71.9467100180103 * exp(- 1.652095283444389 * t) - 2.1234830203699615)'
value = 'if(t<20.0, 21.45 * 0.01 * (41.55445426051471 * t^3 * exp(- 1.191429363538613 * t) + 153.9202791221457 * t^2 * exp(- 1.7549341949958999 * t)+ 109.09101346038737 * t * exp(- 1.7445792842120031 * t)+ 30.185886583872634 * exp(- 0.13241539751519363 * t) + 71.9467100180103 * exp(- 1.652095283444389 * t) - 2.1234830203699615), 1e-14)'
[]
[]

Expand Down Expand Up @@ -186,14 +190,18 @@

[Executioner]
type = Transient
end_time = 2000
scheme = bdf2
end_time = 70

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_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'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'

nl_abs_tol = 1e-8
l_tol = 1e-5
line_search = none
automatic_scaling = true
compute_scaling_once = false
Expand All @@ -203,21 +211,7 @@
fixed_point_abs_tol = 1e-7
fixed_point_max_its = 5

# dt = 1
dtmin = 1
dtmax = 20
steady_state_detection = true
steady_state_tolerance = 1e-12
steady_state_start_time = 100
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1
cutback_factor = .5
growth_factor = 1.5
optimal_iterations = 1000
iteration_window = 4
linear_iteration_ratio = 1000
[../]
dt = 1
[]

[Preconditioning]
Expand Down Expand Up @@ -249,7 +243,7 @@
app_type = MoltresApp
execute_on = timestep_end
positions = '0 0 0'
input_files = 'msre-coastdown-nts.i'
input_files = 'msre-transient-nts.i'
[]
[]

Expand Down
45 changes: 22 additions & 23 deletions problems/2022-msre-transients/msre-coastdown-loop.i
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,39 @@
[]

[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 350
elem_type = EDGE2
[./mesh]
type = FileMeshGenerator
file = 'msre-steady-state-flow_out_loopApp0_out.e'
use_for_exodus_restart = true
[]
[../]

[Precursors]
[./core]
var_name_base = pre
outlet_boundaries = 'right'
u_def = 21.45
v_def = 0
w_def = 0
constant_velocity_values = false
u_func = vel_func
v_func = 0
w_func = 0
nt_exp_form = false
family = MONOMIAL
order = CONSTANT
loop_precursors = true
multi_app = loopApp
is_loopapp = true
inlet_boundaries = 'left'
init_from_file = true
[../]
[]

[Functions]
[./vel_func]
type = ParsedFunction
value = 'if(t<20.0, 21.45 * 0.01 * (41.55445426051471 * t^3 * exp(- 1.191429363538613 * t) + 153.9202791221457 * t^2 * exp(- 1.7549341949958999 * t)+ 109.09101346038737 * t * exp(- 1.7445792842120031 * t)+ 30.185886583872634 * exp(- 0.13241539751519363 * t) + 71.9467100180103 * exp(- 1.652095283444389 * t) - 2.1234830203699615), 1e-14)'
[]
[]

[Materials]
[./fuel_nts]
type = MoltresJsonMaterial
Expand All @@ -45,13 +54,14 @@

[Executioner]
type = Transient
end_time = 2000
scheme = bdf2
end_time = 70
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
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'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_max_its = 20
l_max_its = 50
Expand All @@ -60,18 +70,7 @@
compute_scaling_once = false
resid_vs_jac_scaling_param = 0.1

# dt = 1
dtmin = 1
dtmax = 20
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1
cutback_factor = .5
growth_factor = 1.5
optimal_iterations = 1000
iteration_window = 4
linear_iteration_ratio = 1000
[../]
dt = 1
[]

[Preconditioning]
Expand Down
181 changes: 0 additions & 181 deletions problems/2022-msre-transients/msre-coastdown-nts.i

This file was deleted.

Loading

0 comments on commit a92b524

Please sign in to comment.