← Back to team overview

yade-users team mailing list archive

Re: [Question #691171]: add uniform fibers to the cylinder-shape specimen

 

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

    Status: Answered => Open

onyourself is still having a problem:
hi,

1)Is there a geom module that can be used to simulate fiber? it should be deformable(shear force need be applied on it) and look like a fiber(cylinder would be fine, i used facetcylinder before then i found it cant deform… )
2)the specimen should be cylinder shape. i wonder how specimens can be isotropically consolidated to pressures of 50 kPa, 100 kPa, 200 kPa and 300 kPa. ususlly the pressures are applied by wall and i think that cylinder dont have side ?
3)i need to observe the stress–dilatancy relationship of specimen so the exteral surface should be deformable too,what kind of geom module/material should i use?

my script is below, it's totally a mess…

##########
from yade import pack

###############
#cubic generate 
###############

def randomOrientation():
   # from the source code of Quaternion::UnitRandom()
   # https://eigen.tuxfamily.org/dox-devel/Quaternion_8h_source.html
   from random import random as r
   u1 = r()
   u2 = r() * pi
   u3 = r() * pi
   a = sqrt(1 - u1)
   b = sqrt(u1)
   return Quaternion(a*sin(u2),a*cos(u2),b*sin(u3),b*cos(u3))

# create loose spherical packing using makeCloud
sp = yade.pack.SpherePack()
mi,ma = (0,0,0),(0.2,0.2,0.2)
nCyls,nSphs = 2350,50000
sp.makeCloud(mi,ma,rMean=0.006,num=nCyls) # makeCloud for cylinders
sp.makeCloud(mi,ma,rMean=0.0011,rRelFuzz=.0005,num=nSphs) # makeCloud for spheres
for i,(pos,radius) in enumerate(sp):
    if i < nSphs: 
      O.bodies.append(sphere(pos,radius)) 
      for i in O.bodies:
    #if i < nSphs:
        i.shape.color=(0,0.5,0.5)
    else:
      O.bodies.append(geom.facetCylinder(center=pos,height=0.012,radius=0.0015,orientation=randomOrientation(),segmentsNumber=10,wallMask=7))
    
    #if i < nCyls: # add cylinder
     # O.bodies.append(geom.facetCylinder(center=pos,height=0.012,radius=0.0015,orientation=randomOrientation(),segmentsNumber=10,wallMask=7))
      #for i in O.bodies:
    #if i < nSphs:
       # i.shape.color=(0,0,1)
   # else: # add sphere
    #  O.bodies.append(sphere(pos,radius))    

##########
#predicate
##########

#pred = pack.inCylinder((0.04,0.04,0),(0.04,0.04,0.08),0.0391) # predicate for a cylinder
#for (pos,radius) in sp:
#	if pred(pos,radius): O.bodies.append(sphere(pos,radius))

################
#certain content
################

#spheres = [b for b in O.bodies if isisntance(b.shape,Sphere)]
#massSpheres = sum(b.state.mass for b in spheres)
#cylinders = [b for b in O.bodies if isisntance(b.shape,Cylinder)]
#massSCylinders = sum(b.state.mass for b in cylinders)

#x = massSCylinders/massSpheres
#for i,(pos,radius) in enumerate(sp):
 #   if x < 0.35: # 35%
   
#mass = 0.0
#for b in O.bodies:
# if cyl(b.state.pos): # b is inside cyl1
#    mass += b.state.mass


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

O.materials.append(FrictMat(young=15e6,poisson=.4,frictionAngle=radians(30),density=2600,label='spheres'))
O.materials.append(FrictMat(young=15e6,poisson=.4,frictionAngle=0,density=0,label='frictionless'))

walls=aabbWalls(thickness=1e-10,material='frictionless')
wallIds=O.bodies.append(walls)

triax=TriaxialCompressionEngine(
	wall_bottom_id=wallIds[2],
	wall_top_id=wallIds[3],
	wall_left_id=wallIds[0],
	wall_right_id=wallIds[1],
	wall_back_id=wallIds[4],
	wall_front_id=wallIds[5],
	internalCompaction=False,
	sigmaIsoCompaction=-50e3,
	sigmaLateralConfinement=-50e3,
	max_vel=10,
	strainRate=0.01,
	label="triax"
)

O.engines=[
	ForceResetter(),
	InsertionSortCollider([
		Bo1_Sphere_Aabb(),
		Bo1_GridConnection_Aabb()]),
	InteractionLoop([
       		Ig2_Sphere_Sphere_ScGeom(),
		Ig2_GridNode_GridNode_GridNodeGeom6D(),
		Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
	],
	[
		Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),	# internal cylinder physics
		Ip2_FrictMat_FrictMat_FrictPhys()	# physics for external interactions, i.e., cylinder-cylinder interaction
	],
	[  	Law2_ScGeom_FrictPhys_CundallStrack(),
		Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),	# contact law for "internal" cylinder forces
		Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()	# contact law for cylinder-cylinder interaction
	]
	),
	## We will use the global stiffness of each body to determine an optimal timestep (see https://yade-dem.org/w/images/1/1b/Chareyre&Villard2005_licensed.pdf)
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	triax,
	#TriaxialStateRecorder(iterPeriod=100,file='WallStresses'),
	NewtonIntegrator(damping=.4)
]


Gl1_Sphere.stripes=1
#if nRead==0: yade.qt.Controller(), 
yade.qt.View()

#######################################
###   APPLYING CONFINING PRESSURE   ###
#######################################

#triax.goal1=triax.goal2=triax.goal3=-10000

#while 1:
 # O.run(10, True)
  #the global unbalanced force on dynamic bodies, thus excluding boundaries, which are not at equilibrium
  #unb=unbalancedForce()
  #print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
  #if unb<stabilityThreshold and abs(-10000-triax.meanStress)/10000<0.001:
   # break

#O.save('confinedState'+key+'.yade.gz')
#print "###      Isotropic state saved      ###"

############

thanks
xxxe

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