Skip to content

Commit

Permalink
fix docs issues (#349)
Browse files Browse the repository at this point in the history
* fix powerflow

* update network switch
  • Loading branch information
rodrigomha committed Aug 4, 2023
1 parent f50405c commit 652b313
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/src/perturbations.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Triping one circuit can be modeled by doubling the impedance, i.e., dividing by
new_yb = [0.0 - 10.0im 0.0 + 10.0im
0.0 + 10.0im 0.0 - 10.0im]
```
To apply a Network Switch, we require to use a sparse matrix, so we can do this by simply:

```julia
using SparseArrays
new_yb = sparse(new_yb)
```

Then, this perturbation ocurring at ``t = 1.0`` seconds can be included as:
```julia
Expand All @@ -47,6 +53,7 @@ new_yb2 = [10000.0 - 20.0im 0.0 + 20.0im
Then, this perturbation ocurring at ``t = 1.0`` seconds can be included as:

```julia
new_yb2 = sparse(new_yb2)
ns2 = NetworkSwitch(1.0, new_yb2)
```

Expand All @@ -60,6 +67,7 @@ new_yb3 = [0.0 - 10.0im 0.0 + 10.0im
and the perturbation as:

```julia
new_yb3 = sparse(new_yb3)
ns3 = NetworkSwitch(1.05, new_yb3)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/tutorial_inverter_modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ add_component!(sys, storage)
A good sanity check it running a power flow on the system to make sure all the components are properly scaled and that the system is properly balanced. We can use `PowerSystems` to perform this check. We can get the results back and perform a sanity check.

```@repl inv_sys
res = run_powerflow(sys)
res = solve_powerflow(ACPowerFlow(), sys)
res["bus_results"]
```

Expand Down

0 comments on commit 652b313

Please sign in to comment.