-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPZT_vac_cyl.i
398 lines (377 loc) · 8.32 KB
/
PZT_vac_cyl.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
[Mesh]
file = exodus_nanowire.e
[]
[GlobalParams]
# Use the Srwolitz paper N. Ng et al. / Acta Materialia 60 (2012) 3632–3642 -PZT
len_scale = 1.0
alpha1 = -0.1484 # T = 300 K
alpha11 = -0.0305
alpha111 = 0.2475
alpha12 = 0.632
alpha112 = 0.96839
alpha123 = -4.901
G110 = 0.1483
G12/G110 = 0
G44/G110 = 0.5
G44P/G110 = 0.5
Q_mnkl = '0.08142 -0.02446 -0.02446 0.08142 -0.02446 0.08142 0.06417 0.06417 0.06417'
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_int = potential_int #can add a potential_ext
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
displacements = 'disp_x disp_y disp_z'
C_ijkl = '176.4 79.37 79.37 176.4 79.37 176.4 111. 111. 111.'
[]
[Variables]
[./polar_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
[../]
[./potential_int]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
block = '1'
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
block = '1'
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = -0.5e-5
max = 0.5e-5
[../]
[../]
[]
[Kernels]
#Elastic problem
[./TensorMechanics]
#This is an action block
[../]
#Bulk energy density
[./bed_x]
type = BulkEnergyDerivativeSixth
variable = polar_x
component = 0
[../]
[./bed_y]
type = BulkEnergyDerivativeSixth
variable = polar_y
component = 1
[../]
[./bed_z]
type = BulkEnergyDerivativeSixth
variable = polar_z
component = 2
[../]
##Wall energy penalty
[./walled_x]
type = PZTWallEnergyDerivative
variable = polar_x
component = 0
[../]
[./walled_y]
type = PZTWallEnergyDerivative
variable = polar_y
component = 1
[../]
[./walled_z]
type = PZTWallEnergyDerivative
variable = polar_z
component = 2
[../]
##Polarization-strain coupling
[./ferroelectriccouplingu_x]
type = FerroelectricCouplingX
variable = disp_x
component = 0
block = '1'
[../]
[./ferroelectriccouplingu_y]
type = FerroelectricCouplingX
variable = disp_y
component = 1
block = '1'
[../]
[./ferroelectriccouplingu_z]
type = FerroelectricCouplingX
variable = disp_z
component = 2
block = '1'
[../]
[./ferroelectriccouplingp_xx]
type = FerroelectricCouplingP
variable = polar_x
component = 0
[../]
[./ferroelectriccouplingp_yy]
type = FerroelectricCouplingP
variable = polar_y
component = 1
[../]
[./ferroelectriccouplingp_zz]
type = FerroelectricCouplingP
variable = polar_z
component = 2
[../]
##Electrostatics
[./potential_int_electric_E]
type=PolarElectricEStrong
variable = potential_int
block = '1'
permittivity = 1.16
[../]
[./FE_E_int]
type=Electrostatics
variable = potential_int
block = '1'
permittivity = 1.16 #approximately 2\epsilon_0, just for testing purposes
[../]
[./vac_E_int]
type=Electrostatics
variable = potential_int
block = '2'
permittivity = 0.5843763
[../]
[./polar_electric_px]
type=PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type=PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type=PolarElectricPStrong
variable = polar_z
component = 2
[../]
##Time dependence
[./polar_x_time]
type = TimeDerivativeScaled
variable = polar_x
time_scale = 1.0
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable = polar_y
time_scale = 1.0
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
[../]
[]
[BCs]
[./Periodic]
[./potential_int_pbc_vac]
variable = potential_int
primary = '3'
secondary = '4'
translation = '0 0 -30'
[../]
[./potential_int_pbc_FE]
variable = potential_int
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./polar_x_pbc]
variable = polar_x #could leave empty and default is ALL variables in system...
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./polar_y_pbc]
variable = polar_y
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./polar_z_pbc]
variable = polar_z
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./disp_x_pbc]
variable = disp_x
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./disp_y_pbc]
variable = disp_y
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[./disp_z_pbc]
variable = disp_z
primary = '7'
secondary = '8'
translation = '0 0 30'
[../]
[../]
[]
[Materials]
[./slab_ferroelectric]
type = LinearFerroelectricMaterial
block = '1'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = '1'
fill_method = symmetric9
[../]
[./strain]
type = ComputeSmallStrain
block = '1'
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1'
[../]
[./vacuum]
type = GenericConstantMaterial
block = '2'
[../]
[]
[Postprocessors]
[./bulk_energy]
type = BulkEnergy
execute_on = 'timestep_end'
block = '1'
[../]
[./wall_energy]
type = PZTWallEnergy
execute_on = 'timestep_end'
block = '1'
[../]
[./elastic_energy]
type = ElasticEnergy
execute_on = 'timestep_end'
block = '1'
[../]
[./coupled_energy]
type = CoupledEnergy
execute_on = 'timestep_end'
block = '1'
[../]
[./electrostatic_energy]
type = ElectrostaticEnergy
execute_on = 'timestep_end'
block = '1'
permittivity = 1.16
[../]
[./total_energy_noelastic]
type = TotalEnergyFlow
bulk_energy = bulk_energy
wall_energy = wall_energy
bulk_energy_fourth = bulk_energy_fourth
coupled_energy = coupled_energy
electrostatic_energy = electrostatic_energy
execute_on = 'timestep_end'
[../]
[./perc_change]
type = PercentChangePostprocessor
postprocessor = total_energy_noelastic
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 5.0e-5'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_converged_reason -snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_rtol -ksp_rtol -pc_type -sub_pc_factor_zeropivot -pc_factor_zeropivot'
petsc_options_value = ' 121 1e-8 1e-8 gamg 1e-50 1e-50'
[../]
[]
[Executioner]
type = Transient
[./TimeStepper] #iterative DT halfs the time it takes to find a solution? oh well, our time is fake in this simulation anyway...
type = IterationAdaptiveDT
dt = 0.85 #max seems to be about 1.0 but could depend on refinement...
#there is also a cutback on this for 0.2*optimal and yes i think it does count the 0th one.
#iteration_window = 10
optimal_iterations = 5 #i think this is 3 or more then cut? less than 3 grow, does it count the 0th iteration? no the cutting has to do with the iteration ratio
growth_factor = 1.4
linear_iteration_ratio = 100
cutback_factor = 0.35
[../]
solve_type = 'NEWTON' #"PJFNK, JFNK, NEWTON"
scheme = 'implicit-euler' #"implicit-euler, explicit-euler, crank-nicolson, bdf2, rk-2"
dtmin = 1e-13
dtmax = 1.285
[]
[Outputs]
print_linear_residuals = true
print_perf_log = true
[./out]
type = Exodus
file_base = out_PZT_nanowire_free_r10_h30
interval = 1
[../]
[]