← Back to team overview

yade-users team mailing list archive

[Question #676746]: JCFpmState Error

 

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

In the name of God
Dear all

When i trying to replace my spheres in a triaxial test by clumps with the material of JCFpmMat, i encounter this error:

RuntimeError: Body #14: Body::material type JCFpmMat doesn't correspond to Body::state type State (should be JCFpmState instead).

Please note that with no replacement with clumps, there is no problem. The other point is that if i reduce the Rmean to generate more spheres, then script would not be run. Any idea?!

the MWE is as following:


from yade import pack,plot
from yade import export, ymport
import random
from yade import utils

############################################
### DEFINING VARIABLES AND MATERIALS ###
############################################

key='_Triax-J2_'
intRadius= 1

mn,mx=Vector3(0,0,0),Vector3(.1,.1,.1) # corners of the initial packing

## create materials for spheres and plates
id_Mat=O.materials.append(JCFpmMat())
Mat=O.materials[id_Mat]

#frictionless walls
O.materials.append(FrictMat(label='walls'))

## create walls around the packing
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

## use a SpherePack object to generate a random loose particles packing
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=.029,rRelFuzz=0.0,periodic=False,num=5000)
O.bodies.append([sphere(c,r,material=Mat) for c,r in sp])


relRadList1=[1,1]
relPosList1=[[0,0,0],[.5,.5,.5]]
templates= []
templates.append(clumpTemplate(relRadii=relRadList1,relPositions=relPosList1))
O.bodies.replaceByClumps(templates,[1.0], discretization=5)
        

###########################
## DEFINING ENGINES ###
###########################

triax=TriaxialStressController(
 thickness = 0,
 stressMask = 7,
 internalCompaction=False,
)

newton=NewtonIntegrator(damping=.2, gravity=[0,0,0])
########################################
#Modified engine
##################################
O.engines=[
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius),Bo1_Box_Aabb()]),
        InteractionLoop(
                [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius),Ig2_Box_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=10, label='jcf')],
                [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=True,label='interactionLaw', recordCracks=True),Law2_ScGeom_FrictPhys_CundallStrack()]
        ),
        GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
        triax,
        TriaxialStateRecorder(iterPeriod=100,file='J2_Triaxial,'+key),
        newton
]

triax.goal1=triax.goal2=triax.goal3=-150000
O.step()

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