Skip to content

Commit

Permalink
docs: update documentation about fluid models adding missing yaml key…
Browse files Browse the repository at this point in the history
…words

ECALC-1231
ECALC-1232
ECALC-1233
ECALC-1234
  • Loading branch information
olelod committed Jun 11, 2024
1 parent 5df5f36 commit d9a7973
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 9 deletions.
25 changes: 18 additions & 7 deletions docs/docs/about/modelling/setup/models/fluid_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ description: Selecting a fluid model in eCalc

# Fluid model
To calculate the energy usage related to compression of a natural gas, information about the composition is needed, i.e.
which components it consist of and the (mole) fraction of each. Typical components for natural gas are alkanes such as
which components it consists of and the (mole) fraction of each. Typical components for natural gas are alkanes such as
methane, ethane, propane, butane, pentane, hexane in addition to water, nitrogen and carbone dioxide. Alkanes with seven
or more carbon atoms may occur, but these are often just part of the liquid (oil) phase and not significant in dry gas
compression.

The composition can either be selected from a set of predefined compositions available within eCalc, or the mole
fraction of each component can be user specified directly. This is controlled through the
[FLUID_MODEL_TYPE](/about/references/keywords/FLUID_MODEL_TYPE.md) keyword.

As the fluid is going through the compressor in a fluid dynamic process, the enthalpy changes, resulting in a new state
with increased pressure and temperature, and decreased volume. To estimate these changes, an equation-of-state (EOS)
model is used. The default EOS model in eCalc is SRK (Soave-Redlich-Kwong).
Expand All @@ -25,15 +29,21 @@ Available EOS models
- GERG_SRK
- GERG_PR

This is controlled through the [EOS_MODEL](/about/references/keywords/EOS_MODEL.md) keyword. If the
[EOS_MODEL](/about/references/keywords/EOS_MODEL.md) is not specified, it will be defaulted to `SRK`.

## Fluid model using predefined composition
Available predefined fluid compositions (with mole weights) are
If the [FLUID_MODEL_TYPE](/about/references/keywords/FLUID_MODEL_TYPE.md) is `PREDEFINED` the
[GAS_TYPE](/about/references/keywords/GAS_TYPE.md) must be defined. Available gas types (with mole weights) are:

- ULTRA_DRY (17.1 kg/kmol)
- DRY (18.3 kg/kmol)
- MEDIUM (19.4 kg/kmol)
- RICH (21.1 kg/kmol)
- ULTRA_RICH (24.6 kg/kmol)

If no [GAS_TYPE](/about/references/keywords/GAS_TYPE.md) is specified, it will be defaulted to `MEDIUM`.

### Format
~~~~~~~~yaml
MODELS:
Expand Down Expand Up @@ -75,12 +85,13 @@ MODELS:
~~~~~~~~

## Fluid model with user-specified composition
The composition is specified by setting the mole fraction of each component. Setting the mole fraction for **methane is
required**, all other components are optional and will be set to 0 if not specified. If methane is not part of your
composition, simply put 0.0 for it.
If the [FLUID_MODEL_TYPE](/about/references/keywords/FLUID_MODEL_TYPE.md) is `COMPOSITION` the
[COMPOSITION](/about/references/keywords/COMPOSITION.md) must be defined. The composition is specified by setting
the mole fraction of each component. Setting the mole fraction for **methane is required**, all other components
are optional and will be set to 0 if not specified. If methane is not part of your composition, simply put 0.0 for it.

It is not important that the fractions sum to one as they will be normalized by eCalc. It is the relative amount of each
that will be important.
It is not important that the fractions sum to one as they will be normalized by eCalc. It is the relative amount of
each that will be important.

### Format
~~~~~~~~yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/about/modelling/setup/models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MODELS:

The supported types are:

- `FLUID`
- `FLUID`, which is described in more detail in [Fluid model](/about/modelling/setup/models/fluid_model.md)
- `COMPRESSOR_CHART`
- `SINGLE_SPEED_COMPRESSOR_TRAIN`
- `SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN`
Expand Down
54 changes: 54 additions & 0 deletions docs/docs/about/references/keywords/COMPOSITION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# EOS_MODEL

## Description

`COMPOSITION` is required to be specified under the [MODEL](/about/references/keywords/MODELS.md) keyword when
the model is of [TYPE](/about/references/keywords/TYPE.md) `FLUID` and the [FLUID_MODEL_TYPE](/about/references/keywords/FLUID_MODEL_TYPE.md)
is `COMPOSITION`. The composition is specified by setting
the mole fraction of each component. Setting the mole fraction for **methane is required**, all other components
are optional and will be set to 0 if not specified. If methane is not part of your composition, simply put 0.0 for it.

