LBPM icon indicating copy to clipboard operation
LBPM copied to clipboard

Volumetric flux calculation

Open Ricardoleite opened this issue 2 years ago • 1 comments

Hello LBPM community,

I would like to bring to your attention an error that I have identified in the volumetric flux calculation within the Core Flooding routine.

Upon reviewing the code in the file "ColorModel.cpp," I have noticed that at line 524, the parameter "flux" is computed using the following equation:

flux = Mask->Porosity() * CrossSectionalArea * (Ny - 2) * IFT * capillary_number / MuB;

However, upon further analysis, it appears that the parameter (Ny - 2) in this equation lacks a clear physical interpretation. Specifically, (Ny - 2) represents the domain size along the y-axis divided by the number of process grid divisions for the y-axis. This value is being multiplied by the real flux that should be computed based on the Capillary number.

Furthermore, the presence of (Ny - 2) results in a dependence on the number of divisions in the y-axis, leading to inconsistent results. To illustrate this, I conducted two separate simulations of a viscous fingering problem within a 3D channel with walls only on the upper and side boundaries. The simulation setups were kept identical, with the only variation being the process grid used along the y-axis. The attached figures depict the results obtained for fingering formation at the same time step in simulations using different segmentations along the y-axis.

image

In light of these observations, I believe it is advisable to remove the value (Ny - 2) from the flux equation present in line 524. By doing so, the computed flux values will align more accurately with those expected from flooding processes.

Attached are the .raw and .db files used in the simulations.

CF-Channel-2.db.txt CF-Channel-1.db.txt

https://drive.google.com/file/d/1s4HPtSWYaW9oYDndYiSNl9FVVc1mYFGl/view?usp=drive_link

Ricardoleite avatar Aug 29 '23 19:08 Ricardoleite

You are absolutely correct. I have pushed a bugfix to correct this issue

https://github.com/OPM/LBPM/commit/7394e7ff331c36b86ab1c1cd7677b8a05b82e7f2

JamesEMcClure avatar Aug 29 '23 23:08 JamesEMcClure