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 choosingfrom the 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.
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).
Defining and editing the grid lines
When you click onfrom the 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, , and grid lines using the respective commands from the menu.
For example, when you click on, 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.
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 thefunction in the 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 thefunction from the menu and defining the number of control volumes you would like to have in the selected region.
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 function from the 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 in the menu and the resulting grid will be like shown in the picture below.
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 choosingfrom the . 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.