← Back to team overview

yade-users team mailing list archive

Re: [Question #314841]: Cannot figure out how to use 2D TriaxialStressController

 

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

James X posted a new comment:
As a general note for future reference, I needed to include
"Bo1_Box_Aabb()" in 'InsertionSortCollider' and 'Ig2_Box_Sphere_ScGeom'
in 'InteractionLoop'.

Full code below:

import time
from yade import utils

#other random parameters
start = time.time()

###volume parameters
Sradius = 1
xSize = 4
ySize = 2
youngs = 30e9

#define and append the material
def mat_1(): return JCFpmMat(type=1,young=youngs,poisson=0.3,frictionAngle=radians(30),density=3000,tensileStrength=1.23e8,cohesion=1.23e8,jointNormalStiffness=1e7,jointShearStiffness=1e7,jointCohesion=1e6,jointFrictionAngle=radians(20),jointDilationAngle=0.0) 

def mat_wall(): return
JCFpmMat(type=1,young=youngs*10,poisson=0.3,frictionAngle=radians(30),density=3000,tensileStrength=1.23e9,cohesion=1.23e9,jointNormalStiffness=1e8,jointShearStiffness=1e8,jointCohesion=1e7,jointFrictionAngle=radians(20),jointDilationAngle=0.0)

O.materials.append((mat_wall()))
O.materials.append((mat_1()))

#add in wall information, from uniax.py
mn,mx=Vector3(0,0,0),Vector3(xSize,ySize,Sradius*2) # corners of the initial packing
walls=aabbWalls([mn,mx],thickness=0,material=mat_wall)
wallIds=O.bodies.append(walls)


#Create the two spheres
O.bodies.append(utils.sphere((1,1,Sradius),radius=Sradius,material=mat_1))
O.bodies.append(utils.sphere((3,1,Sradius),radius=Sradius,material=mat_1))

interactionRadius=1.10 # to set initial contacts to larger neighbours
and a bit further

strainRateTension=.0001
triax=TriaxialStressController(
    thickness = 0,
    stressMask = 6, #1 is x, 2 is y, 4 is z, Bitmask, if imposed goal`s are stresses (0 for none, 7 for all, 1 for direction 1, 5 for directions 1 and 3, etc. :ydefault:`7)
    goal1 = strainRateTension,
    goal2 = -0.000001, # positive is tension, negative is compression
    goal3 = -0.000001,
    internalCompaction=False
)


O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=interactionRadius,label='is2aabb'),Bo1_Box_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=interactionRadius,label='ss2d3dg'), Ig2_Box_Sphere_ScGeom()],
		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')],
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(label='interactionLaw')]
	),
	GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.8),
	NewtonIntegrator(damping=0.2,gravity=(0.,0,0.)),
	triax,
	TriaxialStateRecorder(iterPeriod=500,file='WallStresses_test')
]

#### time step definition (low here to create cohesive links without big changes in the assembly)
O.dt=0.05*utils.PWaveTimeStep()

#### set cohesive links with interaction radius>=1
O.step();

#### initializes now the interaction detection factor to strictly 1
ss2d3dg.interactionDetectionFactor=1.0
is2aabb.aabbEnlargeFactor=1.0

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.