built by Lloyd, Nath, and the boys
This project implements a load flow analysis solver using the Newton-Raphson method in Python. The solver calculates the voltage magnitudes and angles at each bus in a power system network.
- Introduction
- Features
- Installation
- Usage
- Modules
- Contributing
- License
- Acknowledgements
Load flow analysis is a fundamental tool in power system engineering used to determine the steady-state operating conditions of a power system. This project uses the Newton-Raphson method, which is an iterative numerical technique, to solve the load flow problem.
- Calculates voltage magnitudes and angles at each bus.
- Handles different types of buses: PQ, PV, and Slack (Vθ).
- Uses an admittance matrix derived from the impedance matrix.
- Provides detailed error handling and convergence checks.
-
Clone the repository:
git clone https://github.com/yourusername/load-flow-analysis.git cd load-flow-analysis
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the main script:
python main.py
-
Follow the prompts to input the bus data and impedance matrix.
- bus_data_input.py: Handles the input of bus data and determines the bus type.
- calculated_power.py: Calculates the power at each bus.
- equation.py: Generates power equations based on the bus data and admittance matrix.
- jacobian.py: Calculates the Jacobian matrix and its inverse.
- y_matrix.py: Calculates the admittance matrix from the impedance matrix.
- y_matrix_gen.py: Generates the admittance matrix and converts it to polar form.
- main.py: Implements the Newton-Raphson method for load flow analysis.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the open-source community for providing valuable resources and tools.
- Special thanks to Dr. Elvis Twumasi for inspiring the development of this project.