← Back to team overview

yade-users team mailing list archive

[Question #679314]: Reset Interactions

 

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

Hello Everyone,

I'm trying to model a uniaxial compression of a concrete cylinder. First I create the cylinder as a cloud of spheres in a cylindrical facet and compress it to a certain porosity. Then I remove the facet and start the uniaxial compression. I'm using CPM material model. The problem is that after achieving the desired porosity, all the bonds between the spheres is already damaged. I want to reset the interactions and change material properties (i.e. young, friction angle..etc) before starting the uniaxial compression. I tried doing that using O.interactions.clear() but the spheres explode. Can anyone please help? My code is below.

Thank you,
Othman

PS: I tried doing the compaction to a certain porosity in a different code and export the compacted spheres as a txt file and then import it in another code for uniaxial compression but didn't work because porosity was reset to the original cloud porosity. If anyone know how to export then import without loosing the applied compaction, it will make life much easier. Thanks   



-------------------------------------------------------
from yade import pack

targetp = .45 ##specify the targeted porosity

##specimen geometry
radiuscyl=.05
heightcyl=.203*3
SphereRadius = .0045
# material parameters
E=1e6 #initial young modulus is low so that compaction is faster
poiss=.15
eps=1e-4
strength=2e5

concrete=O.materials.append(CpmMat(young = E, poisson = poiss,frictionAngle = atan(.2), epsCrackOnset = eps, relDuctility = 30, sigmaT = strength))



################ spheres ################

sp=pack.SpherePack()											
sp.makeCloud((0,0,0),(.3,.3,0.7),rMean=SphereRadius,rRelFuzz=.3,periodic=True,seed=1) 					
#### cylinder extraction 										
pred=pack.inCylinder((.2,.2,0),(.2,.2,heightcyl),radiuscyl) 							
spFilter=filterSpherePack(pred,sp,Material=concrete, returnSpherePack=True)				
spFilter.toSimulation(color=(1,0.5,0.2))


################ facet ################

facets=geom.facetCylinder((.2,.2,heightcyl/2),radiuscyl,heightcyl,segmentsNumber=50,wallMask=4)

cylinder=O.bodies.append(facets)
yade.qt.View()


##creating disks 

d1=geom.facetCylinder((.2,.2,heightcyl),radiuscyl-.001,0,segmentsNumber=50,wallMask=1)
d2=geom.facetCylinder((.2,.2,0),radiuscyl-.001,0,segmentsNumber=50,wallMask=1)

disk1IDs= O.bodies.append(d1)
disk2IDs= O.bodies.append(d2)

for i in disk1IDs:
	body= O.bodies[i]
	body.state.vel = (0,0,-0.15)

for n in disk2IDs:
	body= O.bodies[n]
	body.state.vel = (0,0,0.15)


################ Compaction ################
O.dt=.5*utils.PWaveTimeStep()
enlargeFactor=1.5
O.engines=[
	ForceResetter(),
	InsertionSortCollider([
		Bo1_Sphere_Aabb(aabbEnlargeFactor=enlargeFactor,label='bo1s'),
		Bo1_Facet_Aabb()
	]),
	InteractionLoop(
		[
			Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=enlargeFactor,label='ss2d3dg'),
			Ig2_Facet_Sphere_ScGeom(),
		],
		[
			
			Ip2_CpmMat_CpmMat_CpmPhys(),
			Ip2_CpmMat_CpmMat_CpmPhys(),
		],
		[
			
			Law2_ScGeom_CpmPhys_Cpm(),
		],
	),

	NewtonIntegrator(damping=.3),
	CpmStateUpdater(realPeriod=.5), 

	PyRunner(iterPeriod=500,command='stop()'),

]
O.step()
# reset interaction detection enlargement
bo1s.aabbEnlargeFactor=ss2d3dg.interactionDetectionFactor=1.0

O.run()  

################ Uniaxial compression ################
def stop():
   if utils.porosity()<targetp:
	O.pause()
	print 'Finished'
	print ('porosity = ', utils.porosity())
	for i in cylinder: O.bodies.erase(i)
	print ('unbalanced forces = ', utils.unbalancedForce())
	utils.calm()
	O.interactions.clear()
	O.step()	
	for i in O.interactions:
		i.phys.young=1e9 # update young modulus
	#start uniaxial compression
	for b in disk1IDs:
		body= O.bodies[b]
		body.state.vel = (0,0,-0.009)
	for n in disk2IDs:
		body= O.bodies[n]
		body.state.vel = (0,0,0.009)

	O.run()



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