Graphics Reference
In-Depth Information
The
here is a parameter that can be adjusted to control the effect of
vorticity confinement. The Δ
x
factor, as mentioned above, makes this
physically consistent: as we refine the grid and Δ
x
tends to zero, the
erroneous numerical dissipation of vorticity also tends to zero so our fix
should too.
Let's step through numerically implementing this. We begin by av-
eraging velocities from the MAC grid to the cell centers (as discussed in
Chapter 2) and then use central derivatives to approximate the vorticity:
1
ω
i,j,k
=
w
i,j
+1
,k
−
w
i,j−
1
,k
2Δ
x
v
i,j,k
+1
−
v
i,j,k−
1
2Δ
x
−
,
u
i,j,k
+1
−
u
i,j,k−
1
2Δ
x
w
i
+1
,j,k
−
w
i−
1
,j,k
2Δ
x
−
,
.
v
i
+1
,j,k
−
u
i,j
+1
,k
−
v
i−
1
,j,k
2Δ
x
u
i,j−
1
,k
2Δ
x
−
The gradient of
is similarly estimated with central differences at the
grid cell centers, for use in defining
ω
N
:
∇
ω
i,j,k
=
.
ω
|
i
+1
,j,k
−
ω
|
i−
1
,j,k
,
ω
|
i,j
+1
,k
−
ω
|
i,j−
1
,k
,
ω
|
i,j,k
+1
−
ω
|
i,j,k−
1
2Δ
x
2Δ
x
2Δ
x
When we normalize this to get
N
, we should of course guard against a
divide-by-zero by using, for example,
∇
ω
i,j,k
N
i,j,k
=
+10
−
20
M
,
∇
ω
i,j,k
where
M
is a characteristic value of units m
−
1
s
−
1
for the simulation—
nothing to be too concerned about;
M
=1
/
(Δ
x
Δ
t
) is fine just to make
sure this scales properly. Finally, we take the cross-product to get
f
conf
at
the grid cell centers; we can take the appropriate averages to apply this to
the different components of velocity on the MAC grid.
Ideally we would connect the confinement parameter
with the ex-
pected numerical dissipation of vorticity. However, this has yet to be done,
but in the meantime serves as another tweakable parameter for the sim-
ulation. If set too high, the simulation can go quasi-unstable, reducing
the velocity field to essentially a random turbulent chaos; more moderate
values encourage fine-scale vortices and keep the flow more lively.
1
Note that the null-space problem we discussed earlier isn't particularly alarming
here: we just will lack the ability to “see” and boost the very smallest vortices. We still
get the benefit of boosting slightly larger ones.