Skip to content

Commit

Permalink
fix: use file reference instead of urls in docs (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
krisolba1 authored Oct 2, 2023
1 parent a310df2 commit 35c4f68
Show file tree
Hide file tree
Showing 113 changed files with 510 additions and 510 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ behalf of external users.

There are a few things you need to know.

We wrote a [Contribution Guide](https://equinor.github.io/ecalc/docs/contribute/get-started) to help you get started.
We wrote a [Contribution Guide](/contribute/get-started) to help you get started.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ eCalc™ is a software tool for calculation of energy demand and greenhouse gas
---
## Reference Links

* [**Documentation**](https://equinor.github.io/ecalc/docs/about/)
* [**Documentation**](/about/)
* [**Contribution**](CONTRIBUTING.md)
* [**Security**](SECURITY.md)
* [**Code of Conduct**](CODE_OF_CONDUCT.md)
Expand All @@ -49,7 +49,7 @@ eCalc™ uses a bottom-up approach to give high-quality installation and portfol
eCalc™ is both a Python library and has a command line interface (CLI) to use with eCalc YAML Models. We currently recommend using eCalc™ from the command line with eCalc YAML Models, since the Python API is about to change soon, but the YAML will
be more or less stable and backwards compatible.

To get started, please refer to the [eCalc™ Docs - Getting Started](https://equinor.github.io/ecalc/docs/about/getting_started/),
To get started, please refer to the [eCalc™ Docs - Getting Started](/about/getting_started/),
or follow the quick guide below:

### Prerequisites
Expand Down Expand Up @@ -99,7 +99,7 @@ and making a pull request.

See [Contribution Document](CONTRIBUTING.md) on how to contribute.

See the [Developer Guide](https://equinor.github.io/ecalc/docs/contribute/get-started) for details.
See the [Developer Guide](/contribute/get-started) for details.

## Examples
Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the optional
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/about/getting_started/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It is currently **recommended** to use the CLI instead of the Python library dir
The current recommended way to use eCalc is through the CLI (Command Line Interpreter). This is a part of the
eCalc Python library, and should be accessible from the command line as `ecalc`.

See all commands and options in the [CLI reference](../../references/cli_reference.md)
See all commands and options in the [CLI reference](/about/references/cli_reference.md)


## Example Usage
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/about/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ description: Getting started with eCalc
# API Reference

:::info
Currently the *only* officially supported method is the [eCalc CLI](cli/index.md) using eCalc YAML models.
Currently the *only* officially supported method is the [eCalc CLI](/about/getting_started/cli/index.md) using eCalc YAML models.
:::

There are three options to run eCalc models:

- [eCalc CLI](cli/index.md)
- [eCalc Python library](library/index.md)
- [eCalc CLI](/about/getting_started/cli/index.md)
- [eCalc Python library](/about/getting_started/library/index.md)

## What method should I choose?

### eCalc CLI
Choose the [eCalc CLI](cli/index.md) option if you:
Choose the [eCalc CLI](/about/getting_started/cli/index.md) option if you:

- Don't know much about programming
- Have simple requirements
- Can define the eCalc models statically

### Python Library
Choose the [Python Library](library/index.md) option if you:
Choose the [Python Library](/about/getting_started/library/index.md) option if you:

- Are a developer or advanced user, and want to build eCalc models and get results programmatically
- Use Python, and you need to use (parts of) eCalc as a dependency
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/about/getting_started/library/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ It is currently **not recommended** to use the Python library due to upcoming br
If you choose to use the Python library programmatically when creating eCalc models, there is a greater flexibility in
dynamically changing the eCalc models.

See all commands and options in the [API reference](../../references/api)
See all commands and options in the [API reference](/about/references/api/index.md)
6 changes: 3 additions & 3 deletions docs/docs/about/getting_started/yaml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Getting started with YAML

We have chosen the way to model eCalc models is in the YAML format. For a simple introduction to YAML, please see [here](https://learnxinyminutes.com/docs/yaml/)

The eCalc YAML model can either be run directly with the [eCalc CLI](../cli) or loaded using the [Python library](../library)
The eCalc YAML model can either be run directly with the [eCalc CLI](/about/getting_started/cli/index.md) or loaded using the [Python library](../library)

For getting started setting up your first eCalc YAML model, please see [Setup an eCalc Model](../../modelling/setup),
look at some example YAMLs [here](../../modelling/examples) and refer to the vocabulary that we use [here](../../references/keywords).
For getting started setting up your first eCalc YAML model, please see [Setup an eCalc Model](/about/modelling/setup/index.md),
look at some example YAMLs [here](/about/modelling/examples/index.md) and refer to the vocabulary that we use [here](/about/references/keywords/index.md).
2 changes: 1 addition & 1 deletion docs/docs/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ By using eCalc™ you will be able to forecast your energy consumption and emiss

### How to use eCalc™?
To use eCalc™ you need to create a model setup of your asset.
This is described in the [Modelling](modelling/index.md) section.
This is described in the [Modelling](/about/modelling/index.md) section.

Once the model is ready, you can run the eCalc™ calculator. Different user interfaces for the calculator are offered. These are described in detail in the [Getting started](getting_started/index.md) section.
36 changes: 18 additions & 18 deletions docs/docs/about/modelling/examples/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Advanced model
description: An advanced model using consumer systems and two installations
---
# Advanced model example
This is a model very similar to [Simple example](simple.md). The main difference is the use of more advanced
This is a model very similar to [Simple example](/about/modelling/examples/simple.md). The main difference is the use of more advanced
energy usage models and consumer systems, and the addition of a second installation.

Both installations exports oil (`OIL_PROD`) and gas (`GAS_PROD`).
Expand Down Expand Up @@ -54,12 +54,12 @@ The results of a performed characterization of the equipment are listed below:

## YAML model overview
The YAML model consist of these main components:
- Time series inputs - [TIME_SERIES](../../references/keywords/TIME_SERIES.md)
- Facility characterization input - [FACILITY_INPUTS](../../references/keywords/FACILITY_INPUTS)
- Fuel input - [FUEL_TYPES](../../references/keywords/FUEL_TYPES)
- Model specifications - [MODELS](../../references/keywords/MODELS)
- Model variables - [VARIABLES](../../references/keywords/VARIABLES)
- Installation topology - [INSTALLATIONS](../../references/keywords/INSTALLATIONS)
- Time series inputs - [TIME_SERIES](/about/references/keywords/TIME_SERIES.md)
- Facility characterization input - [FACILITY_INPUTS](/about/references/keywords/FACILITY_INPUTS.md)
- Fuel input - [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md)
- Model specifications - [MODELS](/about/references/keywords/MODELS.md)
- Model variables - [VARIABLES](/about/references/keywords/VARIABLES.md)
- Installation topology - [INSTALLATIONS](/about/references/keywords/INSTALLATIONS.md)

The YAML setup file looks like this:

Expand All @@ -81,7 +81,7 @@ 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](../../references/keywords/TIME_SERIES.md) for further details.
See [TIME_SERIES](/about/references/keywords/TIME_SERIES.md) for further details.

~~~~~~~~yaml title="model.yaml"
TIME_SERIES:
Expand All @@ -92,10 +92,10 @@ TIME_SERIES:

## 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](../../references/keywords/FACILITY_INPUTS.md) for further details.
tabulated/sampled models and pump charts. See [FACILITY_INPUTS](/about/references/keywords/FACILITY_INPUTS.md) for further details.

Here we define a tabulated genset, a sampled compressor, and a single speed pump chart.
Note that more complicated energy models are defined under the [MODELS](../../references/keywords/MODELS.md)-keyword.
Note that more complicated energy models are defined under the [MODELS](/about/references/keywords/MODELS.md)-keyword.

~~~~~~~~yaml title="model.yaml"
FACILITY_INPUTS:
Expand All @@ -115,7 +115,7 @@ FACILITY_INPUTS:
~~~~~~~~

## FUEL_TYPES
In this example there are two [FUEL_TYPES](../../references/keywords/FUEL_TYPES) - `fuel_gas` and `bad_fuel_gas`.
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:
Expand Down Expand Up @@ -146,7 +146,7 @@ FUEL_TYPES:

## MODELS

This advanced example requires some energy usage models to be defined under the model section. See [MODELS](../../references/keywords/MODELS) for details.
This advanced example requires some energy usage models to be defined under the model section. See [MODELS](/about/references/keywords/MODELS.md) for details.

Here we specify:
- Compressor chart based on design points
Expand Down Expand Up @@ -199,10 +199,10 @@ MODELS:
COMPRESSOR_CHART: predefined_variable_speed_compressor_chart
~~~~~~~~

See [MODELS](../../references/keywords/MODELS) for further details.
See [MODELS](/about/references/keywords/MODELS.md) for further details.

## VARIABLES
To run the model it is recommended to specify [VARIABLES](../../references/keywords/VARIABLES),
To run the model it is recommended to specify [VARIABLES](/about/references/keywords/VARIABLES.md),
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.

Expand Down Expand Up @@ -254,7 +254,7 @@ We specify:
- `NAME`: the installation name
- `HCEXPORT`: Hydrocarbon export in Sm<sup>3</sup>/day by referring to the variable $var.hydrocarbon_export_sm3_per_day specified under [VARIABLES](#variables) above.
- `FUEl`: Default fuel specified in [FUEL_TYPES](#fuel_types) above. Note the different fuels used by the two installations.
- `CATEGORY`: FIXED (installation) category is used to group result data for reporting. See [CATEGORY](../../references/keywords/CATEGORY) for details.
- `CATEGORY`: FIXED (installation) category is used to group result data for reporting. See [CATEGORY](/about/references/keywords/CATEGORY.md) for details.

~~~~~~~~yaml
INSTALLATIONS:
Expand Down Expand Up @@ -346,7 +346,7 @@ The setup for `Installation B` thus becomes:
~~~~~~~~

## ENERGY_USAGE_MODEL
We will now fill in the final placeholders with detailed [ENERGY_USAGE_MODEL](../../references/keywords/ENERGY_USAGE_MODEL.md)s.
We will now fill in the final placeholders with detailed [ENERGY_USAGE_MODEL](/about/references/keywords/ENERGY_USAGE_MODEL.md)s.

`Base production loads A` has a load of 7.6 MW with additional 4.1 MW when the field gas injection rate is positive:

Expand All @@ -364,7 +364,7 @@ rate distributions between these two compressor trains. It will first send all r
and nothing to the second `RATE_FRACTIONS: [1.0, 0.0]` and then it will run the same input while distributing equal
rates to the two compressor trains `RATE_FRACTIONS: [0.5, 0.5]`. The final result will be composed of the first
setting that returns a valid result for the compressors.
See [COMPRESSOR_SYSTEM](../../references/keywords/ENERGY_USAGE_MODEL#compressor-system) for further details.
See [COMPRESSOR_SYSTEM](/about/references/keywords/ENERGY_USAGE_MODEL.md#compressor-system) for further details.

The model compressor model is defined:
~~~~~~~~yaml
Expand Down Expand Up @@ -394,7 +394,7 @@ This is when the water injection rate is positive. Fluid density, suction pressu
is also defined.

This PUMP_SYSTEM behaves much the same as the COMPRESSOR_SYSTEM above.
See [PUMP_SYSTEM](../../references/keywords/ENERGY_USAGE_MODEL#pump-system) for further details.
See [PUMP_SYSTEM](/about/references/keywords/ENERGY_USAGE_MODEL.md#pump-system) for further details.

~~~~~~~~yaml
- NAME: Water injection pump system A
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/about/modelling/examples/drogon.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TIME_SERIES:

## FACILITY_INPUTS

In this case, the compressors are not specified in this section as [GENERIC COMPRESSOR CHARTS](../setup/models/compressor_modelling/compressor_charts/index.md). Thus, the pump chart and generator set will be the only facility components specified within this section.
In this case, the compressors are not specified in this section as [GENERIC COMPRESSOR CHARTS](/about/modelling/setup/models/compressor_modelling/compressor_charts/index.md). Thus, the pump chart and generator set will be the only facility components specified within this section.

The pump will be variable speed, meaning that the pump type will be `PUMP_CHART_VARIABLE_SPEED`. The generator set will be a tabulated, where power consumption will be linked to fuel gas utilised.

Expand All @@ -99,7 +99,7 @@ Peng-Robinson (PR) will be the selected equation of state in this example.

This example will use a generic compressor chart. In this case, a generic compressor chart from input will utilised. Here, the a "typical" chart will be shifted to match the input head and rate data. See [GENERIC COMPRESSOR CHARTS](../setup/models/compressor_modelling/compressor_charts/index.md) for more details. When a generic chart is used, a polytropic efficiency needs to be specified. This value will be constant throughout the use, in this case a value of 0.8 is used.

A [SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN](../setup/models/compressor_modelling/compressor_models_types/simplified_variable_speed_compressor_train_model) model is used in this example, as this is necessary when a generic chart is used. Instead of manually specifying the number of compression stages, a `MAXIMUM_PRESSURE_RATIO_PER_STAGE` of 3.5 is defined. This will automatically distribute the pressure increase amongst the compression train so that no pressure ratio per compression stage will be above 3.5.
A [SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN](/about/modelling/setup/models/compressor_modelling/compressor_models_types/simplified_variable_speed_compressor_train_model.md) model is used in this example, as this is necessary when a generic chart is used. Instead of manually specifying the number of compression stages, a `MAXIMUM_PRESSURE_RATIO_PER_STAGE` of 3.5 is defined. This will automatically distribute the pressure increase amongst the compression train so that no pressure ratio per compression stage will be above 3.5.

~~~~~~~~yaml
MODELS:
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/about/modelling/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Examples of eCalc usage
# Examples
Here you find some examples.

- [Simple example](simple.md)
- [Advanced example](advanced.md)
- [Drogon example](drogon.md)
- [Simple example](/about/modelling/examples/simple.md)
- [Advanced example](/about/modelling/examples/advanced.md)
- [Drogon example](/about/modelling/examples/drogon.md)

The models are also available in the Python library under the libecalc.examples module.
22 changes: 11 additions & 11 deletions docs/docs/about/modelling/examples/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ The results of a performed characterization of the equipment are listed below:

## YAML model overview
The YAML model consist of these main components:
- Time series inputs - [TIME_SERIES](../../references/keywords/TIME_SERIES.md)
- Facility characterization input - [FACILITY_INPUTS](../../references/keywords/FACILITY_INPUTS)
- Fuel input - [FUEL_TYPES](../../references/keywords/FUEL_TYPES)
- Model variables - [VARIABLES](../../references/keywords/VARIABLES)
- Installation topology - [INSTALLATIONS](../../references/keywords/INSTALLATIONS)
- Time series inputs - [TIME_SERIES](/about/references/keywords/TIME_SERIES.md)
- Facility characterization input - [FACILITY_INPUTS](/about/references/keywords/FACILITY_INPUTS.md)
- Fuel input - [FUEL_TYPES](/about/references/keywords/FUEL_TYPES.md)
- Model variables - [VARIABLES](/about/references/keywords/VARIABLES.md)
- Installation topology - [INSTALLATIONS](/about/references/keywords/INSTALLATIONS.md)

The YAML setup file looks like this:

Expand All @@ -65,7 +65,7 @@ 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](../../references/keywords/TIME_SERIES.md) for further details.
See [TIME_SERIES](/about/references/keywords/TIME_SERIES.md) for further details.

~~~~~~~~yaml title="model.yaml"
TIME_SERIES:
Expand All @@ -77,11 +77,11 @@ TIME_SERIES:
## 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](../../references/keywords/FACILITY_INPUTS.md) for further details.
See [FACILITY_INPUTS](/about/references/keywords/FACILITY_INPUTS.md) 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](../../references/keywords/MODELS.md).
Note that more complicated energy models are defined under the [MODELS-keyword](/about/references/keywords/MODELS.md).

See the input data further down to understand the input formats.

Expand Down Expand Up @@ -109,7 +109,7 @@ FACILITY_INPUTS:
~~~~~~~~

## FUEL_TYPES
In this example there is only one [FUEL_TYPES](../../references/keywords/FUEL_TYPES) - `fuel_gas`. This has a price/value
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.
Expand All @@ -126,7 +126,7 @@ FUEL_TYPES:
~~~~~~~~

## VARIABLES
To run the model it is recommended to specify [VARIABLES](../../references/keywords/VARIABLES),
To run the model it is recommended to specify [VARIABLES](/about/references/keywords/VARIABLES.md),
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.

Expand Down Expand Up @@ -227,7 +227,7 @@ The direct fuel consumers are **Flare** and **Gas export compressor**.
~~~~~~~~

## ENERGY_USAGE_MODEL
We will now fill in the final placeholders with detailed [ENERGY_USAGE_MODEL](../../references/keywords/ENERGY_USAGE_MODEL.md)s.
We will now fill in the final placeholders with detailed [ENERGY_USAGE_MODEL](/about/references/keywords/ENERGY_USAGE_MODEL.md)s.


`Base production load` has a constant load of 11.8 MW:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and fuel consumption for an entire generator set. This means that if you have se
this table needs to include a "jump" every time a new generator is started. An example of this
is shown [below](#Table-example).

Under [FACILITY_INPUTS](../facility_inputs/index.md), this electricity to fuel table is specified using the keyword [ELECTRICITY2FUEL](../../../references/keywords/ELECTRICITY2FUEL)
Under [FACILITY_INPUTS](/about/modelling/setup/facility_inputs/index.md), this electricity to fuel table is specified using the keyword [ELECTRICITY2FUEL](/about/references/keywords/ELECTRICITY2FUEL.md)

### Facility input format

Expand Down
Loading

0 comments on commit 35c4f68

Please sign in to comment.