Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
Add DynaFlow.md

Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte committed Jun 3, 2024
1 parent 7a53890 commit 6ffd21a
Show file tree
Hide file tree
Showing 7 changed files with 272 additions and 129 deletions.
41 changes: 41 additions & 0 deletions docs/dynamic_simulation/curves-dsl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: default
---

# Curves DSL
The curves domain specific language allow a user to configure the curves Dynawo will export at the end of the simulation. This DSL defines the `curve` and the `curves` keywords.

The `curve` keyword create a single curve for a dynamic model. One identifies a dynamic model by its ID, the same as the one used in the [Dynamic Models DSL](dynamic-models-dsl). The variable to plot is identified by its name.
```groovy
curve {
dynamicModelId load.id
variable "load_PPu"
}
```

If you want to plot a static variable, the `dynamicModelId` parameter has to be replaced by the `staticId` keyword and refers to an ID present in the static network.
```groovy
curve {
staticId bus.id
variable "Upu_value"
}
```

If you want to plot several variables of the same dynamic model, you can use the `curves` keyword that permit limiting boilerplate code in the script.
```
// This:
curve {
dynamicModelId load.id
variable "load_PPu"
}
curve {
dynamicModelId load.id
variable "load_QPu"
}
// is equivalent to:
curves {
dynamicModelId load.id
variables "load_PPu", "load_QPu"
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,74 @@ layout: default
# Dynawo parameters
The `dynawo-default-parameters` module defines the default values for all specific parameters of a dynamic simulation run with Dynawo.

## Required properties
## Required parameters

**parametersFile**
`parametersFile` defines the path of the main parameters file. The default value is `models.par`.
`parametersFile` defines the path of the main parameters file.
The default value is `models.par`.

**network.parametersFile**
`network.parametersFile` defines the path of the network parameters file. The default value is `network.par`.
`network.parametersFile` defines the path of the network parameters file.
The default value is `network.par`.

**solver.parametersFile**
`solver.parametersFile` defines the path of the solver parameters file. The default value is `solvers.par`.
`solver.parametersFile` defines the path of the solver parameters file.
The default value is `solvers.par`.

## Optional properties
## Optional parameters

**network.parametersId**
`network.parametersId` defines the network parameters set id stored in `network.parametersFile`. The default value for this property is `1`.
`network.parametersId` defines the network parameters set id stored in `network.parametersFile`.
The default value is `1`.

**solver.parametersId**
`solver.parametersId` defines the solver parameters set id stored in `solver.parametersFile`. The default value is `1`.
`solver.parametersId` defines the solver parameters set id stored in `solver.parametersFile`.
The default value is `1`.

**solver.type**
`solver.type` defines the solver used in the simulation. The default value is `SIM`.
`solver.type` defines the solver used in the simulation.
The available `com.powsybl.dynawaltz.DynaWaltzParameters.SolverType` values are:
- `SIM`: the simplified solver (fixed time step solver)
- `IDA`: the IDA solver (variable time step solver)

**dump.export**
`dump.export` defines if the dynamic simulation result should be exported as a dump. The default value is `FALSE`.
The default value is `SIM`.

**dump.useAsInput**
`dump.useAsInput` defines if a previous simulation result dump should be used as input for the current simulation. The default value is `FALSE`.
**dump.export**
`dump.export` defines if the dynamic simulation result should be exported as a dump.
The default value is `FALSE`.

**dump.exportFolder**
`dump.exportFolder` defines the folder name where the dump is exported. The default value is `null`.
**dump.useAsInput**
`dump.useAsInput` defines if a previous simulation result dump should be used as input for the current simulation.
The default value is `FALSE`.

**dump.fileName**
`dump.fileName` defines the dump file name. The default value is `null`.
**dump.exportFolder**
`dump.exportFolder` defines the folder name where the dump is exported.
The default value is `null`.

**useModelSimplifiers**
`useModelSimplifiers` defines if simplifiers are used before macro connection computation //TODO add link. The default value is `FALSE`.
**dump.fileName**
`dump.fileName` defines the dump file name.
The default value is `null`.

**mergeLoads**
`mergeLoads` defines if loads connected to the same bus are merged or not. The default value is `FALSE`.
**useModelSimplifiers**
`useModelSimplifiers` defines if simplifiers are used before macro connection computation **(TODO: link)**.
The default value is `FALSE`.

**timeline.exportMode**
`timeline.exportMode` defines the file extension of the timeline export. The default value is `TXT`.
**mergeLoads**
`mergeLoads` defines if loads connected to the same bus are merged or not.
The default value is `FALSE`.

**timeline.exportMode**
`timeline.exportMode` defines the file extension of the timeline export.
The available `com.powsybl.dynawaltz.DynaWaltzParameters.ExportMode` values are:
- `CSV`
- `TXT`: same format as `CSV` but with `|` separator
- `XML`
- `XML`

The default value is `TXT`.

**precision**
`precision` defines the simulation step precision The default value is `1e-6`.
**precision**
`precision` defines the simulation step precision.
The default value is `1e-6`.

## Examples

Expand Down
112 changes: 9 additions & 103 deletions docs/dynamic_simulation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,121 +2,27 @@
layout: default
---

# Dynawo
# Dynamic simulation

PowSyBl provides an implementation to run dynamic simulations with [DynaWaltz](https://dynawo.github.io/about/dynawaltz), a tool for long-term stability simulation from the [Dynawo](https://dynawo.github.io) suite.

## Installation

Read this [documentation page](https://dynawo.github.io/install/) to learn how to install and configure Dynawo.

## Configuration

The `dynawo` module may be used to set up a Dynawo simulation: it defines the installation directory of the Dynawo simulator and whether the temporary folder where the inputs are generated should be kept after the simulation (for debug purposes).
```yml
dynawo:
homeDir: /home/user/dynawo
debug: false
```
To go further, you should read the [Dynawo configuration](dynawo-configuration.md) reference page.
## Specific parameters
To set up specific Dynawo parameters, the `dynawo-default-parameters` should be used:
```yml
dynawo-default-parameters:
parametersFile: <PATH_TO_MAIN_PARAMETERS_FILE>
network.parametersFile: <PATH_TO_NETWORK_PARAMETERS_FILE>
network.parametersId: id
solver.type: IDA
solver.parametersFile: <PATH_TO_SOLVER_PARAMETERS_FILE>
solver.parametersId: id
```
Main parameters are:

**parametersFile**
This parameter defines the path of the main parameters file. This file is an XML file that provides, for each dynamic model the characteristics required that are not available in the static network.

**network.parametersFile**
This parameter defines the path of the parameters file for the special dynamic model associated to the network.

**network.parametersId**
As the `network.parametersFile` can contain several sets of parameters, the `network.parametersId` parameter defines the set to use among the available sets of parameters.

**solver.type**
This parameter defines the type of solver. The allowed values are `IDA` or `SIM`. See [Dynawo documentation](https://github.com/dynawo/dynawo/releases/latest/download/DynawoDocumentation.pdf) for more details about the solvers.

**solver.parametersFile**
This parameter defines the path of the parameters file for the solvers.

**solver.parametersId**
As the `solver.parametersFile` can contain several sets of parameters, the `solver.parametersId` parameter defines the set to use among the available sets of parameters.

To go further, you should read the [Dynawo parameters](dynawo-default-parameters.md) reference page.

## Dynamic models DSL
The Dynamic Models DSL is a domain specific language written in groovy for the creation dynamic models used by Dynawo, most of them associated with a static equipment present in the network.

To go further, you should read the [Dynamic Models DSL](dynamic-models-dsl.md) reference page.

## Event models DSL
The event models domain specific language helps user to simulate events during the simulation, such as equipment disconnection... The following models are supported:
- Disconnect
- Step
- NodeFault

To go further, you should read the [Event Models DSL](event-models-dsl.md) reference page.

## Curves DSL
The curves domain specific language allow a user to configure the curves Dynawo will export at the end of the simulation. This DSL defines the `curve` and the `curves` keywords.

The `curve` keyword create a single curve for a dynamic model. One identifies a dynamic model by its ID, the same as the one used in the [Dynamic Models DSL](#dynamic-models-dsl). The variable to plot is identified by its name.
```groovy
curve {
dynamicModelId load.id
variable "load_PPu"
}
```

If you want to plot a static variable, the `dynamicModelId` parameter has to be replaced by the `staticId` keyword and refers to an ID present in the static network.
```groovy
curve {
staticId bus.id
variable "Upu_value"
}
```

If you want to plot several variables of the same dynamic model, you can use the `curves` keyword that permit limiting boilerplate code in the script.
```
// This:
curve {
dynamicModelId load.id
variable "load_PPu"
}
curve {
dynamicModelId load.id
variable "load_QPu"
}

