forked from idaholab/moose
/
2d-rc-ambient-convection.i
202 lines (190 loc) · 3.57 KB
/
2d-rc-ambient-convection.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
mu=1
rho=1
k=1e-3
cp=1
advected_interp_method='average'
velocity_interp_method='rc'
[GlobalParams]
two_term_boundary_expansion = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = -1
ymax = 1
nx = 50
ny = 16
[]
[]
[Problem]
fv_bcs_integrity_check = true
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[temperature]
type = INSFVEnergyVariable
[]
[]
[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_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
p = pressure
[]
[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_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
p = pressure
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = temperature
vel = 'velocity'
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
pressure = pressure
u = u
v = v
mu = ${mu}
rho = ${rho}
[]
[energy_diffusion]
type = FVDiffusion
coeff = ${k}
variable = temperature
[]
[ambient_convection]
type = NSFVEnergyAmbientConvection
variable = temperature
T_ambient = 100
alpha = 'alpha'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = temperature
value = 1
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'cp alpha'
prop_values = '${cp} 1'
[]
[ins_fv]
type = INSFVMaterial
u = 'u'
v = 'v'
pressure = 'pressure'
rho = ${rho}
temperature = 'temperature'
[]
[]
[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 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]