How to calculate porosities

The Flacs solver is based on the porosity/distributed resistance (PDR) approach. In this approach, obstructions in the flow field are represented by a three-dimensional field (porosity) that measures whether space is open to the flow (porosity = 1), partially blocked (0 < porosity < 1), or completely blocked (porosity = 0). The porosities have to be computed before a Flacs simulation can be run.

Schematic view of a geometry (left) and its representation as porosity field (right)


Porosities are calculated by the Porcalc utility, which is included in the FLACS installation. Porcalc can be started from different origins, as discussed below.

Based on the obstruction file (co<JOBID>.dat3) and the grid file (cg<JOBID>.dat3), Porcalc computes the porosities and other geometric measures and stores them in the porosity file (cp<JOBID>.dat3). This file defines if each of the grid cells is open, blocked, or partially open/blocked. The porosity file is what the Flacs solver uses as geometric model when conducting a simulation.

The graphical user interface of Porcalc, showing calculation progress

Calculating porosities with Porcalc

Calculating porosities from CASD

In CASD, you can calculate the porosities by clicking on the Calculate Porosities button highlighted in the figure below.

The Porcalc button in the CASD icon bar

Alternatively, you can launch the Porcalc from the Porosities menu in CASD, as shown in the figure below.

You can also run Porcalc from CASD by opening the Porosities menu

Calculating porosities from the FLACS RunManager

To calculate porosities from the FLACS RunManager, you mark the job for which you want to calculate porosities and then click on the Porcalc button to the right of the job selection.

When the geometry has been created earlier, it is often most practical to run Porcalc from the RunManager, before starting the simulation

Calculating porosities from the command line

To run Porcalc manually (or using a script) from the command line, use the command:


porcalc <JOBID>


run porcalc <JOBID>

Note that <JOBID> is only the six-digit number of the job, without any prefix or extension.

To run porcalc without launching the GUI you can write the command line as follows:


porcalc – <JOBID>


run porcalc – <JOBID>

Compatibility between Porcalc and FLACS

It is important to use consistent versions of Porcalc and the Flacs solver. When you use the RunManager, CASD, Porcalc and the Flacs solver from the same installed FLACS package, then Porcalc is compatible with the Flacs solver.

Attention: If you run Porcalc and the FLACS solver from different versions you must verify their compatibility in the version history table in the FLACS User’s Manual.

Gexcon Announces New CEO

Gexcon Announces New CEO

Gexcon is pleased to announce that our Board of Directors has appointed Trygve Birkeli as our new corporate Chief Executive Officer. Trygve has extensive international experience with a track record of leading high-performing teams. Before joining Gexcon in 2018 as an Executive Vice President, he successfully held multiple senior positions

Event News
Longship Fund II Acquires Gexcon AS

Longship Fund II Acquires Gexcon AS

Longship Fund II (“Longship”) has as of February 19th, 2021 acquired 100% of the shares in Gexcon AS from NORCE Norwegian Research Centre AS (“NORCE”).  Gexcon is a global leader in process safety software, safety consulting and testing services, and specializes in analysis of dispersion, explosion and fire related risk and consequences. Based on experience developed in cooperation

Event News
Join the hydrogen safety challenges discussion with industry experts

Join the hydrogen safety challenges discussion with industry experts

We are pleased to invite you to join industry experts from Gexcon, Shell, Engie and Wales & West Utilities for an exclusive panel debate where they will be discussing topics surrounding Hydrogen Safety Challenges for the Energy Transition. The main discussion points at this panel debate are as follows: Perceptions within the hydrogen industry around safety

Event News Renewables

E-Newsletter sign-up

Gexcon Makes The World a Safer Place