This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
1D_determineL.i
315 lines (265 loc) · 5.57 KB
/
1D_determineL.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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
#This simulation is in 1D to determine whether the Allen-Cahn kinetic coefficient puts
#the simulation into diffusion or interface controlled growth.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 200
ny = 1
nz = 0
xmin = 0
xmax = 30
ymin = 0
ymax = 1
zmin = 0
zmax = 0
# elem_type = EDGE2
#uniform_refine = 2
[]
[Variables]
[./concentration]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
variable = concentration
x1 = 0
y1 = 0
z1 = 0
invalue = 0.6
outvalue = 0.02
radius = 20
int_width = 1
[../]
[../]
[./mu]
order = FIRST
family = LAGRANGE
[../]
[./n]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
variable = n
type = SmoothCircleIC
variable = concentration
x1 = 0
y1 = 0
z1 = 0
invalue = 1
outvalue = 0
radius = 20
int_width = 1
[../]
[../]
[]
[AuxVariables]
[./temperature]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 600
[../]
[../]
[./omega]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./omega_calc]
type = AuxGrandPotential
variable = omega
omega_eq = -1.9093 #600K # -1.45135 #485K
concentration = concentration
OP = n
[../]
[]
[Preconditioning]
[./SMP_TempAux]
type = SMP
full = true
[../]
[]
[Kernels]
[./dcdt]
type = CoupledTimeDerivative
variable = mu
v = concentration
[../]
[./mu_residual]
type = SplitCHWRes
variable = mu
mob_name = M
[../]
[./conc_residual]
type = CHCoupledCalphadSplit
variable = concentration
kappa_name = kappa_c
n = 'n'
w = mu
[../]
[./dndt]
type = TimeDerivative
variable = n
[../]
[./ACSolidn]
type = ACCoupledCalphad
variable = n
mob_name = L
w = mu
c = concentration
[../]
[./ACInterfacen1]
type = ACInterface
variable = n
mob_name = L
kappa_name = kappa_n
[]
[Materials]
[./calphad]
type = ZrHCalphadDiffusivity
block = 0
#n_OP_variables = 1
OP_variable = 'n'
concentration = concentration
H_Zr_D0 = 7.00e5 #nm^2/microsecond
H_ZrH2_D0 = 1.53e5 #nm^2/microsecond
H_Zr_Q0 = 4.456e4 #J/mol
H_ZrH2_Q0 = 5.885E4 #J/mol
mobility_AC = 1E-1 #nm^3/(aJ microsecond)
kappa_CH = 1 #aJ/nm
kappa_AC = 1 #aJ/nm
#well height and molar volume remain unscaled.
well_height = 0 #aJ/amol?
molar_volume = 1.4e4 #nm^3/amol
temperature = temperature
[../]
[./alphaZr]
type = CalphadAB1CD1Material
block = 0
low_cutoff = 1e-6
high_cutoff = 0.49
#aJ/amol
pure_endpoint_low_coeffs = '-7827.595
125.64905
-24.1618
-0.00437791
0.0
34971.0' #HCP_Zr
pure_endpoint_high_coeffs = '-9522.97393
78.5273873
-31.35707
0.0027589925
-7.46390667E-7
56582.3' #H2_gas
mixture_coeffs = '-45965
41.6
0' #FCC_ZrH
L0_coeffs = '0 0'
L1_coeffs = '0 0'
coupled_temperature = temperature
coupled_concentration = concentration
[../]
[./deltaZrH2]
type = CalphadAB1CD2Material
block = 0
low_cutoff = 0.5
high_cutoff = 0.665
#aJ/amol
pure_endpoint_low_coeffs = '-227.595
124.74905
-24.1618
-0.00437791
0.0
34971' #FCC_Zr
pure_endpoint_high_coeffs = '-9522.97393
78.5273873
-31.35707
0.0027589925
-7.46390667E-7
56582.3' #H2_gas
mixture_coeffs = '-170490
208.2
-9.47' #FCC_ZrH2'
L0_coeffs = '14385 -6.0'
L1_coeffs = '-106445 87.3'
coupled_temperature = temperature
coupled_concentration = concentration
pure_EP1_phase1_coeffs = '-7827.595
125.64905
-24.1618
-0.00437791
0.0
34971.0' #HCP_Zr
[../]
[]
[BCs]
[./right_fixed]
type = NeumannBC
variable = concentration
value = 0.1
boundary = right
[../]
[]
[Postprocessors]
[./VolumeFraction]
type = NodalVolumeFraction
bubble_volume_file = 1D_interfaceEnergy_vol.csv
threshold = 0.5
variable = n
mesh_volume = Volume
[../]
[./Volume]
type = VolumePostprocessor
execute_on = initial
[../]
[./dofs]
type = NumDOFs
[../]
[./Gamma]
type = ElementIntegralVariablePostprocessor
variable = omega
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e0
cutback_factor = 0.25
growth_factor = 1.05
optimal_iterations = 5
iteration_window = 1
linear_iteration_ratio = 100
[../]
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = ' ksp lu '
l_max_its = 100
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 5e-12
nl_max_its = 20
start_time = 0
num_steps = 10000
#end_time = 500
#dtmax = 1E0
#dtmin = 1E-8
[]
[Outputs]
file_base = 1D_determineL_SS2
exodus = true
interval = 20
checkpoint = 0
csv = true
[./console]
type = Console
interval = 20
max_rows = 10
output_linear = 0
[../]
[]