You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-47Lines changed: 56 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,37 +14,46 @@ The implementations were made based on the ANAREDE user guide manual (v09).
14
14
15
15
**Quickstart**
16
16
17
-
Parsing a .pwf file to Julia dictionary is as simple as:
17
+
Until the creating of PWF.jl, '.pwf' files could only be parsed through Brazilian commercial softwares, such as ANAREDE and Organon. Therefore, the Brazilian Power System community was compelled to use one of the two solutions to run Power Flow analysis.
18
18
19
-
```julia
20
-
using PWF
19
+
PWF.jl unlocks the power of open-source to the Power System community. Therefore, now, anyone can read the standard Brazilian file ('.pwf') and run steady-state electrical analysis with state-of-the-art methodologies. For the Power Flow algorithm, we encourage the usage of the package PowerModels.jl, which already have integration with the PWF.jl package.
21
20
22
-
file ="3bus.pwf"
23
-
pwf_dict =parse_file(file)
24
-
```
21
+
To perform Power Flow analysis using PWF.jl in Julia, follow the steps bellow:
22
+
23
+
1. First of all, make sure you have [Visual Studio Code](https://code.visualstudio.com/) and [Julia Language](https://julialang.org/downloads/) Long-term support (LTS) 1.6.6 configured correctly;
25
24
26
-
Converting the .pwf file into PowerModels.jl network data dictionary:
25
+
2. Then, add PWF.jl and PowerModels.jl to the known packages;
27
26
28
27
```julia
29
-
network_data =parse_file(file; pm =true)
28
+
using Pkg
29
+
30
+
Pkg.add("PWF")
31
+
Pkg.add("PowerModels")
30
32
```
31
33
32
-
Then you are ready to use PowerModels!
34
+
3. Finally, you are ready to perform power flow analysis
33
35
34
36
```julia
35
-
using PowerModels, Ipopt
37
+
using PWF, PowerModels
38
+
39
+
network_path ="network.pwf"
36
40
37
-
run_ac_pf(network_data, Ipopt.Optimizer)
41
+
network = PWF.parse_file(network_path)
42
+
43
+
results = PowerModels.run_ac_pf(network)
44
+
45
+
results["solution"]["bus"]["1"]["vm"] # folution for voltage magniture of bus 1
46
+
results["solution"]["bus"]["1"]["va"] # solution for voltage angle of bus 1
38
47
```
39
48
40
49
For more information about PowerModels.jl visit the PowerModels [documentation](https://lanl-ansi.github.io/PowerModels.jl/stable/)
41
50
42
51
## Parser
43
52
44
-
The package parses all available sections into a julia dictionary. Each key represents a .pwf section as shown below:
53
+
The package can parse all available sections into a julia dictionary withou any modifications. Each key represents a .pwf section as shown below:
julia> data = parse_file(file; pm = true, software = Organon)
132
111
```
133
112
134
113
**Additional data inside PWF files**
135
114
136
-
If parse_pwf_to_powermodels' argument add_control_data is set to true (default =false), additional information present on the PWF file that is not used by PowerModels will be stored inside each element in the field "control_data", such as the example below:
115
+
If parse_file' argument add_control_data is set to true (default =false), additional information present on the PWF file that is not used by PowerModels will be stored inside each element in the field "control_data", such as the example below:
137
116
138
117
```julia
139
-
julia> data = PWF.parse_pwf_to_powermodels(file, add_control_data = true);
118
+
julia> data = parse_file(file, pm = true, add_control_data = true);
140
119
141
120
julia> data["shunt"]["1"]["control_data"]
142
121
Dict{String, Any} with 9 entries:
@@ -151,6 +130,36 @@ Dict{String, Any} with 9 entries:
151
130
"controlled_bus" => 1
152
131
```
153
132
133
+
**PWF Sections Available:**
134
+
135
+
- DBAR
136
+
- DBSH
137
+
- DCBA
138
+
- DCCV
139
+
- DCER
140
+
- DCLI
141
+
- DCNV
142
+
- DCSC
143
+
- DCTE
144
+
- DELO
145
+
- DGBT
146
+
- DGER
147
+
- DGLT
148
+
- DLIN
149
+
- DOPC
150
+
- DSHL
151
+
- DARE
152
+
- DCAI
153
+
- DCAR
154
+
- DGEI
155
+
- DINJ
156
+
- DMFL
157
+
- DMOT
158
+
- DMTE
159
+
- DAGR
160
+
- DCMT
161
+
- DTPF
162
+
154
163
## Contributing
155
164
156
165
- PRs such as adding new sections and fixing bugs are very welcome!
This section includes general information about AC buses, in columns described as follows:
6
+
4
7
## Usage
5
-
Column | Description
6
-
--- | ---
7
-
Number | Bus identification number
8
-
Operation | Bus addition, removal or modification
9
-
Status | Bus status - on or off
10
-
Type | Bus type - PQ, PV or swing
11
-
Base voltage group | Bus voltage group identifier, defined in DGBT section. If there is no such section or the group is not defined there, base voltage will be set to 1.0 kv
12
-
Name | Bus alphanumeric identification
13
-
Voltage limit group | Bus voltage bounds group identifier, defined in DGLT section. If there is no such section or the group is not defined there, bounds will be set to 0.9 and 1.1.
14
-
Voltage | Initial voltage (per unit)
15
-
Angle | Initial phase angle (degrees)
16
-
Active generation | Bus active generation (MW)
17
-
Reactive generation | Bus reactive generation (Mvar)
18
-
Minimum reactive generation | Lower bound for bus reative generation (Mvar)
19
-
Maximum reactive generation | Upper bound for bus reative generation (Mvar)
20
-
Controlled bus | Bus which voltage magnitude will be controlled as defined in Voltage field
21
-
Active charge | Bus active charge (MW)
22
-
Reactive charge | Bus reactive charge (Mvar)
23
-
Total reactive power | Total injected power by capacitor reactor banks; Positive value for capacitor and negative for reactors
24
-
Area | Number of area which the bus is a part of
25
-
Charge definition voltage | Voltage in which active and reactive charge were measured
26
-
Visualization mode | Bus visualization in ANAREDE software
| Operation | Bus addition, removal or modification |
13
+
| Status | Bus status - on or off |
14
+
| Type | Bus type - PQ, PV or swing |
15
+
| Base voltage group | Bus voltage group identifier, defined in DGBT section. If there is no such section or the group is not defined there, base voltage will be set to 1.0 kv |
16
+
| Name | Bus alphanumeric identification |
17
+
| Voltage limit group | Bus voltage bounds group identifier, defined in DGLT section. If there is no such section or the group is not defined there, bounds will be set to 0.9 and 1.1. |
18
+
| Voltage | Initial voltage (per unit) |
19
+
| Angle | Initial phase angle (degrees) |
20
+
| Active generation | Bus active generation (MW) |
21
+
| Reactive generation | Bus reactive generation (Mvar) |
22
+
| Minimum reactive generation | Lower bound for bus reative generation (Mvar) |
23
+
| Maximum reactive generation | Upper bound for bus reative generation (Mvar) |
24
+
| Controlled bus | Bus which voltage magnitude will be controlled as defined in Voltage field |
25
+
| Active charge | Bus active charge (MW) |
26
+
| Reactive charge | Bus reactive charge (Mvar) |
27
+
| Total reactive power | Total injected power by capacitor reactor banks; Positive value for capacitor and negative for reactors |
28
+
| Area | Number of area which the bus is a part of |
29
+
| Charge definition voltage | Voltage in which active and reactive charge were measured |
30
+
| Visualization mode | Bus visualization in ANAREDE software |
0 commit comments