tests.bubble.test_thermo

Unit tests for thermodynamic functions

Classes

class tests.bubble.test_thermo.ThermoTest

Bases: object

Unit tests for thermodynamic functions

ALPHA_NS: ndarray
BVA_KE_FRAC_REF: ndarray
KAPPA_REF: ndarray
MODEL: Model = <pttools.models.bag.BagModel object>
OMEGA_REF: ndarray
V_WALLS: ndarray
bubbles: List[Bubble]
classmethod setUpClass()
Return type:

None

test_bva_ke_frac()
test_ebar()
test_kappa()
test_kappa_omega()
test_kappa_omega_ref()

Ensure that there are no typos in the reference data

test_omega()
test_wbar()

If there is no bubble, then wbar=wn

class tests.bubble.test_thermo.ThermoTestBag(methodName='runTest')

Bases: ThermoTest, TestCase

Test that the results have not changed due to code changes

Reference data has been generated with PTtools.

ALPHA_NS: ndarray = array([0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.3, 0.3])
BVA_KE_FRAC_REF: ndarray = array([0.01120122, 0.04102288, 0.02133517, 0.03584025, 0.09408546,        0.07716743, 0.06676238, 0.14411715, 0.13352655])
KAPPA_REF: ndarray = array([0.1227, 0.4512, 0.2346, 0.2141, 0.5645, 0.463 , 0.2881, 0.6245,        0.5786])
OMEGA_REF: ndarray = array([0.8773, 0.5574, 0.7683, 0.7854, 0.4408, 0.5496, 0.7113, 0.3794,        0.4305])
V_WALLS: ndarray = array([0.3, 0.7, 0.8, 0.3, 0.7, 0.8, 0.3, 0.7, 0.8])
class tests.bubble.test_thermo.ThermoTestConstCS(methodName='runTest')

Bases: ThermoTest, TestCase

Test that the results have not changed due to code changes

Reference data has been generated with PTtools.

ALPHA_NS: ndarray = array([0.15, 0.15, 0.15, 0.2 , 0.2 , 0.2 , 0.3 , 0.3 , 0.3 ])
BVA_KE_FRAC_REF: ndarray = array([0.02241072, 0.06855181, 0.04693314, 0.03579221, 0.09491076,        0.07758419, 0.06659433, 0.14493926, 0.13417616])
KAPPA_REF: ndarray = array([0.17526324, 0.52981172, 0.3600414 , 0.21890328, 0.57413588,        0.46646184, 0.2938114 , 0.63314631, 0.58336228])
MODEL: Model = <pttools.models.const_cs.ConstCSModel object>
OMEGA_REF: ndarray = array([0.82459827, 0.47720201, 0.65719739, 0.78079516, 0.43156144,        0.54712883, 0.70572079, 0.37119028, 0.42637198])
V_WALLS: ndarray = array([0.3, 0.7, 0.8, 0.3, 0.7, 0.8, 0.3, 0.7, 0.8])
class tests.bubble.test_thermo.ThermoTestHindmarshHijazi(methodName='runTest')

Bases: ThermoTest, TestCase

ALPHA_NS: ndarray = array([0.578, 0.151, 0.091])
BVA_KE_FRAC_REF: ndarray = array([0.223 , 0.0684, 0.022 ])
KAPPA_REF: ndarray = array([0.61 , 0.522, 0.264])
OMEGA_REF: ndarray = array([0.395, 0.491, 0.744])
V_WALLS: ndarray = array([0.5 , 0.7 , 0.77])
class tests.bubble.test_thermo.ThermoTestLectureNotes(methodName='runTest')

Bases: ThermoTest, TestCase

ALPHA_NS: ndarray = array([0.1, 0.1, 0.1])
BVA_KE_FRAC_REF: ndarray = array([0.0172, 0.0411, 0.0213])
KAPPA_REF: ndarray = array([0.189, 0.452, 0.235])
OMEGA_REF: ndarray = array([0.815, 0.559, 0.769])
UBARFS_REF = array([0.119, 0.184, 0.133])
V_WALLS: ndarray = array([0.4, 0.7, 0.8])
test_ubarf()