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.2364 │     5.46 % │ 0.0967 │
│ Equations     │ 0.2057 │     6.39 % │ 0.1132 │
│ Assembly      │ 0.2313 │     7.18 % │ 0.1272 │
│ Linear solve  │ 0.2869 │     6.62 % │ 0.1173 │
│ Linear setup  │ 1.8115 │    41.82 % │ 0.7409 │
│ Precond apply │ 0.1881 │    26.74 % │ 0.4737 │
│ Update        │ 0.0746 │     1.72 % │ 0.0305 │
│ Convergence   │ 0.0682 │     2.12 % │ 0.0375 │
│ Input/Output  │ 0.0389 │     0.31 % │ 0.0055 │
│ Other         │ 0.0714 │     1.65 % │ 0.0292 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.3317 │   100.00 % │ 1.7717 │
╰───────────────┴────────┴────────────┴────────╯

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 │ 175 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   5.82927 │       4.09714 │   717 (75) │
│ Linearization  │   7.25203 │       5.09714 │   892 (80) │
│ Linear solver  │   13.3902 │       9.41143 │  1647 (75) │
│ Precond apply  │   26.7805 │       18.8229 │ 3294 (150) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2397 │     4.99 % │ 0.1719 │
│ Equations     │ 0.2249 │     5.82 % │ 0.2006 │
│ Assembly      │ 0.2338 │     6.06 % │ 0.2086 │
│ Linear solve  │ 0.2533 │     5.27 % │ 0.1817 │
│ Linear setup  │ 2.0308 │    42.28 % │ 1.4561 │
│ Precond apply │ 0.1813 │    17.34 % │ 0.5973 │
│ Update        │ 0.0769 │     1.60 % │ 0.0551 │
│ Convergence   │ 0.5267 │    13.64 % │ 0.4698 │
│ Input/Output  │ 0.0352 │     0.18 % │ 0.0062 │
│ Other         │ 0.1352 │     2.81 % │ 0.0969 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.8034 │   100.00 % │ 3.4440 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬─────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │       Total │
│                │ 123 steps │ 426 ministeps │    (wasted) │
├────────────────┼───────────┼───────────────┼─────────────┤
│ Newton         │   25.4797 │       7.35681 │ 3134 (1620) │
│ Linearization  │   28.9431 │       8.35681 │ 3560 (1728) │
│ Linear solver  │   35.9268 │       10.3732 │ 4419 (1676) │
│ Precond apply  │   71.8537 │       20.7465 │ 8838 (3352) │
╰────────────────┴───────────┴───────────────┴─────────────╯
╭───────────────┬────────┬────────────┬─────────╮
│ Timing type   │   Each │   Relative │   Total │
│               │     ms │ Percentage │       s │
├───────────────┼────────┼────────────┼─────────┤
│ Properties    │ 0.2366 │     6.67 % │  0.7414 │
│ Equations     │ 0.2237 │     7.16 % │  0.7965 │
│ Assembly      │ 0.2350 │     7.52 % │  0.8364 │
│ Linear solve  │ 0.2844 │     8.02 % │  0.8915 │
│ Linear setup  │ 1.7707 │    49.90 % │  5.5495 │
│ Precond apply │ 0.1816 │    14.43 % │  1.6049 │
│ Update        │ 0.0763 │     2.15 % │  0.2390 │
│ Convergence   │ 0.0729 │     2.33 % │  0.2595 │
│ Input/Output  │ 0.1558 │     0.60 % │  0.0664 │
│ Other         │ 0.0433 │     1.22 % │  0.1358 │
├───────────────┼────────┼────────────┼─────────┤
│ Total         │ 3.5484 │   100.00 % │ 11.1207 │
╰───────────────┴────────┴────────────┴─────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 197 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   7.21138 │       4.50254 │   887 (45) │
│ Linearization  │   8.81301 │       5.50254 │  1084 (48) │
│ Linear solver  │   19.1138 │        11.934 │  2351 (90) │
│ Precond apply  │   38.2276 │        23.868 │ 4702 (180) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2385 │     5.37 % │ 0.2115 │
│ Equations     │ 0.2257 │     6.21 % │ 0.2446 │
│ Assembly      │ 0.2333 │     6.42 % │ 0.2529 │
│ Linear solve  │ 0.2730 │     6.15 % │ 0.2421 │
│ Linear setup  │ 2.1750 │    48.98 % │ 1.9292 │
│ Precond apply │ 0.1827 │    21.80 % │ 0.8588 │
│ Update        │ 0.0767 │     1.73 % │ 0.0681 │
│ Convergence   │ 0.0705 │     1.94 % │ 0.0764 │
│ Input/Output  │ 0.0342 │     0.17 % │ 0.0067 │
│ Other         │ 0.0546 │     1.23 % │ 0.0484 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.4406 │   100.00 % │ 3.9388 │
╰───────────────┴────────┴────────────┴────────╯
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.57724 │        3.0137 │  440 (0) │
│ Linearization  │   4.76423 │        4.0137 │  586 (0) │
│ Linear solver  │    13.439 │       11.3219 │ 1653 (0) │
│ Precond apply  │    26.878 │       22.6438 │ 3306 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2407 │     4.63 % │ 0.1059 │
│ Equations     │ 0.2289 │     5.87 % │ 0.1342 │
│ Assembly      │ 0.2358 │     6.04 % │ 0.1382 │
│ Linear solve  │ 0.3415 │     6.57 % │ 0.1503 │
│ Linear setup  │ 2.2438 │    43.17 % │ 0.9873 │
│ Precond apply │ 0.1804 │    26.08 % │ 0.5964 │
│ Update        │ 0.0800 │     1.54 % │ 0.0352 │
│ Convergence   │ 0.0717 │     1.84 % │ 0.0420 │
│ Input/Output  │ 0.4342 │     2.77 % │ 0.0634 │
│ Other         │ 0.0772 │     1.49 % │ 0.0340 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.1973 │   100.00 % │ 2.2868 │
╰───────────────┴────────┴────────────┴────────╯
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.73984 │       3.10811 │  460 (0) │
│ Linearization  │   4.94309 │       4.10811 │  608 (0) │
│ Linear solver  │    16.187 │       13.4527 │ 1991 (0) │
│ Precond apply  │    32.374 │       26.9054 │ 3982 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2435 │     4.51 % │ 0.1120 │
│ Equations     │ 0.2393 │     5.87 % │ 0.1455 │
│ Assembly      │ 0.2392 │     5.86 % │ 0.1454 │
│ Linear solve  │ 0.3990 │     7.40 % │ 0.1835 │
│ Linear setup  │ 2.2680 │    42.05 % │ 1.0433 │
│ Precond apply │ 0.1798 │    28.86 % │ 0.7159 │
│ Update        │ 0.0871 │     1.61 % │ 0.0400 │
│ Convergence   │ 0.0795 │     1.95 % │ 0.0483 │
│ Input/Output  │ 0.0498 │     0.30 % │ 0.0074 │
│ Other         │ 0.0858 │     1.59 % │ 0.0395 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.3932 │   100.00 % │ 2.4809 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 152 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │    3.9187 │       3.17105 │  482 (0) │
│ Linearization  │   5.15447 │       4.17105 │  634 (0) │
│ Linear solver  │   18.5691 │       15.0263 │ 2284 (0) │
│ Precond apply  │   37.1382 │       30.0526 │ 4568 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2463 │     4.35 % │ 0.1187 │
│ Equations     │ 0.2427 │     5.64 % │ 0.1539 │
│ Assembly      │ 0.2407 │     5.59 % │ 0.1526 │
│ Linear solve  │ 0.4331 │     7.64 % │ 0.2088 │
│ Linear setup  │ 2.3484 │    41.45 % │ 1.1319 │
│ Precond apply │ 0.1804 │    30.18 % │ 0.8243 │
│ Update        │ 0.0875 │     1.54 % │ 0.0422 │
│ Convergence   │ 0.0797 │     1.85 % │ 0.0506 │
│ Input/Output  │ 0.0482 │     0.27 % │ 0.0073 │
│ Other         │ 0.0843 │     1.49 % │ 0.0406 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.6656 │   100.00 % │ 2.7308 │
╰───────────────┴────────┴────────────┴────────╯
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.76423 │       3.12838 │  463 (0) │
│ Linearization  │   4.96748 │       4.12838 │  611 (0) │
│ Linear solver  │   17.2927 │       14.3716 │ 2127 (0) │
│ Precond apply  │   34.5854 │       28.7432 │ 4254 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2445 │     4.42 % │ 0.1132 │
│ Equations     │ 0.2404 │     5.74 % │ 0.1469 │
│ Assembly      │ 0.2417 │     5.77 % │ 0.1477 │
│ Linear solve  │ 0.4182 │     7.57 % │ 0.1936 │
│ Linear setup  │ 2.2854 │    41.36 % │ 1.0581 │
│ Precond apply │ 0.1793 │    29.82 % │ 0.7628 │
│ Update        │ 0.0871 │     1.58 % │ 0.0403 │
│ Convergence   │ 0.0806 │     1.92 % │ 0.0492 │
│ Input/Output  │ 0.0482 │     0.28 % │ 0.0071 │
│ Other         │ 0.0845 │     1.53 % │ 0.0391 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.5252 │   100.00 % │ 2.5582 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 198 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   7.14634 │       4.43939 │   879 (75) │
│ Linearization  │    8.7561 │       5.43939 │  1077 (80) │
│ Linear solver  │   17.0081 │       10.5657 │ 2092 (109) │
│ Precond apply  │   34.0163 │       21.1313 │ 4184 (218) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2401 │     5.49 % │ 0.2110 │
│ Equations     │ 0.2316 │     6.49 % │ 0.2494 │
│ Assembly      │ 0.2339 │     6.56 % │ 0.2520 │
│ Linear solve  │ 0.2630 │     6.02 % │ 0.2312 │
│ Linear setup  │ 2.1511 │    49.20 % │ 1.8908 │
│ Precond apply │ 0.1853 │    20.17 % │ 0.7753 │
│ Update        │ 0.1135 │     2.60 % │ 0.0998 │
│ Convergence   │ 0.0711 │     1.99 % │ 0.0766 │
│ Input/Output  │ 0.0356 │     0.18 % │ 0.0070 │
│ Other         │ 0.0565 │     1.29 % │ 0.0496 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.3718 │   100.00 % │ 3.8428 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │        Total │
│                │ 123 steps │ 477 ministeps │     (wasted) │
├────────────────┼───────────┼───────────────┼──────────────┤
│ Newton         │   28.5203 │        7.3543 │  3508 (1575) │
│ Linearization  │   32.3984 │        8.3543 │  3985 (1680) │
│ Linear solver  │    43.439 │       11.2013 │  5343 (1667) │
│ Precond apply  │    86.878 │       22.4025 │ 10686 (3334) │
╰────────────────┴───────────┴───────────────┴──────────────╯
╭───────────────┬────────┬────────────┬─────────╮
│ Timing type   │   Each │   Relative │   Total │
│               │     ms │ Percentage │       s │
├───────────────┼────────┼────────────┼─────────┤
│ Properties    │ 0.2360 │     6.51 % │  0.8278 │
│ Equations     │ 0.2394 │     7.50 % │  0.9539 │
│ Assembly      │ 0.2422 │     7.59 % │  0.9652 │
│ Linear solve  │ 0.2362 │     6.51 % │  0.8285 │
│ Linear setup  │ 1.8390 │    50.71 % │  6.4512 │
│ Precond apply │ 0.1844 │    15.49 % │  1.9701 │
│ Update        │ 0.0763 │     2.10 % │  0.2676 │
│ Convergence   │ 0.0727 │     2.28 % │  0.2896 │
│ Input/Output  │ 0.0288 │     0.11 % │  0.0138 │
│ Other         │ 0.0436 │     1.20 % │  0.1531 │
├───────────────┼────────┼────────────┼─────────┤
│ Total         │ 3.6262 │   100.00 % │ 12.7207 │
╰───────────────┴────────┴────────────┴─────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬─────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │       Total │
│                │ 123 steps │ 273 ministeps │    (wasted) │
├────────────────┼───────────┼───────────────┼─────────────┤
│ Newton         │   13.2114 │       5.95238 │  1625 (720) │
│ Linearization  │   15.4309 │       6.95238 │  1898 (768) │
│ Linear solver  │   21.5528 │       9.71062 │  2651 (754) │
│ Precond apply  │   43.1057 │       19.4212 │ 5302 (1508) │
╰────────────────┴───────────┴───────────────┴─────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2363 │     6.57 % │ 0.3840 │
│ Equations     │ 0.2204 │     7.15 % │ 0.4184 │
│ Assembly      │ 0.2332 │     7.57 % │ 0.4426 │
│ Linear solve  │ 0.2218 │     6.16 % │ 0.3605 │
│ Linear setup  │ 1.7618 │    48.96 % │ 2.8629 │
│ Precond apply │ 0.1821 │    16.51 % │ 0.9655 │
│ Update        │ 0.0756 │     2.10 % │ 0.1228 │
│ Convergence   │ 0.1068 │     3.47 % │ 0.2027 │
│ Input/Output  │ 0.0327 │     0.15 % │ 0.0089 │
│ Other         │ 0.0489 │     1.36 % │ 0.0795 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 3.5986 │   100.00 % │ 5.8478 │
╰───────────────┴────────┴────────────┴────────╯

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 61.650309454 seconds to complete.

This page was generated using Literate.jl.