Skip to content

Quarter-five-spot example

The quarter-five-spot is a standard test problem that simulates 1/4 of the five spot well pattern by assuming axial symmetry. The problem contains an injector in one corner and the producer in the opposing corner, with a significant volume of fluids injected into the domain.

julia
using JutulDarcy, Jutul
nx = 50;

Setup

We define a function that, for a given porosity field, computes a solution with an estimated permeability field. For assumptions and derivation of the specific form of the Kozeny-Carman relation used in this example, see Lie, Knut-Andreas. An introduction to reservoir simulation using MATLAB/GNU Octave: User guide for the MATLAB Reservoir Simulation Toolbox (MRST). Cambridge University Press, 2019, Section 2.5.2

julia
function perm_kozeny_carman(Φ)
    return ((Φ^3)*(1e-5)^2)/(0.81*72*(1-Φ)^2);
end

function simulate_qfs(porosity = 0.2)
    Dx = 1000.0
    Dz = 10.0
    Darcy = 9.869232667160130e-13
    Darcy, bar, kg, meter, Kelvin, day, sec = si_units(:darcy, :bar, :kilogram, :meter, :Kelvin, :day, :second)

    mesh = CartesianMesh((nx, nx, 1), (Dx, Dx, Dz))
    K = perm_kozeny_carman.(porosity)
    domain = reservoir_domain(mesh, permeability = K, porosity = porosity)
    Inj = setup_vertical_well(domain, 1, 1, name = :Injector);
    Prod = setup_vertical_well(domain, nx, nx, name = :Producer);
    phases = (LiquidPhase(), VaporPhase())
    rhoLS = 1000.0*kg/meter^3
    rhoGS = 700.0*kg/meter^3
    rhoS = [rhoLS, rhoGS]
    sys = ImmiscibleSystem(phases, reference_densities = rhoS)
    model, parameters = setup_reservoir_model(domain, sys, wells = [Inj, Prod])
    c = [1e-6/bar, 1e-6/bar]
    ρ = ConstantCompressibilityDensities(p_ref = 150*bar, density_ref = rhoS, compressibility = c)
    kr = BrooksCoreyRelativePermeabilities(sys, [2.0, 2.0])
    replace_variables!(model, PhaseMassDensities = ρ, RelativePermeabilities = kr);

    state0 = setup_reservoir_state(model, Pressure = 150*bar, Saturations = [1.0, 0.0])
    dt = repeat([30.0]*day, 12*10)
    dt = vcat([0.1, 1.0, 10.0], dt)
    inj_rate = Dx*Dx*Dz*0.2/sum(dt) # 1 PVI if average porosity is 0.2

    rate_target = TotalRateTarget(inj_rate)
    I_ctrl = InjectorControl(rate_target, [0.0, 1.0], density = rhoGS)
    bhp_target = BottomHolePressureTarget(50*bar)
    P_ctrl = ProducerControl(bhp_target)
    controls = Dict()
    controls[:Injector] = I_ctrl
    controls[:Producer] = P_ctrl
    forces = setup_reservoir_forces(model, control = controls)
    return simulate_reservoir(state0, model, dt, parameters = parameters, forces = forces)
end
simulate_qfs (generic function with 2 methods)

Simulate base case

This will give the solution with uniform porosity of 0.2.

julia
ws, states, report_time = simulate_qfs();
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 141 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │    3.3252 │       2.90071 │  409 (0) │
│ Linearization  │   4.47154 │       3.90071 │  550 (0) │
│ Linear solver  │   10.2358 │       8.92908 │ 1259 (0) │
│ Precond apply  │   20.4715 │       17.8582 │ 2518 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2383 │     5.47 % │ 0.0974 │
│ Equations     │ 0.2076 │     6.41 % │ 0.1142 │
│ Assembly      │ 0.2548 │     7.87 % │ 0.1401 │
│ Linear solve  │ 0.2880 │     6.62 % │ 0.1178 │
│ Linear setup  │ 1.7969 │    41.29 % │ 0.7349 │
│ Precond apply │ 0.1889 │    26.73 % │ 0.4757 │
│ Update        │ 0.0741 │     1.70 % │ 0.0303 │
│ Convergence   │ 0.0677 │     2.09 % │ 0.0372 │
│ Input/Output  │ 0.0340 │     0.27 % │ 0.0048 │
│ Other         │ 0.0670 │     1.54 % │ 0.0274 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.3519 │   100.00 % │ 1.7799 │
╰───────────────┴────────┴────────────┴────────╯

