Graphics Reference
In-Depth Information
Modeling gaseous phenomena (smoke, clouds, and fire) is particularly challenging because of their
ethereal nature. Gas has no definite geometry, no definite topology. Gas is usually treated as compress-
ible , meaning that density is spatially variable and computing the changes in density is part of the com-
putational cost. Liquids are usually treated as incompressible , which means the density of the material
remains constant. In fact, the equations in Section 8.1.1 were derived from the CFD equations.
In a steady-state flow , the motion attributes (e.g., velocity and acceleration) at any point in space are
constant. Particles traveling through a steady-state flow can be tracked similarly to how a space curve
can be traced out when the derivatives are known. Vortices , circular swirls of material, are important
features in fluid dynamics. In steady-state flow, vortices are attributes of space and are time invariant.
In time-varying flows, particles that carry a non-zero vortex strength can travel through the environ-
ment and can be used to modify the acceleration of other particles in the system by incorporating a
distance-based force.
8.2.1 General approaches to modeling fluids
There are three approaches to modeling gas: grid-based methods ( Eulerian formulations ), particle-
based methods ( Lagrangian formulations ), and hybrid methods. The approaches are illustrated here
in two dimensions, but the extension to three dimensions should be obvious.
Grid-based method
The grid-based method decomposes space into individual cells, and the flow of the gas into and out of
each cell is calculated ( Figure 8.17 ). In this way, the density of gas in each cell is updated from time step
to time step. The density in each cell is used to determine the visibility and illumination of the gas
during rendering. Attributes of the gas within a cell, such as velocity, acceleration, and density, can
be used to track the gas as it travels from cell to cell.
The flow out of the cell can be computed based on the cell velocity, the size of the cell, and the cell
density. The flow into a cell is determined by distributing the densities out of adjacent cells. External
forces, such as wind and obstacles, are used to modify the acceleration of the particles within a cell.
A
B
FIGURE 8.17
Grid-based method. (A) Gas flowing through an individual cell. (B) Grid of cells.
 
Search WWH ::




Custom Search