Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
Loading...
Searching...
No Matches
Functions | Variables
Ybus_Python Namespace Reference

Functions

 get_input (choice, n)
 
 calculate_admittance_matrix (y)
 
 print_admittance_matrix (Ybus)
 

Variables

 n = int(input())
 
 Ybus = np.array([[0+0j for i in range(n)] for j in range(n)])
 
 y = np.zeros((n,n),dtype=complex)
 
 choice = int(input())
 

Function Documentation

◆ calculate_admittance_matrix()

Ybus_Python.calculate_admittance_matrix (   y)
Forms admittance matrix using the admittance value matrix y

Args:
    y(np.array): Line Admittance Matrix

Returns:
    Ybus(np.array) : Bus Admittance Matrix

◆ get_input()

Ybus_Python.get_input (   choice,
  n 
)
Gets the input from the user based on the choice of impedance or
admittance , calculates admittance values and returns them

Args:
    choice(int) : the choice of the user(1 for impedance and 2 for admittance)
    n(int) : Total no.of buses in the system

Returns:
    y(np.array) : Line Admittance matrix

◆ print_admittance_matrix()

Ybus_Python.print_admittance_matrix (   Ybus)
Prints the bus admittance matrix to the console.

Args:
    Ybus (np.array): Bus admittance matrix.

Variable Documentation

◆ choice

Ybus_Python.choice = int(input())

◆ n

Ybus_Python.n = int(input())

◆ y

Ybus_Python.y = np.zeros((n,n),dtype=complex)

◆ Ybus

Ybus_Python.Ybus = np.array([[0+0j for i in range(n)] for j in range(n)])