-
Notifications
You must be signed in to change notification settings - Fork 0
/
Re_t180.i
344 lines (316 loc) · 5.81 KB
/
Re_t180.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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
von_karman_const = 0.41
H = 1 #halfwidth of the channel
L = 150
Re_t = 180
Re = 5600
#rho = 1
#mu = 1
#nu = 1
#momentum_force = ${fparse Re_t * Re_t * nu * nu / H / H / H} #needs periodic BC's
rho = 1
bulk_u = 1
mu = ${fparse rho * bulk_u * 2 * H / Re}
advected_interp_method='upwind'
velocity_interp_method='rc'
[GlobalParams]
two_term_boundary_expansion = true
[]
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${L}'
dy = '0.9 0.1'
ix = '200'
iy = '18 1'
[]
[]
#[Mesh]
# [gen]
# type = GeneratedMeshGenerator
# dim = 2
# xmin = 0
# xmax = ${L}
# ymin = 0
# ymax = ${H} #Channel is 2H tall, half channel H for symmetry
# nx = 40
# ny = 3
# []
#[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[mixing_len]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[wall_shear_stress]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[wall_yplus]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
#[UserObjects]
# [./inlet_solution]
# type = SolutionUserObject
# mesh = Re_t180_out.e
# system_variables = 'u v'
# translation = '${fparse -0.8 * L} 0 0'
# timestep = LATEST
# [../]
#[]
#[Functions]
# [./set_inlet_u]
# type = SolutionFunction
# solution = inlet_solution
# from_variable = u
# [../]
# [./set_inlet_v]
# type = SolutionFunction
# solution = inlet_solution
# from_variable = v
# [../]
#[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
vel = 'velocity'
pressure = pressure
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_quantity = 'rhou'
vel = 'velocity'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
pressure = pressure
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[u_viscosity]
type = FVDiffusion
variable = u
coeff = ${mu}
[]
[u_viscosity_rans]
type = INSFVMixingLengthReynoldsStress
variable = u
rho = ${rho}
mixing_length = mixing_len
momentum_component = 'x'
u = u
v = v
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
p = pressure
[]
#[u_force]
# type = FVBodyForce
# variable = u
# function = function_force
#[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_quantity = 'rhov'
vel = 'velocity'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
pressure = pressure
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[v_viscosity]
type = FVDiffusion
variable = v
coeff = ${mu}
[]
[v_viscosity_rans]
type = INSFVMixingLengthReynoldsStress
variable = v
rho = ${rho}
mixing_length = mixing_len
momentum_component = 'y'
u = u
v = v
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
p = pressure
[]
[]
[AuxKernels]
[mixing_len]
type = WallDistanceMixingLengthAux
walls = 'top'
variable = mixing_len
execute_on = 'initial'
von_karman_const = ${von_karman_const}
[]
[wall_shear_stress]
type = WallFunctionWallShearStressAux
variable = wall_shear_stress
walls = 'top'
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[wall_yplus]
type = WallFunctionYPlusAux
variable = wall_yplus
walls = 'top'
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = '0'
[]
#[inlet-u]
# type = INSFVInletVelocityBC
# boundary = 'left'
# variable = u
# function = 'set_inlet_u'
#[]
#[inlet-v]
# type = INSFVInletVelocityBC
# boundary = 'left'
# variable = v
# function = 'set_inlet_v'
#[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = u
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = v
function = 0
[]
[wall-u]
type = INSFVWallFunctionBC
variable = u
boundary = 'top'
u = u
v = v
mu = ${mu}
rho = ${rho}
momentum_component = x
[]
[wall-v]
type = INSFVWallFunctionBC
variable = v
boundary = 'top'
u = u
v = v
mu = ${mu}
rho = ${rho}
momentum_component = y
[]
[sym-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[sym-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[]
#[Functions]
# [./function_force]
# type = ConstantFunction
# value = momentum_force
# [../]
#[]
[Materials]
[ins_fv]
type = INSFVMaterial
u = 'u'
v = 'v'
pressure = 'pressure'
rho = ${rho}
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[restart_out] # creates input_other.e
type = Exodus
[]
[]