-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiphase_solid_parabolic.i
681 lines (660 loc) · 15.9 KB
/
multiphase_solid_parabolic.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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
xmin = 0
xmax = 1200
ymin = 0
ymax = 1200
#uniform_refine = 3
[]
[GlobalParams]
op_num = 5
grain_num = 5
var_name_base = etam
numbub = 15
bubspac = 150
radius = 44
int_width = 50
displacements = 'disp_x disp_y'
[]
[Variables]
[./wv]
[../]
[./wg]
[../]
[./etab0]
[../]
[./PolycrystalVariables]
[../]
# Displacement fields in x and y directions
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
invalue = 1.0
outvalue = 0.0
[../]
[../]
[./bubble_IC]
variable = etab0
type = PolycrystalVoronoiVoidIC
structure_type = voids
invalue = 1.0
outvalue = 0.0
[../]
[./IC_wv]
variable = wv
type = PolycrystalVoronoiVoidIC
structure_type = voids
invalue = 0.0
outvalue = 0.0
[../]
[./IC_wg]
variable = wg
type = PolycrystalVoronoiVoidIC
structure_type = voids
invalue = 0.0
outvalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
# Order parameter eta_b0 for bubble phase
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etam0 etam1 etam2 etam3 etam4'
gamma_names = 'gmb gmb gmb gmb gmb'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etam0 etam1 etam2 etam3 etam4 wv wg'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_m0 for matrix grain 0
[./ACm0_bulk]
type = ACGrGrMulti
variable = etam0
v = 'etab0 etam1 etam2 etam3 etam4'
gamma_names = 'gmb gmm gmm gmm gmm'
[../]
[./ACm0_sw]
type = ACSwitching
variable = etam0
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etab0 etam1 etam2 etam3 etam4 wv wg'
[../]
[./ACm0_int]
type = ACInterface
variable = etam0
kappa_name = kappa
[../]
[./em0_dot]
type = TimeDerivative
variable = etam0
[../]
# Order parameter eta_m1 for matrix grain 1
[./ACm1_bulk]
type = ACGrGrMulti
variable = etam1
v = 'etab0 etam0 etam2 etam3 etam4'
gamma_names = 'gmb gmm gmm gmm gmm'
[../]
[./ACm1_sw]
type = ACSwitching
variable = etam1
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam2 etam3 etam4 wv wg'
[../]
[./ACm1_int]
type = ACInterface
variable = etam1
kappa_name = kappa
[../]
[./em1_dot]
type = TimeDerivative
variable = etam1
[../]
# Order parameter eta_m2 for matrix grain 2
[./ACm2_bulk]
type = ACGrGrMulti
variable = etam2
v = 'etab0 etam0 etam1 etam3 etam4'
gamma_names = 'gmb gmm gmm gmm gmm'
[../]
[./ACm2_sw]
type = ACSwitching
variable = etam2
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam3 etam4 wv wg'
[../]
[./ACm2_int]
type = ACInterface
variable = etam2
kappa_name = kappa
[../]
[./em2_dot]
type = TimeDerivative
variable = etam2
[../]
# Order parameter eta_m3 for matrix grain 3
[./ACm3_bulk]
type = ACGrGrMulti
variable = etam3
v = 'etab0 etam0 etam1 etam2 etam4'
gamma_names = 'gmb gmm gmm gmm gmm'
[../]
[./ACm3_sw]
type = ACSwitching
variable = etam3
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam4 wv wg'
[../]
[./ACm3_int]
type = ACInterface
variable = etam3
kappa_name = kappa
[../]
[./em3_dot]
type = TimeDerivative
variable = etam3
[../]
# Order parameter eta_m4 for matrix grain 4
[./ACm4_bulk]
type = ACGrGrMulti
variable = etam4
v = 'etab0 etam0 etam1 etam2 etam3'
gamma_names = 'gmb gmm gmm gmm gmm'
[../]
[./ACm4_sw]
type = ACSwitching
variable = etam4
Fj_names = 'omega_total_bubble omega_total_matrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 wv wg'
[../]
[./ACm4_int]
type = ACInterface
variable = etam4
kappa_name = kappa
[../]
[./em4_dot]
type = TimeDerivative
variable = etam4
[../]
#Chemical potential for vacancies
[./wv_dot]
type = SusceptibilityTimeDerivative
variable = wv
f_name = chiv
args = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion_v]
type = MatDiffusion
variable = wv
D_name = Dchiv
args = ''
[../]
[./Source_v]
type = MaskedBodyForce
variable = wv
value = 1e-10
mask = hm
[../]
[./coupled_v_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etab0
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_v_etam0dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam0
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_v_etam1dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam1
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_v_etam2dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam2
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_v_etam3dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam3
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_v_etam4dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam4
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
#Chemical potential for gas atoms
[./wg_dot]
type = SusceptibilityTimeDerivative
variable = wg
f_name = chig
args = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion_g]
type = MatDiffusion
variable = wg
D_name = Dchig
args = ''
[../]
[./Source_g]
type = MaskedBodyForce
variable = wg
value = 1e-10
mask = hm
[../]
[./coupled_g_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etab0
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_g_etam0dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam0
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_g_etam1dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam1
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_g_etam2dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam2
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_g_etam3dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam3
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[./coupled_g_etam4dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam4
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
args = 'etab0 etam0 etam1 etam2 etam3 etam4'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[Materials]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etab0 etam0 etam1 etam2 etam3 etam4'
phase_etas = 'etab0'
#outputs = exodus
[../]
[./hm]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hm
all_etas = 'etab0 etam0 etam1 etam2 etam3 etam4'
phase_etas = 'etam0 etam1 etam2 etam3 etam4'
#outputs = exodus
[../]
# Chemical contribution to grand potential of bubble
[./omegab]
type = DerivativeParsedMaterial
args = 'wv wg'
f_name = omegab
material_property_names = 'Va kvbub cvbubeq kgbub cgbubeq'
function = '-0.5*wv^2/Va^2/kvbub-wv/Va*cvbubeq-0.5*wg^2/Va^2/kgbub-wg/Va*cgbubeq'
derivative_order = 2
#outputs = exodus
[../]
[./elastic_energy_bubble]
type = ElasticEnergyMaterial
base_name = bubble
f_name = fe_bub
args = ' '
[../]
# Total free energy of the bubble
[./Total_energy_bubble]
type = DerivativeSumMaterial
f_name = omega_total_bubble
sum_materials = 'omegab fe_bub'
args = 'wv wg'
[../]
# Chemical contribution to grand potential of matrix
[./omegam]
type = DerivativeParsedMaterial
args = 'wv wg'
f_name = omegam
material_property_names = 'Va kvmatrix cvmatrixeq kgmatrix cgmatrixeq'
function = '-0.5*wv^2/Va^2/kvmatrix-wv/Va*cvmatrixeq-0.5*wg^2/Va^2/kgmatrix-wg/Va*cgmatrixeq'
derivative_order = 2
#outputs = exodus
[../]
[./elastic_energy_matrix]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
block = 0
f_name = omega_total_matrix
sum_materials = 'omegam fe_m'
args = 'wv wg'
[../]
# Densities
[./rhovbub]
type = DerivativeParsedMaterial
args = 'wv'
f_name = rhovbub
material_property_names = 'Va kvbub cvbubeq'
function = 'wv/Va^2/kvbub + cvbubeq/Va'
derivative_order = 2
#outputs = exodus
[../]
[./rhovmatrix]
type = DerivativeParsedMaterial
args = 'wv'
f_name = rhovmatrix
material_property_names = 'Va kvmatrix cvmatrixeq'
function = 'wv/Va^2/kvmatrix + cvmatrixeq/Va'
derivative_order = 2
#outputs = exodus
[../]
[./rhogbub]
type = DerivativeParsedMaterial
args = 'wg'
f_name = rhogbub
material_property_names = 'Va kgbub cgbubeq'
function = 'wg/Va^2/kgbub + cgbubeq/Va'
derivative_order = 2
#outputs = exodus
[../]
[./rhogmatrix]
type = DerivativeParsedMaterial
args = 'wg'
f_name = rhogmatrix
material_property_names = 'Va kgmatrix cgmatrixeq'
function = 'wg/Va^2/kgmatrix + cgmatrixeq/Va'
derivative_order = 2
#outputs = exodus
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa mu L D Va cvbubeq cgbubeq gmb gmm T tgrad_corr_mult'
prop_values = '0.5273 0.004688 1.0 0.01 0.04092 0.61 0.39 0.9218 1.5 1200 0.0 '
[../]
[./cvmatrixeq] #For values, see Li et al., Nuc. Inst. Methods in Phys. Res. B, 303, 62-27 (2013).
type = ParsedMaterial
f_name = cvmatrixeq
material_property_names = 'T'
constant_names = 'kB Efv'
constant_expressions = '8.6173324e-5 3.0'
function = 'exp(-Efv/(kB*T))'
[../]
[./cgmatrixeq]
type = ParsedMaterial
f_name = cgmatrixeq
material_property_names = 'T'
constant_names = 'kB Efg'
constant_expressions = '8.6173324e-5 3.0'
function = 'exp(-Efg/(kB*T))'
[../]
[./kvmatrix_parabola]
type = ParsedMaterial
f_name = kvmatrix
material_property_names = 'T cvmatrixeq'
constant_names = 'c0v c0g a1 a2'
constant_expressions = '0.01 0.01 0.178605-0.0030782*log(1-c0v)+0.0030782*log(c0v) 0.178605-0.00923461*log(1-c0v)+0.00923461*log(c0v)'
function = '((-a2+3*a1)/(4*(c0v-cvmatrixeq))+(a2-a1)/(2400*(c0v-cvmatrixeq))*T)'
#outputs = exodus
[../]
[./kgmatrix_parabola]
type = ParsedMaterial
f_name = kgmatrix
material_property_names = 'kvmatrix'
function = 'kvmatrix'
[../]
[./kgbub_parabola]
type = ParsedMaterial
f_name = kgbub
material_property_names = 'kvmatrix cvmatrixeq cvbubeq'
constant_names = 'fcross'
constant_expressions = '0.5' #Scaled by C44
function = 'kvmatrix * fcross/(sqrt(kvmatrix)*(cvmatrixeq-cvbubeq) + sqrt(fcross))^2'
#outputs = exodus
[../]
[./kvbub_parabola]
type = ParsedMaterial
f_name = kvbub
material_property_names = 'kgbub'
function = 'kgbub'
[../]
[./Mobility_v]
type = DerivativeParsedMaterial
f_name = Dchiv
material_property_names = 'D chiv'
function = 'D*chiv'
derivative_order = 2
#outputs = exodus
[../]
[./Mobility_g]
type = DerivativeParsedMaterial
f_name = Dchig
material_property_names = 'D chig'
function = 'D*chig'
derivative_order = 2
#outputs = exodus
[../]
[./chiv]
type = DerivativeParsedMaterial
f_name = chiv
material_property_names = 'Va hb kvbub hm kvmatrix '
function = '(hm/kvmatrix + hb/kvbub) / Va^2'
derivative_order = 2
#outputs = exodus
[../]
[./chig]
type = DerivativeParsedMaterial
f_name = chig
material_property_names = 'Va hb kgbub hm kgmatrix '
function = '(hm/kgmatrix + hb/kgbub) / Va^2'
derivative_order = 2
#outputs = exodus
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '6.17 1.89 1.89 6.17 1.89 6.17 1 1 1'
# Elastic constants are in eV/atom to match other energies in the problem
# For symmetric9 with cubic anisotropy the constants are in order
# C11 C12 C12 C11 C12 C11 C44 C44 C44
base_name = matrix
fill_method = symmetric9
[../]
[./strain_matrix]
type = ComputeSmallStrain
base_name = matrix
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./Stiffness_bubble]
type = ComputeElasticityTensor
C_ijkl = '6.17e-4 1.89e-4 1.89e-4 6.17e-4 1.89e-4 6.17e-4 1e-4 1e-4 1e-4'
base_name = bubble
fill_method = symmetric9
[../]
[./strain_bubble]
type = ComputeSmallStrain
base_name = bubble
[../]
[./stress_bubble]
type = ComputeLinearElasticStress
base_name = bubble
[../]
[./const_stress]
type = ComputeExtraStressConstant
base_name = bubble
extra_stress_tensor = '-6.25e-3 -6.25e-3 -6.25e-3 0 0 0'
[../]
[./global_stress]
type = MultiPhaseStressMaterial
phase_base = 'bubble matrix'
h = 'hb hm'
[../]
[]
#[Adaptivity]
# marker = errorfrac
# max_h_level = 3
# [./Indicators]
# [./error]
# type = GradientJumpIndicator
# variable = bnds
# [../]
# [../]
# [./Markers]
# [./bound_adapt]
# type = ValueThresholdMarker
# third_state = DO_NOTHING
# coarsen = 1.0
# refine = 0.99
# variable = bnds
# invert = true
# [../]
# [./errorfrac]
# type = ErrorFractionMarker
# coarsen = 0.1
# indicator = error
# refine = 0.7
# [../]
# [../]
#[]
[Postprocessors]
[./number_DOFs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
nl_max_its = 15
scheme = bdf2
#solve_type = NEWTON
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
#num_steps = 1000
end_time = 1e9
nl_abs_tol = 1e-10
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
adapt_log = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
interval = 10
[../]
checkpoint = true
csv = true
[]