It is not important that the fractions sum to one as they will be normalized by eCalc. It is the relative amount of
each that will be important.

### Format
~~~~~~~~yaml
MODELS:
- NAME: <name of fluid model, for reference>
TYPE: FLUID
FLUID_MODEL_TYPE: COMPOSITION
EOS_MODEL: <eos model>
COMPOSITION:
water: <mole fraction>
nitrogen: <mole fraction>
CO2: <mole fraction>
methane: <mole fraction, required>
ethane: <mole fraction>
propane: <mole fraction>
i_butane: <mole fraction>
n_butane: <mole fraction>
i_pentane: <mole fraction>
n_pentane: <mole fraction>
n_hexane: <mole fraction>
~~~~~~~~

### Example
~~~~~~~~yaml
MODELS:
- NAME: <name of fluid model, for reference>
TYPE: FLUID
FLUID_MODEL_TYPE: COMPOSITION
EOS_MODEL: srk
COMPOSITION:
water: 0.1
nitrogen: 0.74373
CO2: 2.415619
methane: 85.60145
ethane: 6.707826
propane: 2.611471
i_butane: 0.45077
n_butane: 0.691702
i_pentane: 0.210714
n_pentane: 0.197937
n_hexane: 0.368786
~~~~~~~~
35 changes: 35 additions & 0 deletions docs/docs/about/references/keywords/EOS_MODEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# EOS_MODEL

## Description

`EOS_MODEL` is required to be specified under the [MODEL](/about/references/keywords/MODELS.md) keyword when
the model is of [TYPE](/about/references/keywords/TYPE.md) `FLUID`.

The `EOS_MODEL` can be one of the following:
- SRK
- PR
- GERG_SRK
- GERG_PR

If the `EOS_MODEL` is not specified, it will be defaulted to `SRK`.

## Format

~~~~yaml
MODELS:
- NAME: <name of model>
TYPE: FLUID
...
EOS_MODEL: <SRK/PR/GERG_SRK/GERG_PR>
~~~~

## Example

~~~~yaml
MODELS:
- NAME: fluid_model_reference_name
TYPE: FLUID
FLUID_MODEL_TYPE: PREDEFINED
EOS_MODEL: SRK
GAS_TYPE: MEDIUM
~~~~
29 changes: 29 additions & 0 deletions docs/docs/about/references/keywords/FLUID_MODEL_TYPE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# FLUID_MODEL_TYPE

## Description

`FLUID_MODEL_TYPE` is a required to be specified under the [MODEL](/about/references/keywords/MODELS.md) keyword when
the model is of [TYPE](/about/references/keywords/TYPE.md) `FLUID`.

The `FLUID_MODEL_TYPE` can either be set to `PREDEFINED` or to `COMPOSITION`.

## Format

~~~~yaml
MODELS:
- NAME: <name of model>
TYPE: FLUID
...
FLUID_MODEL_TYPE: <PREDEFINED or COMPOSITION>
~~~~

## Example

~~~~yaml
MODELS:
- NAME: fluid_model_reference_name
TYPE: FLUID
FLUID_MODEL_TYPE: PREDEFINED
EOS_MODEL: SRK
GAS_TYPE: MEDIUM
~~~~
37 changes: 37 additions & 0 deletions docs/docs/about/references/keywords/GAS_TYPE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GAS_TYPE

## Description

`GAS_TYPE` is required to be specified under the [MODEL](/about/references/keywords/MODELS.md) keyword when
the model is of [TYPE](/about/references/keywords/TYPE.md) `FLUID` and the [FLUID_MODEL_TYPE](/about/references/keywords/FLUID_MODEL_TYPE.md)
is `PREDEFINED`. Available gas types are:

- ULTRA_DRY
- DRY
- MEDIUM
- RICH
- ULTRA_RICH

If no `GAS_TYPE` is specified, it will be defaulted to `MEDIUM`.


## Format

~~~~yaml
MODELS:
- NAME: <name of model>
TYPE: FLUID
...
EOS_MODEL: <SRK/PR/GERG_SRK/GERG_PR>
~~~~

## Example

~~~~yaml
MODELS:
- NAME: fluid_model_reference_name
TYPE: FLUID
FLUID_MODEL_TYPE: PREDEFINED
EOS_MODEL: SRK
GAS_TYPE: MEDIUM
~~~~
2 changes: 1 addition & 1 deletion docs/docs/about/references/keywords/MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ The supported types are:
- `COMPRESSOR_WITH_TURBINE`


The documentation of each of these is found on the [Compressor Modelling](/about/modelling/setup/models/compressor_modelling/compressor_models_types/index.md) page.
The documentation of each of these is found on the [Models](/about/modelling/setup/models/index.md) page.

0 comments on commit d9a7973

Please sign in to comment.