Advertisement
nicogodet

Untitled

Jul 2nd, 2018
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.29 KB | None | 0 0
  1. from yade import plot,qt
  2. from yade.gridpfacet import *
  3. import math
  4.  
  5. O.dt = 0.000001
  6.  
  7. Rad = 0.1
  8. Factor=1.5
  9. m_viscosity=3
  10. m_roughness=0.02
  11.  
  12. O.materials.append(
  13.         FrictMat(
  14.             density=2500,
  15.             frictionAngle=math.radians(35.),
  16.             poisson=0.2,
  17.             young=1e7,
  18.             label='Frict'
  19.         ))
  20.  
  21. S2 = O.bodies.append(sphere(center=[1.5*Rad,0,Factor*2.1*Rad],radius=Rad,material='Frict',fixed=False))
  22. Stest = O.bodies.append(sphere(center=[1.5*Rad,0,3*Factor*2.1*Rad],radius=Rad,material='Frict',fixed=False))
  23. W1 = O.bodies.append(aabbWalls([(4*Rad,-2*Rad,15*Rad),(0,3*Rad,0)],thickness=0.,material='Frict',oversizeFactor=1.0))
  24. #F1=O.bodies.append(facet([[-10,-2*Rad,0],[10,-2*Rad,0],[0,-2*Rad,10]],fixed=True,material='Frict'))
  25.  
  26.  
  27. theta_method= 0.55  #1 : Euler Backward, 0.5 : trapezoidal rule, 0 : not used, 0.55 : suggested optimum
  28. resolution=1        #Change normal component resolution method, 0: Iterative exact resolution (theta method, linear contact), 1: Newton-Rafson dimentionless resolution (theta method, linear contact), 2: Newton-Rafson with nonlinear surface deflection (Hertzian-like contact)
  29. NewtonRafsonTol = 1e-6  #Precision of the resolution of Newton-Rafson's method
  30. O.engines=[
  31.     ForceResetter(),
  32.     InsertionSortCollider(
  33.         [
  34.          Bo1_Sphere_Aabb(aabbEnlargeFactor=Factor, label="aabb"),
  35.          Bo1_Box_Aabb(),
  36. #        Bo1_Wall_Aabb(),
  37. #        Bo1_Facet_Aabb(),
  38.         ],
  39.          verletDist=-0.1,
  40.          allowBiggerThanPeriod=False),
  41.          
  42.     InteractionLoop(
  43.         [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=Factor,label="Ig2"),
  44. #         Ig2_Wall_Sphere_ScGeom(),
  45.          Ig2_Box_Sphere_ScGeom6D(),
  46. #        Ig2_Facet_Sphere_ScGeom()
  47.          
  48.         ],
  49.        
  50.         [
  51.          Ip2_FrictMat_FrictMat_LubricationPhys(eta=m_viscosity,eps=m_roughness),
  52.         ],
  53.        
  54.         [
  55.          Law2_ScGeom_ImplicitLubricationPhys(activateNormalLubrication=True,
  56.                                              activateTangencialLubrication=True,
  57.                                              activateTwistLubrication=False,
  58.                                              activateRollLubrication=False,
  59.                                              theta=theta_method,
  60.                                              resolution=resolution,
  61.                                              NewtonRafsonTol=NewtonRafsonTol,
  62.                                              warnedOnce=True,
  63.                                              maxSubSteps=20,
  64.                                              debug=False,),
  65.  
  66.         ]
  67.     ),
  68.     NewtonIntegrator(damping=0.,gravity=[0,-5,-5],label='newton'),
  69. ]
  70.  
  71.  
  72. qt.View()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement