Skip to content

Commit 573a816

Browse files
committed
feat: add SHAFT model with MECHANICAL_EFFICIENCY for compressor trains
- Add SHAFT model type with MECHANICAL_EFFICIENCY field - Add MECHANICAL_EFFICIENCY directly to simplified trains - Add deprecation warnings for POWER_ADJUSTMENT_CONSTANT/FACTOR - Add validation for mutual exclusivity - Update documentation with migration guide
1 parent 2b429a2 commit 573a816

29 files changed

Lines changed: 1070 additions & 125 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Mechanical Efficiency Migration
3+
description: Migrating from POWER_ADJUSTMENT_FACTOR to SHAFT with MECHANICAL_EFFICIENCY
4+
sidebar_position: -16
5+
---
6+
7+
# Migrating to SHAFT with MECHANICAL_EFFICIENCY
8+
9+
This guide explains how to migrate from the deprecated `POWER_ADJUSTMENT_FACTOR` and `POWER_ADJUSTMENT_CONSTANT` parameters to the new `SHAFT` model with `MECHANICAL_EFFICIENCY`.
10+
11+
## Why Migrate?
12+
13+
The legacy power adjustment parameters were empirical corrections without clear physical meaning. The new approach provides:
14+
15+
- **Physical clarity**: Mechanical efficiency represents real-world losses in bearings, gearboxes, and seals
16+
- **Better documentation**: Efficiency values can be traced to equipment specifications
17+
- **Future compatibility**: Legacy parameters will be removed in a future version
18+
19+
## Conversion Formula
20+
21+
$$
22+
\eta_{mechanical} = \frac{1}{\text{POWER\_ADJUSTMENT\_FACTOR}}
23+
$$
24+
25+
For example: `POWER_ADJUSTMENT_FACTOR: 1.05``MECHANICAL_EFFICIENCY: 0.952`
26+
27+
:::note
28+
`POWER_ADJUSTMENT_CONSTANT` has no direct equivalent. If you used a constant offset, consult the eCalc team.
29+
:::
30+
31+
## Migration Examples
32+
33+
### Common-Shaft Trains
34+
35+
For `VARIABLE_SPEED_COMPRESSOR_TRAIN`, `SINGLE_SPEED_COMPRESSOR_TRAIN`, and `VARIABLE_SPEED_COMPRESSOR_TRAIN_MULTIPLE_STREAMS_AND_PRESSURES`:
36+
37+
**Before:**
38+
```yaml
39+
- NAME: export_compressor
40+
TYPE: VARIABLE_SPEED_COMPRESSOR_TRAIN
41+
POWER_ADJUSTMENT_FACTOR: 1.05
42+
...
43+
```
44+
45+
**After:**
46+
```yaml
47+
- NAME: export_shaft
48+
TYPE: SHAFT
49+
MECHANICAL_EFFICIENCY: 0.952
50+
51+
- NAME: export_compressor
52+
TYPE: VARIABLE_SPEED_COMPRESSOR_TRAIN
53+
SHAFT: export_shaft
54+
...
55+
```
56+
57+
:::note
58+
Each `SHAFT` can only be used by one compressor train. Create separate shaft models if you have multiple trains.
59+
:::
60+
61+
### Simplified Trains
62+
63+
For `SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN`, set `MECHANICAL_EFFICIENCY` directly on the train:
64+
65+
**Before:**
66+
```yaml
67+
- NAME: simple_train
68+
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
69+
POWER_ADJUSTMENT_FACTOR: 1.08
70+
...
71+
```
72+
73+
**After:**
74+
```yaml
75+
- NAME: simple_train
76+
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
77+
MECHANICAL_EFFICIENCY: 0.926
78+
...
79+
```
80+
81+
## Troubleshooting
82+
83+
**Cannot specify both SHAFT and POWER_ADJUSTMENT_FACTOR**: Remove the legacy parameter when using `SHAFT` or `MECHANICAL_EFFICIENCY`.
84+
85+
**SHAFT is referenced by multiple trains**: Each shaft can only be used by one train. Create separate shaft models.
86+
87+
## Further Reading
88+
89+
- [SHAFT Reference](/about/references/SHAFT.md)
90+
- [MECHANICAL_EFFICIENCY Reference](/about/references/MECHANICAL_EFFICIENCY.md)

docs/docs/about/modelling/setup/installations/compressor_models_in_calculations/variable_speed_compressor_train_model_with_multiple_streams_and_pressures.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ ENERGY_USAGE_MODEL:
2626
SUCTION_PRESSURE: <suction pressure expression>
2727
DISCHARGE_PRESSURE: <discharge pressure expression>
2828
INTERSTAGE_CONTROL_PRESSURE: <interstage control pressure expression>
29-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
29+
SHAFT: <Optional reference to a SHAFT model for mechanical efficiency>
30+
POWER_ADJUSTMENT_CONSTANT: <Deprecated. Use SHAFT with MECHANICAL_EFFICIENCY instead.>
3031
~~~~~~~~
3132

