Skip to content

Commit

Permalink
Dynawaltz renamed into dynawo (#372)
Browse files Browse the repository at this point in the history
* Rename dynawaltz to dynawo
* Update documentation
* Fix code smells
* Replace dynawaltz.log with dynawo.log

Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte authored Jul 18, 2024
1 parent b510b19 commit 62780e7
Show file tree
Hide file tree
Showing 514 changed files with 1,600 additions and 1,599 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Javadocs](https://www.javadoc.io/badge/com.powsybl/powsybl-dynawo.svg?color=blue)](https://www.javadoc.io/doc/com.powsybl/powsybl-dynawo)
[![Slack](https://img.shields.io/badge/slack-powsybl-blueviolet.svg?logo=slack)](https://join.slack.com/t/powsybl/shared_invite/zt-rzvbuzjk-nxi0boim1RKPS5PjieI0rA)

[Dynawo](https://dynawo.github.io) is an hybrid C++/Modelica open source suite of simulation tools for power systems. This integration module allows to use [DynaFlow](https://dynawo.github.io/about/dynaflow) for [power flow simulations](https://www.powsybl.org/pages/documentation/simulation/powerflow) and [DynaWaltz](https://dynawo.github.io/about/dynawaltz) for [time domain simulations](https://www.powsybl.org/pages/documentation/simulation/timedomain).
[Dynawo](https://dynawo.github.io) is an hybrid C++/Modelica open source suite of simulation tools for power systems. This integration module allows to use [DynaFlow](https://dynawo.github.io/about/dynaflow) for [power flow simulations](https://www.powsybl.org/pages/documentation/simulation/powerflow) and [Dynawo](https://dynawo.github.io) for [time domain simulations](https://www.powsybl.org/pages/documentation/simulation/timedomain).

## DynaFlow

Expand All @@ -21,17 +21,17 @@ LoadFlow.find("DynaFlow").run(network, parameters);

To learn more about the usage of DynaFlow, read the [dedicated page](https://www.powsybl.org/pages/documentation/simulation/powerflow/dynaflow.html) on our website.

## DynaWaltz
## Dynawo

To use DynaWaltz as your time domain engine, add the `com.powsybl:powsybl-dynawaltz` and `com.powsybl:powsybl-dynawaltz-dsl` modules to your dependencies.
To use Dynawo as your time domain engine, add the `com.powsybl:powsybl-dynawo` and `com.powsybl:powsybl-dynawo-dsl` modules to your dependencies.
To run a dynamic simulation, you need:
- a case file
- a `DynamicModelsSupplier` to associate dynamic models to the equipment of the network
- an `EventModelsSuppler` to configure events simulated during the simulation (optional)
- a `CurvesSupplier` to follow the evolution of dynamic variables during the simulation (optional)
- a set of parameters to configure the simulation (optional)

Thanks to `powsybl-dynawaltz-dsl`, the inputs can be easily configured using Groovy scripts.
Thanks to `powsybl-dynawo-dsl`, the inputs can be easily configured using Groovy scripts.
The simulation parameters can be configured either in the `config.yml` file or using a Json file.

```java
Expand All @@ -40,17 +40,17 @@ Network network = Network.read("/path/to/the/casefile.xiidm");
// Load the dynamic models mapping
GroovyDynamicModelsSupplier dynamicModelsSupplier = new GroovyDynamicModelsSupplier(
Paths.get("/path/to/dynamicModelsMapping.groovy"),
GroovyExtension.find(DynamicModelGroovyExtension.class, DynaWaltzProvider.NAME));
GroovyExtension.find(DynamicModelGroovyExtension.class, DynawoSimulationProvider.NAME));

// Load the events
GroovyEventModelsSupplier eventModelsSupplier = new GroovyEventModelsSupplier(
Paths.get("/path/to/event.groovy"),
GroovyExtension.find(EventModelGroovyExtension.class, DynaWaltzProvider.NAME));
GroovyExtension.find(EventModelGroovyExtension.class, DynawoSimulationProvider.NAME));

// Configure the curves
GroovyCurvesSupplier curvesSupplier = new GroovyCurvesSupplier(
Paths.get("/path/to/curves.groovy"),
GroovyExtension.find(CurveGroovyExtension.class, DynaWaltzProvider.NAME));
GroovyExtension.find(CurveGroovyExtension.class, DynawoSimulationProvider.NAME));

// Load the parameters
DynamicSimulationParameters parameters = DynamicSimulationParameters.load();
Expand All @@ -62,7 +62,7 @@ System.out.println("Timeline:");
result.getTimeLine().forEach(tl -> System.out.printf("[%.8f] %s (on %s)%n", tl.time(), tl.message(), tl.modelName()));
```

To learn more about the usage of DynaWaltz, read the [dedicated page](https://www.powsybl.org/pages/documentation/simulation/timedomain/dynawo) on our website.
To learn more about the usage of Dynawo, read the [dedicated page](https://www.powsybl.org/pages/documentation/simulation/timedomain/dynawo) on our website.

### Examples

Expand Down Expand Up @@ -171,7 +171,7 @@ For the above example, the corresponding parameter file could be:
```


Other examples can be found in the [resources](https://github.com/powsybl/powsybl-dynawo/tree/main/dynawaltz-dsl/src/test/resources) of this project.
Other examples can be found in the [resources](https://github.com/powsybl/powsybl-dynawo/tree/main/dynawo-dsl/src/test/resources) of this project.


## Contribute to documentation
Expand Down
5 changes: 3 additions & 2 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-dynaflow</artifactId>

</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-dynawaltz</artifactId>
<artifactId>powsybl-dynawo-simulation</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-dynawaltz-dsl</artifactId>
<artifactId>powsybl-dynawo-dsl</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
2 changes: 1 addition & 1 deletion docs/dynamic_security_analysis/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ dynawo-algorithms:
```

## Default parameters
The dynamic security analysis reuse the `dynawo-default-parameters` [module](../dynamic_simulation/configuration.md#default-parameters).
The dynamic security analysis reuse the `dynawo-simulation-default-parameters` [module](../dynamic_simulation/configuration.md#default-parameters).
16 changes: 8 additions & 8 deletions docs/dynamic_simulation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dynawo:
```

## Default parameters
The `dynawo-default-parameters` module defines the default values for all specific parameters of a dynamic simulation run with Dynawo.
The `dynawo-simulation-default-parameters` module defines the default values for all specific parameters of a dynamic simulation run with Dynawo.

### Required parameters

Expand Down Expand Up @@ -55,7 +55,7 @@ The default value is `1`.

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

Expand Down Expand Up @@ -87,7 +87,7 @@ 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:
The available `com.powsybl.dynawo.DynawoSimulationParameters.ExportMode` values are:
- `CSV`
- `TXT`: same format as `CSV` but with `|` separator
- `XML`
Expand All @@ -101,7 +101,7 @@ The default value is `1e-6`.
**log.levelFilter**
`log.levelFilter` defines the log level for Dynawo log.
The default value is `INFO`.
The available `com.powsybl.dynawaltz.DynaWaltzParameters.LogLevel` values are:
The available `com.powsybl.dynawo.DynawoSimulationParameters.LogLevel` values are:
- `DEBUG`
- `INFO`
- `WARN`
Expand All @@ -110,7 +110,7 @@ The available `com.powsybl.dynawaltz.DynaWaltzParameters.LogLevel` values are:
**log.specificLogs**
`log.specificLogs` defines as a list the specifics logs to return besides the regular Dynawo log.
The default value is an empty list.
The available `com.powsybl.dynawaltz.DynaWaltzParameters.SpecificLog` values are:
The available `com.powsybl.dynawo.DynawoSimulationParameters.SpecificLog` values are:
- `NETWORK`
- `MODELER`
- `PARAMETERS`
Expand All @@ -121,7 +121,7 @@ The available `com.powsybl.dynawaltz.DynaWaltzParameters.SpecificLog` values are

**YAML configuration:**
```yaml
dynawo-default-parameters:
dynawo-simulation-default-parameters:
parametersFile: /home/user/parametersFile
network.parametersFile: /home/user/networkParametersFile
network.parametersId: 1
Expand All @@ -144,7 +144,7 @@ dynawo-default-parameters:
**XML configuration:**
```xml
<dynawo-default-parameters>
<dynawo-simulation-default-parameters>
<parametersFile>/home/user/parametersFile</parametersFile>
<network.parametersFile>/home/user/networkParametersFile</network.parametersFile>
<network.parametersId>NETWORK</network.parametersId>
Expand All @@ -161,5 +161,5 @@ dynawo-default-parameters:
<precision>10e-6</precision>
<log.levelFilter>INFO</log.levelFilter>
<log.specificLogs>NETWORK, PARAMETERS</log.specificLogs>
</dynawo-default-parameters>
</dynawo-simulation-default-parameters>
```
4 changes: 2 additions & 2 deletions docs/dynamic_simulation/dynamic-models-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ OverloadManagementSystem {
#### TODO add all automation systems

## Supported models
Models are listed in [models.json](../../dynawaltz/src/main/resources/models.json).
Models are listed in [models.json](../../dynawo/src/main/resources/models.json).
The list is divided in categories each linked to a dedicated builder.
### Categories properties
* `defaultLib` : name of the default library
* `libs` : list of dynawo libraries supported for this category

The list is statically loaded via [ModelConfigLoader](https://javadoc.io/doc/com.powsybl/powsybl-dynawo/latest/com/powsybl/dynawaltz/builders/ModelConfigLoader.html) services and thus can be extended.
The list is statically loaded via [ModelConfigLoader](https://javadoc.io/doc/com.powsybl/powsybl-dynawo/latest/com/powsybl/dynawo/builders/ModelConfigLoader.html) services and thus can be extended.

### Library properties
* `lib`: library name used in dynawo
Expand Down
2 changes: 1 addition & 1 deletion docs/dynamic_simulation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ event-models-dsl.md
curves-dsl.md
```

PowSyBl provides an implementation of the [DynamicSimulation API from powsybl-core](inv:powsyblcore:*:*#simulation/dynamic/index) with [DynaWaltz](https://dynawo.github.io/about/dynawaltz), a tool for long-term stability simulation from the [Dynaωo](https://dynawo.github.io) suite.
PowSyBl provides an implementation of the [DynamicSimulation API from powsybl-core](inv:powsyblcore:*:*#simulation/dynamic/index) with [Dynaωo](https://dynawo.github.io), a tool for long-term stability simulation.

## Installation

Expand Down
43 changes: 0 additions & 43 deletions dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzConfig.java

This file was deleted.

18 changes: 9 additions & 9 deletions dynawaltz-dsl/pom.xml → dynawo-dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<version>2.6.0-SNAPSHOT</version>
</parent>

<artifactId>powsybl-dynawaltz-dsl</artifactId>
<name>DynaWaltz DSL</name>
<description>DSL for DynaWaltz</description>
<artifactId>powsybl-dynawo-dsl</artifactId>
<name>Dynawo DSL</name>
<description>DSL for Dynawo</description>

<properties>
<groovydoc.attach>true</groovydoc.attach>
Expand Down Expand Up @@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-dynawaltz</artifactId>
<artifactId>powsybl-dynawo-simulation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
Expand Down Expand Up @@ -100,14 +100,14 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-dynawaltz</artifactId>
<type>test-jar</type>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-test</artifactId>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-dynawo-simulation</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
*/
package com.powsybl.dynawaltz.dsl
package com.powsybl.dynawo.dsl

import com.powsybl.commons.report.ReportNode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package com.powsybl.dynawaltz.dsl
package com.powsybl.dynawo.dsl

import com.google.auto.service.AutoService
import com.powsybl.commons.report.ReportNode
import com.powsybl.dynamicsimulation.Curve
import com.powsybl.dynamicsimulation.groovy.CurveGroovyExtension
import com.powsybl.dynawaltz.DynaWaltzProvider
import com.powsybl.dynawaltz.curves.DynawoCurvesBuilder
import com.powsybl.dynawo.DynawoSimulationProvider
import com.powsybl.dynawo.curves.DynawoCurvesBuilder

import java.util.function.Consumer
/**
Expand All @@ -20,11 +20,11 @@ import java.util.function.Consumer
* @author Mathieu Bague {@literal <[email protected]>}
*/
@AutoService(CurveGroovyExtension.class)
class DynaWaltzCurveGroovyExtension implements CurveGroovyExtension {
class DynawoCurveGroovyExtension implements CurveGroovyExtension {

@Override
String getName() {
DynaWaltzProvider.NAME
DynawoSimulationProvider.NAME
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
*/
package com.powsybl.dynawaltz.dsl
package com.powsybl.dynawo.dsl

import com.google.auto.service.AutoService
import com.powsybl.commons.report.ReportNode
import com.powsybl.dynamicsimulation.DynamicModel
import com.powsybl.dynamicsimulation.groovy.DynamicModelGroovyExtension
import com.powsybl.dynawaltz.DynaWaltzProvider
import com.powsybl.dynawaltz.builders.BuilderConfig
import com.powsybl.dynawaltz.builders.ModelBuilder
import com.powsybl.dynawaltz.builders.ModelConfigsHandler
import com.powsybl.dynawo.DynawoSimulationProvider
import com.powsybl.dynawo.builders.BuilderConfig
import com.powsybl.dynawo.builders.ModelBuilder
import com.powsybl.dynawo.builders.ModelConfigsHandler
import com.powsybl.iidm.network.Network

import java.util.function.Consumer
Expand All @@ -23,17 +23,17 @@ import java.util.function.Consumer
* @author Laurent Issertial {@literal <laurent.issertial at rte-france.com>}
*/
@AutoService(DynamicModelGroovyExtension.class)
class DynaWaltzDynamicModelGroovyExtension implements DynamicModelGroovyExtension {
class DynawoDynamicModelGroovyExtension implements DynamicModelGroovyExtension {

private final List<BuilderConfig> builderConfigs

DynaWaltzDynamicModelGroovyExtension() {
DynawoDynamicModelGroovyExtension() {
builderConfigs = ModelConfigsHandler.getInstance().getBuilderConfigs()
}

@Override
String getName() {
DynaWaltzProvider.NAME
DynawoSimulationProvider.NAME
}

@Override
Expand Down
Loading

0 comments on commit 62780e7

Please sign in to comment.