The alternative to setting up the grid with Quick grid utility (see here), is to create and manipulate it manually, using the Grid menu in CASD. Although this method may be more laborious compared to using Quick grid, it provides you with flexibility in manipulating the grid in special situations.
This article describes the main steps to set up a grid manually and some useful commands to manipulate the grid. All commands can be accessed from the Grid menu shown below.

Setting up the domain

The first step is to set up the domain boundaries. This is done by choosing Simulation Volume from the Grid menu; the dialogue that opens allows you to define the boundaries of your domain by setting the minimum and maximum in the three Cartesian directions.

Defining the simulation domain in the three coordinate directions.

Setting the working direction

After defining the boundaries of the simulation domain, the grid settings are specified manually for one direction at a time. Therefore, you need to set the working direction before defining the grid lines. The selected direction will be marked with a bullet to its left as shown in the picture below (X direction in this case).

Setting the working direction when editing the grid.

Defining and editing the grid lines

When you click on Region from the Grid menu, a window will open allowing you to specify the number of control volumes in the selected direction. This has to be done for each coordinate direction separately.

You can also Add, Position, Move and Delete grid lines using the respective commands from the Grid menu.

For example, when you click on Add, a window will open where you can define the position of the added grid line.

Before you can position, move and delete grid lines, you need to select them as explained in the section below. You can only position and move one line at a time but you can delete many selected lines at the same time.

Selecting regions

You can select a region of grid lines by holding the Ctrl-key and using the left/right arrow keys to select the previous/next minimum grid line in the working direction. Similarly, by holding the Ctrl-key and using the up/down arrows, you select the previous/next grid line at the maximum of the region. The colour of the grid lines in the selected region will be white, and the bounding deselected regions will be in red (see the picture below).

Alternatively use the Select function in the Grid menu to achieve the same thing.

A region can also be a single grid line.

You have the option to set a different resolution in the selected region by using the Region function from the Grid menu and defining the number of control volumes you would like to have in the selected region.

The white grid lines are in the selected region, the red ones are not selected.


Now consider a situation where you have specified locally higher grid resolution by selecting a region and increasing the number of grid cells. You will have a large difference in the size between two adjacent cells where the fine and coarse mesh meet. The size difference of neighbouring cells must be limited depending on the simulation type (consult the FLACS User's Manual for guidelines on the acceptable maximum difference). In this situation you need to smooth the transition from the small to the large cells. This can be done using the Smooth function from the Grid menu. You must select the region which you want smoothed; this should include at least 5 control volumes in order for the smoothing function to work. Once the region is selected, click on Smooth in the Grid menu and the resulting grid will be like shown in the picture below.

Smoothing the grid helps reduce the difference in cell size between the fine and the coarse region. Observe the selected region when applying smoothing.


In some situations you might want to have a large simulation domain with the boundaries far away from the core domain. The results in the outer region are normally not of interest and therefore the grid can be coarse there. In such cases you can stretch the grid in the outer region by selecting the region as explained above and choosing Stretch from the Grid. The stretching applies in the positive or negative direction, depending on your choice. Stretching the grid where results are not interesting reduces the number of grid cells and thus decreases the simulation time and memory consumption.

Stretching the grid towards the domain boundaryies reduces the number of cells and thereby the computational cost of a simulation. Observe the selected region when applying stretching.