3233
The number of elements in [RATE_PER_STREAM](/about/references/RATE_PER_STREAM.md) must correspond to the number of streams defined for the model referenced in

docs/docs/about/modelling/setup/models/compressor_modelling/compressor_models_types/simplified_variable_speed_compressor_train_model.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ stages are calculated at run-time based on input data.
2727
MODELS:
2828
- NAME: <model name>
2929
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
30-
FLUID_MODEL: <reference to fluid model, must be defined in MODELS
30+
FLUID_MODEL: <reference to fluid model, must be defined in MODELS>
3131
COMPRESSOR_TRAIN: <compressor train specification>
32-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
32+
MECHANICAL_EFFICIENCY: <Optional. Mechanical efficiency applied to all stages. Default 1.0 (no losses). Value must be > 0 and ≤ 1.>
33+
POWER_ADJUSTMENT_CONSTANT: <Deprecated. Use MECHANICAL_EFFICIENCY instead.>
3334
MAXIMUM_POWER: <Optional constant MW maximum power the compressor train can require>
34-
CALCULATE_MAX_RATE: <Optional. compressor train max standard rate [Sm3/day] in result if set to true. Default false. Use with caution. This will increase runtime significantly. >
35+
CALCULATE_MAX_RATE: <Optional. compressor train max standard rate [Sm3/day] in result if set to true. Default false. Use with caution. This will increase runtime significantly.>
3536
~~~~~~~~
3637

3738
### Simplified compressor train model with known compressor stages
@@ -42,14 +43,14 @@ MODELS:
4243
- NAME: <model name>
4344
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
4445
FLUID_MODEL: <reference to fluid model>
46+
MECHANICAL_EFFICIENCY: <Optional. Default 1.0>
4547
COMPRESSOR_TRAIN:
4648
STAGES:
4749
- INLET_TEMPERATURE: <inlet temperature in Celsius for stage>
4850
COMPRESSOR_CHART: <reference to compressor chart model for first stage, must be defined in MODELS or FACILITY_INPUTS>
4951
- INLET_TEMPERATURE: <inlet temperature in Celsius for stage>
5052
COMPRESSOR_CHART: <reference to compressor chart model for second stage, must be defined in MODELS or FACILITY_INPUTS>
5153
- ... and so forth for each stage in the train
52-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
5354
MAXIMUM_POWER: <Optional constant MW maximum power the compressor train can require>
5455
~~~~~~~~
5556

@@ -68,11 +69,11 @@ MODELS:
6869
- NAME: <model name>
6970
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
7071
FLUID_MODEL: <reference to fluid model>
72+
MECHANICAL_EFFICIENCY: <Optional. Default 1.0>
7173
COMPRESSOR_TRAIN:
7274
MAXIMUM_PRESSURE_RATIO_PER_STAGE: <maximum pressure ratio per stage>
7375
COMPRESSOR_CHART: <reference to compressor chart model used for all stages, must be defined in [MODELS] or [FACILITY_INPUTS]>
7476
INLET_TEMPERATURE: <inlet temperature for all stages>
75-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
7677
~~~~~~~~
7778

7879
## Examples

docs/docs/about/modelling/setup/models/compressor_modelling/compressor_models_types/single_speed_compressor_train_model.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ This means that a single speed compressor model needs the following to be define
2424

2525
The following keywords are optional for a single speed compressor model:
2626

27+
- [SHAFT](/about/references/SHAFT.md) - Reference to a shaft model with mechanical efficiency
2728
- [MAXIMUM_DISCHARGE_PRESSURE](/about/references/MAXIMUM_DISCHARGE_PRESSURE.md)
28-
- [POWER_ADJUSTMENT_CONSTANT](/about/references/POWER_ADJUSTMENT_CONSTANT.md)
2929
- [MAXIMUM_POWER](/about/references/MAXIMUM_POWER.md)
3030
- [CALCULATE_MAX_RATE](/about/references/CALCULATE_MAX_RATE.md)
31+
- [POWER_ADJUSTMENT_CONSTANT](/about/references/POWER_ADJUSTMENT_CONSTANT.md) *(Deprecated - use SHAFT instead)*
3132

3233
The model is defined under the main keyword [MODELS](/about/references/MODELS.md) in the format
3334

