-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyDPMtest.i
165 lines (150 loc) · 2.95 KB
/
myDPMtest.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
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 1
ymax = 1
[]
[Variables]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./px]
order = FIRST
family = MONOMIAL
[../]
[./py]
order = FIRST
family = MONOMIAL
[../]
#[./pz]
# order = FIRST
# family = MONOMIAL
#[../]
[]
[ICs]
[./u_circle_IC]
type = SmoothCircleIC
variable = p
x1 = 0.5
y1 = 0.5
radius = 0.02
int_width = 0.06
invalue = 1
outvalue = 0
[../]
[]
[BCs]
[]
[AuxKernels]
[./calc_px]
type = VariableGradientComponent
variable = px
gradient_variable = p
component = x
execute_on = TIMESTEP_BEGIN
[../]
[./calc_py]
type = VariableGradientComponent
variable = py
gradient_variable = p
component = y
execute_on = TIMESTEP_BEGIN
[../]
#[./calc_pz]
# type = VariableGradientComponent
# variable = pz
# gradient_variable = p
# component = z
# execute_on = TIMESTEP_BEGIN
#[../]
[]
[Kernels]
[./TimeDerivative]
type = TimeDerivative
variable = p
#tau_name = tau_op
#Coupled_variables = 'px py'
[../]
#[./AnisotropicDiffusion]
# type = myDPMtraining
# variable = p
# mob_name = L
# kappa_name = kappa_op
# coupled_variables = 'px py'
#[../]
[./AnisotropicDiffusion]
type = myDPMtraining2
variable = p
mob_name = L
kappa_name = kappa_op
grad_aeta_x = px
grad_aeta_y = py
[../]
[]
[Materials]
[./Anisotropy_strength]
type = GenericConstantMaterial
prop_names = eps0
prop_values = 0.05
[../]
[./kappa]
type = DerivativeParsedMaterial
f_name = kappa_op
args = 'px py'
constant_names = 'k0'
constant_expressions = '1.0'
material_property_names = 'eps0'
function = 'if(px^2 + py^2 > 100, k0 * (1 + eps0 * (px^4 + py^4)/(px^2 + py^2))^2,0)'
#function = 'k0'
derivative_order = 2
outputs = exodus
[../]
[./L]
type = GenericConstantMaterial
prop_names = L
prop_values = 1.0
[../]
[./tau]
type = DerivativeParsedMaterial
f_name = tau_op
args = 'px py'
constant_names = 'tau0'
constant_expressions = '1'
material_property_names = 'eps0'
function = 'if(px^2 + py^2 > 100, tau0 * (1 + eps0 * (px^4 + py^4)/(px^2 + py^2))^2,0)'
#function = 'k0'
derivative_order = 2
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
#solve_type = NEWTON
scheme = bdf2
#steady_state_detection = true
#steady_state_tolerance = 1e-08
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu ' #asm: Additive Schwartz method, lu: LU factorization
l_max_its = 50
l_tol = 1e-20
nl_max_its = 20
nl_rel_tol = 1e-11
line_search = none
dt = 1e-9
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-9
optimal_iterations = 20
iteration_window = 5
[../]
[]
[Outputs]
exodus = true
print_perf_log = true
[]