-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_process.py
More file actions
31 lines (28 loc) · 930 Bytes
/
Copy pathdata_process.py
File metadata and controls
31 lines (28 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import numpy as np
import manual_data_process as mdp
import matplotlib.pyplot as plt
import warnings
#warnings.filterwarnings("ignore", category=np.ComplexWarning)
def analyze_power_flow():
gamma = mdp.gamma
H = mdp.H
P = mdp.P
Q = mdp.Q
D = mdp.D
E = mdp.E
impedance_matrix = mdp.impedance_matrix
impedance_matrix_faulted = mdp.impedance_matrix_faulted
return P, Q, E, H, D, gamma, impedance_matrix, impedance_matrix_faulted
if __name__ == "__main__":
case_data = case14()
P, Q, E, H, D, gamma, impedance_matrix, impedance_matrix_faulted = analyze_power_flow()
# Print the results
print("Impedance Matrix:")
print(impedance_matrix)
print(f' Net PF: P = {P}')
print(f' Net PF: Q = {Q}')
print(f' Initial Phase (gamma_0): {gamma}')
print(f' Inertia (H): {H}')
print(f' Damping (D): {D}')
print(f' Terminal Voltage (E): {E}')
print('---')