Pankaj(ADS)

Featured post

Python Codes for Electric Potential

Python Codes for Electric Potential Code:- import numpy as np import math import matplotlib.pyplot as plot ''' Calculating Elect...

Monday 29 June 2020

Python Program(Eq Resistance)

0 comments
(Python Program)Calculation Of Eq Electrical Resistance
 The following Article contains, the calculation of Equivalent Resistance of Infinite Ladder Network
Theory:-
Calculation based upon the concept that if we remove one step of the infinite Ladder,it does not effect the Ladder.

 Following Module Require foe execution of Program (as Python is Open Source Software)

1.Numpy Module (Through Internet with the help of Command Prompt)
2.Math Module (Pre-Installed as provided by Python Developers)

Program Of  Ladder Network--------

import numpy as np
import math

'''
For Electrical Infinite Ladder Network 
+┌─ R1    ┬──R1──┬
Req             R2    R2    ∞
- └─────┴─────┴
with following values:
'''

R1 = 9
R2 = 4

'''
CopyRight(Pankaj aswal)
here calculation has been done on the basis of Infinite ladder Network
Resolving it into Simplified form
+┌─ R1    ┬────┬
Req             R2         ∞
-└─────┴────┴
'''
Req1 = (-2*R2 + 2*math.sqrt(R2*R2+R1))/2
Req2 = (-2*R2 - 2*math.sqrt(R2*R2+R1))/2
print("Req1: ", Req1)
print("Req2: ", Req2)

Output
1.
>>> 
============== RESTART: D:/Desktop/Python(TUT)/EqResistance.py ==============
Req1:  1.0
Req2:  -9.0
>>> 
Discarding the Value of Req2 as Electrical Resistance can't be negative
hence the equivalent resistance of following Ladder Network is Req1 = 1 Ohm 


No comments:

Post a Comment