|
Explosions |
Fluid Dynamics Explosion Animation |
Explosion Program
Explosions - Fluid Dynamics Explosion Animation
Much of the information presented on this page was derived from
a paper by Gary D. Yngve, James F. O'Brien, and Jessica K. Hodgins.
Their paper, entitled Animating Explosions is available online at
http://www.gvu.gatech.edu/animation/Papers/yngve:2000:AE.pdf.
Motivation for using Fluid Dynamics
As stated by Gary Yngve, et al., "Explosions are among the
most dramatic phenomena in nature." To model
explosions appropriately, a physically-based
system must be implemented. Although particle systems can often
provide accurate and stunning results, they are
still limited in their abilities. Particle systems ignore several
key issues:
- Explosions have a "shock wave" that behaves very uniquely,
causing reflections, diffractions, and mergers of energy.
These properties cannot be represented through particles.
- Dust clouds often result from the blast of an explosion.
Calculating the "dust cloud effect" is computationally difficult in a
particle system.
- The fireballs created with a particle system are typically
spherical, rather than following the fluid dynamics model of real fire.
- Particle systems do not easily allow for refraction of
light due to the shock wave and heat associated with an explosion.
- Particle systems work poorly among a large system of objects,
such as buildings, mountains, or other natural environments.
With all of the severe limitations of the particle system
method, other options were investigated.
An empirical view of the blast wave was investigated next,
which helped provide features like dust clouds and refraction of light to
rendered scenes. However, the empirical view also maintains
several problems. Damages and forces applied to objects in a scene are
assumed to be universal over an entire surface, rather than
centering on specific locations. Additionally, the reflected waves from
the blast are ignored, which significantly limits the accuracy
of the explosion from the perspective of physics. Therefore, the
empirical view also yields artificial effects that leave the
renderings inaccurate.
Gary Yngve, et al., while working at the GVU Center and Georgia Tech's
College of Computing, extended explosions in computer
graphics with computational fluid dynamics "by modeling the
pressure wave and the surrounding air as a fluid discretized over a
three-dimensional rectilinear grid." A three-dimensional space
was maintained, and key properties including density, fluid mass,
pressure, velocity, temperature, and energy were maintained.
Unlike the previous empirical and analytical views of a blast wave,
they chose a fluid-based approach to modeling the wave.
This technique seems to overcome the limitations of both previous
approaches, and it is computationally acceptable.
Graphics and Fluid Dynamics
Computational fluid dynamics (CFD) is an approach for simulating
explosions that has gained wide acceptance recently, due to its potential
for providing a much higher degree of accuracy in describing real world
scenarios. One of its primary advantages is its ability to describe a
model which will behave in a true-to-life manner without relying on
drastic approximations and simplifications. This is not to say that these
models are perfect however, as they are still subject to limitations
inherent to the underlying physical sub-models and accuracy of the
numerical method used. Additionally, properties of the CFD model are
determined for the most part on empirical coefficients and values obtained
through real world experimentation. Therefore in order to ensure an
accurate model, values obtained through experimentation with the actual
type of event being simulated should be used, which limits the
applications of this approach. (2)
According to the generally accepted theory of CFD, fluids are
modeled as a continuum. In other words, a fluid is defined by equations
which describe its properties:
- density p (kg/m3)
- pressure P (N/m3)
- velocity v (m/s)
- temperature T (K)
- internal energy N (J/kg)
- total energy E = N + 1/2v 2 (J/kg)
These properties and equations are evaluated on a continuous basis
according to an Eulerian based definition, in which the equations apply to
a region of space associated with the fluid, rather than to the fluid
itself. Additional equations are needed relate to other physical
properties of fluids, such as conservation of momentum, mass, and energy,
its thermodynamic state, changes in the chemical equilibrium of the air,
and effects related to dissociation and ionization.
Most of these additional equations can be neglected by using
assumptions that generalize to constants many of the time-varying
properties dealing with the temperature. This is possible through the use
of high temperatures in the simulations, which allow aesthetically
pleasing results despite the use of slightly inaccurate values.
The first principle of fluid dynamics results from conservation of mass.
The second principle involves conservation of momentum.
The third principle comes from conservation of energy.
where
In order to relate to each other the energy, temperature, density,
and pressure of the fluid, the following equation must be used.
Here, cv is specific heat, and R represents the gas constant
of air.
In general, the motivations for simulating explosions differ
between the engineering and graphics communities differ fundamentally.
Engineering applications usually involve concentrating on one element in
the system, and considering other elements only in the context of how they
affect the element in question. For this reason, many engineering
simulations take place in a two-dimensional environment, with symmetry
being assumed for the third. In contrast, the motivation for the graphics
community is to create a depiction of the simulation which is all
inclusive. The behavior and interactions of all the elements in the scene
are relevant, as the accuracy of single elements in the scene are less
important than the accuracy of the scene as a whole. As opposed to
engineering simulations, which seek to determine a scientifically accurate
depiction of a model, the primary purpose of the graphics approach is to
create aesthetically pleasing simulations which are perceptually accurate
rather than intrinsically accurate.
Applying Computational Fluid Dynamics in a Graphics Implementation
In practice, implementing an approach based on CFD requires some
tinkering with the model, due to the fact that CFD was designed from an
engineering standpoint, the needs of which differ from that of one rooted
in graphics. The primary issue concerns the modeling of fluids as a
continuum. While this approach ensures a high degree of accuracy, total
accuracy is not always of paramount concern. First, animations by nature
do not describe behavior as it changes on a continual basis, but only in
discrete intervals (i.e. frames). Second, the goal of a simulation in
graphics is to produce aesthetic results. Thus, a discretized model may
be used in place of a continuous one provided they are visually
indistinguishable to an appropriate degree. Finally, from a practical
standpoint, it is preferable to discretize the model in order to allow for
numerical computation. It is also necessary to develop a method for
integrating the relevant equations from fluid dynamics.
The preferred method of discretization involves dividing the
volume into a system of cube shaped cells, called voxels. Then, instead
of integrating across a continuum, the fundamental equations can be
integrated explicitly across the voxels by approximating on them using
central differences. An example of this uses the equation
For each voxel, properties of the fluid are held constant. In order to
address problems associated with steep pressure gradients, a technique
called the donor-acceptor method is used. This method specifies that the
transfer of mass between voxels be proportional to the mass of the donor.
The scheme for updating voxels is based on the following
algorithm, which occurs at each timestep:
- Approximate the fluid acceleration.
- Approximate the final velocity.
- Approximate the change in internal energy.
- Compute the new density.
- Calculate the actual values for velocity and internal energy.
- Compute secondary values such as temperature.
Thus, the process for setting up an explosion simulation involves
first specifying a portion of the space to be the center of the explosion.
Then, a lattice of voxels is defined surrounding the area. The voxels at
the center are explicitly declared to have certain properties, such as
high temperature and pressure, which would be appropriate for describing
the initial state of an explosion. Then, the fundamental equations are
integrated explicitly over the system of voxels, updating each one with
new properties at each timestep.
Interacting with Solid Objects
When considering the interaction of an explosion with solid
objects, there are two related scenarios: applying a solid to a fluid,
and vice versa. An example of the first scenario occurs when a piston
compresses gas. An example of the second occurs when a bullet is fired
from a gun. There are two representations of objects at work when
incorporating these interactions. When applying a solid to a fluid, it is
necessary to use a representation in voxels of the volume of the fluid,
so that it may be displaced upon interaction with an object. When
applying a fluid to a solid, a polygonal mesh is employed to transfer
force from the fluid to the object.
These two scenarios are incorporated into the system in the same way:
- Apply forces on objects from the fluid, and compute the motion of the
objects.
- Recompute the voxel representation of the objects, if it has moved at
least one voxel.
- Displace fluid depending on the movement of objects.
- Update the fluid.
Modeling the Visible Effects of an Explosion
An important aspect of modeling explosions in computer graphics is
making it look like an explosion. The effects of an explosion could be
seen without file-balls and dust-clouds, but then it wouldn't be much
fun. With the fluid dynamics approach to explosion animation, these
effects can be rendered after the actual explosion computation has taken
place.
As the blast wave travels outward from the explosion, once can see a
bending of the light as it passes through the blast wave. This
refraction of the light is a result of the bending of the light as it
passes through the blast wave, which has a higher density than the air
surrounding it. This higher density causes the blast wave to have a
higher index of refraction than the surrounding air.
The fluid dynamics technique models this phenomenon with ray tracing
using refraction. The index of refraction for each position in the
volume in the ray tracing process using [link]trilinear interpolation[/link] of the
densities of neighboring voxels.
Computation of the index of refraction is done according to the
Dale-Gladstone law. If this index of refraction is beyond
a certain threshold, then the direction of the ray cast from this
position is recalculated according to Snell's law.
To render the fireball created by the explosion, particles are placed
inside the shape to be exploded, and this material is used to determine
the shape and color of the fireball.
It's often the case that you want to show the fireball that results from
an explosion. To render the fireball created by the explosion,
particles are placed inside the shape to be exploded, and this material
is used to determine the shape and color of the fireball.
In order for the fireball to take on realistic characteristics, the
particles detonating in the fireball are mass-less and flow with this
fluid representing the explosion. Each particle has an associated
temperature whose value is calculated according to its position in the
explosion fluid. Color values are assigned to the particle with
blackbody radiation.
Since the blast wave affects the environment surrounding it, in a real
life simulation its useful to model how these surrounding particles are
affected. A concrete representation of these surrounding particles is
dust. These particles are hard to empirically study, so the behavior of
the environment particles is a parameter to be set by the
animator, although the simulation takes over once a particle becomes
airborne.
The behavior of the particle once airborne is determined by that
particle's size: smaller particles are more affected by
drag forces, and less so by inertial forces.
Sources
- Primary Source: http://www.gvu.gatech.edu/animation/Papers/yngve:2000:AE.pdf
- http://www.aiche.org/publications/safetyprogress/pdf/psp184235.pdf
- http://www.cs.washington.edu/homes/tzoompy/graphics/
|