Adhesion.Interactions package
Submodules
Adhesion.Interactions.Base module
Defines the base class for contact description
- class Adhesion.Interactions.Base.Dugdale(stress, length)[source]
Bases:
HardWall
Potential class representing a Dugdale cohesive zone model
- property length
- property stress
- class Adhesion.Interactions.Base.HardWall[source]
Bases:
Interaction
base class for non-smooth contact mechanics
- class Adhesion.Interactions.Base.Interaction[source]
Bases:
object
base class for all interactions, e.g. interatomic potentials
- class Adhesion.Interactions.Base.SoftWall(communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Interaction
base class for smooth contact mechanics
- evaluate(gap, potential=True, gradient=False)[source]
computes and returns the interaction energy and/or forces based on the as fuction of the gap Parameters: ———– gap: array like
the point-wise gap values
- potential: bool
(default True) whether the energy should be evaluated
- gradient: bool
(default False) whether the gradient should be evaluated
Adhesion.Interactions.Coulomb module
Electrostatic potential for Coulombic Interactions
Heß, M. and Forsbach, F., 2020. Macroscopic modeling of fingerpad friction under electroadhesion: Possibilities and limitations. Frontiers in Mechanical Engineering, 6, p.567386.
- class Adhesion.Interactions.Coulomb.Coulomb(eps0, eps1, epsg, eps2, d1, d2, voltage, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
Electrostatic potential for Coulombic interaction when a voltage is applied across a gap between two perfect insulators
@doi https://doi.org/10.3389/fmech.2020.567386
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- name = 'Coulomb'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the energy minimum
Adhesion.Interactions.Cutoff module
- class Adhesion.Interactions.Cutoff.CutoffPotential(parent_potential, cutoff_radius)[source]
Bases:
DecoratedPotential
sets the potential to 0 above the cutoff radius and shifts it up to enforce continuity of the potential. This potential hence has a discontinuity in the force
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property has_cutoff
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the enery minimum
- class Adhesion.Interactions.Cutoff.LinearCorePotential(parent_potential, r_ti=None, hardness=None, htol=1e-05)[source]
Bases:
DecoratedPotential
Replaces the singular repulsive part of potentials by a linear part. This makes potentials maximally robust for the use with very bad initial parameters. Consider using this instead of loosing time guessing initial states for optimization.
The repulsive part of the potential is linear, meaning that the pressure is constant. This thus corresponds to an ideal plastic model.
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the enery minimum
- class Adhesion.Interactions.Cutoff.ParabolicCutoffPotential(parent_potential, cutoff_radius)[source]
Bases:
DecoratedPotential
Implements a very simple smoothing of a potential, by complementing the functional form of the potential with a parabola that brings to zero the potential’s zeroth, first and second derivative at an imposed (and freely chosen) cut_off radius r_c
- evaluate(gap, potential=True, gradient=False, curvature=False)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property has_cutoff
- property r_infl
convenience function returning the location of the inflection point
- property r_min
convenience function returning the location of the energy minimum
Adhesion.Interactions.Exponential module
Exponential attraction.
- class Adhesion.Interactions.Exponential.Exponential(gamma0, rho, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
V(g) = -gamma0*e^(-g(r)/rho)
V(g) = -gamma0*e^(-g(r)/rho) V’(g) = (gamma0/rho)*e^(-g(r)/rho) V’’(g) = -(gamma0/rho^2)*e^(-g(r)/rho)
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property max_tensile
convenience function returning the value of the maximum stress (i.e. the value of the gradient at the inflexion point pot.r_infl)
- name = 'exp'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the energy minimum
- class Adhesion.Interactions.Exponential.Morse(work_of_adhesion, interaction_range, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
RepulsiveExponential
- name = 'morse'
- class Adhesion.Interactions.Exponential.RepulsiveExponential(gamma_rep, rho_rep, gamma_att, rho_att, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
V(g) = -gamma_{rep}*e^(-r/rho_{rep}) - gamma_{att}*e^(-r/rho_{att})
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=(slice(None, None, None), slice(None, None, None)))[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- name = 'repulsive_exp'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the energy minimum
Adhesion.Interactions.Harmonic module
Harmonic potential for wall interaction
- class Adhesion.Interactions.Harmonic.Harmonic(spring_constant, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
Repulsive harmonic potential.
Harmonic potential: V (r) = 1/2 k r**2 for r < 0
- evaluate(gap, potential=True, gradient=False, curvature=True)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- name = 'harmonic'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the energy minimum
Adhesion.Interactions.LJ93 module
9-3 Lennard-Jones potential for wall interactions
- class Adhesion.Interactions.LJ93.LJ93(epsilon, sigma, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
9-3 Lennard-Jones potential with optional cutoff radius.
9-3 Lennard-Jones potential: V_l (r) = ε[ 2/15 (σ/r)**9 - (σ/r)**3]
⎛ 3 9⎞ ⎜ σ 2⋅σ ⎟
- V_l(r) = ε⋅⎜- ── + ─────⎟
⎜ 3 9⎟ ⎝ r 15⋅r ⎠
⎛ 3 9⎞ ⎜3⋅σ 6⋅σ ⎟
- V_l’(r) = ε⋅⎜──── - ─────⎟
⎜ 4 10⎟ ⎝ r 5⋅r ⎠
⎛ 3 9⎞ ⎜ 12⋅σ 12⋅σ ⎟
- V_l’’(r) = ε⋅⎜- ───── + ─────⎟
⎜ 5 11 ⎟ ⎝ r r ⎠
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- name = 'lj-93'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
r_infl = σ
- property r_min
convenience function returning the location of the energy minimum
6 ___ 5/6
- r_min = ╲╱ 2 ⋅5 ⋅σ
- ────────────
5
Adhesion.Interactions.Potential module
Generic potential class, all potentials inherit it
- class Adhesion.Interactions.Potential.DecoratedPotential(parent_potential)[source]
Bases:
Potential
- class Adhesion.Interactions.Potential.Potential(communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
SoftWall
Describes the minimum interface to interaction potentials for Adhesion. These potentials are purely 1D, which allows for a few simplifications. For instance, the potential energy and forces can be computed at any point in the problem from just the one-dimensional gap (h(x,y)-z(x,y)) at that point
- class SliceableNone[source]
Bases:
object
small helper class to remedy numpy’s lack of views on index-sliced array views. This construction avoid the computation of all interactions as with np.where, and copies
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property has_cutoff
- property max_tensile
convenience function returning the value of the maximum stress (i.e. the value of the gradient at the inflexion point pot.r_infl)
- name = 'generic_potential'
- abstract property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- abstract property r_min
convenience function returning the location of the energy minimum
- property v_min
convenience function returning the value of the energy minimum
Adhesion.Interactions.PowerLaw module
- class Adhesion.Interactions.PowerLaw.PowerLaw(work_of_adhesion, cutoff_radius, exponent=3, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
Polynomial interaction wiches value, first and second derivatives are 0 at the cutoff radius \(r_c\)
\[(r < r_c) \ (1 - r / r_c)^p\]With the exponent \(p >= 3\)
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=None)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- property has_cutoff
- property max_tensile
convenience function returning the value of the maximum stress (i.e. the value of the gradient at the inflexion point pot.r_infl)
- name = 'PowerLaw'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
- property r_min
convenience function returning the location of the energy minimum
Adhesion.Interactions.SmoothPotential module
- class Adhesion.Interactions.SmoothPotential.SmoothPotential(parent_potential, gamma=None, r_t=None)[source]
Bases:
DecoratedPotential
implements the splining of the potential tail using a fourth order polynomial than reaches zero within a finite cutoff radius
decoupled potential: V_lγ (r) = V_l(r) - V_l(r_t) + γ
- spline: (Δr = r-r_t)
2 3 4
C₂⋅Δr C₃⋅Δr C₄⋅Δr
- V_s(Δr) = C₀ - C₁⋅Δr - ────── - ────── - ──────
2 3 4
The formulation allows to choose the contact stiffness (the original repulsive zone) independently from the work of adhesion (the energy well). By default, the work of adhesion equals -min(V(r)) and the transition point r_t between the naive potential and the spline is at the minimumm, however they can be chosen freely.
The spline is chosen to guarantee continuity of the second derivative of the potential, leading to the following conditions: (1): V_s’ (Δr_t) = V_lγ’ (r_t) (2): V_s’’(Δr_t) = V_lγ’’(r_t) (3): V_s (Δr_c) = 0, where Δr_c = r_c-r_o (4): V_s’ (Δr_c) = 0 (5): V_s’’(Δr_c) = 0 (6): V_s (Δr_m) = -γ, where Δr_m = r_min-r_o The unknowns are C_i (i in {0,..4}) and r_c r_o is the origin for the spline, which can be chosen freely. The original choice was r_o = r_t, but it turned out to be a bad choice, leading to a system of nonlinear equation in which only two of the six unknowns can be eliminated.
With r_o = r_c, all coefficients C_i can be eliminated and a good initial guess for the remaining scalar nonlinear equation can be computed. see _eval_poly_and_cutoff
- evaluate(gap, potential=True, gradient=False, curvature=False)[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- get_r_infl_spline()[source]
compute the inflection Point of the spline. The inflexion Point of the smoothed potential could be below r_t and so staying the original one
- property r_infl
convenience function returning the location of the potential’s inflection point Depending on where the transition between the parent_potential and the spline has been made this returns the inflection point of the spline or of the parent_potential
- property r_min
convenience function returning the location of the enery minimum of the parent potential. (The spline begins at radii above r_min)
Adhesion.Interactions.VdW82 module
Implements a van der Waals-type interaction as described in http://dx.doi.org/10.1103/PhysRevLett.111.035502
- class Adhesion.Interactions.VdW82.VDW82(c_sr, hamaker, communicator=<NuMPI.MPIStub.Intracomm object>)[source]
Bases:
Potential
Van der Waals-type attractive potential with a fantasy repulsive model (like Lennard-Jones). The potential uses the formulation of Lessel et al. 2013 (http://dx.doi.org/10.1103/PhysRevLett.111.035502). However, the oxide layer is supposed do be thick
A C_sr
- vdW(r) = - ─────── + ────
2 8
12⋅r ⋅π r
A 8⋅C_sr
- vdW’(r) = ────── - ──────
3 9
6⋅r ⋅π r
A 72⋅C_sr
- vdW”(r) = - ────── + ───────
4 10
2⋅r ⋅π r
- evaluate(gap, potential=True, gradient=False, curvature=False, mask=(slice(None, None, None), slice(None, None, None)))[source]
Evaluates the potential and its derivatives
Parameters:
- gap: array_like of float
array of distances between the two surfaces
- potential: bool, optional
if true, returns potential energy (default True)
- gradient: bool, optional
if true, returns gradient (default False)
- curvature: bool, optional
if true, returns second derivative (default False)
- mask: ndarray of bool, optional
potential is only evaluated on gap[mask] this property is used by the child potential
- name = 'v-d-Waals82'
- property r_infl
convenience function returning the location of the potential’s inflection point (if applicable)
3 ____ ╱ C_sr⋅π
- r_infl = ╲╱ 12 ⋅6 ╱ ──────
╲╱ A
- property r_min
- convenience function returning the location of the enery minimum
2/3 6 ___ ╱ C_sr⋅π
- r_min = 2 ⋅╲╱ 3 ⋅6 ╱ ──────
╲╱ A