Skip to content

Commit

Permalink
refactor!: remove economy from ecalc (#282)
Browse files Browse the repository at this point in the history
* refactor!: remove economy from ecalc, i.e. remove tax, quota and price.
  • Loading branch information
frodehk committed Nov 20, 2023
1 parent bd9d684 commit a50148c
Show file tree
Hide file tree
Showing 75 changed files with 153 additions and 2,892 deletions.
17 changes: 2 additions & 15 deletions docs/docs/about/modelling/examples/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a model very similar to [Simple example](/about/modelling/examples/simpl
energy usage models and consumer systems, and the addition of a second installation.

Both installations exports oil (`OIL_PROD`) and gas (`GAS_PROD`).
The installations emits CO<sub>2</sub> and CH<sub>4</sub> that is subject to taxation and emission quotas.
The installations emits CO<sub>2</sub> and CH<sub>4</sub>.

The following is an example with one installation called `Installation A` and `Installation B`.

Expand Down Expand Up @@ -116,31 +116,24 @@ FACILITY_INPUTS:
## FUEL_TYPES
In this example there are two [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md) - `fuel_gas` and `bad_fuel_gas`.
These are used for Installation A and Installation B respectively.
Here we also define emissions in CO<sub>2</sub> and CH<sub>4</sub>. Note that the two fuels have different prices,
emissions factors and the same taxes and are defined:
Here we also define emissions in CO<sub>2</sub> and CH<sub>4</sub>:

~~~~~~~~yaml title="model.yaml"
FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.5 # NOK/Sm3
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: CO2
FACTOR: 2.20 #kg/Sm3
TAX: 1.51 # NOK/Sm3
- NAME: CH4
FACTOR: 0.01 #kg/Sm3
TAX: 0.9 # NOK/Sm3
- NAME: bad_fuel_gas
PRICE: 0.5 # NOK/Sm3
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: CO2
FACTOR: 5.0 #kg/Sm3
TAX: 1.51 # NOK/Sm3
- NAME: CH4
FACTOR: 0.01 #kg/Sm3
TAX: 0.9 # NOK/Sm3
~~~~~~~~

## MODELS
Expand Down Expand Up @@ -520,25 +513,19 @@ FACILITY_INPUTS:

FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.5 # NOK/Sm3
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: CO2
FACTOR: 2.20 #kg/Sm3
TAX: 1.51 # NOK/Sm3
- NAME: CH4
FACTOR: 0.01 #kg/Sm3
TAX: 0.9 # NOK/Sm3
- NAME: bad_fuel_gas
PRICE: 0.5 # NOK/Sm3
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: CO2
FACTOR: 5.0 #kg/Sm3
TAX: 1.51 # NOK/Sm3
- NAME: CH4
FACTOR: 0.01 #kg/Sm3
TAX: 0.9 # NOK/Sm3

MODELS:
- NAME: generic_from_design_point_compressor_chart
Expand Down
4 changes: 0 additions & 4 deletions docs/docs/about/modelling/examples/drogon.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ In this case, the installation uses a single fuel gas with a value of 1.23 NOK/S
~~~~~~~~yaml
FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.23
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: CO2
FACTOR: 2.416 #CO2/Sm3 fuel gas burned
TAX: 1.71 #NOK/Sm3 fuel gas burned
~~~~~~~~

## INSTALLATIONS
Expand Down Expand Up @@ -300,12 +298,10 @@ MODELS:
INLET_TEMPERATURE: 19.3
FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.23
CATEGORY: FUEL-GAS
EMISSIONS:
- NAME: co2_fuel_gas
FACTOR: 2.416
TAX: 1.71
INSTALLATIONS:
- NAME: drogon
CATEGORY: FIXED
Expand Down
14 changes: 3 additions & 11 deletions docs/docs/about/modelling/examples/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A simple model with a single installation
---
# 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 CO<sub>2</sub> that is subject to taxation and emission quotas.
The installation emits CO<sub>2</sub>.

On this installation, the following components are identified:

Expand Down Expand Up @@ -109,20 +109,15 @@ FACILITY_INPUTS:
~~~~~~~~

## FUEL_TYPES
In this example there is only one [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md) - `fuel_gas`. This has a price/value
of 1.5 NOK/Sm<sup>3</sup> and the emissions we model with the fuel is CO<sub>2</sub>. The CO<sub>2</sub> factor
is 2.19 kg CO2 per Sm<sup>3</sup> fuel gas burned. The CO<sub>2</sub> tax is set to 1.5 NOK/Sm<sup>3</sup>
fuel gas burned, and it has a quota price of 260 NOK/ton.
In this example there is only one [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md) - `fuel_gas`. The emissions we model with the fuel is CO<sub>2</sub>. The CO<sub>2</sub> factor
is 2.19 kg CO2 per Sm<sup>3</sup> fuel gas burned.

~~~~~~~~yaml title="model.yaml"
FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.5 #NOK/Sm3
EMISSIONS:
- NAME: CO2
FACTOR: 2.19 #CO2/Sm3 fuel gas burned
TAX: 1.5 #NOK/Sm3 fuel gas burned
QUOTA: 260 #NOK/ton
~~~~~~~~

## VARIABLES
Expand Down Expand Up @@ -356,12 +351,9 @@ FACILITY_INPUTS:

FUEL_TYPES:
- NAME: fuel_gas
PRICE: 1.5 # NOK/Sm3
EMISSIONS:
- NAME: CO2
FACTOR: 2.19 # CO2/Sm3 fuel gas burned
TAX: 1.5 # NOK/Sm3 fuel gas burned
QUOTA: 260 # NOK/ton

VARIABLES:
hydrocarbon_export_sm3_per_day:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Documentation about how to set up each of these fields are found here, respectiv
reservoir variables.
- [FACILITY_INPUTS](/about/references/keywords/FACILITY_INPUTS.md): List of input files from facility characterization. Typically, this can be
characteristics for an element in a consumer system or characteristics for a generator set.
Also, if fuel price or/and CO<sub>2</sub> tax is of type `VARIABLE_FUEL_PRICE` or
`VARIABLE_EMISSION_TAX`, these files should also be put here. These are later used as input
to the energy functions for each consumer. Some may also be used as energy functions directly.
- [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md): Defining the fuel types being used in the model and the corresponding
emissions.
- [MODELS](/about/references/keywords/MODELS.md): Used for multi-level models, one model may refer to other models from either
Expand Down
16 changes: 3 additions & 13 deletions docs/docs/about/modelling/setup/fuel_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ This part of the setup specifies the various fuel types and associated emissions
used in the model. Each fuel type is specified in a list and the defined fuels can later be referred to the
[INSTALLATIONS](/about/modelling/setup/installations/index.md) part of the setup by its name.

A fuel type can have a fuel-cost [PRICE](/about/references/keywords/PRICE.md) associated with
its use. The use of fuel can lead to one or more emission types, specified in [EMISSIONS](/about/references/keywords/EMISSIONS.md),
which in turn can have associated costs.
The use of fuel can lead to one or more emission types, specified in [EMISSIONS](/about/references/keywords/EMISSIONS.md).

You can optionally specify a [CATEGORY](/about/references/keywords/CATEGORY.md).

Expand All @@ -23,11 +21,9 @@ You can optionally specify a [CATEGORY](/about/references/keywords/CATEGORY.md).
FUEL_TYPES:
- NAME: <name_1>
CATEGORY: <category_1>
PRICE: <fuel price>
EMISSIONS: <emissions data>
- NAME: <name_2>
CATEGORY: <category_2>
PRICE: <fuel price>
EMISSIONS: <emissions data>
~~~~~~~~

Expand All @@ -38,26 +34,20 @@ fuels defined that can be used in your [INSTALLATIONS](/about/modelling/setup/in
~~~~~~~~yaml
FUEL_TYPES:
- NAME: fuel_gas # Name of this fuel, use this when referencing this fuel in the FUEL specification in the INSTALLATIONS part
PRICE: 1.5 # The price or sales value of the fuel
EMISSIONS:
- NAME: CO2 # Name of the emission type
FACTOR: 2.15 # kg/Sm3
TAX: 1.51 # NOK/Sm3
QUOTA: 280 # NOK/ton
- NAME: CH4
FACTOR: 0.00091 # kg/Sm3
- NAME: CH4
FACTOR: 0.00091 # kg/Sm3
- NAME: flare_gas
PRICE: 1.5
CATEGORY: FUEL_GAS
EMISSIONS:
- NAME: CO2
FACTOR: 2.73
TAX: 1.51
- NAME: CH4
FACTOR: 0.00024
- NAME: diesel
CATEGORY: DIESEL
PRICE: 9000 # NOK/m3
EMISSIONS:
- NAME: CO2
FACTOR: 2.7085 # kg/l - input diesel usage in l/d
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/about/modelling/setup/time_series.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cases, one might have several sources for reservoir and other relevant time seri

For example, a field may have a reservoir simulation model for some areas and decline curves in other area of
the reservoir. There may also be tie-ins which are affecting the energy/emissions on the field
installations. Also, there may be time profiles for fuel prices, emission tax, etc.
installations. Also, there may be time profiles for other variables.
Therefore, a set of sources may be specified with a name, path to data and type. The name is
later referred to in the system of energy consumers defined under [INSTALLATIONS](/about/references/keywords/INSTALLATIONS.md).

Expand Down
18 changes: 1 addition & 17 deletions docs/docs/about/references/keywords/EMISSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,19 @@

| Required | Child of | Children/Options |
|------------|---------------------------|------------------------------------|
| No | `FUEL_TYPES` | `FACTOR` <br /> `NAME` <br /> `QUOTA` <br /> `TAX` |
| No | `FUEL_TYPES` | `FACTOR` <br /> `NAME` |


## Description
In [EMISSIONS](/about/references/keywords/EMISSIONS.md) one or more emissions related to the use of fuel is specified as
a list. Each emission entry is **required** to have a [NAME](/about/references/keywords/NAME.md) and a [FACTOR](/about/references/keywords/FACTOR.mdx).

The costs associated with emitting typically have two cost elements:

- a quota price [NOK/ton] (based on emission mass) and,
- a tax price [NOK/Sm<sup>3</sup>] based on fuel gas volume.

The names and are chosen due to the CO<sub>2</sub> emissions quota price (based on CO<sub>2</sub> mass) and
the Norwegian CO<sub>2</sub> tax

In general, will be multiplied with the calculated emission volume while
will be multiplied with the calculated fuel volume to obtain the resulting taxation.

The economical parameters are optional.

## Format
~~~~~~~~yaml
EMISSIONS:
- NAME: <name>
FACTOR: <factor>
TAX: <expression>
QUOTA: <expression>
~~~~~~~~

## Example
Expand All @@ -44,7 +30,5 @@ you write the following:
EMISSIONS:
- NAME: CO2
FACTOR: 2.5 # [kg/Sm3]
TAX: 1.5 # [NOK/Sm3]
QUOTA: 240 # NOK/ton CO2
~~~~~~~~

12 changes: 4 additions & 8 deletions docs/docs/about/references/keywords/EMITTER_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@
[...] /
[EMITTER_MODEL](/about/references/keywords/EMITTER_MODEL.md)

| Required | Child of | Children/Options |
|------------|---------------------------|------------------------------------|
| No | `DIRECT_EMITTERS` | `EMISSION_RATE` <br /> `QUOTA` |
| Required | Child of | Children/Options |
|------------|---------------------------|-------------------|
| No | `DIRECT_EMITTERS` | `EMISSION_RATE` |

## Description
The emitter model specifies the data to calculate the direct emissions on an installation. This data is used to set up
a function that may be evaluated for a set of time series and return a result including the emissions emitted and
the related cost of the emissions.

The [EMISSION_RATE](/about/references/keywords/EMISSION_RATE.md) describes the rate [kg/day] of emissions and
[QUOTA](/about/references/keywords/QUOTA.md) specifies the cost of emission per rate of
emission [NOK/kg]. Both are required.
The [EMISSION_RATE](/about/references/keywords/EMISSION_RATE.md) describes the rate [kg/day] of emissions, and is required.

## Format
~~~~~~~~yaml
EMITTER_MODEL:
- EMISSION_RATE: <emission rate [kg/day]>
QUOTA: <emission cost per emission [NOK/kg]>
~~~~~~~~

## Example
~~~~~~~~yaml
EMITTER_MODEL:
- EMISSION_RATE: 4 # [kg/day]
QUOTA: 10 # [NOK/kg]
~~~~~~~~

4 changes: 1 addition & 3 deletions docs/docs/about/references/keywords/FUEL_TYPES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ This part of the setup specifies the various fuel types and associated emissions
used in the model. Each fuel type is specified in a list and the defined fuels can later be referred to the
[INSTALLATIONS](/about/references/keywords/INSTALLATIONS.md) part of the setup by its name.

A fuel type can have a fuel-cost [PRICE](/about/references/keywords/PRICE.md) associated with
its use. The use of fuel can lead to one or more emission types, specified in [EMISSIONS](/about/references/keywords/EMISSIONS.md),
which in turn can have associated costs.
The use of fuel can lead to one or more emission types, specified in [EMISSIONS](/about/references/keywords/EMISSIONS.md).
You can optionally specify a [CATEGORY](/about/references/keywords/CATEGORY.md).

See [FUEL TYPES](/about/modelling/setup/fuel_types.md) for more details about usage.
53 changes: 0 additions & 53 deletions docs/docs/about/references/keywords/PRICE.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/docs/about/references/keywords/QUOTA.md

This file was deleted.

6 changes: 2 additions & 4 deletions docs/docs/about/references/keywords/REGULARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ COMPRESSOR|&#9744;| Stream day |

### Reporting

- All fuel rates, tax and emission results are reported in calendar days.
- All fuel rates are reported in calendar days.
- All power and volume rates results are reported in stream day rates. Note that the volume rates are only present in the .json file.

The reason for reporting calendar day rate is due to the economic interpretation, or rather the lack of economic
interpretation when using fuel stream day rates. If we used stream day rates, we would in essence evaluate the process
unit as if it was running all the time. Typically all process units have some down time, and regularity is
The reason for reporting calendar day rate is to account for potential downtime for process units, i.e. some units may not run all the time throughout a year due to different reasons. Typically all process units have some downtime, and regularity is
on average something closer to 0.99 over a longer period such as a year.

## Format
Expand Down
Loading

0 comments on commit a50148c

Please sign in to comment.