statmechcrack.core¶
The core module for the crack model.
This module consist of the class Crack
which, upon instantiation,
becomes a crack model instance with methods for calculating
quantities in either thermodynamic ensemble.
These thermodynamic quantities are calculated using an
asymptotic approach [3],
[2], [1]
or a Monte Carlo approach (see CrackMonteCarlo
).
Basic mathematical capabilities are provided by
numpy
[4] and scipy
[6],
and matplotlib
[5] is often used
for displaying results.
- class Crack(**kwargs)[source]¶
Bases:
CrackIsotensional
The crack model class.
- beta_A(v, ensemble='isometric', approach='asymptotic', absolute=False, **kwargs)[source]¶
The nondimensional Helmholtz free energy as a function of the nondimensional end separation.
- Parameters:
v (array_like) – The nondimensional end separation.
ensemble (str, optional, default='isometric') – The thermodynamic ensemble. The isotensional ensemble uses the Legendre transformation method.
approach (str, optional, default='asymptotic') – The calculation approach.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
**kwargs – Arbitrary keyword arguments. Passed to
beta_A_isometric()
orp()
andbeta_G_isotensional()
.
- Returns:
The nondimensional Helmholtz free energy.
- Return type:
numpy.ndarray
- beta_A_0(v, lambda_, ensemble='isometric', absolute=False)[source]¶
The nondimensional Helmholtz free energy as a function of the nondimensional end separation for the reference system.
- Parameters:
v (array_like) – The nondimensional end separation.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isometric') – The thermodynamic ensemble. The isotensional ensemble uses the Legendre transformation method.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
- Returns:
The nondimensional Helmholtz free energy.
- Return type:
numpy.ndarray
- beta_A_b(v, lambda_, ensemble='isometric', absolute=False)[source]¶
The nondimensional Helmholtz free energy as a function of the nondimensional end separation for the isolated bending system.
- Parameters:
v (array_like) – The nondimensional end separation.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isometric') – The thermodynamic ensemble. The isotensional ensemble uses the Legendre transformation method.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
- Returns:
The nondimensional Helmholtz free energy.
- Return type:
numpy.ndarray
- beta_G(p, ensemble='isotensional', approach='asymptotic', absolute=False, **kwargs)[source]¶
The nondimensional Gibbs free energy as a function of the nondimensional end force.
- Parameters:
p (array_like) – The nondimensional end force.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble. The isometric ensemble uses the Legendre transformation method.
approach (str, optional, default='asymptotic') – The calculation approach.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
**kwargs – Arbitrary keyword arguments. Passed to
beta_G_isotensional()
orv()
andbeta_A_isometric()
.
- Returns:
The nondimensional Gibbs free energy.
- Return type:
numpy.ndarray
- beta_G_0(p, lambda_, ensemble='isotensional', absolute=False)[source]¶
The nondimensional Gibbs free energy as a function of the nondimensional end force for the reference system.
- Parameters:
p (array_like) – The nondimensional end force.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble. The isometric ensemble uses the Legendre transformation method.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
- Returns:
The nondimensional Gibbs free energy.
- Return type:
numpy.ndarray
- beta_G_b(p, lambda_, ensemble='isotensional', absolute=False)[source]¶
The nondimensional Gibbs free energy as a function of the nondimensional end force for the isolated bending system.
- Parameters:
p (array_like) – The nondimensional end force.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble. The isometric ensemble uses the Legendre transformation method.
absolute (bool, optional, default=False) – Whether not to use the absolute free energy.
- Returns:
The nondimensional Gibbs free energy.
- Return type:
numpy.ndarray
- k(p_or_v, ensemble='isometric', approach='asymptotic', **kwargs)[source]¶
The nondimensional forward reaction rate coefficient as a function of the nondimensional end force or the nondimensional end separation.
- Parameters:
p_or_v (array_like) – The nondimensional end force or position. Assumed to be the end separation for the isometric ensemble and the end force for the isotensional ensemble.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
approach (str, optional, default='asymptotic') – The calculation approach.
**kwargs – Arbitrary keyword arguments. Passed to
k_isometric()
ork_isotensional()
.
- Returns:
The nondimensional forward reaction rate.
- Return type:
numpy.ndarray
- k_0(p_or_v, lambda_, ensemble='isometric')[source]¶
The nondimensional forward reaction rate coefficient as a function of the nondimensional end force or the nondimensional end separation for the reference system.
- Parameters:
p_or_v (array_like) – The nondimensional end force or position. Assumed to be the end separation for the isometric ensemble and the end force for the isotensional ensemble.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
- Returns:
The nondimensional forward reaction rate.
- Return type:
numpy.ndarray
- k_b(p_or_v, lambda_, ensemble='isometric')[source]¶
The nondimensional forward reaction rate coefficient as a function of the nondimensional end force or the nondimensional end separation for the isolated bending system.
- Parameters:
p_or_v (array_like) – The nondimensional end force or position. Assumed to be the end separation for the isometric ensemble and the end force for the isotensional ensemble.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
- Returns:
The nondimensional forward reaction rate.
- Return type:
numpy.ndarray
- k_net(p_or_v, ensemble='isometric')[source]¶
The nondimensional net reaction rate coefficient as a function of the nondimensional end force or the nondimensional end separation.
- Parameters:
p_or_v (array_like) – The nondimensional end force or position. Assumed to be the end separation for the isometric ensemble and the end force for the isotensional ensemble.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
- Returns:
The nondimensional net reaction rate.
- Return type:
numpy.ndarray
Note
Only the asymptotic approach is currently available.
- p(v, ensemble='isometric', approach='asymptotic', **kwargs)[source]¶
The nondimensional end force as a function of the nondimensional end separation.
- Parameters:
v (array_like) – The nondimensional end separation.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
approach (str, optional, default='asymptotic') – The calculation approach.
**kwargs – Arbitrary keyword arguments. Passed to
p_isometric()
orv_isotensional()
.
- Returns:
The nondimensional end force.
- Return type:
numpy.ndarray
- p_0(v, lambda_, ensemble='isometric')[source]¶
The nondimensional end force as a function of the nondimensional end separation for the reference system.
- Parameters:
v (array_like) – The nondimensional end separation.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isometric') – The thermodynamic ensemble.
- Returns:
The nondimensional end force.
- Return type:
numpy.ndarray
- p_b(v, lambda_, ensemble='isometric')[source]¶
The nondimensional end force as a function of the nondimensional end separation for the isolated bending system.
- Parameters:
v (array_like) – The nondimensional end separation.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isometric') – The thermodynamic ensemble.
- Returns:
The nondimensional end force.
- Return type:
numpy.ndarray
- v(p, ensemble='isotensional', approach='asymptotic', **kwargs)[source]¶
The nondimensional end separation as a function of the nondimensional end force.
- Parameters:
p (array_like) – The nondimensional end force.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
approach (str, optional, default='asymptotic') – The calculation approach.
**kwargs – Arbitrary keyword arguments. Passed to
v_isotensional()
orp_isometric()
.
- Returns:
The nondimensional end separation.
- Return type:
numpy.ndarray
- v_0(p, lambda_, ensemble='isotensional')[source]¶
The nondimensional end separation as a function of the nondimensional end force for the reference system.
- Parameters:
p (array_like) – The nondimensional end force.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
- Returns:
The nondimensional end separation.
- Return type:
numpy.ndarray
- v_b(p, lambda_, ensemble='isotensional')[source]¶
The nondimensional end separation as a function of the nondimensional end force for the isolated bending system.
- Parameters:
p (array_like) – The nondimensional end force.
lambda (array_like) – The intact bond stretches.
ensemble (str, optional, default='isotensional') – The thermodynamic ensemble.
- Returns:
The nondimensional end separation.
- Return type:
numpy.ndarray
References
Michael R. Buche and Scott J. Grutzik. uFJC: the Python package for the uFJC single-chain model. Zenodo, 2022. doi:10.5281/zenodo.6114263.
Michael R. Buche, Meredith N. Silberstein, and Scott J. Grutzik. Freely jointed chain models with extensible links. Physical Review E, 106(024502):024502, 2022. doi:10.1103/PhysRevE.106.024502.
Michael Robert Buche. Fundamental Theories for the Mechanics of Polymer Chains and Networks. PhD thesis, Cornell University, 2021. URL: https://www.proquest.com/openview/620bd18d1bf93950b88a41aa62ebdb3c.
Charles R. Harris, K. Jarrod Millman, Stéfan J van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, Robert Kern, Matti Picus, Stephan Hoyer, Marten H. van Kerkwijk, Matthew Brett, Allan Haldane, Jaime Fernández del Río, Mark Wiebe, Pearu Peterson, Pierre Gérard-Marchant, Kevin Sheppard, Tyler Reddy, Warren Weckesser, Hameer Abbasi, Christoph Gohlke, and Travis E. Oliphant. Array programming with NumPy. Nature, 585:357–362, 2020. doi:10.1038/s41586-020-2649-2.
John D Hunter. Matplotlib: a 2D graphics environment. Computing in Science & Engineering, 9(03):90–95, 2007. doi:10.1109/MCSE.2007.55.
Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric Larson, C J Carey, İlhan Polat, Yu Feng, Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antônio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nature Methods, 17:261–272, 2020. doi:10.1038/s41592-019-0686-2.