Adding new sc free energy file
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good

This commit is contained in:
Deepak Mallubhotla 2021-01-04 15:04:42 -06:00
parent 0715e1858a
commit 7843e462de
Signed by: deepak
GPG Key ID: 64BF53A3369104E7
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,9 @@
def sc_free_energy(
delta: float,
temp: float,
mustar: float,
debye_freq: float,
n_0: float,
v_interaction_0: float
) -> float:
return 9999.35

View File

@ -0,0 +1,22 @@
import pysuperconductor.sc_free_energy
import numpy
import pytest
def test_sc_free_energy():
with pytest.warns(None) as record:
actual = pysuperconductor.sc_free_energy.sc_free_energy(
0.907816, .5, .247777, 100, 1, .2)
assert not record
numpy.testing.assert_almost_equal(
actual, 9999.35,
decimal=7, err_msg='superconducting free energy was off', verbose=True
)
with pytest.warns(None) as record:
actual = pysuperconductor.sc_free_energy.sc_free_energy(
0.907816, .5, .247777, 50, 1, .2)
assert not record
# numpy.testing.assert_almost_equal(
# actual, 2498.910078644398,
# decimal=7, err_msg='superconducting free energy was off', verbose=True
# )