Skip to content

Commit

Permalink
single value
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Jun 25, 2024
1 parent 36cde27 commit 22b1ba8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions analyses/nitroxides/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def kappa2(C: float, z: int, eps_r: float, T: float = 298.15) -> float:

return k2

def G_DH(z: float, kappa: float, epsilon_r: float, a: float) -> float:
def G_DH(z: float, kappa: float, epsilon_r: float, a: float, fx: bool = True) -> float:
G = -1 * z **2 / epsilon_r * kappa / (kappa * a) ** 3 * (numpy.log(1 + kappa * a) - kappa * a + .5 * (kappa * a) ** 2) # in Ha
G[kappa < 1e-5] = 0
if fx:
G[kappa < 1e-5] = 0

return G

Expand Down

0 comments on commit 22b1ba8

Please sign in to comment.