-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHiMaD5a_DK.i
204 lines (184 loc) · 3.62 KB
/
CHiMaD5a_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
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
# CHiMaD benchmark problem #5 Stokes flow with MOOSE Navier-Stokes Modules
# Activation of navier_stokes module is required during compiling the code.
# Incompressible fluid flow with gravity in 2D
# 5a; without obstacle
[Mesh]
type = FileMesh
file = CHiMaD5a_mesh.msh
[]
mu=1
rho=100
[GlobalParams]
#Variable coupling and naiming
u = vel_x
v = vel_y
p = p
#Stabilization Parameters
supg = true
pspg = true
alpha = 1e0
#Problem coefficients
gravity = '0 -0.001 0'
#Weak form customization
convective_term = true
integrate_p_by_parts = true
transient_term = true
laplace = true
[]
[Variables]
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
#[AuxVariables]
# [./Check_Bernoulli]
# order = CONSTANT
# family = SCALAR
# [../]
#[]
[ICs]
[./IC_vel_x]
type = ConstantIC
variable = vel_x
value = 0.0
[../]
[./IC_vel_y]
type = ConstantIC
variable = vel_y
value = 0.0
[../]
#[./IC_pressure]
# type = ConstantIC
# variable = p
# value = 0.0
#[../]
[]
[Kernels]
#Continuity equations
[./mass]
type = INSMass
variable = p
[../]
#Time derivative of vel_x
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0 #May be x:0, y:1, z:2 ?
[../]
#[./x_gravity]
# type = NSGravityForce
# variable = vel_x
#[../]
#Time derivative of vel_y
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1 #May be x:0, y:1, z:2 ?
[../]
#[./y_gravity]
# type = NSGravityForce
# variable = vel_y
# acceleration = gravity
#[../]
[]
[Functions]
[./Inlet_vel]
type = ParsedFunction
value = '-0.001*(y-3)^2+0.009'
[../]
[]
[BCs]
[./vel_x_inlet]
type = FunctionDirichletBC
variable = vel_x
function = Inlet_vel
value = 0.0
boundary = inlet
[../]
[./vel_y_inlet]
type = DirichletBC
variable = vel_y
value = 0.0
boundary = inlet
[../]
[./vel_x_wall] #no-slip boundary conditions
type = DirichletBC
variable = vel_x
value = 0.0
boundary = wall
[../]
[./vel_y_wall] #no-slip boundary conditions
type = DirichletBC
variable = vel_y
value = 0.0
boundary = wall
[../]
[./Pressure]
type = DirichletBC
variable = p
value = 0.0
boundary = pressure_confine
[../]
#BC for outlet; natueal BC
#BC for pressure; natural BC
[]
[Materials]
[./Constants]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '100 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[../]
[]
[Executioner]
#Time integrator and time stepper customization
type = Transient
num_steps = 100
trans_ss_check = true
ss_check_tol = 1e-10
dtmin = 5e-4
dt = 0.5
[./TimeStepper]
dt = 0.5
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 5
[../]
#Solver tolerance and iteration limits
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
nl_max_its = 50
l_tol = 1e-6
l_max_its = 50
line_search = 'none'
# Options passed directly to PETSc
petsc_options = '-snes_converged_reason -ksp_converged_reason '
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package ' petsc_options_value = 'lu NONZERO superlu_dist '
[]
[Outputs]
exodus = true
[]