New question #706072 on Yade:
https://answers.launchpad.net/yade/+question/706072

Hi, I am new to yade. plz help me removing the following error. 

My problem description- It is basically a simple shear problem. Firstly 
isometric compression is done to prepare the sample by compacting. Periodic 
boundary conditions were used. Then a plate in the form of wall is applied at 
the top and normal loading is applied by velocity gradient tensor. After it 
reaches the defined value then shear is applied by distorting the cell. I know 
i am doing some mistake but unable to catch it up. please help me in finding 
the same. Script is attacted.

Error- python3.10: ./pkg/common/InsertionSortCollider.cpp:779: bool 
yade::InsertionSortCollider::spatialOverlapPeri(yade::Body::id_t, 
yade::Body::id_t, yade::Scene*, yade::Vector3i&) const: Assertion `maxima[3 * 
id2 + axis] - minima[3 * id2 + axis] < .99 * dim' failed.
Aborted (core dumped)
 
Script- 

# setup the periodic boundary
from __future__ import print_function
O.periodic = True
O.cell.hSize = Matrix3(2, 0, 0, 0, 2, 0, 0, 0, 2)

# CREATION OF PARTICLES
from yade import pack, qt

#Define Material- E=7*e8, poisson=0.25, friction angle=31 degree(0.541 
radians), density=2650kg/m^3
O.materials.append(FrictMat(young=7e8,poisson=.25,frictionAngle=.541, 
density=2650, label="soil"))

# create cloud of spheres and insert them into the simulation
# we give corners, mean radius, radius variation, material
sp = pack.SpherePack()
sp.makeCloud((0, 0, 0), (2, 2, 2), periodic=True, rMean=0.05, rRelFuzz=0.2, 
seed=10)
# insert the packing into the simulation
sp.toSimulation(material="soil")   

# create "dense" packing by setting friction to zero initially
O.materials[0].frictionAngle = 0

# simulation loop (will be run at every step)
O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb()]),
        InteractionLoop(
                # interaction loop
                [Ig2_Sphere_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_MindlinPhys()],
                [Law2_ScGeom_MindlinPhys_Mindlin()]                
        ),
        NewtonIntegrator(damping=.4),
        PyRunner(command='checkStress()', iterPeriod=100, label='checker')      
 
]
O.dt = .7 * PWaveTimeStep()

# prescribe isotropic normal deformation (constant strain rate)
O.cell.velGrad = Matrix3(-.1, 0, 0, 0, -.1, 0, 0, 0, -.1)
qt.View()

# when to stop the isotropic compression 
limitMeanStress = -1000

#Regenerating the friction
O.materials[0].frictionAngle = .54 
        
def checkStress():
        # stress tensor as the sum of normal and shear contributions
        # Matrix3.Zero is the intial value for sum(...)
        stress = getStress().trace()/3.
        print('Stress at', O.iter, '=', stress) 
        # if mean stress is below (bigger in absolute value) limitMeanStress, 
start shearing
        if stress < limitMeanStress:
                O.bodies.append(wall(max([b.state.pos[2] + b.shape.radius for b 
in O.bodies if isinstance(b.shape, Sphere)]), axis=2, sense=-1))
                global plate 
                plate = O.bodies[-1]  # the last particles is the plate
                # plate moves downwards by giving velocity gradient
                plate.state.vel = (0, 0, -.1)
                checker.command='stopplate()'
                
#Apply oedometric compression by applying velocity over a plate/wall

def stopplate():
        force= O.forces.f(plate.id)[2]
        print('Force on plate=', force)
        # if the force on plate exceeds maximum load, start unloading
        if O.forces.f(plate.id)[2]> 1e5:
                plate.state.vel = (0, 0, 0)
                print('Plate stops and Distortion is applied at 0.1 strain 
rate')
                #Apply Distorsion
                O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0)    
                checker.command = 'checkDistorsion()'
        
def checkDistorsion():
        # if the distorsion value is >.5, exit; otherwise do nothing
        if abs(O.cell.trsf[0, 2]) > .5:
                O.pause()
                print('Distortion of cell exceeds 0.5') 

Gl1_Sphere.stripes = True
O.saveTmp()


NOTE: Error mainly comes after isometric compression

Thank you in advance.

-- 
You received this question notification because your team yade-users 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