Skip to content

Commit

Permalink
Merge pull request #245 from smpark7/fix-dep-code
Browse files Browse the repository at this point in the history
Replace deprecated code
  • Loading branch information
yardasol authored Sep 14, 2023
2 parents 2b36546 + 4aafa25 commit 8eb20d6
Show file tree
Hide file tree
Showing 56 changed files with 2,514 additions and 2,544 deletions.
4 changes: 2 additions & 2 deletions doc/content/getting_started/input_syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ are represented below, followed by the input required to construct these equatio
In the `group1` and `group2` neutron flux equations below and in the input that
follows, notice that the fission kernel (`CoupledFissionEigenKernel`)
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 `DelayedNeutronEigenSource`
since there is no fuel in the moderator region. Also, the `DelayedNeutronSource`
kernel, which contributes neutrons from the precursor group equations, is only
included as part of the `group1` or fast group equation.

Expand Down Expand Up @@ -359,7 +359,7 @@ included as part of the `group1` or fast group equation.
block = '0'
[]
[delayed_group1]
type = DelayedNeutronEigenSource
type = DelayedNeutronSource
variable = group1
block = '0'
group_number = 1
Expand Down
3 changes: 1 addition & 2 deletions include/base/MoltresApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ class MoltresApp : public MooseApp
virtual ~MoltresApp();

static void registerApps();
static void registerAll(Factory & factory, ActionFactory & action_factory, Syntax & syntax);
static void associateSyntax(Syntax & syntax, ActionFactory & action_factory);
static void registerAll(Factory & f, ActionFactory & af, Syntax & s);
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
flow_velocity=21.7 # cm/s. See MSRE-properties.ods
nt_scale=1e13
ini_temp=922
diri_temp=922
flow_velocity = 21.7 # cm/s. See MSRE-properties.ods
nt_scale = 1e13
ini_temp = 922
diri_temp = 922

[GlobalParams]
num_groups = 2
Expand All @@ -17,38 +17,37 @@ diri_temp=922
[Mesh]
file = '2d_lattice_structured.msh'
# file = '2d_lattice_structured_jac.msh'
[../]
[]

[MeshModifiers]
[./scale]
[scale]
type = Transform
transform = SCALE
vector_value = '1 1 1'
[../]
[]
[]


[Problem]
coord_type = RZ
[]

[Variables]
[./group1]
[group1]
order = FIRST
family = LAGRANGE
initial_condition = 1
# scaling = 1e4
[../]
[./group2]
[]
[group2]
order = FIRST
family = LAGRANGE
initial_condition = 1
# scaling = 1e4
[../]
[./temp]
[]
[temp]
initial_condition = ${ini_temp}
scaling = 1e-4
[../]
[]
[]

[Precursors]
Expand All @@ -66,153 +65,153 @@ diri_temp=922

[Kernels]
# Neutronics
[./time_group1]
[time_group1]
type = NtTimeDerivative
variable = group1
group_number = 1
[../]
[./diff_group1]
[]
[diff_group1]
type = GroupDiffusion
variable = group1
group_number = 1
[../]
[./sigma_r_group1]
[]
[sigma_r_group1]
type = SigmaR
variable = group1
group_number = 1
[../]
[./fission_source_group1]
[]
[fission_source_group1]
type = CoupledFissionKernel
variable = group1
group_number = 1
[../]
[./delayed_group1]
[]
[delayed_group1]
type = DelayedNeutronSource
variable = group1
[../]
[./inscatter_group1]
[]
[inscatter_group1]
type = InScatter
variable = group1
group_number = 1
[../]
[./diff_group2]
[]
[diff_group2]
type = GroupDiffusion
variable = group2
group_number = 2
[../]
[./sigma_r_group2]
[]
[sigma_r_group2]
type = SigmaR
variable = group2
group_number = 2
[../]
[./time_group2]
[]
[time_group2]
type = NtTimeDerivative
variable = group2
group_number = 2
[../]
[./fission_source_group2]
[]
[fission_source_group2]
type = CoupledFissionKernel
variable = group2
group_number = 2
[../]
[./inscatter_group2]
[]
[inscatter_group2]
type = InScatter
variable = group2
group_number = 2
[../]
[]

