-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNS_Master_airfoil.i
230 lines (203 loc) · 4.13 KB
/
NS_Master_airfoil.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
[Mesh]
second_order = true
[fmg]
type = FileMeshGenerator
file = Mesh3.exo
[]
[]
#[Mesh]
# file = NACA_airfoil_PP.e
#[]
[Variables]
# Pressure
[./p]
order = FIRST
family = LAGRANGE
#initial_from_file_var = p
#initial_from_file_timestep = LATEST
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[AuxVariables]
# x-star velocity
[./u_star]
order = SECOND
family = LAGRANGE
#initial_from_file_var = u_star
#initial_from_file_timestep = LATEST
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
# y-star velocity
[./v_star]
order = SECOND
family = LAGRANGE
#initial_from_file_var = v_star
#initial_from_file_timestep = LATEST
[./InitialCondition]
type = ConstantIC
value = 0.05
[../]
[../]
[./u]
order = SECOND
family = L2_LAGRANGE
#initial_from_file_var = u
#initial_from_file_timestep = LATEST
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./v]
order = SECOND
family = L2_LAGRANGE
#initial_from_file_var = v
#initial_from_file_timestep = LATEST
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[./p_current]
order = FIRST
family = LAGRANGE
#initial_from_file_var = p
#initial_from_file_timestep = LATEST
[../]
[./p_old]
order = FIRST
family = LAGRANGE
#initial_from_file_var = p
#initial_from_file_timestep = LATEST
[../]
[]
[Kernels]
[./PressurePoisson]
type = NavStokesPressurePoisson_p
variable = p
u_star = u_star
v_star = v_star
p = p
[../]
[]
[AuxKernels]
[corrector_x]
type = Corrector
variable = u
execute_on = timestep_end
p = p
u_star = u_star
v_star = v_star
component = 0
[]
[corrector_y]
type = Corrector
variable = v
execute_on = timestep_end
p = p
u_star = u_star
v_star = v_star
component = 1
[]
[]
[BCs]
[./pressure_outlet]
type = DirichletBC
variable = p
boundary = 'OUTLET'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
#block = 'FLUID'
block = 'SOLID'
prop_names = 'rho mu'
prop_values = '1 0.002' #Re 100 : 0.002; Re 500 : 0.0004
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
#solve_type = 'NEWTON'
solve_type = 'LINEAR'
[../]
[]
[Executioner]
type = Transient
num_steps = 100
dt = .1
dtmin = .1
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter' #USED FOR RE 100
petsc_options_value = 'hypre boomeramg 6'
#petsc_options_iname = '-pc_type'
#petsc_options_value = 'lu'
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
#petsc_options_value = 'asm 2 ilu 4'
#line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
picard_max_its = 1
[]
[MultiApps]
[./sub_predictor]
type = TransientMultiApp
input_files = NS_Predictor_airfoil.i
execute_on = TIMESTEP_BEGIN
[../]
[]
[Transfers]
[./u_star_from_sub_predictor]
type = MultiAppCopyTransfer
direction = from_multiapp
multi_app = sub_predictor
source_variable = u_star
variable = u_star
[../]
[./v_star_from_sub_predictor]
type = MultiAppCopyTransfer
direction = from_multiapp
multi_app = sub_predictor
source_variable = v_star
variable = v_star
[../]
[./u_to_sub_predictor]
type = MultiAppCopyTransfer
#type = MultiAppCopyTransfer
direction = to_multiapp
multi_app = sub_predictor
source_variable = u
variable = u
[../]
[./v_to_sub_predictor]
type = MultiAppCopyTransfer
#type = MultiAppCopyTransfer
direction = to_multiapp
multi_app = sub_predictor
source_variable = v
variable = v
[../]
[./p_to_sub_predictor]
type = MultiAppCopyTransfer
direction = to_multiapp
multi_app = sub_predictor
source_variable = p
variable = p
[../]
[]
[Outputs]
file_base = NACA_airfoil_Chorin
exodus = true
checkpoint = true
[]