Flacs will write any error or warning messages to the simulation log file.
In this article, you will learn about the most common warnings and errors, and possible causes and workarounds. This article assumes that you are familiar with setting up and running a simulation, and how to view results in Flowvis.

In this article

Mass residual

An error message “*** MASS RESIDUAL -…” indicates that the Flacs simulator has problems to achieve a converged solution. If the mass residual is not too large or it does not last for many iterations, it may be ignored.
The mass residual error message includes a control volume index (i,j,k) for where the mass residual is high. In the simulation log file, a mass residual error may look like:

***MASS RESIDUAL = 0.487E-02, CV INDEX 55 6 7

For explosion calculations

For explosion simulations, the mass residual error message is mainly seen when there are very high pressures in a simulation and the flame is going through partly porous areas.
This may be solved with a setup file where you set the values for ZERO_APOR=0.1 (the lower limit for area porosities) and ZERO_VPOR=0.1 (the lower limit for volume porosities).

For dispersion calculations

For dispersion calculations, there are several reasons and possible solutions for the mass residual error messages.

Open the simulation log file (tt<jobno> or rt<jobno>.dat3) and find the CV index for where the mass residual happens. Open Flowvis and check where the CV is in your geometry, see also the chapter on Porosities in the FLACS User's Manual. Flowvis may be +/- one grid cell shifted during visualization compared to Flacs.

If the mass residual error for a dispersion calculation is:

  • Very early in your simulation when wind and/or ventilation has just started, it may be because it is hard to adjust the wind to the geometry. This can be solved by defining a low value for the initial turbulence (CHAR VEL=wind speed, RELATIVE TURB= 0.01 and LENGTH SCALE = 0.01) to help the simulation through the transient start-up.
  • When a leak starts or stops, it can be due to a too transient leak start. Check the leak definition to see if the flow is too high relative to the grid cell size or the significant porosities in the leak volume so that pressure is building up.
  • Sudden crashes can be caused by the time steps being too long. Try to reduce the CFLC and CFLV numbers to 10 and 1, or 5 and 0,5, respectively.

Other problems:

  • Pasquill classes A, B and C may give mass residual problems, avoid using these.
  • The turbulence length scale may be too long relative to the grid cell size. This can be solved by:
    • Use Pasquill class F instead of D and E
    • If it still is a problem, do not use a Pasquill class, but define turbulence parameters in the wind boundary conditions, with intensity 0.05 to 0.10 and length scale not more than the smallest grid cell (you may try to exclude refined grid cells), see also the chapter on Wind in FLACS User's Manual.
  • Too thin grid cells:
    • Very narrow grid cells (e.g. 10cm refinement when normal grid is 1m and stretched to boundaries is 10m) may often give problems. Try first to reduce stretching to boundaries (10m => 3m) and thereafter if necessary to increase 10cm grid size.
  • In cases with stretched grids, reduce the stretching and make sure FLUX_CONTROL=2 in a setup file
  • The new pool models may lead to some additional stability issues.
  • Dispersion calculations in partly porous regions may also sometimes give problems, and it may help to increase the values for ZERO_APOR and ZERO_VPOR as described above
  • Boundary conditions may also lead to stability problems in some situations. You can try to change the passive outflow (NOZZLE) at parallel boundaries to WIND and move the boundaries further away if you suspect that this might be the issue

For combined explosion and dispersion calculations

For a combined dispersion and explosion simulation where the explosion simulation is started from a dump file, you can get a mass residual error message if you change the equivalence ratio (ER0) between the two simulations. When a non-homogeneous fuel-air cloud calculated in a dispersion simulation is ignited in the explosion simulation, it is advised to keep the same value of ER0 for both the dispersion simulation and the subsequent explosion simulation. If you need to change the equivalence ratio for the two simulations, you should use the convert option of the rdfile utility program to ensure that the output enthalpy field is converted consistently for the changed value.

Try one or more of the suggested measures for dispersion calculations, both alone and combined, until your problem is solved.

Leak excess area

If you have defined a leak with a larger area than the control volume face where the leak is located, you will receive an error message “***LEAK EXCESS AREA…”. This can be solved by one of two ways:

  1. Increase the grid cell size where the leak is defined, see also How to use the Quick Grid tool and How to set up a grid manually
  2. Redefine the leak so that the leak area is decreased, see also How to define an area leak

CV too small

If you have overlapping grid lines in the X direction, you will receive warnings like:
ERROR: xcv (2) is too small
ERROR: xcv (291) is too small

You can investigate the problem directly in CASD. In CASD, click on Grid on the menu bar, go to List. In the window that opens, look for grid lines with the same X position. Delete one of the grid lines, save and run the porosity calculations over again.

For overlapping grid lines in the Y and Z direction, the warnings will be ycv and zcv, respectively.

Error reading the cs-file

If you receive an error message: “Error: Reading file cs<jobno>.dat3 file”, you most likely have a formatting or syntax error in your scenario file.

A more complete error message is shown in the log file, and possibly also the line where the error occurs. Open the log file (rt<jobno>.dat3 or tt<jobno>) in a text editor to investigate the problem.

Sometimes one can isolate a syntax error by opening the scenario file in CASD, saving it to a different job number and comparing the two cs-files.

Related articles

Advanced topics covered in the user manual