Simple model example
The following is an example with one installation called Installation A
that exports oil (OIL_PROD
) and gas (GAS_PROD
).
The installation emits CO2.
On this installation, the following components are identified:
The results of a performed characterization of the equipment are listed below:
Consumer | Type | Description |
---|---|---|
Generator set A | Generator set | Variable fuel consumer with electricity to fuel function |
Base production load | Power consumer | Constant load 11.8 MW |
Gas injection compressor | Power consumer | Variable consumption depending on gas injection rate and lift gas rate |
Produced water reinjection pump | Power consumer | Variable consumption depending on water production rate and water injection rate. The pump suction pressure is 10 bar and discharge pressure is 200 bar. |
Sea water injection pump | Power consumer | Variable consumption depending on a complex combination on water injection rate and water production rate |
Flare | Direct fuel consumer | Before 1.1.2005: Constant fuel rate 10000 Sm3/day, From 1.1.2005: Constant fuel rate 7000 Sm3/day |
Gas export compressor | Direct fuel consumer | Variable fuel consumer depending on gas sales rate |
YAML model overview
The YAML model consist of these main components:
- Time series inputs - TIME_SERIES
- Facility characterization input - FACILITY_INPUTS
- Fuel input - FUEL_TYPES
- Model variables - VARIABLES
- Installation topology - INSTALLATIONS
The YAML setup file looks like this:
TIME_SERIES:
<placeholder>
FACILITY_INPUTS:
<placeholder>
FUEL_TYPES:
<placeholder>
VARIABLES:
<placeholder>
INSTALLATIONS:
<placeholder>
We will now replace the placeholders for each of the main keywords above.
TIME_SERIES
The reservoir variables, in this case, are found in a CSV (Comma separated file) production_data.csv
.
We give the time-series data a name that can be referenced as variables elsewhere in the form <NAME>:<NAME OF COLUMN>
.
See TIME_SERIES for further details.
START: 2020-01-01
END: 2031-01-01
TIME_SERIES:
- NAME: SIM
FACILITY_INPUTS
We specify CSV input data for processing equipment using FACILITY_INPUTS. This is used for generatorsets, tabulated/sampled models and pump charts. See FACILITY_INPUTS for further details.
Here we define a tabulated genset, a sampled compressor, a sampled compressor driven by a turbine, a sampled pump, and a single speed pump chart. These will be used in the final model for illustration. Note that more complicated energy models are defined under the MODELS-keyword.
See the input data further down to understand the input formats.
FILE: production_data.csv
TYPE: DEFAULT
FACILITY_INPUTS:
- NAME: genset
FILE: genset.csv
TYPE: ELECTRICITY2FUEL
- NAME: compressor_sampled
FILE: compressor_sampled.csv
TYPE: COMPRESSOR_TABULAR
- NAME: compressor_with_turbine_sampled
FILE: compressor_sampled_with_turbine.csv
TYPE: COMPRESSOR_TABULAR
- NAME: pump_sampled
FILE: pump_sampled.csv #!include, commented !include is now supported
TYPE: TABULAR
- NAME: pump_chart
FILE: pump_chart.csv
TYPE: PUMP_CHART_SINGLE_SPEED
UNITS:
HEAD: M
FUEL_TYPES
In this example there is only one FUEL_TYPES - fuel_gas
. The emissions we model with the fuel is CO2. The CO2 factor
is 2.19 kg CO2 per Sm3 fuel gas burned.
EFFICIENCY: PERCENTAGE
FUEL_TYPES:
- NAME: fuel_gas
EMISSIONS:
VARIABLES
To run the model it is recommended to specify VARIABLES, instead of hard coding values in difference places. This makes it easier to develop, maintain and understand the model by allowing descriptive variable names and avoid duplications.
For our model, we specify the following variables:
FACTOR: 2.19 # CO2/Sm3 fuel gas burned
VARIABLES:
hydrocarbon_export_sm3_per_day:
VALUE: SIM;OIL_PROD {+} SIM;GAS_SALES {/} 1000 # divide the gas rate by 1000 to get oil equivalent
salt_water_injection_rate_m3_per_day:
VALUE: SIM;WATER_INJ {-} SIM;WATER_PROD {+} SIM;WATER_PROD {*} (SIM;WATER_PROD < 1500) {+} (SIM;WATER_PROD {-} 17000) {*} (SIM;WATER_PROD > 17000) {*} (SIM;WATER_PROD < 18500)
gas_export_rate_sm3_per_day:
VALUE: SIM;GAS_SALES
gas_injection_rate_sm3_per_day:
VALUE: SIM;GAS_INJ {+} SIM;GAS_LIFT
produced_water_reinjection_condition:
VALUE: SIM;WATER_PROD > 1500
produced_water_reinjection_total_system_rate_m3_per_day:
VALUE: SIM;WATER_PROD
flare_fuel_rate_sm3_day:
1995-10-01:
VALUE: 10000
We reference the TIME_SERIES SIM
using the column names from the CSV file. Here we use for example
SIM:OIL_PROD
(Field Oil Production Rate) SIM:GAS_PROD
(Field Gas Sales Rate).
It is possible to specify if-else conditions by multiplying with boolean values. This has been done in the $var.sea_water_injection_rate_m3_per_day variable example above.