@@ -53,7 +54,8 @@ MODELS:
5354
CONTROL_MARGIN_UNIT: <FRACTION or PERCENTAGE, default is PERCENTAGE>
5455
PRESSURE_DROP_AHEAD_OF_STAGE: <Pressure drop before compression stage [in bar]>
5556
- ... and so forth for each stage in the train
56-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
57+
SHAFT: <Optional reference to a SHAFT model for mechanical efficiency>
5758
MAXIMUM_POWER: <Optional constant MW maximum power the compressor train can require>
59+
POWER_ADJUSTMENT_CONSTANT: <Deprecated. Use SHAFT with MECHANICAL_EFFICIENCY instead.>
5860
CALCULATE_MAX_RATE: <Optional compressor train max standard rate [Sm3/day] in result if set to true. Default false. Use with caution. This will increase runtime significantly. >
5961
~~~~~~~~

docs/docs/about/modelling/setup/models/compressor_modelling/compressor_models_types/variable_speed_compressor_train_model.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ MODELS:
5858
PRESSURE_DROP_AHEAD_OF_STAGE: <Pressure drop before compression stage [in bar]>
5959
CONTROL_MARGIN_UNIT: <FRACTION or PERCENTAGE, default is PERCENTAGE>
6060
- ... and so forth for each stage in the train
61-
POWER_ADJUSTMENT_CONSTANT: <Optional constant MW adjustment added to the model>
61+
SHAFT: <Optional reference to a SHAFT model for mechanical efficiency>
6262
MAXIMUM_POWER: <Optional constant MW maximum power the compressor train can require>
63+
POWER_ADJUSTMENT_CONSTANT: <Deprecated. Use SHAFT with MECHANICAL_EFFICIENCY instead.>
6364
CALCULATE_MAX_RATE: <Optional compressor train max standard rate [Sm3/day] in result if set to true. Default false. Use with caution. This will increase runtime significantly. >
6465
PRESSURE_CONTROL: <method for pressure control, DOWNSTREAM_CHOKE (default), UPSTREAM_CHOKE, , INDIVIDUAL_ASV_PRESSURE, INDIVIDUAL_ASV_RATE or COMMON_ASV>
6566
~~~~~~~~

docs/docs/about/modelling/setup/models/compressor_modelling/compressor_models_types/variable_speed_compressor_train_model_with_multiple_streams_and_pressures.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ MODELS:
5353
CONTROL_MARGIN_UNIT: <FRACTION or PERCENTAGE, default is PERCENTAGE>
5454
PRESSURE_DROP_AHEAD_OF_STAGE: <Pressure drop before compression stage [in bar]>
5555
- ...
56+
SHAFT: <Optional reference to a SHAFT model for mechanical efficiency>
5657
MAXIMUM_POWER: <Optional constant MW maximum power the compressor train can require>
5758
~~~~~~~~
5859

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# MECHANICAL_EFFICIENCY
2+
3+
[MODELS](/about/references/MODELS.md) /
4+
[SHAFT](/about/references/SHAFT.md) /
5+
[MECHANICAL_EFFICIENCY](/about/references/MECHANICAL_EFFICIENCY.md)
6+
7+
## Description
8+
9+
`MECHANICAL_EFFICIENCY` defines the ratio of useful mechanical work output to the total mechanical work input for a shaft system. It accounts for power losses in bearings, gearboxes, seals, and couplings.
10+
11+
The mechanical efficiency is used in a [SHAFT](/about/references/SHAFT.md) model to calculate the shaft power required from the driver:
12+
13+
$$
14+
P_{shaft} = \frac{P_{gas}}{\eta_{mechanical}}
15+
$$
16+
17+
## Format
18+
19+
~~~~yaml
20+
MODELS:
21+
- NAME: <shaft name>
22+
TYPE: SHAFT
23+
MECHANICAL_EFFICIENCY: <value>
24+
~~~~
25+
26+
:::note Simplified trains
27+
For `SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN`, `MECHANICAL_EFFICIENCY` is set directly on the train model (not via a separate SHAFT). It applies uniformly to all stages and defaults to 1.0 if not specified.
28+
:::
29+
30+
## Example
31+
32+
~~~~yaml
33+
MODELS:
34+
- NAME: compressor_shaft
35+
TYPE: SHAFT
36+
MECHANICAL_EFFICIENCY: 0.95 # 95% efficiency, 5% losses
37+
~~~~
38+
39+
## Value Range
40+
41+
| Constraint | Value | Description |
42+
|------------|-------|-------------|
43+
| Minimum | > 0 | Must be positive (exclusive) |
44+
| Maximum | ≤ 1.0 | Cannot exceed 100% efficiency |
45+
46+
### Typical Values
47+
48+
| Drive Configuration | Typical Range | Typical Losses | Notes |
49+
|---------------------|---------------|----------------|-------|
50+
| Direct drive | 0.96 - 0.98 | 2-4% | Bearings (1-2%) + seals/couplings (1-2%) |
51+
| With gearbox | 0.93 - 0.96 | 4-7% | Adds gearbox losses (2-3%) |
52+
53+
:::note
54+
These are approximate ranges for the **total** mechanical efficiency of the drive train. The actual value depends on equipment design, operating conditions, and manufacturer data. A typical default of ~0.95 (5% losses) covers a common configuration with gearbox.
55+
:::
56+
57+
## Physical Interpretation
58+
59+
The mechanical efficiency accounts for power losses in the drivetrain between
60+
the driver (motor/turbine) and the compressor, including:
61+
62+
- **Bearing losses**: Friction in shaft support bearings
63+
- **Gearbox losses**: Friction and churning in gear systems (if present)
64+
- **Seal and coupling losses**: Minor friction in auxiliary components
65+
66+
:::note Constant efficiency assumption
67+
In reality, frictional losses scale approximately with the square of rotational speed.
68+
However, eCalc assumes a **constant** mechanical efficiency across all operating points.
69+
Choose a representative value for typical operating conditions, or consult vendor data
70+
for the expected speed range.
71+
:::
72+
73+
## See Also
74+
75+
- [SHAFT](/about/references/SHAFT.md)
76+
- [EFFICIENCY](/about/references/EFFICIENCY.md)
77+
- [POLYTROPIC_EFFICIENCY](/about/references/POLYTROPIC_EFFICIENCY.md)