# Temperature
[./temp_time_derivative]
[temp_time_derivative]
type = MatINSTemperatureTimeDerivative
variable = temp
[../]
[./temp_source_fuel]
[]
[temp_source_fuel]
type = TransientFissionHeatSource
variable = temp
nt_scale=${nt_scale}
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]
[temp_diffusion]
type = MatDiffusion
diffusivity = 'k'
variable = temp
[../]
[./temp_advection_fuel]
[]
[temp_advection_fuel]
type = ConservativeTemperatureAdvection
velocity = '0 ${flow_velocity} 0'
variable = temp
block = 'fuel'
[../]
[]
[]

[BCs]
[./vacuum_group1]
[vacuum_group1]
type = VacuumConcBC
boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall'
variable = group1
[../]
[./vacuum_group2]
[]
[vacuum_group2]
type = VacuumConcBC
boundary = 'fuel_bottoms fuel_tops moder_bottoms moder_tops outer_wall'
variable = group2
[../]
[./temp_diri_cg]
[]
[temp_diri_cg]
boundary = 'moder_bottoms fuel_bottoms outer_wall'
type = FunctionDirichletBC
function = 'temp_bc_func'
variable = temp
[../]
[./temp_advection_outlet]
[]
[temp_advection_outlet]
boundary = 'fuel_tops'
type = TemperatureOutflowBC
variable = temp
velocity = '0 ${flow_velocity} 0'
[../]
[]
[]

[Functions]
[./temp_bc_func]
[temp_bc_func]
type = ParsedFunction
value = '${ini_temp} - (${ini_temp} - ${diri_temp}) * tanh(t/1e-2)'
[../]
expression = '${ini_temp} - (${ini_temp} - ${diri_temp}) * tanh(t/1e-2)'
[]
[]

[Materials]
[./fuel]
[fuel]
type = MsreFuelTwoGrpXSFunctionMaterial
block = 'fuel'
prop_names = 'k cp'
prop_values = '.0553 1967' # Robertson MSRE technical report @ 922 K
[../]
[./rho_fuel]
[]
[rho_fuel]
type = DerivativeParsedMaterial
f_name = rho
function = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))'
args = 'temp'
property_name = rho
expression = '2.146e-3 * exp(-1.8 * 1.18e-4 * (temp - 922))'
coupled_variables = 'temp'
derivative_order = 1
block = 'fuel'
[../]
[./moder]
[]
[moder]
type = GraphiteTwoGrpXSFunctionMaterial
prop_names = 'k cp'
prop_values = '.312 1760' # Cammi 2011 at 908 K
block = 'moder'
[../]
[./rho_moder]
[]
[rho_moder]
type = DerivativeParsedMaterial
f_name = rho
function = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))'
args = 'temp'
property_name = rho
expression = '1.86e-3 * exp(-1.8 * 1.0e-5 * (temp - 922))'
coupled_variables = 'temp'
derivative_order = 1
block = 'moder'
[../]
[]
[]

[Executioner]
Expand All @@ -238,52 +237,52 @@ diri_temp=922
dtmin = 1e-5
# dtmax = 1
# dt = 1e-3
[./TimeStepper]
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[]

[Preconditioning]
[./SMP]
[SMP]
type = SMP
full = true
ksp_norm = none
[../]
[]
[]

[Postprocessors]
[./group1_current]
[group1_current]
type = IntegralNewVariablePostprocessor
variable = group1
outputs = 'console exodus'
[../]
[./group1_old]
[]
[group1_old]
type = IntegralOldVariablePostprocessor
variable = group1
outputs = 'console exodus'
[../]
[./multiplication]
[]
[multiplication]
type = DivisionPostprocessor
value1 = group1_current
value2 = group1_old
outputs = 'console exodus'
[../]
[./temp_fuel]
[]
[temp_fuel]
type = ElementAverageValue
variable = temp
block = 'fuel'
outputs = 'exodus console'
[../]
[./temp_moder]
[]
[temp_moder]
type = ElementAverageValue
variable = temp
block = 'moder'
outputs = 'exodus console'
[../]
[]
# [./average_fission_heat]
# type = AverageFissionHeat
# nt_scale = ${nt_scale}
Expand All @@ -296,10 +295,10 @@ diri_temp=922
[Outputs]
perf_graph = true
print_linear_residuals = true
[./exodus]
[exodus]
type = Exodus
execute_on = 'timestep_end final'
[../]
[]
[]

[Debug]
Expand Down
Loading

0 comments on commit 8eb20d6

Please sign in to comment.