openmc_master.i 1.78 KB
Newer Older
Derek Gaston's avatar
Derek Gaston committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
[Mesh]
  type = FileMesh
  file = spheres_generator_in.e
[]

[Variables]
  [temp]
    initial_condition = 300
  []
[]

[AuxVariables]
  [heat_source]
    family = MONOMIAL
    order = CONSTANT
  []
17 18 19 20
  [average_temp]
    family = MONOMIAL
    order = CONSTANT
  []
Derek Gaston's avatar
Derek Gaston committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
[]

[Kernels]
  [hc]
    type = HeatConduction
    variable = temp
  []
  [heat]
    type = CoupledForce
    variable = temp
    v = heat_source
  []
[]

[BCs]
  [outside]
    type = DirichletBC
    variable = temp
    boundary = '1'
    value = 300
  []
[]

44 45 46 47 48 49 50 51 52
[AuxKernels]
  [average_temp]
    variable = average_temp
    type = SpatialUserObjectAux
    user_object = average_temp
    execute_on = 'initial timestep_end'
  []
[]

Derek Gaston's avatar
Derek Gaston committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
[Materials]
  [hc]
    type = GenericConstantMaterial
    prop_values = '0.1' # 20 W/mK -> 0.2 W/cmK
    prop_names = 'thermal_conductivity'
  []
[]

[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -pc_hypre_type'
  num_steps = 1000
  petsc_options_value = 'hypre boomeramg'
  dt = 1e-4
  nl_rel_tol = 1e-5
[]

[Outputs]
  exodus = true
[]

74
[UserObjects]
Derek Gaston's avatar
Derek Gaston committed
75
  [./average_temp]
76
    type = NearestPointAverage
Derek Gaston's avatar
Derek Gaston committed
77
    variable = temp
78
    execute_on = 'initial timestep_end' # Evaluate on timestep end so OpenMC can get updated values next timestep
79
    points_file = 'pebble_centers_rescaled.txt'
Derek Gaston's avatar
Derek Gaston committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93
  []
[]

[MultiApps]
  [openmc]
    type = TransientMultiApp
    app_type = OpenMCApp
    input_files = 'openmc.i'
    execute_on = timestep_begin
  []
[]

[Transfers]
  [./heat_source_from_openmc]
94
    type = MultiAppCopyTransfer
Derek Gaston's avatar
Derek Gaston committed
95 96
    direction = from_multiapp
    multi_app = openmc
97
    source_variable = heat_source
Derek Gaston's avatar
Derek Gaston committed
98 99 100
    variable = heat_source
  []
  [./average_temp_to_openmc]
101
    type = NearestPointReceiverTransfer
Derek Gaston's avatar
Derek Gaston committed
102 103
    direction = to_multiapp
    multi_app = openmc
104 105
    from_uo = average_temp
    to_uo = average_temp
Derek Gaston's avatar
Derek Gaston committed
106 107
  []
[]