// is equivalent to:
curves {
dynamicModelId load.id
variables "load_PPu", "load_QPu"
}
```
## Going further
- You may find an extensive documentation of the Dynawo project [here](https://github.com/dynawo/dynawo/releases/latest/download/DynawoDocumentation.pdf).
```{toctree}
---
maxdepth: 2
hidden: true
---
dynawo-configuration.md
dynawo-default-parameters.md
dynawo-parameters.md
dynamic-models-dsl.md
event-models-dsl.md
curves-dsl.md
```

## Going further

You may find an extensive documentation of the Dynawo project [here](https://github.com/dynawo/dynawo/releases/latest/download/DynawoDocumentation.pdf).


2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Powsybl-dynawo is an interface between the PowSyBl project and [Dynawo](https://
---
maxdepth: 2
---
load_flow/index.md
dynamic_simulation/index.md
```
19 changes: 19 additions & 0 deletions docs/load_flow/dynaflow-configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: default
---

## DynaFlow configuration

You need to tell powsybl where to find DynaFlow, by adding this into you configuration file:
```yaml
dynaflow:
homeDir: /path/to/dynaflow # Directory obtained by unzipping the package, should contain "bin"
debug: false
```
To use DynaFlow as a default for all power flow computations, you may configure the `load-flow`
module in your configuration file:
```yaml
load-flow:
default-impl-name: "DynaFlow"
```
Loading

0 comments on commit 6ffd21a

Please sign in to comment.