Skip to content

Commit

Permalink
clean the input files and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hapfang committed Feb 27, 2024
1 parent ae8c13b commit 5b27202
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 41 deletions.
28 changes: 14 additions & 14 deletions lfr/7pin_cardinal_demo/HC.i
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[fmg]
type = FileMeshGenerator
file = 'HCmesh_out.e'
exodus_extra_element_integers = 'pin_id'
exodus_extra_element_integers = 'pin_id'
[]
[]

Expand Down Expand Up @@ -208,7 +208,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[duct_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = '${bid_duct}'
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -227,7 +227,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[gap_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = '${bid_gapc} ${bid_gap}'
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -240,7 +240,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[fuel_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_fl}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -253,7 +253,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[clad_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_clad}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -266,7 +266,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[reflB_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = '${bid_lrflc} ${bid_lrfl}'
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -279,7 +279,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
[reflT_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = '${bid_urflc} ${bid_urfl}'
execute_on = 'initial timestep_begin timestep_end'
[]
Expand Down Expand Up @@ -410,8 +410,8 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
from_boundaries = 'ROD_SIDE'
to_boundaries = '3'
to_multi_app = nek
greedy_search = true
search_value_conflicts = false
greedy_search = true
search_value_conflicts = false
[]
[heat_flux_duct_to_nek]
type = MultiAppGeneralFieldNearestLocationTransfer
Expand All @@ -420,8 +420,8 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
from_boundaries = 'DUCT_INNERSIDE'
to_boundaries = '4'
to_multi_app = nek
greedy_search = true
search_value_conflicts = false
greedy_search = true
search_value_conflicts = false
[]
[flux_integral_to_nek]
type = MultiAppReporterTransfer
Expand All @@ -436,7 +436,7 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
from_boundary = '3'
to_boundary = 'ROD_SIDE'
from_multi_app = nek
search_value_conflicts = false
search_value_conflicts = false
[]
[nek_surf_temp_duct_to_heatconduction]
type = MultiAppGeneralFieldNearestLocationTransfer
Expand All @@ -445,14 +445,14 @@ powerdensity = ${fparse linearpower / (pi * (fuel_r_o * fuel_r_o - fuel_r_i * fu
from_boundary = '4'
to_boundary = 'DUCT_INNERSIDE'
from_multi_app = nek
search_value_conflicts = false
search_value_conflicts = false
[]
[nek_bulk_temp_to_heatconduction]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = temp
variable = nek_bulk_temp
from_multi_app = nek
search_value_conflicts = false
search_value_conflicts = false
[]
[synchronization_to_nek]
type = MultiAppPostprocessorTransfer
Expand Down
45 changes: 22 additions & 23 deletions lfr/7pin_cardinal_demo/NT.i
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ richardsonmaxits=1000
[fmg]
type = FileMeshGenerator
file = 'NTmesh_out.e'
exodus_extra_element_integers = 'material_id pin_id coarse_element_id'
exodus_extra_element_integers = 'material_id pin_id coarse_element_id'
[]
[]

Expand Down Expand Up @@ -171,7 +171,7 @@ richardsonmaxits=1000
variable = fluid_density
coupled_variables = 'nek_bulk_temp'
expression = '10678-13174*(nek_bulk_temp-600.6)/10000'
execute_on = 'timestep_begin timestep_end'
execute_on = 'timestep_begin timestep_end'
[]
[]

Expand Down Expand Up @@ -387,8 +387,8 @@ richardsonmaxits=1000
library_id = 2
block = ${bid_cool}
grid_variables = nek_bulk_temp
fluid_density = fluid_density
reference_fluid_density = ${coolantdensity_ref}
fluid_density = fluid_density
reference_fluid_density = ${coolantdensity_ref}
[]
[]

Expand All @@ -400,7 +400,7 @@ richardsonmaxits=1000
input_files = HC.i
keep_solution_during_restore = true
execute_on = 'timestep_end'
cli_args = 'Materials/HeatConduct_Fuel/thermal_conductivity=${fuelconductance}'
cli_args = 'Materials/HeatConduct_Fuel/thermal_conductivity=${fuelconductance}'
[]
[]

Expand All @@ -425,15 +425,15 @@ richardsonmaxits=1000
source_variable = nek_bulk_temp
variable = nek_bulk_temp
[]

[nek_surf_temp_rod_from_HeatConduction]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = nek_surf_temp
variable = nek_surf_temp
from_boundaries = 'ROD_SIDE'
to_boundaries = 'ROD_SIDE'
from_multi_app = HeatConduction
search_value_conflicts = false
search_value_conflicts = false
[]
[nek_surf_temp_rod_to_HeatConduction]
type = MultiAppGeneralFieldNearestLocationTransfer
Expand All @@ -442,7 +442,7 @@ richardsonmaxits=1000
from_boundaries = 'ROD_SIDE'
to_boundaries = 'ROD_SIDE'
to_multi_app = HeatConduction
search_value_conflicts = false
search_value_conflicts = false
[]
[nek_surf_temp_duct_from_HeatConduction]
type = MultiAppGeneralFieldNearestLocationTransfer
Expand All @@ -451,7 +451,7 @@ richardsonmaxits=1000
from_boundaries = 'DUCT_INNERSIDE'
to_boundaries = 'DUCT_INNERSIDE'
from_multi_app = HeatConduction
search_value_conflicts = false
search_value_conflicts = false
[]
[nek_surf_temp_duct_to_HeatConduction]
type = MultiAppGeneralFieldNearestLocationTransfer
Expand All @@ -460,15 +460,15 @@ richardsonmaxits=1000
from_boundaries = 'DUCT_INNERSIDE'
to_boundaries = 'DUCT_INNERSIDE'
to_multi_app = HeatConduction
search_value_conflicts = false
search_value_conflicts = false
[]

[nek_bulk_temp_pp]
type = MultiAppPostprocessorTransfer
to_postprocessor = nek_bulk_temp_pp
from_postprocessor = nek_bulk_temp_pp
from_multi_app = HeatConduction
reduction_type = maximum
reduction_type = maximum
[]
[]

Expand Down Expand Up @@ -719,7 +719,7 @@ richardsonmaxits=1000
[nek_bulk_temp_min]
type = ElementExtremeValue
variable = nek_bulk_temp
value_type = min
value_type = min
block = ${bid_cool}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -732,7 +732,7 @@ richardsonmaxits=1000
[gap_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = '${bid_gapc} ${bid_gap}'
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -745,7 +745,7 @@ richardsonmaxits=1000
[innerfuel_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ifl}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -758,7 +758,7 @@ richardsonmaxits=1000
[outerfuel1_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl1}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -771,7 +771,7 @@ richardsonmaxits=1000
[outerfuel2_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl2}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -784,7 +784,7 @@ richardsonmaxits=1000
[outerfuel3_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl3}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -797,7 +797,7 @@ richardsonmaxits=1000
[outerfuel4_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl4}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -810,7 +810,7 @@ richardsonmaxits=1000
[outerfuel5_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl5}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -823,7 +823,7 @@ richardsonmaxits=1000
[outerfuel6_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_ofl6}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand All @@ -836,7 +836,7 @@ richardsonmaxits=1000
[clad_temp_min]
type = ElementExtremeValue
variable = solid_temp
value_type = min
value_type = min
block = ${bid_clad}
execute_on = 'initial timestep_begin timestep_end'
[]
Expand Down Expand Up @@ -942,7 +942,6 @@ richardsonmaxits=1000
type = PerfGraphOutput
level = 2
[]
# interval = 100
csv = true
exodus = true
perf_graph = true
Expand Down
5 changes: 1 addition & 4 deletions lfr/7pin_cardinal_demo/nek.i
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
volume = true

# nekRS runs in non-dimensional form, which means that we shrunk the mesh
# from physical units of meters to our characteristic scale of 1
# from physical units of meters to our characteristic scale of 1
# That means that we must multiply
# the nekRS mesh by 0.008638 to get back in units of meters that MOOSE is
# running in.
Expand Down Expand Up @@ -161,10 +161,7 @@
[Outputs]
exodus = true
interval = 500
# execute_on = 'timestep_end'

[screen]
type = Console
# hide = 'synchronization_in'
[]
[]
54 changes: 54 additions & 0 deletions lfr/7pin_cardinal_demo/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[Tests]
[generate_mesh]
type = RunApp
executable_pattern = 'cardinal*'
input = 'NTmesh.i HCmesh.i'
cli_args = '--mesh-only'
[]
[syntax_griffin]
type = RunApp
input = 'NT.i'
check_input = true
executable_pattern = 'cardinal*'
prereq = generate_mesh
max_time = 400
[]
[syntax_conduction]
type = RunApp
input = 'HC.i'
check_input = true
executable_pattern = 'cardinal*'
prereq = generate_mesh
[]
[syntax_nekrs]
type = RunApp
input = 'nek.i'
check_input = true
executable_pattern = 'cardinal*'
[]

[run_multiphysics]
type = RunApp
input = 'NT.i'
cli_args = "Executioner/num_steps=2"
executable_pattern = 'cardinal*'
prereq = 'syntax_griffin'
min_parallel = 144
max_time = 2000
mesh_mode = DISTRIBUTED
[]
[run_conduction]
type = RunApp
check_input = True
input = 'HC.i'
executable_pattern = 'cardinal*'
prereq = 'syntax_conduction'
[]
[run_nekrs]
type = RunApp
input = 'nek.i'
check_input = true
executable_pattern = 'cardinal*'
prereq = 'syntax_nekrs'
[]
[]

0 comments on commit 5b27202

Please sign in to comment.