Incompressible Navier-Stokes
1. Thin flame tracked by level set $\phi$ 1
- Implicit surface where (
$\phi=0$ ) defines the interface between-
Fuel (
$\phi>0$ ) blue-core reaction zone -
Hot Gas (
$\phi<0$ )
-
Fuel (
- velocity of surface
$$w = u_{fuel} + S\cdot n$$ - Implicit surface unit normal vector (central differencing)
$$\mathbf{n} = \nabla\phi/|\nabla\phi|$$ - Time derivative of level set (upwind differencing for
$\nabla\phi$ )$$\phi_t = -(\mathbf{u}_f + S\mathbf{n})\cdot\nabla\phi$$
- evolve fuel and hot gas velocity fields separately
2. Add Force (before advection)2
- Buoyancy
$$f_{buoy} = \alpha(T - T_{air})\hat{z}$$ - Vorticity Confinement
- Vorticity vector
$$\mathbf{\omega} = \nabla\times\mathbf{u}$$ - Normalized vorticity location vector (central differencing)
$$\mathbf{n} = \nabla|\mathbf{\omega}|/|\nabla|\mathbf{\omega}||$$ - Force of vorticity confinement
$$f_{conf} = \varepsilon h(\mathbf{N}\times\mathbf{\omega})$$
- Vorticity vector
3. Advection3
- for incompressible flow (Stam's 4-step loop)
- Stable Semi-Lagrangian
semi_lagrangian_advect
- with implicit diffusion
diffuse_velocity
- and a Poisson solve for pressure
project_hot
- (mass conservation)
$\nabla\cdot\mathbf{u}=0$ - i.e. when hot gas advection samples fuel, synthesize correct cross-interface value
-
$V_h^{ghost} = V_f + (\rho_f/\rho_h)S$ - (normal velocity of fuel)
$V_f = \mathbf{u}_f\cdot\mathbf{n}$
- (normal velocity of fuel)
$u_h^{ghost} = V_h^{ghost}\mathbf{n} + \mathbf{u}_f - (\mathbf{u}_f\cdot\mathbf{n})\mathbf{n}$
-
- (advected and decreased by 1 per unit time)
- time since crossing blue core
- with radiative cooling
- proportional to
$(T - T_{air})^4$ $T_t = -(\mathbf{u}\cdot\nabla)T - c_T\Big(\frac{T - T_{air}}{T_{max} - T_{air}}\Big)^4$
- proportional to
-
$c_T$ : cooling constantp.k_cool
- By Fourier's law for an isotropic medium, the rate of flow of heat energy per unit area through a surface is proportional to the negative temperature gradient across it:
$\mathbf{q}_{heat flow} = -k\nabla T(\mathbf{x}, t)$
- not full Monte-Carlo ray marcher, but good first pass)
- for full correctness, see stochastic ray marching of the RTE (stanford)
- Diffusion (via Jacobi or CG) not applies to
T
,Y
, orD
Variable | Description |
---|---|
N | grid length (Vectors are N x N) |
h | grid spacing |
phi | (grid-center) level set function |
p | (grid-center) pressure |
T | (grid-center) temperature |
vf | velocity of fuel |
vg | velocity of gas |
- (phi = 0) defines interface between fuel and gas
- velocity units of 'cells / time'
- cell-centered fields
- Conjugate-Gradient Poisson solver (SPD 5-point Laplacian)
- Ghost-velocity
- (applied during semi-Lagrangian sampling of hot-gas field)
- pressure jump conditions not enforced in the linear system
Staggered Field Grids2
Defined at faces/edges of grid cells
Defined at center of grid cells
Advection for a conserved quantity described by a scalar field
For a generic scalar field
-
$k_S$ : diffusion constant -
$a_S$ : dissipation rate
Footnotes
-
Nguyen, Duc & Fedkiw, Ronald & Jensen, Henrik. (2002). Physically Based Modeling and Animation of Fire. ACM Transactions on Graphics. 21. 10.1145/566570.566643. ↩
-
Fedkiw, Ronald & Stam, Jos & Jensen, Henrik. (2001). Visual Simulation of Smoke. ACM SIGGRAPH2001, 2001.. 10.1145/383259.383260. ↩ ↩2
-
Stam, Jos. (2001). Stable Fluids. ACM SIGGRAPH 99. 1999. 10.1145/311535.311548. ↩