Skip to main content

Posts

Showing posts with the label resultant_finder

Find the resultant torque of coplanar forces with Python

Hello everyone, today I will show you how to use Python to calculate the resultant torque of coplanar forces. In this article, we will consider forces on a coordinate plane as shown below. To calculate the resultant torque with this Python script, we want to know the magnitude, angle, and coordinates of each force. With this script, we can calculate the resultant torque around any point of the coordinate plane. Let's get started. First of all, we have to install Python and other required software to write our code. After installing Python correctly, open the code editor and create a new file with the .py extension. We don't have to install any other module as the only module we want to use in this project is the math module which comes with Python. You can import the math module with the following line. import math Then we have to create a dictionary to store all the information about forces. You can use a list instead of a dictionary to do that but I prefer using a dictionary...

How to find the resultant of multiple vectors with Python.

Hello everyone, welcome back to my blog. Two years ago, I published a post on "How to find the resultant of two vectors with Python." and it has become the most popular post on my blog. So I thought to give a deep explanation of the updated version of that resultant finder. In the "How to find the Resultant of two vectors" script we learned, how to write a script that finds the resultant of just two vectors but what if we want to find the resultant of three or more vectors? We have to write a new script. Logic. Here we use different logic to calculate the resultant. First, we collect all the vectors with the angle they make with the horizontal level to calculate their x and y components. Look at the image below. I hope that will help you to get an idea of what x and y components are and how to calculate them. Then we calculate the sum of all x components and y components. As the direction of all components of each category (x & y), we can simply add them to...

Version 1.1 of RESULTANT FINDER is released!

A few weeks before I released my first version of Resultant finder which helps you to calculate the resultant of two vectors using a formula. When I wanted to find the resultant of a big number of vectors I built software with a different logic to find the size and its direction. In this version: the software divides the vector into two components along the y-axis and x-axis and lists them into two lists. after the user finished entering inputs; Python calculates the sum of all x components and y components and  calculate the results of all vectors given with the support of the Pythagoras Theorem and Triangle of vectors. As the vector triangle is right angled we can simply calculate the tan ratio of the angle, between the resultant and x-axis t hat is all here is the code: https://github.com/ChamodhNethsara/resultant/blob/main/resultant.py Hope You Like it :-) Happy coding Kavindu Chamodh Nethsara