-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHiMaD1d_DK.i
148 lines (130 loc) · 2.71 KB
/
CHiMaD1d_DK.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
#
# Example problem showing how to use the DerivativeParsedMaterial with SplitCHParsed.
#
[Mesh]
type = FileMesh
file = sphere_mesh.e
uniform_refine = 4
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[AuxVariables]
[./energy_density]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = FunctionIC
function = sphereICfnc
variable = c
[../]
[]
[Functions]
[./sphereICfnc]
type = ParsedFunction
value = 'C0+Epsilon*(cos(8*acos(z/r))*cos(15*atan(y/x))+(cos(12*acos(z/r))*cos(10*atan(y/x)))^2+cos(2.5*acos(z/r)-1.5*atan(y/x))*cos(7*acos(z/r)-2*atan(y/x)))'
vars = 'C0 Epsilon r'
vals = '0.5 0.05 100'
[../]
[]
[AuxKernels]
[./energy_density]
type = TotalFreeEnergy
variable = energy_density
f_name = fbulk
interfacial_vars = c
kappa_names = kappa_c
execute_on = timestep_end
[../]
[]
[BCs]
#[./Periodic]
# [./all]
# auto_direction = 'x y'
# [../]
#[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '5.0 2.0'
[../]
[./free_energy]
type = DerivativeParsedMaterial
f_name = fbulk
args = c
constant_names = 'Q ca cb'
constant_expressions = '5.0 0.3 0.7'
function =Q*(c-ca)^2*(c-cb)^2
enable_jit = true
outputs = exodus
[../]
[]
[Postprocessors]
[./ctot]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = energy_density
[../]
[./endcriterion]
type = ElementAverageTimeDerivative
variable = energy_density
[../]
[]
[UserObjects]
[./end]
type = Terminator
expression = 'abs(endcriterion)<1e-14'
[../]
[]
[Preconditioning]
[./cw_coupling]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
#scheme = bdf2
#petsc_options_iname = '-pc_type -sub_pc_type'
#petsc_options_value = 'asm lu '
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 2'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 50
nl_rel_tol = 1e-8
dt = 1.0
#end_time = 20.0
end_time = 500000.0
timestep_tolerance = 1e-1
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt=1
percent_change = 0.05
[../]
[]
[Outputs]
exodus = true
sync_times = '1 5 10 20 100 200 500 1000 2000 3000 10000 400000 100000 250000 5000000'
sync_only = true
print_perf_log = true
csv = true
[]