forked from aurora-multiphysics/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.i
168 lines (155 loc) · 3.15 KB
/
main.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Example input for neutronics + heat conduction
# Usage: ./aurora-opt -i main.i
[Mesh]
type = FileMesh
file = copper_air_bcs_tetmesh.e
# Uncomment to use tet10 in MOOSE
# second_order=true
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
solve_type = NEWTON
abort_on_solve_fail=True
[]
[Variables]
[temperature]
order = FIRST
family = LAGRANGE
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[heating-local]
order = CONSTANT
family = MONOMIAL
[]
[heating-local-err]
order = CONSTANT
family = MONOMIAL
[]
[flux]
order = CONSTANT
family = MONOMIAL
[]
[flux-err]
order = CONSTANT
family = MONOMIAL
[]
[]
[BCs]
[air-outer]
#type = DirichletBC
# penalty is a variant for monomials
type = PenaltyDirichletBC
penalty = 1e5
variable = temperature
boundary = 'top-outer bottom-outer left-outer right-outer front-outer back-outer'
value = 300 # (K)
[]
[]
[UserObjects]
[uo-heating-function]
type = FunctionUserObject
variable = heating-local
execute_on = "initial"
[]
[]
[Functions]
[heating-function]
type = VariableFunction
uoname = "uo-heating-function"
[]
[]
[Materials]
[copper_props]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '3.97 0.385 8.920' # W/cm*K, J/g-K, g/cm^3
block = 1
[]
[air_props]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.26 1 0.001'
block = 2
[]
[heating]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'heating-function'
block = '1 2'
constant_on = 'ELEMENT'
output_properties = 'volumetric_heat'
outputs = exodus
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat-source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temperature
block = '1 2'
[]
[]
[MultiApps]
[openmc]
type = FullSolveMultiApp
app_type = OpenMCApp
execute_on = "timestep_begin"
input_files = "openmc.i"
positions = '0 0 0'
library_path = openmc/lib
[]
[]
[Transfers]
[./to_openmc]
type = MoabMeshTransfer
direction = to_multiapp
multi_app = openmc
moabname = "moab"
[../]
[]
[Postprocessors]
[total-heating]
type = ElementIntegralVariablePostprocessor
variable = heating-local
[]
[total-flux]
type = ElementIntegralVariablePostprocessor
variable = flux
[]
[copper-heating]
type = ElementIntegralVariablePostprocessor
variable = heating-local
block = 1
[]
[copper-flux]
type = ElementIntegralVariablePostprocessor
variable = flux
block = 1
[]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'timestep_end'
# Uncomment these lines to disable output to screen
# console = false
# [my_console]
# type = Console
# output_screen = false
# []
[]