-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDroppingBubble_Adaptive.i
216 lines (189 loc) · 3.99 KB
/
DroppingBubble_Adaptive.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
[GlobalParams]
L0 = 1e-2
Ca = 0.025
Mobility = 1e-7
MonotonicPressure = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[]
[./Partitioner]
type = LibmeshPartitioner
partitioner = PARMETIS
[../]
[]
[Variables]
[./u]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[./phi]
[../]
[./mu]
[../]
[]
[Kernels]
[./ResMass]
type = ADResMass
variable = p
[]
[./ResMom]
type = ADResMom
variable = u
[]
[./ResPhi]
type = ADResPhi
variable = phi
[]
[./ResMu]
type = ADResMu
variable = mu
[]
[]
[ICs]
[./phi_ic]
type = FunctionIC
variable = phi
function = 'tanh(sqrt(2.0)/2.0 * ((sqrt((x-0.5001)^2 + (y-0.5001)^2) - 0.15) / (0.025)))'
#function = '-tanh(sqrt(2)/2.0 * ((sqrt((x-0.5001)^2 + (0.5001-0.5001)^2) - 0.25) / (0.02)))'
[../]
[]
# [BCs]
# [./Periodic]
# [./all]
# variable = 'mu phi u p'
# auto_direction = 'x y'
# [../]
# [../]
# []
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = u
boundary = 'bottom right left top'
[../]
[]
[Materials]
[./ADMaterial_NSCH]
type = ADMaterial_NSCH
phase_field = phi
chemical_potential = mu
velocity = u
pressure = p
output_properties = 'rho ResMomStrong'
outputs = Soln
[../]
[]
[Preconditioning]
active = 'SMP'
[./MUMPS]
type = SMP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'preonly lu mumps'
[]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 50 preonly lu 0'
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
# petsc_options_value = 'hypre boomeramg 31 0.7'
[../]
[./FDP_n_full]
type = FDP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_jfnk]
type = FDP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = GeneralizedAlpha
[]
nl_rel_tol = 1e-6
nl_abs_tol = 1e-15
nl_max_its = 10
l_tol = 1e-5
l_max_its = 500
# Time Stepping information
start_time = 0
end_time = 1.5
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-4
growth_factor = 1.25
cutback_factor = 0.75
optimal_iterations = 4
linear_iteration_ratio = 100
[../]
[]
[Adaptivity]
max_h_level = 2
interval = 1
#cycles_per_step = 2
marker = combo
initial_marker = combo
initial_steps = 2
[./Markers]
[./combo]
type = ComboMarker
markers = 'mark_phi_grad'
[../]
[./value_marker]
type = ValueRangeMarker
lower_bound = -0.75
upper_bound = 0.75
buffer_size = 0.2
variable = phi
[../]
[./mark_phi_grad]
type = ErrorFractionMarker
coarsen = 0.2
refine = 0.6
indicator = ind_phi_grad
[../]
[../]
[./Indicators]
[./ind_phi_grad]
type = GradientJumpIndicator
variable = phi
[../]
[../]
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
print_linear_converged_reason = true
print_nonlinear_converged_reason = true
print_nonlinear_residuals = true
[Soln]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END FINAL'
time_step_interval = 10
[]
[./console]
type = Console
output_file = true
[../]
# [debug] # This is a test, use the [Debug] block to enable this
# type = VariableResidualNormsDebugOutput
# []
[]