Skip to content

Commit

Permalink
use delta for more concise formulation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnjoMan committed Apr 2, 2019
1 parent 6919cd5 commit 5187fa1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions carsons/carsons.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,17 @@ def compute_X(self, i, j):
Qᵢⱼ = self.compute_Q(i, j)
ΔX = self.μ * self.ω / π * Qᵢⱼ

# calculate geometry ratio 𝛥G
if i != j:
Dᵢⱼ = self.compute_D(i, j)
dᵢⱼ = self.compute_d(i, j)
geometry_ratio = Dᵢⱼ / dᵢⱼ
𝛥G = Dᵢⱼ / dᵢⱼ
else:
hᵢ = self.get_h(i)
gmrⱼ = self.gmr[j]
geometry_ratio = 2.0 * hᵢ / gmrⱼ
𝛥G = 2.0 * hᵢ / gmrⱼ

X_o = self.ω * self.μ / (2 * π) * log(geometry_ratio)
X_o = self.ω * self.μ / (2 * π) * log(𝛥G)

return X_o + ΔX

Expand Down

0 comments on commit 5187fa1

Please sign in to comment.