statmechcrack.tests.test_zero

A module for testing when something is zero.

class Zero(methodName='runTest')[source]

Bases: TestCase

Class to test for when something is zero.

_classSetupFailed = False
_class_cleanups = []
main()[source]

Main function for module-level testing functionality.

test_zero_inverse()[source]

Function to test inverse calculation at zero.

test_zero_minimized_nondimensional_energy()[source]

Function to test for zero minimized nondimensional energy.

test_zero_nondimensional_end_force()[source]

Function to test for zero nondimensional end force.

test_zero_nondimensional_energy()[source]

Function to test for zero nondimensional energy.

test_zero_nondimensional_jacobian()[source]

Function to test for zero nondimensional Jacobian.

test_zero_relative_nondimensional_gibbs_free_energy()[source]

Function to test for zero relative Gibbs free energy.

test_zero_relative_nondimensional_helmholtz_free_energy()[source]

Function to test for zero relative Helmholtz free energy.

random_crack_model(N=7, M=10, kappa=68.13496238471541, alpha=1.0362364986465709, varepsilon=64.79975282046777)[source]

Function to produce a random crack model.

Parameters:
  • N (int, optional, default=random) – The number of broken bonds.

  • M (int, optional, default=random) – The number of intact bonds.

  • kappa (float, optional, default=random) – The nondimensional bending stiffness.

  • alpha (float, optional, default=random) – The nondimensional Morse parameter.

  • varepsilon (float, optional, default=random) – The nondimensional bond energy.

Returns:

A crack model instance.

Return type:

object