Question #187058 on Yade changed:
https://answers.launchpad.net/yade/+question/187058

Christian Jakob posted a new comment:
to reproduce it, try this script:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from yade import qt

#define material properties:
rho     = 1000  #density
fric    = 2             #friction coefficient
fric_angle = atan(fric) #friction angle in radian
stiff_n = 1e8
stiff_s = 1e8
c_n     = 0.0   #normal viscous damping
c_s     = 0.0   #shear viscous damping
l_d             = 0.7   #local damping 


#define a material:
MyMaterial = O.materials.append(ViscElMat(kn=stiff_n, ks=stiff_s, \
cn=c_n, cs=c_s, density=rho, frictionAngle=fric_angle))

#create a sphere:
O.bodies.append(utils.sphere(center=(0,0,1), radius=0.5, material=MyMaterial))

#create a plane facet:
O.bodies.append(geom.facetBox(center=(0,0,0), extents=(1,1,0), fixed=True, 
material=MyMaterial))

#define engines:
O.engines=[
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),    
#Axis-aligned bounding box
        InteractionLoop(
                [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom()],       
                #Interaction geometry
                [Ip2_ViscElMat_ViscElMat_ViscElPhys()], #Interaction physics
                [Law2_ScGeom_ViscElPhys_Basic()],               #Contact law
        ),
        GravityEngine(gravity=(0,0,-9.81)),
        NewtonIntegrator(damping=l_d),
        
qt.SnapshotEngine(fileBase='/tmp/yade-test-snapshots',label='snapper',iterPeriod=1000),
]

#show geometry:
v=qt.View(); v.axes=True
v.viewDir=Vector3(0,1,-.05)
v.eyePosition=Vector3(0,-5,.5)

O.dt = 1e-6

#this works:--------------------------------------
#O.run(1000000)

#this not:-------------------------------------------
ii=1
while ii < 200:
        ii=ii+1
        O.run(1500,True)

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to