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.2354 │     5.45 % │ 0.0963 │
│ Equations     │ 0.2075 │     6.46 % │ 0.1141 │
│ Assembly      │ 0.2537 │     7.90 % │ 0.1395 │
│ Linear solve  │ 0.2819 │     6.53 % │ 0.1153 │
│ Linear setup  │ 1.7880 │    41.41 % │ 0.7313 │
│ Precond apply │ 0.1867 │    26.63 % │ 0.4702 │
│ Update        │ 0.0755 │     1.75 % │ 0.0309 │
│ Convergence   │ 0.0670 │     2.09 % │ 0.0369 │
│ Input/Output  │ 0.0322 │     0.26 % │ 0.0045 │
│ Other         │ 0.0658 │     1.52 % │ 0.0269 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.3175 │   100.00 % │ 1.7659 │
╰───────────────┴────────┴────────────┴────────╯

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 │ 162 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   4.61789 │       3.50617 │   568 (30) │
│ Linearization  │   5.93496 │       4.50617 │   730 (32) │
│ Linear solver  │   14.3333 │       10.8827 │  1763 (72) │
│ Precond apply  │   28.6667 │       21.7654 │ 3526 (144) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2398 │     4.29 % │ 0.1362 │
│ Equations     │ 0.2314 │     5.33 % │ 0.1689 │
│ Assembly      │ 0.2619 │     6.03 % │ 0.1912 │
│ Linear solve  │ 0.2966 │     5.31 % │ 0.1685 │
│ Linear setup  │ 2.1685 │    38.85 % │ 1.2317 │
│ Precond apply │ 0.1817 │    20.21 % │ 0.6408 │
│ Update        │ 0.0787 │     1.41 % │ 0.0447 │
│ Convergence   │ 0.6763 │    15.57 % │ 0.4937 │
│ Input/Output  │ 0.0330 │     0.17 % │ 0.0054 │
│ Other         │ 0.1580 │     2.83 % │ 0.0898 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.5825 │   100.00 % │ 3.1709 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 167 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   5.08943 │        3.7485 │   626 (45) │
│ Linearization  │   6.44715 │        4.7485 │   793 (48) │
│ Linear solver  │   25.5447 │       18.8144 │ 3142 (174) │
│ Precond apply  │   51.0894 │       37.6287 │ 6284 (348) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2422 │     4.40 % │ 0.1516 │
│ Equations     │ 0.2466 │     5.68 % │ 0.1956 │
│ Assembly      │ 0.2658 │     6.12 % │ 0.2108 │
│ Linear solve  │ 0.4156 │     7.55 % │ 0.2602 │
│ Linear setup  │ 2.1677 │    39.41 % │ 1.3570 │
│ Precond apply │ 0.1763 │    32.17 % │ 1.1079 │
│ Update        │ 0.0859 │     1.56 % │ 0.0537 │
│ Convergence   │ 0.0767 │     1.77 % │ 0.0608 │
│ Input/Output  │ 0.0367 │     0.18 % │ 0.0061 │
│ Other         │ 0.0638 │     1.16 % │ 0.0399 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.5009 │   100.00 % │ 3.4436 │
╰───────────────┴────────┴────────────┴────────╯
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.11382 │       3.26452 │  506 (0) │
│ Linearization  │   5.37398 │       4.26452 │  661 (0) │
│ Linear solver  │    20.252 │        16.071 │ 2491 (0) │
│ Precond apply  │   40.5041 │       32.1419 │ 4982 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2365 │     4.30 % │ 0.1197 │
│ Equations     │ 0.2252 │     5.35 % │ 0.1489 │
│ Assembly      │ 0.2554 │     6.06 % │ 0.1688 │
│ Linear solve  │ 0.4031 │     7.33 % │ 0.2040 │
│ Linear setup  │ 2.2382 │    40.68 % │ 1.1325 │
│ Precond apply │ 0.1780 │    31.85 % │ 0.8869 │
│ Update        │ 0.0779 │     1.41 % │ 0.0394 │
│ Convergence   │ 0.0709 │     1.68 % │ 0.0468 │
│ Input/Output  │ 0.0345 │     0.19 % │ 0.0053 │
│ Other         │ 0.0631 │     1.15 % │ 0.0319 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.5025 │   100.00 % │ 2.7843 │
╰───────────────┴────────┴────────────┴────────╯
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.8374 │       3.18919 │  472 (0) │
│ Linearization  │   5.04065 │       4.18919 │  620 (0) │
│ Linear solver  │   16.2276 │       13.4865 │ 1996 (0) │
│ Precond apply  │   32.4553 │        26.973 │ 3992 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2386 │     4.55 % │ 0.1126 │
│ Equations     │ 0.2310 │     5.78 % │ 0.1432 │
│ Assembly      │ 0.2587 │     6.47 % │ 0.1604 │
│ Linear solve  │ 0.3625 │     6.91 % │ 0.1711 │
│ Linear setup  │ 2.2329 │    42.53 % │ 1.0539 │
│ Precond apply │ 0.1794 │    28.91 % │ 0.7163 │
│ Update        │ 0.0809 │     1.54 % │ 0.0382 │
│ Convergence   │ 0.0727 │     1.82 % │ 0.0451 │
│ Input/Output  │ 0.0376 │     0.22 % │ 0.0056 │
│ Other         │ 0.0671 │     1.28 % │ 0.0317 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.2503 │   100.00 % │ 2.4781 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 163 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │   4.70732 │       3.55215 │  579 (0) │
│ Linearization  │   6.03252 │       4.55215 │  742 (0) │
│ Linear solver  │   12.8374 │       9.68712 │ 1579 (0) │
│ Precond apply  │   25.6748 │       19.3742 │ 3158 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2384 │     5.09 % │ 0.1381 │
│ Equations     │ 0.3507 │     9.59 % │ 0.2602 │
│ Assembly      │ 0.2647 │     7.24 % │ 0.1964 │
│ Linear solve  │ 0.2728 │     5.82 % │ 0.1579 │
│ Linear setup  │ 2.1449 │    45.77 % │ 1.2419 │
│ Precond apply │ 0.1826 │    21.25 % │ 0.5765 │
│ Update        │ 0.0830 │     1.77 % │ 0.0480 │
│ Convergence   │ 0.0727 │     1.99 % │ 0.0539 │
│ Input/Output  │ 0.0341 │     0.20 % │ 0.0056 │
│ Other         │ 0.0597 │     1.27 % │ 0.0346 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 4.6859 │   100.00 % │ 2.7132 │
╰───────────────┴────────┴────────────┴────────╯
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.60163 │       3.03425 │  443 (0) │
│ Linearization  │   4.78862 │       4.03425 │  589 (0) │
│ Linear solver  │   16.4634 │       13.8699 │ 2025 (0) │
│ Precond apply  │   32.9268 │       27.7397 │ 4050 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2373 │     4.39 % │ 0.1051 │
│ Equations     │ 0.2268 │     5.57 % │ 0.1336 │
│ Assembly      │ 0.2565 │     6.30 % │ 0.1511 │
│ Linear solve  │ 0.3898 │     7.21 % │ 0.1727 │
│ Linear setup  │ 2.1951 │    40.58 % │ 0.9725 │
│ Precond apply │ 0.1842 │    31.13 % │ 0.7460 │
│ Update        │ 0.0785 │     1.45 % │ 0.0348 │
│ Convergence   │ 0.0716 │     1.76 % │ 0.0422 │
│ Input/Output  │ 0.0419 │     0.26 % │ 0.0061 │
│ Other         │ 0.0729 │     1.35 % │ 0.0323 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.4092 │   100.00 % │ 2.3963 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬──────────╮
│ Iteration type │  Avg/step │  Avg/ministep │    Total │
│                │ 123 steps │ 149 ministeps │ (wasted) │
├────────────────┼───────────┼───────────────┼──────────┤
│ Newton         │    4.0813 │       3.36913 │  502 (0) │
│ Linearization  │   5.29268 │       4.36913 │  651 (0) │
│ Linear solver  │   13.9106 │       11.4832 │ 1711 (0) │
│ Precond apply  │   27.8211 │       22.9664 │ 3422 (0) │
╰────────────────┴───────────┴───────────────┴──────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2452 │     4.84 % │ 0.1231 │
│ Equations     │ 0.2393 │     6.12 % │ 0.1558 │
│ Assembly      │ 0.2601 │     6.66 % │ 0.1693 │
│ Linear solve  │ 0.3254 │     6.42 % │ 0.1633 │
│ Linear setup  │ 2.3299 │    45.97 % │ 1.1696 │
│ Precond apply │ 0.1845 │    24.81 % │ 0.6312 │
│ Update        │ 0.0841 │     1.66 % │ 0.0422 │
│ Convergence   │ 0.0753 │     1.93 % │ 0.0490 │
│ Input/Output  │ 0.0414 │     0.24 % │ 0.0062 │
│ Other         │ 0.0690 │     1.36 % │ 0.0346 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 5.0685 │   100.00 % │ 2.5444 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬─────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │       Total │
│                │ 123 steps │ 282 ministeps │    (wasted) │
├────────────────┼───────────┼───────────────┼─────────────┤
│ Newton         │   14.2764 │       6.22695 │  1756 (900) │
│ Linearization  │   16.5691 │       7.22695 │  2038 (960) │
│ Linear solver  │   22.7073 │       9.90426 │  2793 (929) │
│ Precond apply  │   45.4146 │       19.8085 │ 5586 (1858) │
╰────────────────┴───────────┴───────────────┴─────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2341 │     6.53 % │ 0.4110 │
│ Equations     │ 0.2201 │     7.12 % │ 0.4485 │
│ Assembly      │ 0.2560 │     8.28 % │ 0.5217 │
│ Linear solve  │ 0.2361 │     6.58 % │ 0.4145 │
│ Linear setup  │ 1.7597 │    49.05 % │ 3.0900 │
│ Precond apply │ 0.1808 │    16.03 % │ 1.0099 │
│ Update        │ 0.0956 │     2.66 % │ 0.1678 │
│ Convergence   │ 0.0727 │     2.35 % │ 0.1481 │
│ Input/Output  │ 0.0316 │     0.14 % │ 0.0089 │
│ Other         │ 0.0448 │     1.25 % │ 0.0787 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 3.5872 │   100.00 % │ 6.2992 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │      Total │
│                │ 123 steps │ 236 ministeps │   (wasted) │
├────────────────┼───────────┼───────────────┼────────────┤
│ Newton         │   10.2033 │        5.3178 │ 1255 (345) │
│ Linearization  │    12.122 │        6.3178 │ 1491 (368) │
│ Linear solver  │   18.9919 │       9.89831 │ 2336 (364) │
│ Precond apply  │   37.9837 │       19.7966 │ 4672 (728) │
╰────────────────┴───────────┴───────────────┴────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2339 │     6.05 % │ 0.2935 │
│ Equations     │ 0.2237 │     6.88 % │ 0.3335 │
│ Assembly      │ 0.2557 │     7.86 % │ 0.3812 │
│ Linear solve  │ 0.2564 │     6.64 % │ 0.3217 │
│ Linear setup  │ 1.9036 │    49.27 % │ 2.3890 │
│ Precond apply │ 0.1829 │    17.62 % │ 0.8545 │
│ Update        │ 0.0771 │     2.00 % │ 0.0968 │
│ Convergence   │ 0.0733 │     2.25 % │ 0.1092 │
│ Input/Output  │ 0.0317 │     0.15 % │ 0.0075 │
│ Other         │ 0.0491 │     1.27 % │ 0.0616 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 3.8634 │   100.00 % │ 4.8486 │
╰───────────────┴────────┴────────────┴────────╯
Jutul: Simulating 9 years, 44.69 weeks as 123 report steps
╭────────────────┬───────────┬───────────────┬─────────────╮
│ Iteration type │  Avg/step │  Avg/ministep │       Total │
│                │ 123 steps │ 243 ministeps │    (wasted) │
├────────────────┼───────────┼───────────────┼─────────────┤
│ Newton         │   11.0813 │       5.60905 │  1363 (555) │
│ Linearization  │   13.0569 │       6.60905 │  1606 (592) │
│ Linear solver  │   19.3902 │       9.81481 │  2385 (584) │
│ Precond apply  │   38.7805 │       19.6296 │ 4770 (1168) │
╰────────────────┴───────────┴───────────────┴─────────────╯
╭───────────────┬────────┬────────────┬────────╮
│ Timing type   │   Each │   Relative │  Total │
│               │     ms │ Percentage │      s │
├───────────────┼────────┼────────────┼────────┤
│ Properties    │ 0.2344 │     6.34 % │ 0.3194 │
│ Equations     │ 0.2204 │     7.03 % │ 0.3540 │
│ Assembly      │ 0.2554 │     8.14 % │ 0.4101 │
│ Linear solve  │ 0.2277 │     6.16 % │ 0.3104 │
│ Linear setup  │ 1.7992 │    48.67 % │ 2.4523 │
│ Precond apply │ 0.1821 │    17.24 % │ 0.8687 │
│ Update        │ 0.0763 │     2.06 % │ 0.1040 │
│ Convergence   │ 0.0912 │     2.91 % │ 0.1465 │
│ Input/Output  │ 0.0311 │     0.15 % │ 0.0076 │
│ Other         │ 0.0484 │     1.31 % │ 0.0660 │
├───────────────┼────────┼────────────┼────────┤
│ Total         │ 3.6970 │   100.00 % │ 5.0391 │
╰───────────────┴────────┴────────────┴────────╯

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

This page was generated using Literate.jl.