simulation.PyGranSim.model_liggghts

A module for creating contact models on the fly for LIGGGHTS

Created on July 1, 2016

Author: Andrew Abi-Mansour

This is the:

██████╗ ██╗   ██╗ ██████╗ ██████╗  █████╗ ███╗   ██╗
██╔══██╗╚██╗ ██╔╝██╔════╝ ██╔══██╗██╔══██╗████╗  ██║
██████╔╝ ╚████╔╝ ██║  ███╗██████╔╝███████║██╔██╗ ██║
██╔═══╝   ╚██╔╝  ██║   ██║██╔══██╗██╔══██║██║╚██╗██║
██║        ██║   ╚██████╔╝██║  ██║██║  ██║██║ ╚████║
╚═╝        ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝

DEM simulation and analysis toolkit http://www.pygran.org, support@pygran.org

Core developer and main author: Andrew Abi-Mansour, andrew.abi.mansour@pygran.org

PyGran is open-source, distributed under the terms of the GNU Public License, version 2 or later. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with PyGran. If not, see http://www.gnu.org/licenses . See also top-level README and LICENSE files.

Functions

register(**args)

Generates a c++ header file for a contact model and compiles it during runtime.

simulation.PyGranSim.model_liggghts._find_number_models(src_dir, mtype='normal')[source]

Finds the total number of contact models available in the liggghts src dir

@src_dir: directory to search the contact model header files in @[mtype]: ‘normal’ (default) or ‘tangential’ contact models to search for

simulation.PyGranSim.model_liggghts.register(**args)[source]

Generates a c++ header file for a contact model and compiles it during runtime.

Parameters
  • stiffness (str) – analytical form of the stiffness = force / deltan

  • viscosity (str) – analytical form of the viscosity term (force = viscosity * vn).

Material parameters that can be used: Yeff: effective Young’s modulus Geff: effective Shear modulus meff: effective mass reff: effective radius charVel: characteristic impact velocity restLog: log of the coefficient of restitution deltan: normal displacement vn: velocity of the normal displacement kn: stiffness PI: constant (3.14 …)

Example

register(name=’my_model’, stiffness = ‘6./15.*sqrt(reff)*(Yeff)*pow(15.*meff*charVel*charVel/(16.*sqrt(reff)*Yeff),0.2)’, viscosity = ‘sqrt(4.*meff*kn*restLogChosen*restLogChosen/(restLogChosen*restLogChosen+PI*PI))’)

produces a template header file for the spring-dashpot model called ‘my_model’.