-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parsed_SplitCH.i
170 lines (152 loc) · 3.04 KB
/
Parsed_SplitCH.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
#
# Example problem showing how to use the DerivativeParsedMaterial with SplitCHParsed.
# The free energy is identical to that from SplitCHMath, f_bulk = 1/4*(1-c)^2*(1+c)^2.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 150
xmax = 60
ymax = 60
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[AuxVariables]
#[./local_energy]
# order = CONSTANT
# family = MONOMIAL
#[../]
[./energy_density]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = RandomIC
variable = c
#min = -0.1
#max = 0.1
min = 0.45
max = 0.55
[../]
#[./MyIc1]
# type = SpecifiedSmoothCircleIC
# variable = c
# x_positions = '40 15 45'
# y_positions = '30 15 2'
# z_positions = ' 0 0 0'
# radii = '3 2 5'
# invalue = 1.0
# outvalue = 0.1
#[../]
[]
[AuxKernels]
#[./local_energy]
# type = TotalFreeEnergy
# variable = local_energy
# f_name = fbulk
# interfacial_vars = c
# kappa_names = kappa_c
# execute_on = timestep_end
#[../]
[./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'
# [../]
#[../]
#[./zero_flux_BC]
# type = NeumannBC
# variable = c
# boundary = all
# value = 0
#[../]
#Do nothing means no-flux boundary condition
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
#prop_values = '1.0 0.5'
prop_values = '0.75 1.0'
[../]
[./free_energy]
type = DerivativeParsedMaterial
f_name = fbulk
args = c
constant_names = 'W kbT'
#constant_names = chem_pot
#constant_expressions = 1.0/2^2
constant_expressions = '1 0.1'
#const_names = kbt
#constant_expressions = 0.1
#function = W*(1-c)^2*(1+c)^2
#function = chem_pot*(1-c)^2*(1+c)^2
#function = chem_pot*(c)^2*(1-c)^2
function = W*c*(1-c)+kbT*(c*plog(c,1e-4)+(1-c)*plog(1-c,1e-4))
enable_jit = true
outputs = exodus
[../]
[]
[Postprocessors]
[./top]
#type = SideIntegralVariablePostprocessor
type = ElementIntegralVariablePostprocessor
variable = c
#boundary = top
[../]
#[./total_free_energy]
# type = ElementIntegralVariablePostprocessor
# variable = local_energy
#[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = energy_density
[../]
[]
[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 '
l_max_its = 30
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
dt = 2.0
#end_time = 20.0
end_time = 20.0
[]
[Outputs]
exodus = true
print_perf_log = true
csv = true
[]