← Back to team overview

yade-users team mailing list archive

[Question #707027]: How to combine 'FrictMat' with 'JCFpmMat'?

 

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

Hi, everyone!
I am preparing triaxial samples. I want to study the process of gradual transition from granular materials to continuum materials (many particles — a whole rock). I will bond a part of particles ) randomly (0-100%, 0 means no bonded contact, and 100% means all particles are bonded into a rock.
The material properties of particles are different. A part of particles are cohesionless (set by ‘FrictMat’) and the other part is set by ‘JCFpmMat’. However, I met the following error and I didn’t know how to handle this.

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

Here is my script.

> ### Positon.txt (file name)
#format x_y_z_r
0.0423719	0.0423718	0.00762624	0.00762937
0.0368311	0.00762414	0.0218373	0.00762937
0.0109732	0.0274949	0.0423726	0.00762937
0.0423729	0.0196072	0.0294726	0.00762937
0.00762888	0.0076284	0.0237511	0.00762937
0.0423757	0.021344	0.0143142	0.00762937
0.0423732	0.0423786	0.0381319	0.00762937
0.0423707	0.00762926	0.0389254	0.00762937
0.0277218	0.042376	0.0423756	0.00762937
0.00762825	0.0221316	0.028487	0.00762937
0.0183669	0.02929	0.020351	0.00762937
0.00762204	0.00983953	0.00762463	0.00762937
0.0293079	0.0172139	0.00762398	0.00762937
0.0308355	0.0323899	0.00762729	0.00762937
0.0204724	0.00761678	0.0155146	0.00762937
0.0076186	0.012617	0.0423748	0.00762937
0.0158864	0.037335	0.00762595	0.00762937
0.0423768	0.0423791	0.022879	0.00762937
0.0244463	0.0292061	0.0354264	0.00762937
0.0423718	0.00762923	0.00762641	0.00762937
0.0176763	0.0421088	0.030898	0.00762937
0.025848	0.042379	0.0180193	0.00762937
0.00762741	0.0423712	0.0194226	0.00762937
0.0333746	0.0300839	0.022991	0.00762937
0.0423771	0.0277384	0.0423761	0.00762937
0.0257761	0.0172419	0.0260697	0.00762937
0.0208973	0.00761264	0.036825	0.00762937
0.0311736	0.0174043	0.0423743	0.00762937
0.00762717	0.0423745	0.0423721	0.00762937
0.00762815	0.0248273	0.0104743	0.00762937

> ### The script:

# packing (previously constructed)
PACKING='Position.txt'

from yade import pack, timing,ymport
############################################
###   DEFINING VARIABLES AND MATERIALS   ###
############################################

## Sphere material
Young=300e6
Density=2650
Poisson=0.3
compFricDegree = 0
finalFricDegree = 27
AvgRadius=0.0002

intR=1.25
TENS=0.1e6
COH=0.45e6

## wall material
WYoung=600e7
WPoisson=0.5
WDensity=0
WFrictionAngle=0

damp=0.7

# corners of the initial packing
size=0.05
mn,mx=Vector3(0,0,0),Vector3(size,size,size) 


O.materials.append(FrictMat(young = WYoung , poisson = WPoisson , frictionAngle = radians(WFrictionAngle) , density = WDensity,label='walls'))

mat1=JCFpmMat(type=1,young = Young , poisson = Poisson , frictionAngle = radians(compFricDegree),density = Density,tensileStrength=TENS,cohesion=COH,label='spheres1')
mat_1=O.materials.append(mat1)
mat2=FrictMat(young = Young , poisson = Poisson , frictionAngle = radians(compFricDegree),density = Density,label='spheres2')
mat_2=O.materials.append(mat2)


walls=aabbWalls([mn,mx],thickness=0.001,material='walls')
wallIds=O.bodies.append(walls)

O.bodies.append(ymport.text(PACKING,scale=1.,shift=Vector3(0,0,0)))

sphere1=[]
sphere2=[]
for b in O.bodies:
  if not isinstance(b.shape,Sphere):
    continue
  if random.random() < 0.2:
    b.mat = mat1
    b.shape.color = (1,0,0)
    sphere1.append(b.id)
  else:
    b.mat = mat2
    b.shape.color = (0,1,1)
    sphere2.append(b.id)



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

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

newton=NewtonIntegrator(damping=damp)

###################################################
###   REACHING A SPECIFIED POROSITY PRECISELY   ###
###################################################

triax.goal1=triax.goal2=triax.goal3=-100000
setContactFriction(radians(finalFricDegree))
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb(aabbEnlargeFactor=intR,label='Saabb')]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR,label='SSgeom'),Ig2_Box_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')],
                [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='interactionLaw'),Law2_ScGeom_FrictPhys_CundallStrack()]
	),
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	triax,
	newton
]


while 0:
  O.run(1000, True)
  unb=unbalancedForce()
  print ('unbalanced force:',unb,' mean stress: ',triax.meanStress," porosity:",triax.porosity,)
  if unb<0.000001 and abs(-100000-triax.meanStress)/100000<0.001:
    break

O.save('2.yade.gz')
O.save('2.yade.bz2')
print("###      Isotropic state saved      ###")

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