Skip to content

Commit

Permalink
modified: vdP.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hezy committed Jun 16, 2020
1 parent 45ff30e commit a3ff283
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions vdP.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,36 @@
@author: Hezy Amiel
"""

import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize


"""
find the sheet resistance Rs from R1 = R_AB,CD and R2 = R_BC,AD
the solution is from the equation in a paper L. J. van der Pauw "A method of measuring the resistivity and hall coefficients of Lamellae of arbitrary shape", Philips Technical Review, Vol 26, 220.
the solution is from the equation in a paper L. J. van der Pauw
"A method of measuring the resistivity and hall coefficients of
Lamellae of arbitrary shape", Philips Technical Review, Vol 26, 220.
"""

import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize

# define the equation
def fun(Rs):
return np.exp(-np.pi*R1/Rs) + np.exp(-np.pi*R2/Rs) - 1


# these are the resistance R_AB,CD and R_BC,AD respectivly
R1 = 65
R2 = 89

# define the equation
def fun(Rs):
return np.exp(-np.pi*R1/Rs) + np.exp(-np.pi*R2/Rs) - 1

# plot the fuction
Rs = np.linspace (0, 10*np.sqrt(R1*R2), 200)
# Rs = np.linspace (0, 10000, 200)
plt.plot(Rs,fun(Rs))
plt.axhline(color = "r")
Rs = np.linspace(0, 10*np.sqrt(R1*R2), 200)
# Rs = np.linspace(0, 10000, 200)
plt.plot(Rs, fun(Rs))
plt.axhline(color="r")
plt.show()

# find the solution
root = optimize.root(fun, [1])

print (root)
print(root)

0 comments on commit a3ff283

Please sign in to comment.