Pressure drops can be defined in the GUI or in the user sources. In the GUI, the Volume zones allows to define areas where pressure drops are applied, see an example in the head losses region figure. The item Head losses allows to specify the head loss coefficients (see head loss coefficients figure. The tensor representing the pressure drops is supposed to be symmetric and positive.
In the user sources, two files can be of use: cs_user_zones.c (called at the computation start) to define volume zones and cs_user_head_losses.c (called at each iteration) to specify the values of the head losses coefficients. As usual, volume zones defined with the GUI are available in cs_user_head_losses.c.
Porous zones can be defined through the GUI in the Volume zones page.
Alternatively, the porous model can be activated using the cs_porous_model_set_model function in cs_user_parameters. Advanced zone porosity values can be set in the cs_user_porosity function.
See Examples of data settings for porous media for examples.
Porous zones are defined at the beginning of the computation, before the time loop.