Build water-oil relative permeability curves and their SWOF table
Corey and LET water-oil relative permeability from the endpoints of a water-wet sandstone (Swi 0.20, Sorw 0.25, kro 0.85, krw 0.35), compared on one chart, with the Corey curves written out as an Eclipse SWOF table.
- UC-SCAL-001
- UC-SCAL-004
- UC-SCAL-007
Engineering use cases UC-SCAL-001 (Generate Kr Curves for Simulation), UC-SCAL-004 (Compare Correlation Results) and UC-SCAL-007 (Prepare Simulator Kr Tables).
Corey's curves are power laws of the normalised saturation, krw = krw,max S^Nw and krow = kro,max (1 − S)^No with S = (Sw − Swi) / (1 − Swi − Sorw). LET (Lomeland, Ebeltoft and Thomas, 2005) gives each curve three parameters, L for the low end, E for the elevation of the middle and T for the top, so the middle of a curve can move without its ends. Both share the endpoints, so the table starts at kro 0.85 at Swi and ends at krw 0.35 at 1 − Sorw.
What an engineer learns from it: the Corey curves (No 3, Nw 4) cross at Sw 0.537 with kr 0.049, right of the middle of the mobile range, which is what a water-wet rock looks like. At Sw 0.50 the LET curves carry about twice the Corey values (krw 0.068 against 0.031, kro 0.189 against 0.080): two fits that share the endpoints can still differ by a factor of two in the middle, which is where a waterflood's front lives, so check the middle against the core before handing the table to the simulator. The SWOF keyword is the table as Eclipse reads it, Sw from 0.20 to 0.75 every 0.05, Pcow set to zero.
Units: saturations and kr are fractions. The sample is endpoints only; with measured kr points, fit the exponents first, and see the Buckley–Leverett entry for what the curves do to a waterflood.
Source
using System;
using System.Globalization;
using System.Linq;
using Team76.Engineering.SCAL.WaterOil;
public class S : ICalcScript
{
public ScriptResult Run(ICalcContext ctx)
{
// A water-wet sandstone with no core analysis yet: Swi 0.20, Sorw 0.25, kro 0.85 at Swi, krw 0.35 at Sorw.
double swi = 0.20, sorw = 0.25;
// Corey: one exponent per phase. LET: three per phase, so the middle of a curve and its ends move apart.
var corey = new CoreyWaterOilRelPerm(Swi: swi, Sorw: sorw, KrowSwi: 0.85, No: 3.0, KrwSorw: 0.35, Nw: 4.0);
var let = new LetWaterOilRelPerm(Swi: swi, Sorw: sorw, KrowSwi: 0.85, Lo: 2.0, Eo: 1.5, To: 1.2, KrwSorw: 0.35, Lw: 2.5, Ew: 2.0, Tw: 1.0);
// The simulator table: SWOF rows from Swi to 1 - Sorw every 0.05.
var sw = Enumerable.Range(0, 12).Select(i => Math.Round(swi + i * 0.05, 2)).ToArray();
var rows = sw.Select(s => new object[] { s, Math.Round(corey.Krw(s), 4), Math.Round(corey.Krow(s), 4), 0.0 }).ToList();
// The crossover, where the two Corey curves are equal: bisection on Krw - Krow.
double lo = swi, hi = 1 - sorw;
for (var i = 0; i < 60; i++)
{
var mid = (lo + hi) / 2;
if (corey.Krw(mid) < corey.Krow(mid))
{
lo = mid;
}
else
{
hi = mid;
}
}
var fine = Enumerable.Range(0, 56).Select(i => swi + i * 0.01).ToArray();
var chart = new ScriptChart(
[
new ScriptSeries("Krw, Corey", fine, fine.Select(corey.Krw).ToArray()),
new ScriptSeries("Krow, Corey", fine, fine.Select(corey.Krow).ToArray()),
new ScriptSeries("Krw, LET", fine, fine.Select(let.Krw).ToArray()),
new ScriptSeries("Krow, LET", fine, fine.Select(let.Krow).ToArray()),
],
title: "Water-oil relative permeability", xLabel: "Sw (fraction)", yLabel: "kr (fraction)");
var swof = "SWOF\n" + string.Join("\n", sw.Select(s => string.Format(CultureInfo.InvariantCulture, "{0:F2} {1:F4} {2:F4} 0.0", s, corey.Krw(s), corey.Krow(s)))) + "\n/";
return ctx.Result()
.Set("Relative permeability", chart)
.Set("SWOF table", new ScriptTable(["Sw", "Krw", "Krow", "Pcow (bar)"], rows))
.Set("SWOF keyword", swof)
.Set("Crossover Sw", Math.Round(lo, 3))
.Set("Kr at the crossover", Math.Round(corey.Krw(lo), 4))
.Set("Krw at Sw 0.50, Corey", Math.Round(corey.Krw(0.50), 4))
.Set("Krw at Sw 0.50, LET", Math.Round(let.Krw(0.50), 4))
.Set("Krow at Sw 0.50, Corey", Math.Round(corey.Krow(0.50), 4))
.Set("Krow at Sw 0.50, LET", Math.Round(let.Krow(0.50), 4));
}
}