Source code for interaction

from base_types import *


[docs] class base_interaction: """This is generic pair interaction and this is a long comment continuing here""" model: str = None """**[mandatory]** which model applies to this interaction""" id1: int = None """**[mandatory]** id of body 1""" id2: int = None """**[mandatory]** id of body 2""" virtual: bool = False """*[optional]* weither the interaction is real (else it is in a virtual state - typically without contact)""" creation_time: float = 0 """*[optional]* time when the interaction was created (example of optional data)"""
[docs] class normal(base_interaction): """interaction in the normal direction""" normal: Vector3 = Vector3(0,0,0) """**[mandatory]** unit normal [:math:`-`]""" normal_force: float = 0 """**[mandatory]** normal force magnitude (positive in traction) [:math:`F`]"""
[docs] class shear(base_interaction): """interaction in the tangential (or shear) direction""" shear_force: Vector3 = Vector3(0,0,0) """shear force [:math:`F`]"""
[docs] class intr3D(normal, shear): """3 DOFs interaction combining normal and shear forces"""
[docs] class shear_linear(shear): """linear-elasticity""" ks: float = None """**[mandatory]** shear stiffness [:math:`F/L`]"""
[docs] class shear_linear_viscoelastic(shear_linear): """linear-elasticity with viscosity""" shear_viscosity: float = None """**[mandatory]** shear damping ratio, :math:`c_{s}`, [:math:`FT/L`]"""
[docs] class normal_linear(normal): """linear-elasticity""" kn: float = None """**[mandatory]** normal stiffness [:math:`F/L`]"""
[docs] class normal_linear_viscoelastic(normal_linear): """linear-elasticity with viscosity (linear spring dashpot)""" normal_viscosity: float = None """**[mandatory]** normal damping ratio, :math:`c_{n}`, [:math:`FT/L`]"""
[docs] class normal_hertz(normal): """Hertzian interaction in the normal direction""" hertz_young: float = None """**[mandatory]** equivalent Young modulus [:math:`F/L²`]""" hertz_poisson: float = None """**[mandatory]** equivalent Poisson coefficient [:math:`-`]"""
[docs] class linear_3D(intr3D, normal_linear, shear_linear): """linear elastic interaction""" pass
[docs] class linear_frictional_3D(linear_3D): """linear frictional interaction""" friction_coefficient: float = None """**[mandatory]** friction coefficient, :math:`\mu`, [:math:`-`]""" pass
[docs] class base_thermal(base_interaction): """This material describes thermal behaviour""" pass
[docs] class thermal_Blaze(base_thermal): """This material describes thermal behaviour dependent on friction and cohesion""" pass
[docs] class liquid_bridge(base_interaction): """interaction to store base information needed for liquid bridges""" is_formed: bool = None """**[mandatory]** whether a liquid bridge was formed previously"""
[docs] class liquid_bridge_dynamic(liquid_bridge): """liquid bridge interaction, where the volume can change""" liquid_bridge_volume: float = None """**[mandatory]** the liquid volume stored in the bridge, :math:`V` [:math:`L^3`]"""
[docs] class normal_basic_luding(normal_linear): """This material describes linear-elastic behaviour with spring constants""" k1: float = None """**[mandatory]** normal stiffness in plastic branch, :math:`K_{1}`, [:math:`FL^{-1}`]""" k2: float = None """**[mandatory]** normal stiffness in unloading and reloading elastic branch, :math:`K_{n}^{U}`, [:math:`FL^{-1}`]""" kc: float = None """**[mandatory]** normal stiffness in tensile adhesive branch, :math:`K_{adh}^{U}`, [:math:`FL^{-1}`]"""