Chapter 4. Meshes

Table of Contents

Working with Meshes
Uniform Meshes
Nonuniform Meshes
Using Multiple Meshes
2D View Drawing Grid

Working with Meshes

All FDS calculations are performed within computational meshes. Every object in the simulation (e.g. obstructions and vents) must conform to the mesh. When an object's location doesn't exactly conform to a mesh, the object is automatically repositioned during the simulation. Any object that extends beyond the boundary of the physical domain is cut off at the boundary. There is no penalty for defining objects outside of the domain, but these objects do not appear in Smokeview.

To achieve optimal simulation accuracy, it is important to use mesh cells that are approximately the same size in all three directions.

FDS uses a Poisson solver based on Fast Fourier Transforms (FFTs). A side effect of this approach is that optimal mesh divisions are constrained to the form 2^u 3^v 5^w, where u, v and w are integers. For example, 64 = 2^6, 72 = 2^3 * 3^2, and 108 = 2^2 * 3^3 are good mesh dimensions. However, 37, 99 and 109 are not. In addition, using a prime number of cells along an axis may cause undesirable results. PyroSim warns when the number of divisions is not optimal.

Uniform Meshes

This example illustrates creating a multiple mesh model. To create the first mesh:

  1. On the Model menu, click Edit Meshes... .

  2. Click New.

  3. In the Max X box, type 5.0, in the Max Y box, type 1.0, and in the Max Z box, type 1.0.

  4. In the X Cells box, type 50, in the Y Cells box, type 10, and in the Z Cells box, type 10.

  5. Click OK.

Figure 4.1. Defining properties of the new mesh

Defining properties of the new mesh

The 3D View will now display the resulting mesh.

Nonuniform Meshes

To create a second, nonuniform mesh:

  1. On the Model menu, click Edit Meshes....

  2. Click New

  3. In the Min X box, type 0.0, in the Min Y box, type 1.0, and in the Min Z box, type 0.0

  4. In the Max X box, type 1.0, in the Max Y box, type 3.0, and in the Max Z box, type 1.0

  5. In the Division method box, select Non-Uniform

  6. In the table, enter the data shown in Table 4.1

  7. Click OK

Table 4.1. Non-Uniform Mesh Parameters

 
Dir (X,Y,Z)Num CellsSize
X100.1
Y100.1
Y50.2
Z100.1

Figure 4.2. Defining properties of the nonuniform mesh

Defining properties of the nonuniform mesh

You can click (or type Ctrl + R) to reset the model. The resulting meshes are displayed below.

Figure 4.3. 3D display of first and second mesh

3D display of first and second mesh

Using Multiple Meshes

The term "multiple meshes" means that the computational domain consists of more than one rectangular mesh, usually connected, although this is not required. In each mesh, the governing equations can be solved with a time step based on the flow speed within that particular mesh. Some reasons for using multiple meshes include:

  • Multiple meshes are required for parallel processing of FDS using the MPI option.

  • If the geometry of the problem has corridors such as shown in Figure 4.3, using multiple meshes can significantly reduce the number of cells and the solution time.

  • Because each mesh can have different time steps, this technique can save CPU time by requiring relatively coarse meshes to be updated only when necessary. Coarse meshes are best used in regions where temporal and spatial gradients of key quantities are small or unimportant.

Meshes can overlap, abut, or not touch at all. In the last case, essentially two separate calculations are performed with no communication at all between them. Obstructions and vents are entered in terms of the overall coordinate system and need not apply to any one particular mesh. Each mesh checks the coordinates of all the geometric entities and decides whether or not they are to be included.

