lbpm_color_simulator miscalculates porosity
I have found that lbpm_color_simulator miscalculates media porosity when performing water flooding.
Please take a look at line 643 in the file below, which is where the porosity calculation is performed
https://github.com/OPM/LBPM/blob/master/common/Domain.cpp
Note that it is intentional to exclude the inlet/outlet layers from the porosity calculation.
I pushed a small change to ensure that inlet/outlet layers would be excluded irrespective of how many layers there are. However, this would not have effected you unless you set these values manually.
Does this seem correct to you or am I misunderstanding what you mean?
Thank you very much, but why inlet/outlet layers are excluded? Does this enhance the simulation?
The porosity for the inlet / outlet layers is one, since the solid is removed. However, this does not reflect the porosity of the material, so these are excluded to avoid reporting porosity values that are artificially high. This could matter, for example, if you were to perform a REV study.
The reason solid nodes are removed at the boundary is that this makes the pressure boundary condition behave in a more stable way. Both the volumetric flux and pressure BC are set based on a Dirichlet-type of approach.