This dataset contains the code and simulation results for the paper "Upscaled equations for two-phase flow in highly heterogeneous porous media: Varying permeability and porosity" by Tufan Ghosh, Carina Bringedal, Rainer Helmig and G. P. Raja Sekhar.
Based on a layered permeability and porosity distribution specified by the user, the code solves for the saturation as a function of time. Codes for both micro-scale equations and upscaled equations, for periodically layered and randomly layered media, are provided. The main files are "MicroEquations.m" and "MicroRandomEquations.m" for micro-scale equations, "AvgMicroPhi.m" and "AvgMicroRandomPhi.m" for averaging of the micro-scale results, and "EffectiveMultiEquations.m" and "EffectiveRandomEquations" for solving the upscaled equations. The example simulation script "simscript.m" explains how to run the codes. Other files are subroutines called by the main files. All simulation results use the same naming as in "simscript.m".
The code contains an example simulation script "simscript.m" explaining how to run the codes. All simulation results use the same naming as in simscript.m