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

Alexander gave more information on the question:
Also the last MWE:


import __builtin__
from yade import export

###################################################
# define materials and model configuration

E = 5.2e11#0.65e11#1.338e11#2e11 # Young's modulus of model need to be 
calibrated
v = 0.3# Poisson's ratio
P = 150e6 # initial pressure value
d = 7850 # density

r = 0.25 # spheres radius

# Enlarge interaction radius between spheres using "interaction_radius" 
parameter (for example in uniax.py this value is 1.5)
interaction_radius = 1.5

F = P*r

# define plate material, create "dense" packing by setting friction to zero 
initially
O.materials.append(CpmMat(young=E,
                                              frictionAngle=0,
                                                  poisson=v,
                                                  density=d,
                                                  sigmaT=3.5e6,
                                                  epsCrackOnset=1e-4,
                                                  neverDamage=True,
                                                  isoPrestress=0,
                                                  relDuctility=30,
                                                  label = 'mat'))
        
# represent plate like a set of regular monosized set of spheres 
# also set boundary conditions via predefined tensile force for spheres on ABCD 
and
# fixed spheres on KGHO
O.bodies.append(pack.regularOrtho(pack.inAlignedBox((0,0,0),(16.1,16.1,2.1)),r,0))
for b in O.bodies:
    id = b.id
    if b.state.pos[1]+r > 15.9:
      O.forces.addF(id,(0,F,0),permanent=True) 
    if b.state.pos[1]-r < 0.1:
      O.forces.addF(id,(0,-F,0),permanent=True) 


###################################################
# define engines

# simulation loop 
O.engines=[
 ForceResetter(),
 
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=interaction_radius,label='bo1s')]),
 InteractionLoop(
        
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=interaction_radius,label='ig2ss')],
    [Ip2_CpmMat_CpmMat_CpmPhys()], 
    [Law2_ScGeom_CpmPhys_Cpm()] 
 ),
 CpmStateUpdater(realPeriod=1),
 NewtonIntegrator(damping=0.4)
]
         
###################################################
# start simulation and compute strain and stress
   
# try to run script with qt graphical interface
try:
   yade.qt.Controller(), yade.qt.View()  
except:
   print 'Qt graphical interface is not avaliable'
   
# set the integration timestep to be 1/2 of the "critical" timestep
O.dt=.5*utils.PWaveTimeStep() 

# run one single step
O.step()

# reset interaction radius to the default value
bo1s.aabbEnlargeFactor=1.0
ig2ss.interactionDetectionFactor=1.0

# run simulation, until static equilibrium will not reached
while unbalancedForce()>1e-2:
   O.run(10,True)

# compute stress tensor for each body
stresses = bodyStressTensors() 

###################################################
# save data to vtk. file
__builtin__.my_stresses = stresses 
vtk = export.VTKExporter('result')
vtk.exportSpheres(what=[('radius','b.shape.radius'),('displacement','b.state.displ()'),('stress','my_stresses[b.id]')])

-- 
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     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to