''' Created on July 9, 2016 @author: Andrew Abi-Mansour ''' # !/usr/bin/python # -*- coding: utf8 -*- from PyGran import simulation from PyGran.params import organic # Launch 4 simultaneous simulations, each different coef of rest nSim = 4 materials = [organic.copy() for i in range(nSim)] for i, mat in enumerate(materials): mat['coefficientRestitution'] = 0.9 / (1 + i) # Create a dictionary of physical parameters params = { # Define the system 'boundary': ('p', 'p', 'f'), # fixed BCs 'box': (-0.001, 0.001, -0.001, 0.001, 0, 0.004), # simulation box size # Define component(s) 'species': ({ 'style': 'sphere', 'material': materials, 'radius': ('constant', 2e-4) }, ),
from PyGran import simulation from PyGran.params import organic xdim = 1e-3 organic["cohesionEnergyDensity"] = 1e5 organic["youngsModulus"] = 6e7 wall = organic.copy() wall["cohesionEnergyDensity"] = 0.0 PID = wall.copy() wall["coefficientFriction"] = 0 # Create a dictionary of physical parameters params = { # Define the system "boundary": ("p", "f", "f"), # fixed BCs "box": (-xdim, xdim, -xdim, xdim, 0, xdim * 12), "model": simulation.models.HertzMindlin, # Define component(s) "species": ({ "material": organic, "radius": ("constant", 2e-4) }, ), # Timestep "dt": 1e-6, "nns_skin": 1e-4, # Apply gravitional force in the negative direction along the z-axis "gravity": (9.81, 0, 0, -1), # Number of simulation steps (non-PyGran variable)