Plot the solution of the base case

We observe a radial flow pattern initially, before coning occurs near the producer well once the fluid has reached the opposite corner. The uniform permeability and porosity gives axial symmetry at x=y.

julia
using GLMakie
to_2d(x) = reshape(vec(x), nx, nx)
get_sat(state) = to_2d(state[:Saturations][2, :])
nt = length(report_time)
fig = Figure()
h = nothing
ax = Axis(fig[1, 1])
h = contourf!(ax, get_sat(states[nt÷3]))
ax = Axis(fig[1, 2])
h = contourf!(ax, get_sat(states[nt]))
Colorbar(fig[1, end+1], h)
fig

Create 10 realizations

We create a small set of realizations of the same model, with porosity that is uniformly varying between 0.05 and 0.3. This is not especially sophisticated geostatistics - for a more realistic approach, take a look at GeoStats.jl. The main idea is to get significantly different flow patterns as the porosity and permeability changes.

julia
N = 10
saturations = []
wells = []
report_step = nt
for i = 1:N
    poro = 0.05 .+ 0.25*rand(Float64, (nx*nx))
    ws_i, states_i, rt = simulate_qfs(poro)
    push!(wells, ws_i)
    push!(saturations, get_sat(states_i[report_step]))
end
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 153 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │       4.0 │       3.21569 │  492 (0) │
│ Linearization  │    5.2439 │       4.21569 │  645 (0) │
│ Linear solver  │      12.0 │       9.64706 │ 1476 (0) │
│ Precond apply  │      24.0 │       19.2941 │ 2952 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2399 │     5.07 % │ 0.1181 │
│ Equations     │ 0.2365 │     6.55 % │ 0.1526 │
│ Assembly      │ 0.2634 │     7.30 % │ 0.1699 │
│ Linear solve  │ 0.2834 │     5.99 % │ 0.1394 │
│ Linear setup  │ 2.2122 │    46.75 % │ 1.0884 │
│ Precond apply │ 0.1821 │    23.09 % │ 0.5377 │
│ Update        │ 0.0800 │     1.69 % │ 0.0394 │
│ Convergence   │ 0.0715 │     1.98 % │ 0.0461 │
│ Input/Output  │ 0.0330 │     0.22 % │ 0.0050 │
│ Other         │ 0.0644 │     1.36 % │ 0.0317 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.7321 │   100.00 % │ 2.3282 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 146 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   3.66667 │       3.08904 │  451 (0) │
│ Linearization  │   4.85366 │       4.08904 │  597 (0) │
│ Linear solver  │   15.8862 │       13.3836 │ 1954 (0) │
│ Precond apply  │   31.7724 │       26.7671 │ 3908 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2417 │     4.58 % │ 0.1090 │
│ Equations     │ 0.2373 │     5.95 % │ 0.1416 │
│ Assembly      │ 0.2653 │     6.66 % │ 0.1584 │
│ Linear solve  │ 0.3597 │     6.82 % │ 0.1622 │
│ Linear setup  │ 2.2051 │    41.80 % │ 0.9945 │
│ Precond apply │ 0.1784 │    29.30 % │ 0.6973 │
│ Update        │ 0.0833 │     1.58 % │ 0.0376 │
│ Convergence   │ 0.0727 │     1.82 % │ 0.0434 │
│ Input/Output  │ 0.0354 │     0.22 % │ 0.0052 │
│ Other         │ 0.0670 │     1.27 % │ 0.0302 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.2758 │   100.00 % │ 2.3794 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 149 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   3.95935 │       3.26846 │  487 (0) │
│ Linearization  │   5.17073 │       4.26846 │  636 (0) │
│ Linear solver  │   18.6341 │       15.3826 │ 2292 (0) │
│ Precond apply  │   37.2683 │       30.7651 │ 4584 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2397 │     4.24 % │ 0.1167 │
│ Equations     │ 0.4081 │     9.42 % │ 0.2595 │
│ Assembly      │ 0.2571 │     5.93 % │ 0.1635 │
│ Linear solve  │ 0.3829 │     6.77 % │ 0.1865 │
│ Linear setup  │ 2.2431 │    39.64 % │ 1.0924 │
│ Precond apply │ 0.1790 │    29.78 % │ 0.8207 │
│ Update        │ 0.0758 │     1.34 % │ 0.0369 │
│ Convergence   │ 0.0693 │     1.60 % │ 0.0440 │
│ Input/Output  │ 0.0348 │     0.19 % │ 0.0052 │
│ Other         │ 0.0621 │     1.10 % │ 0.0302 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.6585 │   100.00 % │ 2.7557 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 174 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   5.81301 │        4.1092 │   715 (60) │
│ Linearization  │   7.22764 │        5.1092 │   889 (64) │
│ Linear solver  │   13.1382 │       9.28736 │  1616 (60) │
│ Precond apply  │   26.2764 │       18.5747 │ 3232 (120) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2375 │     4.90 % │ 0.1698 │
│ Equations     │ 0.2249 │     5.77 % │ 0.1999 │
│ Assembly      │ 0.2565 │     6.58 % │ 0.2280 │
│ Linear solve  │ 0.2413 │     4.98 % │ 0.1725 │
│ Linear setup  │ 2.0890 │    43.10 % │ 1.4936 │
│ Precond apply │ 0.1842 │    17.17 % │ 0.5952 │
│ Update        │ 0.0743 │     1.53 % │ 0.0531 │
│ Convergence   │ 0.5162 │    13.24 % │ 0.4589 │
│ Input/Output  │ 0.0309 │     0.15 % │ 0.0054 │
│ Other         │ 0.1250 │     2.58 % │ 0.0894 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.8473 │   100.00 % │ 3.4658 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 156 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   4.06504 │       3.20513 │  500 (0) │
│ Linearization  │   5.33333 │       4.20513 │  656 (0) │
│ Linear solver  │   17.5935 │       13.8718 │ 2164 (0) │
│ Precond apply  │    35.187 │       27.7436 │ 4328 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2433 │     4.45 % │ 0.1217 │
│ Equations     │ 0.2371 │     5.69 % │ 0.1556 │
│ Assembly      │ 0.2630 │     6.31 % │ 0.1726 │
│ Linear solve  │ 0.3604 │     6.59 % │ 0.1802 │
│ Linear setup  │ 2.2293 │    40.75 % │ 1.1146 │
│ Precond apply │ 0.1792 │    28.35 % │ 0.7755 │
│ Update        │ 0.2606 │     4.76 % │ 0.1303 │
│ Convergence   │ 0.0717 │     1.72 % │ 0.0470 │
│ Input/Output  │ 0.0343 │     0.20 % │ 0.0053 │
│ Other         │ 0.0648 │     1.18 % │ 0.0324 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.4703 │   100.00 % │ 2.7352 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 188 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   6.74797 │       4.41489 │  830 (105) │
│ Linearization  │   8.27642 │       5.41489 │ 1018 (112) │
│ Linear solver  │   16.0813 │       10.5213 │ 1978 (149) │
│ Precond apply  │   32.1626 │       21.0426 │ 3956 (298) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2359 │     5.58 % │ 0.1958 │
│ Equations     │ 0.2210 │     6.41 % │ 0.2250 │
│ Assembly      │ 0.2546 │     7.38 % │ 0.2592 │
│ Linear solve  │ 0.2494 │     5.90 % │ 0.2070 │
│ Linear setup  │ 2.0818 │    49.21 % │ 1.7279 │
│ Precond apply │ 0.1818 │    20.49 % │ 0.7194 │
│ Update        │ 0.0731 │     1.73 % │ 0.0606 │
│ Convergence   │ 0.0694 │     2.01 % │ 0.0706 │
│ Input/Output  │ 0.0294 │     0.16 % │ 0.0055 │
│ Other         │ 0.0489 │     1.16 % │ 0.0406 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.2308 │   100.00 % │ 3.5116 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 148 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   3.88618 │       3.22973 │  478 (0) │
│ Linearization  │   5.08943 │       4.22973 │  626 (0) │
│ Linear solver  │    18.439 │       15.3243 │ 2268 (0) │
│ Precond apply  │    36.878 │       30.6486 │ 4536 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2402 │     4.31 % │ 0.1148 │
│ Equations     │ 0.2302 │     5.41 % │ 0.1441 │
│ Assembly      │ 0.2601 │     6.11 % │ 0.1628 │
│ Linear solve  │ 0.3843 │     6.89 % │ 0.1837 │
│ Linear setup  │ 2.3700 │    42.51 % │ 1.1329 │
│ Precond apply │ 0.1785 │    30.38 % │ 0.8096 │
│ Update        │ 0.0788 │     1.41 % │ 0.0376 │
│ Convergence   │ 0.0701 │     1.65 % │ 0.0439 │
│ Input/Output  │ 0.0345 │     0.19 % │ 0.0051 │
│ Other         │ 0.0636 │     1.14 % │ 0.0304 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.5753 │   100.00 % │ 2.6650 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 184 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   6.30894 │       4.21739 │  776 (105) │
│ Linearization  │   7.80488 │       5.21739 │  960 (112) │
│ Linear solver  │   13.3659 │       8.93478 │ 1644 (105) │
│ Precond apply  │   26.7317 │       17.8696 │ 3288 (210) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2365 │     5.79 % │ 0.1835 │
│ Equations     │ 0.2232 │     6.76 % │ 0.2142 │
│ Assembly      │ 0.2553 │     7.73 % │ 0.2450 │
│ Linear solve  │ 0.2364 │     5.79 % │ 0.1835 │
│ Linear setup  │ 2.0271 │    49.63 % │ 1.5730 │
│ Precond apply │ 0.1834 │    19.03 % │ 0.6031 │
│ Update        │ 0.0736 │     1.80 % │ 0.0571 │
│ Convergence   │ 0.0687 │     2.08 % │ 0.0660 │
│ Input/Output  │ 0.0292 │     0.17 % │ 0.0054 │
│ Other         │ 0.0501 │     1.23 % │ 0.0388 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.0847 │   100.00 % │ 3.1697 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 155 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   4.12195 │       3.27097 │  507 (0) │
│ Linearization  │   5.38211 │       4.27097 │  662 (0) │
│ Linear solver  │   15.4309 │       12.2452 │ 1898 (0) │
│ Precond apply  │   30.8618 │       24.4903 │ 3796 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2421 │     4.70 % │ 0.1227 │
│ Equations     │ 0.2259 │     5.72 % │ 0.1496 │
│ Assembly      │ 0.2544 │     6.44 % │ 0.1684 │
│ Linear solve  │ 0.4009 │     7.78 % │ 0.2033 │
│ Linear setup  │ 2.2706 │    44.06 % │ 1.1512 │
│ Precond apply │ 0.1835 │    26.67 % │ 0.6967 │
│ Update        │ 0.0752 │     1.46 % │ 0.0381 │
│ Convergence   │ 0.0693 │     1.76 % │ 0.0459 │
│ Input/Output  │ 0.0340 │     0.20 % │ 0.0053 │
│ Other         │ 0.0625 │     1.21 % │ 0.0317 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.1535 │   100.00 % │ 2.6128 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 152 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   4.11382 │       3.32895 │  506 (0) │
│ Linearization  │   5.34959 │       4.32895 │  658 (0) │
│ Linear solver  │   12.2602 │       9.92105 │ 1508 (0) │
│ Precond apply  │   24.5203 │       19.8421 │ 3016 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2369 │     5.00 % │ 0.1199 │
│ Equations     │ 0.2225 │     6.10 % │ 0.1464 │
│ Assembly      │ 0.2558 │     7.02 % │ 0.1683 │
│ Linear solve  │ 0.2805 │     5.92 % │ 0.1419 │
│ Linear setup  │ 2.2129 │    46.69 % │ 1.1197 │
│ Precond apply │ 0.1823 │    22.92 % │ 0.5497 │
│ Update        │ 0.0747 │     1.58 % │ 0.0378 │
│ Convergence   │ 0.0685 │     1.88 % │ 0.0451 │
│ Input/Output  │ 0.2577 │     1.63 % │ 0.0392 │
│ Other         │ 0.0599 │     1.26 % │ 0.0303 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.7397 │   100.00 % │ 2.3983 │
╰───────────────┴────────┴────────────┴────────╯

Plot the oil rate at the producer over the ensemble

julia
using Statistics
fig = Figure()
ax = Axis(fig[1, 1])
for i = 1:N
    ws = wells[i]
    q = -ws[:Producer][:orat]
    lines!(ax, report_time, q)
end
xlims!(ax, [mean(report_time), report_time[end]])
ylims!(ax, 0, 0.0075)
fig

Plot the average saturation over the ensemble

julia
avg = mean(saturations)
fig = Figure()
h = nothing
ax = Axis(fig[1, 1])
h = contourf!(ax, avg)
fig

Plot the isocontour lines over the ensemble

julia
fig = Figure()
h = nothing
ax = Axis(fig[1, 1])
for s in saturations
    contour!(ax, s, levels = 0:0.1:1)
end
fig

Example on GitHub

If you would like to run this example yourself, it can be downloaded from the JutulDarcy.jl GitHub repository as a script, or as a Jupyter Notebook

This example took 37.524909499 seconds to complete.

This page was generated using Literate.jl.