adds n integrand function
This commit is contained in:
parent
507bc76c02
commit
abe17baaf1
@ -33,3 +33,10 @@ def find_gap(temp, mu_star, debye_frequency, nv):
|
||||
x0=debye_frequency / (numpy.sinh(nv_inv))
|
||||
)
|
||||
return sol.x
|
||||
|
||||
|
||||
def n_integrand_function(xi, temp, delta, mu_star):
|
||||
big_e = energy(xi, delta)
|
||||
left = 1 / (1 + numpy.exp((big_e - mu_star) / temp))
|
||||
right = 1 / (1 + numpy.exp(big_e / temp))
|
||||
return left - right
|
||||
|
@ -46,3 +46,12 @@ def test_gap():
|
||||
decimal=7, err_msg='had trouble with gap at non-zero temp and mustar',
|
||||
verbose=True
|
||||
)
|
||||
|
||||
|
||||
def test_n_integrand_function():
|
||||
actual = pysuperconductor.os_gap_calc.n_integrand_function(1, 2, 2, 1)
|
||||
numpy.testing.assert_almost_equal(
|
||||
actual, 0.1038525814172795,
|
||||
decimal=7, err_msg='did not find correct n integrand value',
|
||||
verbose=True
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user