Skip to content

Set up a .AFI file for simulation ​

Introduction   InputFile  

JutulDarcy has partial support for setting up and reading the .AFI file format. This example demonstrates how to load AFI files.

Load the OLYMPUS model ​

We first load the Olympus model from a RESQML-based AFI file.

julia
using Jutul, JutulDarcy, GeoEnergyIO
fn = GeoEnergyIO.test_input_file_path("OLYMPUS_25_AFI_RESQML", "OLYMPUS_25.afi")
case_olympus = setup_case_from_afi(fn);
FM START: Found 1 unhandled IX record types:
  HistoricalControlModes: 15 occurences.
Regions: Only one region label found for region EQUILIBRATION_REGION, but did not find this region in the domain. Assuming all cells belong to this region.
FM: GuideRateBalanceAction: Skipping record 63 for 2016-01-01T00:00:00, record not used by setup code.
FM: ActionSequence: Skipping record 64 for 2016-01-01T00:00:00, record not used by setup code.
FM: Strategy: Skipping record 65 for 2016-01-01T00:00:00, record not used by setup code.
FM: Expression: Skipping record 66 for 2016-01-01T00:00:00, record not used by setup code.
FM: Expression: Skipping record 67 for 2016-01-01T00:00:00, record not used by setup code.

Reading files with a pre-defined reservoir ​

Note that as the AFI support requires either inline mesh definitions or RESQML, and as such, not all files can be read directly. However, if we have already set up a reservoir model (for example from a DATA file), we can reuse the mesh and mesh properties from that model when setting up the AFI case. We set up SPE9 with a pre-defined reservoir model, bypassing the need for GSG support.

julia
spe9_dir = JutulDarcy.GeoEnergyIO.test_input_file_path("SPE9")
case = setup_case_from_data_file(joinpath(spe9_dir, "SPE9.DATA"))
reservoir = reservoir_domain(case)
fn = GeoEnergyIO.test_input_file_path("SPE9_AFI_GSG", "SPE9_clean_split.afi")
case_ix = setup_case_from_afi(fn, reservoir = reservoir);
PVT: Fixing table for low pressure conditions.
Unsupported file extension gsg for include file /home/runner/.julia/artifacts/ea25e7af1dd72f49f8fd8e7a04170529dcec8011/SPE9_clean_SPE9.gsg (local path SPE9_clean_SPE9.gsg). - will be ignored.
IX START: Found 1 unhandled IX record types:
  DrainageRadius: 26 occurences.
FM START: Found 1 unhandled IX record types:
  HistoricalControlModes: 2 occurences.
FM TIME 2015-10-28T00:00:00: Found 1 unhandled IX record types:
  HistoricalControlModes: 1 occurence.
FM TIME 2015-12-27T00:00:00: Found 1 unhandled IX record types:
  HistoricalControlModes: 1 occurence.
PVT: Fixing table for low pressure conditions.
Regions: Only one region label found for region SATURATION_FUNCTION_DRAINAGE_TABLE_NO, but did not find this region in the domain. Assuming all cells belong to this region.
Regions: Only one region label found for region SATURATION_FUNCTION_DRAINAGE_TABLE_NO, but did not find this region in the domain. Assuming all cells belong to this region.
Regions: Only one region label found for region EQUILIBRATION_REGION, but did not find this region in the domain. Assuming all cells belong to this region.
FM: FluidStreamMgr: Skipping record 1 for 2015-01-01T00:00:00, record not used by setup code.
FM: Recurrent3DReport: Skipping record 32 for 2015-01-01T00:00:00, record not used by setup code.
FM: Recurrent3DReport: Skipping record 33 for 2015-01-01T00:00:00, record not used by setup code.
FM: END_INPUT: Skipping record 1 for 2017-06-19T00:00:00, record not used by setup code.

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

This example took 87.911135054 seconds to complete.

This page was generated using Literate.jl.