|On this page|
Pyro is a purely volumetric fluid solver: the data that represents the state of a pyro fluid lives in various scalar and vector fields. The Smoke object takes care of creating these fields, and the node has extensive options for visualizing them during the simulation.
velvector field contains the fluid’s instantaneous velocities. The smoke’s motion is governed by its velocity field.
densityscalar field captures the amount of visible soot. Regions with high
densitywill appear to have thicker smoke.
temperaturescalar field captures the distribution of heat. Hotter gas tends to rise due to buoyancy. It is recommended that contents of this field remain normalized (that is, sourced values should be between
0and some convenient upper bound, such as
1). The physical meaning behind values in this field is controlled by Ambient Temp (K) and Reference Temp (K) parameters on the pyro solver.
These parameter values are in Kelvin. The conversion formulas between Kelvin and other common temperature units are provided in the table below.
From Kelvin (
Degrees Celsius (
C + 273.15
K - 273.15
Degrees Fahrenheit (
(F - 32) * 5/9 + 273.15
(K - 273.15) * 9/5 + 32
temperaturevalues cool down to
0, physically corresponding to the ambient temperature in the surrounding environment.
flamescalar field stores the remaining lifetime of reactants. See the Flames page for a more detailed explanation of this field.
divergencescalar field captures the desired expansion and compression. See the Pressure Projection section below for more information.
pressureis an auxiliary scalar field containing the fluid’s internal pressure. It may be useful to visualize this field, but it’s otherwise not useful.
collisionvelfields contain a mask signaling the presence of colliders and their velocities, respectively. The
collisionfield is positive in the areas that are occupied by a collider and negative everywhere else. See the Colliders section below for more information about adding colliders to pyro simulations.
activemask field captures the active simulation region when the solver is set to operate in sparse mode. See the Sparse vs Dense help page for more information on sparse simulations.
Inside the Pyro Solver
The pyro solver takes care of evolving the simulation fields mentioned above in a manner consistent with smoke. At each timestep, the following steps are performed by the solver:
temperatureis diffused and cooled:
Diffusion represents the transfer of heat from hotter to colder areas, and cooling captures the radiative loss of heat.
Advection refers to the transport of fluid quantities by the flow. This step is responsible for applying the motion to all relevant fields.
flamefield is aged and its outputs generated:
flamefield stores the remaining lifetime of reactants. This step simulates their reaction. See the Flames help page for more information.
Dissipation reduces the smoke density over time, causing it to gradually disappear.
Sourcing is performed:
The solver’s Sourcing input should be used to add new quantities into the simulation (such as
The simulation container is resized:
Resizing must be done to ensure that the simulation domain is large enough to accommodate motion within the timestep, but also small enough to avoid unnecessary computations.
If the solver is operating in sparse mode, the active region is also computed at this point. See the Understanding Resizing section for more information.
Force nodes are applied:
If there are any force nodes in the simulation network (such as gravity, wind, etc.), their effect is applied to the
Buoyancy is applied:
Hot gas is less dense and rises due to buoyancy. This effect is driven by
temperatureand added to
Viscosity is incorporated into
Viscosity refers to dynamic "thickness" of a fluid. More viscous fluids tends to exhibit less chaotic motion. For example, honey is more viscous than water.
Shape operators are applied:
The pyro solver includes several shape operators that affect the motion and emergent shape of the smoke: disturbance, shredding, and turbulence. See pyro workflow for information on how to control these forces.
Custom forces are applied:
Custom forces can be introduced by attaching nodes to the solver’s Forces input.
Pressure projection is performed:
Pressure projection is a key step in the simulation. It ensures that
velfield at the end of the time step agrees with expansion and shrinking prescribed by goal divergence. See Pressure Projection for a deeper discussion of this step.
You can make the smoke or fire interact with other objects by adding them as colliders to the pyro simulation. The simplest way to do this is by using a Static Object (for colliders that don’t move or change shape) or a Deforming Object (for dynamic colliders). These are easily applied using the tools located on the Collisions shelf. These tools automate the tasks of collision detection and velocity sampling. For most scenarios, this method of setting up colliders is sufficient.
An alternate way to introduce colliders is by manually sourcing into
collisionvel simulation fields. This approach requires a little more effort, but offers greater control over collision velocities. You can use the Collide with Objects tool on the Populate Containers shelf to streamline this process. If you chose to go with this more manual approach, it is important to attach the volume source node to the solver’s Forces input.
The SOP version of the pyro solver supports both of these methods. The Create From parameter on the Setup tab allows you to select between the two modes.
The two described methods for adding colliders differ only in the way that the
collisionvel fields are built. Collision enforcement itself is done the same way in both cases. In particular, the pressure projection stage mediates the transfer of momentum between the gas and colliders. This is done by alternating collision enforcement and projection passes. The IOP Iterations parameter on the Advanced ▸ Collisions tab of the pyro solver controls the number of times this process is iterated. By default, this is only done once However, if your colliders are fast or you notice smoke tunneling through them, consider increasing the number of IOP Iterations.
Pressure projection is a critical stage in a fluid simulation. It is responsible for coupling the fluid with the colliders, for giving rise to vortices in incompressible flow, as well as causing the sudden and rapid expansion for an explosion.
The pyro solver uses the Gas Project Non-Divergent Multigrid DOP to perform pressure projection.
divergence field is considered when performing pressure projection. If nothing is adding to the
divergence field in the simulation (that is, the
divergence field remains constantly zero), then the flow will be incompressible or divergence-free. The result of making a simple velocity field divergence-free is given below. Initially, the field is zero everywhere except the circular region, where there are upward velocities. Pressure projection adds velocities around its sides to channel the flow back to the bottom of the circular region.
Intuitively, positive regions of the
divergence field will correspond to expansion (outward-pointing velocity vectors), while negative areas will result in "shrinking" (inward-pointing velocity vectors). The diagrams below illustrate this explanation.
The left column shows the goal divergence field: red areas are positive, blue areas are negative, and green represents zero regions. Images in the right column contain the resulting vector field after pressure projection.
The Sparse Fireball shelf tool demonstrates the two recommended ways of interacting with the
divergence field. First, there is direct sourcing into it, which is responsible for the powerful initial blast. To ensure that the rising fireball continues to expand, the
flame field also contributes to
divergence, since Add Expansion is enabled in the solver’s Flames tab. See the Flames help page for more details about the