adds n integrand function

This commit is contained in:
Deepak Mallubhotla 2020-11-23 14:12:45 -06:00
parent 507bc76c02
commit abe17baaf1
Signed by: deepak
GPG Key ID: 64BF53A3369104E7
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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
)