docs/docs/about/references/POWER_ADJUSTMENT_CONSTANT.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[MODELS](/about/references/MODELS.md) /
44
[POWER_ADJUSTMENT_CONSTANT](/about/references/POWER_ADJUSTMENT_CONSTANT.md)
55

6+
:::warning Deprecated
7+
This parameter is deprecated and will be removed in a future version. Use [SHAFT](/about/references/SHAFT.md) with [MECHANICAL_EFFICIENCY](/about/references/MECHANICAL_EFFICIENCY.md) instead for a physically meaningful way to model mechanical losses.
8+
:::
9+
610
## Description
711
Optional constant MW adjustment added to the model. Only added if (electrical) POWER > 0. Can be used in combination with [POWER_ADJUSTMENT_FACTOR](/about/references/POWER_ADJUSTMENT_FACTOR.md).
812

@@ -18,6 +22,7 @@ MODELS:
1822

1923
## Example
2024

25+
**Deprecated usage:**
2126
~~~~~yaml
2227
MODELS:
2328
- NAME: simple_compressor
@@ -26,11 +31,4 @@ MODELS:
2631
POWER_ADJUSTMENT_CONSTANT: 10 #MW
2732
~~~~~
2833

29-
~~~~~yaml
30-
MODELS:
31-
- NAME: simple_compressor
32-
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
33-
...
34-
POWER_ADJUSTMENT_CONSTANT: 10 #MW
35-
POWER_ADJUSTMENT_FACTOR: 1.2
36-
~~~~~
34+
**Recommended migration:** See the [Mechanical Efficiency Migration Guide](/about/migration_guides/mechanical_efficiency.md).

docs/docs/about/references/POWER_ADJUSTMENT_FACTOR.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[MODELS](/about/references/MODELS.md) /
44
[POWER_ADJUSTMENT_FACTOR](/about/references/POWER_ADJUSTMENT_FACTOR.md)
55

6+
:::warning Deprecated
7+
This parameter is deprecated and will be removed in a future version. Use [SHAFT](/about/references/SHAFT.md) with [MECHANICAL_EFFICIENCY](/about/references/MECHANICAL_EFFICIENCY.md) instead for a physically meaningful way to model mechanical losses.
8+
:::
9+
610
## Description
711
Optional factor adjusting the power in the model. The power is multiplied by this factor. Can be used in combination with [POWER_ADJUSTMENT_CONSTANT](/about/references/POWER_ADJUSTMENT_CONSTANT.md).
812

@@ -18,6 +22,7 @@ MODELS:
1822

1923
## Example
2024

25+
**Deprecated usage:**
2126
~~~~~yaml
2227
MODELS:
2328
- NAME: simple_compressor
@@ -26,11 +31,4 @@ MODELS:
2631
POWER_ADJUSTMENT_FACTOR: 1.2
2732
~~~~~
2833

29-
~~~~~yaml
30-
MODELS:
31-
- NAME: simple_compressor
32-
TYPE: SIMPLIFIED_VARIABLE_SPEED_COMPRESSOR_TRAIN
33-
...
34-
POWER_ADJUSTMENT_CONSTANT: 10 #MW
35-
POWER_ADJUSTMENT_FACTOR: 1.2
36-
~~~~~
34+
**Recommended migration:** See the [Mechanical Efficiency Migration Guide](/about/migration_guides/mechanical_efficiency.md).

0 commit comments

Comments
 (0)