forked from aurora-multiphysics/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_temp_mech.i
263 lines (249 loc) · 5.35 KB
/
main_temp_mech.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# Example input for neutronics + heat conduction + thermal expansion
# Usage: ./aurora-opt -i main_temp_mech.i
[Mesh]
type = FileMesh
file = copper_air_bcs_tetmesh.e
displacements = 'disp_x disp_y disp_z'
# Uncomment to use tet10 in MOOSE
# second_order=true
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
num_steps = 10
dt = 1
abort_on_solve_fail=True
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 300 # Start at room temperature
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[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
[]
[density_local]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[density_copy]
type = ADMaterialRealAux
property = density
variable = density_local
execute_on = timestep_end
[]
[]
[BCs]
[air-outer]
#type = DirichletBC
# penalty is a variant for monomials
type = PenaltyDirichletBC
penalty = 1e5
variable = temp
boundary = 'top-outer bottom-outer left-outer right-outer front-outer back-outer'
value = 300 # (K)
[]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = 'right top-outer bottom-outer left-outer right-outer front-outer back-outer'
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = 'right top-outer bottom-outer left-outer right-outer front-outer back-outer'
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = 'right top-outer bottom-outer left-outer right-outer front-outer back-outer'
value = 0.0
[../]
[]
[UserObjects]
[uo-heating-function]
type = FunctionUserObject
variable = heating-local
execute_on = "initial"
[]
[]
[Functions]
[heating-function]
type = VariableFunction
uoname = "uo-heating-function"
[]
[]
[Materials]
[heating]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'heating-function'
block = '1 2'
constant_on = 'ELEMENT'
output_properties = 'volumetric_heat'
outputs = exodus
[]
[air_const_props]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat'
prop_values = '0.26 1'
block = 2
[]
[air_density]
type = ADOpenMCDensity
density = '0.001' # g/cm^3
displacements = 'disp_x disp_y disp_z'
block = 2
[]
[copper_const_props]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat'
prop_values = '3.97 0.385' # W/cm*K, J/g-K
block = 1
[]
[copper_density]
type = ADOpenMCDensity
density = '8.920' # g/cm^3
displacements = 'disp_x disp_y disp_z'
block = 1
[]
[copper_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.e7
poissons_ratio = 0.36
block = '1'
[]
[copper_thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.8e-5 # K^-1
temperature = temp
eigenstrain_name = copper_eigenstrain
block = '1'
[]
[copper_strain] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'copper_eigenstrain'
block = 1
[]
[copper_stress] #We use linear elasticity
type = ComputeLinearElasticStress
block = 1
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temp
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temp
[]
[heat-source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
block = '1 2'
[]
[TensorMechanics] #Action that creates equations for disp_x and disp_y
displacements = 'disp_x disp_y disp_z'
block = 1 # Only act on air
[]
[NullKernelX]
type = NullKernel
variable = disp_x
block=2
[]
[NullKernelY]
type = NullKernel
variable = disp_y
block=2
[]
[NullKernelZ]
type = NullKernel
variable = disp_z
block=2
[]
[]
[MultiApps]
[openmc]
type = FullSolveMultiApp
app_type = OpenMCApp
execute_on = "timestep_begin"
input_files = "openmc_mech.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
# []
[]