EM - Expt 10 - EM Problem-Python - July-Dec 2024
EM - Expt 10 - EM Problem-Python - July-Dec 2024
Marks:
1) Problem statement
“The lines of actions of three forces concurrent at origin O pass respectively through point A (-1,2,4), B
(3,0,-3), C (2,-2,4). Force F1 = 40 N passes through A, F2 = 10 N passes through B, F3 = 30 N passes
through C. Find the magnitude and direction of their resultant”.
3) Screenshots of the work done in software showing input parameters, coding, graphs, results etc.
Input Code:-
import numpy as np
r1 = np.array([-1, 2, 4])
r2 = np.array([3, 0, -3])
r3 = np.array([2, -2, 4])
F1_magnitude = 40 # N
F2_magnitude = 10 # N
F3_magnitude = 30 # N
r1_magnitude = np.linalg.norm(r1)
r2_magnitude = np.linalg.norm(r2)
r3_magnitude = np.linalg.norm(r3)
u1 = r1 / r1_magnitude
u2 = r2 / r2_magnitude
u3 = r3 / r3_magnitude
F1 = F1_magnitude * u1
F2 = F2_magnitude * u2
F3 = F3_magnitude * u3
F_resultant = F1 + F2 + F3
F_resultant_magnitude = np.linalg.norm(F_resultant)
4) Result
5) Conclusion
The Python code has been written for the problem successfully and is giving the same result as manual
calculations.
No