Advertisement
Guest User

TriaxialStressController and Capillary

a guest
Mar 26th, 2017
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.24 KB | None | 0 0
  1. from yade import pack, plot
  2. from yade import utils
  3. import math
  4. import os
  5.  
  6. num_spheres=500 # 10000 spheres
  7. mn,mx=Vector3(-0.1,-0.1,-0.1),Vector3(0.1,0.1,0.1)
  8. thick = 0 # thickness used for walls (not so important)
  9. compFricDegree = 1 # to generate a super dense specimen
  10. wall_velocity = 0.5
  11.  
  12. rate=0.01
  13. damp=0.06
  14.  
  15. local_damping  = 0.006
  16.  
  17. ## create material
  18. O.materials.append(FrictMat(young=50e6,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
  19. O.materials.append(FrictMat(young=50e6,poisson=0.5,frictionAngle=0,density=0,label='walls'))
  20.  
  21. ## create walls around the packing
  22. walls=utils.aabbWalls([mn,mx],thickness=thick,oversizeFactor=2,material='walls')
  23. wallIds=O.bodies.append(walls)
  24.  
  25. sp=pack.SpherePack()
  26. sp.makeCloud(mn,mx,0.005,0.3,num_spheres,False,0.8,seed=1)
  27. O.bodies.append([sphere(c,r,material='spheres') for c,r in sp])
  28.  
  29. volume = (mx[0]-mn[0])*(mx[1]-mn[1])*(mx[2]-mn[2])
  30. mean_rad = pow(0.09*volume/num_spheres,0.3333)
  31.  
  32. O.dt=.5*utils.PWaveTimeStep()
  33. O.usesTimeStepper=True
  34.  
  35. triax=TriaxialStressController(
  36.     maxMultiplier         =1.001,
  37.     finalMaxMultiplier    =1.000001,      
  38.     thickness             = thick,
  39.     radiusControlInterval =10,
  40.     stressMask            = 7,
  41.     max_vel               =0.01,
  42.     strainDamping         =0.75,
  43.     stressDamping         =0.01
  44. )
  45.  
  46. O.engines=[
  47.         ForceResetter(),
  48.         InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
  49.         InteractionLoop(
  50.             [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  51.             [Ip2_FrictMat_FrictMat_CapillaryPhys(label='capillary_phys')],
  52.             [Law2_ScGeom_FrictPhys_CundallStrack(label='cundall_law')]  #for linear model only
  53.         ),
  54.         Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=1000.0,label='cap_law'),#for linear model only
  55.         GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8, defaultDt=4*utils.PWaveTimeStep()),
  56.         triax,
  57.         NewtonIntegrator(damping=local_damping,gravity=(0,0,0))
  58.     ]
  59.  
  60. cap_law.dead=False
  61. cundall_law.neverErase=True
  62. triax.internalCompaction = True
  63.  
  64. from yade import qt
  65.  
  66. triax.stressMask = 7
  67. triax.goal1 = 5000
  68. triax.goal2 = 5000
  69. triax.goal3 = 5000
  70. qt.View()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement