When you set up dispersion simulations, you should make a grid that gives accurate results but also keeps the simulation times low. To achieve this, the following conditions should be fulfilled:
  • The simulation volume must have a shape and size that can represent boundary conditions, such as wind.
  • The area where you are interested in seeing cloud development must have a sufficiently fine grid.
  • The grid near the leak must be refined to make the leak physics correct.

This article assumes that you have finished ventilation simulations.

You can find a definition of the domain and grid in What is the domain and the grid?
For details on how to set up grids in general, see How to use Quick grid.

In this article

Defining the Region of Interest and selecting a grid size

The Region of Interest (ROI) is the area where you want to evaluate cloud build-up from your dispersion simulations. The ROI is typically a naturally limited area such as an offshore module with wind walls or the inside of a building. Otherwise, it may simply be the congested part of a larger area, or limited by the greatest distance at which your selected leak size can credibly give a flammable concentration.

In the ROI, you should use a grid size of 0.5 – 1 m. You may use larger grid cells if you are modeling a large release. For instance, 2 m grid cells can be used for a leak of 100-200 kg/s. If you do this, you should test the grid dependency by running a test simulation with both a 2 m and 1 m grid and verifying that the results are similar. The surrounding area can be represented on a coarser grid. This is acceptable since we are only interested in the flow patterns that affect the ROI.

You do not need to use a uniform grid (meaning all sides of a grid cell are the same length). When trying to represent walls and decks as on-grid, you may end up with slightly elongated cells. Grid cells should ideally not be too far from cubical in the ROI.

When a wall or deck is not exactly on the edge of a grid cell, Porcalc will move the wall to the closest grid cell. This may have unexpected results:

  • monitor points and panels can be moved to the wrong side of a wall, giving wrong results,
  • corners that should be air-tight (such as in a building) can be opened when one or both walls are moved outward,
  • area and volume porosities may not agree.

Because of these potential pitfalls, it is best to try to get major walls and decks to align with grid lines in the ROI. Skilled CASD users may address this already in placing the walls/decks in anticipation of common grid sizes. Walls and decks can be “rounded” to the nearest 1 m or 0.5 m so that they are treated in a predictable way by FLACS. If not, you should make your grid hit the major walls and decks exactly.

For example, if you aim for a 0.5 m grid in the ROI and the decks are at Z = 7.3 m and Z = 13.6 m, it is better to evenly split the region in 13 grid cells of 0.485 m height than to enforce a 0.5 m height and miss one of the decks by 20 cm. Make sure the grid cells match the decks exactly, then split using the Region tool in the Grid menu. FLACS will calculate the required grid cell size. It is OK to have slightly different grid sizes on each side of a wall. Slightly means you must make sure that no grid cell is more than 20% wider than its neighbor. The Information tool in the Grid menu will show you the largest size difference between neighbours in your entire grid.

The Grid → Information tool will show the largest size difference between neighbours in your grid.

Creating an initial grid using the Quick Grid wizard

The Quick Grid wizard will help you set up a grid. You can find the wizard in CASD’s Grid menu. Main inputs are:

  • ROI,
  • grid size,
  • simulation domain.

The following picture shows where to use these values. The Core Domain should be a little larger than the ROI, since stretching the grid just outside the ROI may make the ventilation patterns inaccurate.

ROI, grid size and simulation domain in the Quick grid dialogue.

When working with the Quick grid wizard:

  • Keep the memory consumption smaller than the available memory of the computer where you will be running the simulations. Keep in mind that if you refine the grid around a leak (see below), you will increase the memory consumption. Keep the memory consumption below 1 GB if you can. If the memory consumption is high, simulations will take long to finish.
  • Run a test simulation on a coarser grid. This simulation will finish earlier and will allow you to verify that your simulation is set up correctly and properly reports all the data you need. It is better to check this early rather than finding out that you are missing something when you are close to a deadline!
  • Document your ROI, grid size, and simulation domain independently (e.g. in a spreadsheet) since these values can be very useful when writing a report, evaluating results, defining monitoring regions, etc.

Reviewing the wind field

Indoor simulations are confined to a closed area, such as a room or several rooms. It is not necessary to include the area outside the walls if the gas cannot escape the room(s). Rooms or buildings that are exposed to wind should be treated as outdoor simulations.

For outdoor simulations, the domain should be big enough to “get the wind right”. The wind is affected by obstacles such as walls, equipment and terrain. Use Flowvis to view the flow field from your ventilation simulations:

  1. Create a 2D cut plane plot. Select your simulation and the VVEC variable.
  2. In Plot properties → Domain, adjust the cut plane height (Z) and boundaries (X and Y) to show the area of interest.
  3. Set the Value range to Fixed with minimum and maximum values that make the plot easy to read: Stagnant areas in white (no arrow) and the highest flow areas in red.

The figure below shows some example settings and the resulting plot.

Example settings for the domain and plot value range to review the wind field.

The WIND boundary condition gives a wind field with a specified direction. When this wind flows around buildings and obstacles, it will form a complex flow pattern. You must represent this flow pattern to get accurate results from your dispersion simulations. The easiest approach is to use a domain that is as big as a ventilation domain. However, this costs a lot of computing time and memory. It is only practical when the number of simulations is low and the leak rates are big. Otherwise, one must be smart about domain selection.

Selecting and testing a representative simulation domain

Define a domain large enough to represent the ventilation conditions in the ROI: look at the ventilation simulations and reduce the Flowvis view area to come up with a smaller area for use in the dispersion simulations. Basic principles:

  1. obstacles that are important for the flow in the ROI should be included,
  2. one or more of the boundaries should have a simple flow that can be represented by WIND conditions.

These rules are simple, but applying them may require some thinking. The FLACS User Manual’s dispersion grid guidelines give some guidance:

An accurate representation of the flow profiles around large geometries typically requires that the distance to the boundary is two or more times the size of the module. However, this depends on the variables of interest as well as on the geometry and scenario. It may be acceptable to use a smaller domain for large QRA projects with several simulations.

“Module” in this case refers to a module of an offshore platform. For other types of geometries, your ROI will be the “module”.

No matter how you define the dispersion grid, you should test it:

  1. Run a test ventilation simulation on the grid.
  2. Compare the flow pattern against your original ventilation simulation.
  3. If the important parts of the flow pattern are reproduced, you are good to go.

The following example will show this process.

Example: Selecting and testing a representative simulation domain

As an example, assume the area in the white circle is our ROI:

ROI for which a representative simulation domain shall be found.

Below are three candidate dispersion domains that we will test to see if they can represent the flow pattern properly. To make it simple, we are only looking at the XY borders, but you should consider the Z direction in a similar way. The first domain is large, while the next two domains are progressively reduced in size. We will test ventilation on these domains to see if we can match the ventilation grid flow field.

Different dispersion grid choices to be evaluated.

For the first two grids, we are keeping the WIND formulation from the ventilation case. For the last one, the inflow across the YLO boundary is lower, and the ventilation along the XHI border needs to be forced to represent the wall that is now not included in the domain. We reduce the velocity in the WIND formulation and copy the WIND boundary from YLO to XHI. Such representations may not always work, and it may be easier (though more computationally expensive) to use a larger domain.

After simulating the ventilation on these three grids, we plot the ventilation field in the region of interest. As the figure below shows, the candidate dispersion grid simulations have a flow field that seems shaped correctly, but with too high wind speeds. This is typical of reduced domains: In a larger domain, the wind will tend to find ways around obstacles, while in smaller domains it will tend to be forced through the congested areas.

Simulation results for the different dispersion grids.

We now try to change the Value range to make the plots match the ventilation grid. In the picture below, the Value range for the ventilation grid is unchanged (2 to 10 m/s) while the remaining plots have their Value range increased by 50% to 3 to 15 m/s.

Velocity fields with scaled results for the dispersion grids.

All of the tested grids now seem to agree reasonably with the ventilation grid. In this example, the smallest domain (3) gives the best fit to the flow pattern seen in the ventilation grid. Most of the time it is the other way around – larger domains give better results – but that is why we test. In “How to run dispersion simulations”, you will see how to adjust for the difference in flow speeds when setting up your dispersion simulations.

Refining the grid near the leak

If the leak is a sonic jet, you will need to refine the grid near the leak. The grid cell face that the leak is coming out of should not be larger than twice the area of the leak. This means in general small leaks need a stronger refinement (and take more memory and time to run). For small leaks, you may have to refine down to a few centimeters. You should apply this refinement in both directions perpendicular to the leak.

Along the leak, it is sufficient to make sure the refined cells do not have an aspect ratio larger than 5. For instance, if your initial grid has a uniform size of 1.33 meters and you refine to 0.2 meters, you will also need to refine the grid to a maximum of 1 meters in the direction along the jet. The grid cells on the side of the jet should be the same size as the cell the jet is in, but outside these, you can smooth the grid towards the surrounding size.

Smooth grid refinement around the leak.

If the jet hits a wall, you will need to refine the grid along the jet near the wall as well. The grid size should be less than 1/3 of the jet radius at the wall. Since the jet expands with distance, a closer wall needs a finer grid. It is easier to keep some distance from the jet start to a wall. If you have to simulate a scenario like this, you should run a test simulation to determine the width of the jet just before the wall.

The Refine grid wizard in CASD will help you with grid refinement: Right-click on the specific leak in the Leaks tab, then select Refine grid.

Right-click on the leak and choose Refine grid to open the dialogue for refining around leaks.

The “New Cell Size” fields define how small the grid cells near the leak will be. The wizard will suggest the correct values for the directions across the leak based on the leak size. However, it is not yet smart enough to refine along the leak by default. If the cells across the leak are smaller than 1/5 of your original grid size, select the along direction – in our example, X – and type in a new cell size that is 5x that of the across directions.

The wizard is also not smart enough to refine near a wall that is hit by the jet, so in this case you will have to refine the grid manually.

The refinement region defines the distance used to smooth the grid up to the surrounding size. It is best to leave this number at the default unless you have a good reason to do otherwise.

Refinement region settings.


  • The domain should be large enough to represent the wind conditions.
  • The ROI must be covered with a grid of around 0.5 – 1 m size, while the surrounding grid may be stretched.
  • The grid must be refined near a jet leak.
  • Use the Quick Grid and Refine grid wizards.
  • When in doubt, test your grid with test simulations.

Advanced topics covered in the user manual