As described in the FDS 5 User Guide ([McGrattan et al., 2007]), the following rules of thumb should also be followed when setting up a multiple mesh calculation:

  • Mesh Alignment

    The most important rule of mesh alignment is that abutting cells ought to have the same cross sectional area, or integral ratios, as shown in Figure 4.4

  • Mesh Priority

    In general, the meshes should be entered from finest to coarsest. FDS assumes that a mesh with higher priority has precedence over a mesh with a lower priority if the two meshes abut or overlap.

  • Mesh Boundaries

    Avoid putting mesh boundaries where critical action is expected, especially fire. Sometimes fire spread from mesh to mesh cannot be avoided, but if at all possible try to keep mesh interfaces relatively free of complicating phenomena since the exchange of information across mesh boundaries is not as accurate as cell to cell exchanges within one mesh.

  • Data Exchange

    Information from other meshes is received only at the exterior boundary of a given mesh. This means that a mesh that is completely embedded within another receives information at its exterior boundary, but the larger mesh receives no information from the mesh embedded within. Essentially, the larger, usually coarser, mesh is doing its own simulation of the scenario and is not affected by the smaller, usually finer, mesh embedded within it. Details within the fine mesh, especially related to fire growth and spread, may not be picked up by the coarse mesh. In such cases, it is preferable to isolate the detailed fire behavior within one mesh, and position coarser meshes at the exterior boundary of the fine mesh. Then the fine and coarse meshes mutually exchange information.

  • Boundary Obstructions

    If a planar obstruction is close to where two meshes abut, make sure that each mesh "sees" the obstruction. If the obstruction is even a millimeter outside of one of the meshes, that mesh may not account for it, in which case information is not transferred properly between meshes.

  • Parallel Calculation

    In a parallel calculation, it is recommended that the time steps in all meshes to be the same. This is the default setting in PyroSim and FDS 5 and provides a tighter connection between meshes. This option is selected by the Synchronize time step for tighter connection between meshes checkbox on the Edit Meshes dialog.

  • Trial and Error

    Experiment with different mesh configurations using relatively coarse mesh cells to ensure that information is being transferred properly from mesh to mesh. There are two issues of concern. First, does it appear that the flow is being badly affected by the mesh boundary? If so, try to move the mesh boundaries away from areas of activity. Second, is there too much of a jump in cell size from one mesh to another? If so, consider whether the loss of information moving from a fine to a coarse mesh is tolerable.

Figure 4.4. Correct and incorrect mesh alignment

Correct and incorrect mesh alignment
This is the ideal mesh alignment.
Correct and incorrect mesh alignment
This is allowed so long as there are an integral number of fine cells abutting each coarse cell.
Correct and incorrect mesh alignment
This is allowed, but of questionable value. PyroSim will warn if meshes overlap.
Correct and incorrect mesh alignment
This is no longer allowed in FDS 5.1 and higher. PyroSim will warn against this mesh alignment.

2D View Drawing Grid

If you create a solution mesh before creating any geometric objects, then that mesh will be used by default when drawing objects in the 2D View. However, you can also define a separate drawing grid (or sketch grid) in the 2D View. This can be useful if the geometry of your model will extend beyond the bounds of the solution mesh, or if you want your objects to be defined using a finer geometric resolution than will be used for the solution.

The 2D View drawing grid has several options that you can modify:

  • To view the sketch grid, on the View menu, click Snap to Sketch Grid.

  • To specify the size of the cells in the Sketch Grid:

    1. On the View menu, click Set Sketch Grid Spacing....

    2. Enter the distance you want between each point on the sketch grid and click OK.

  • To show grids based on the model meshes, on the View menu, click Snap to Model Grids.

  • To disable drawing grids and snapping, on the View menu, click Disable Grid Snapping. You can also hold down the space bar to temporarily disable grid snapping while drawing any object other than a block.

Modeling Hint: In FDS the spatial resolution of the solution is defined by the solution mesh(es), not the Sketch Grid. Using the solution mesh for 2D View drawing ensures that the model geometry matches the FDS solution geometry and is the recommended approach. Some users create all model objects using mesh dimensions. While this leads to a "blocky" appearance, it does represent the true solution geometry and ensures there will be no unexpected gaps in the model.