cs567.smoke
Class Constants

java.lang.Object
  extended by cs567.smoke.Constants

public class Constants
extends java.lang.Object

Compile-time constants/parameters affecting the simulation. Although not great software design, I've collected them here to avoid students/you scanning the codebase looking for all the hidden tweakable parameters.


Field Summary
static float BUOYANCY
          Smoke buoyancy (dimensionless) (default: 1)
static float dt
          Time-step size.
static int n
          Resolution of (n+2)-by-(n+2) computational grid.
static int N
          Resolution of N-by-N computational grid.
static int N_GAUSS_SEIDEL_ITERATIONS
          Iterations used in FluidSolver.linearSolver().
static int size
          Number of cells in computational domain, and size of grid-based float[] arrays indexed by I(i,j).
static float SMOKE_DIFFUSION
          Smoke diffusion coefficient (default: 0.0001).
static float V_d
          Drag force amplitude, V_d (default: 0.5)
static float V_f
          Driving force amplitude, V_f (default: 2)
static float V_g
          Gathering rate amplitude, V_g (default: 0.0005)
static float VISCOSITY
          Viscosity (velocity diffusion coefficient).
 
Constructor Summary
Constants()
           
 
Method Summary
static int I(int i, int j)
          Array index function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dt

public static final float dt
Time-step size. Note that explicitly integrated smoke-control forcing/density terms can impose step-size restrictions.

See Also:
Constant Field Values

N

public static final int N
Resolution of N-by-N computational grid.

See Also:
Constant Field Values

n

public static final int n
Resolution of (n+2)-by-(n+2) computational grid.

See Also:
Constant Field Values

size

public static final int size
Number of cells in computational domain, and size of grid-based float[] arrays indexed by I(i,j).

See Also:
Constant Field Values

N_GAUSS_SEIDEL_ITERATIONS

public static final int N_GAUSS_SEIDEL_ITERATIONS
Iterations used in FluidSolver.linearSolver().

See Also:
Constant Field Values

V_f

public static final float V_f
Driving force amplitude, V_f (default: 2)

See Also:
Constant Field Values

V_g

public static final float V_g
Gathering rate amplitude, V_g (default: 0.0005)

See Also:
Constant Field Values

V_d

public static final float V_d
Drag force amplitude, V_d (default: 0.5)

See Also:
Constant Field Values

SMOKE_DIFFUSION

public static final float SMOKE_DIFFUSION
Smoke diffusion coefficient (default: 0.0001). Nonzero values are needed (I believe) to avoid instabilities during smoke control.

See Also:
Constant Field Values

VISCOSITY

public static final float VISCOSITY
Viscosity (velocity diffusion coefficient). Default is zero since we try hard to get rid of numerical diffusion (e.g., using vorticity confinement) without adding more, and incurring additional linear system solves.

See Also:
Constant Field Values

BUOYANCY

public static final float BUOYANCY
Smoke buoyancy (dimensionless) (default: 1)

See Also:
Constant Field Values
Constructor Detail

Constants

public Constants()
Method Detail

I

public static final int I(int i,
                          int j)
Array index function.