← Back to team overview

yade-users team mailing list archive

Re: [Question #269315]: swap failure in InteractionLoop

 

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

    Status: Answered => Open

behzad is still having a problem:

Hi Jan,

This is the link to the codes:

https://www.dropbox.com/sh/vkqpimkrjr56yic/AADDihKwYjo7MQ0MFAZzZac5a?dl=0


and my Python script is:

=====================================
=====================================

O.reset()
from yade import utils, plot
from yade import pack, qt


id_Mat1=O.materials.append(CohBurgersMat(kmn=2.0e8,kkn=1.0e8,cmn=3e8,ckn=3e8,
kms=2.0e8,kks=1.0e8,cms=3e8,cks=3e8,normalCohesion= 1e25, shearCohesion= 1e23, isCohesive= True, young=2e8,
density=2600, poisson=0.3, frictionAngle= 0.4))
Mat1=O.materials[id_Mat1]


id_Mat3=O.materials.append(CohFBMat(kmn=2.0e8,kkn=1.0e8,cmn=3e8,ckn=3e8,
kms=2.0e8,kks=1.0e8,cms=3e8,cks=3e8,normalCohesion= 1e25, shearCohesion= 1e23, isCohesive= True, young=2e8,
density=2600, poisson=0.3, frictionAngle= 0.4))
Mat3=O.materials[id_Mat3]


id_Mat2=O.materials.append(CohFrictMat(young=2.0e8,poisson=0.3,density=1000,frictionAngle=1,isCohesive= True,
normalCohesion= 1e25, shearCohesion= 1e23))
Mat2=O.materials[id_Mat2]


s1=utils.sphere([0.0,0.0,0.0],0.01,fixed=True,material=Mat3)
s2=utils.sphere([0.0,0.0,2.0e-2],0.01,fixed=False,material=Mat1)

O.bodies.append(s1)
O.bodies.append(s2)


O.engines=[
ForceResetter(),
ForceEngine(force=(0,0,2e1),ids=[1],label='fEngine'),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D()],
[Ip2_CohFBMat_CohBurgersMat_CohBurgersPhys(setCohesionNow=True, setCohesionOnNewContacts=True),
Ip2_CohBurgersMat_CohFBMat_CohBurgersPhys(setCohesionNow=True, setCohesionOnNewContacts=True)],
[Law2_ScGeom6D_CohBurgersPhys_CohesiveBurgers(),Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,0]),
PyRunner(command="fEngine.force=(0,0,0)", iterPeriod=5000000),
PyRunner(command='AutoData()',iterPeriod=150000)
]


def AutoData():
	f_app=2e1
	t_loading=5
	cmn=6e6
#	kmn=4.0e6 
	kmn=2.0e6 # in case of CohFrictMat-CohBurgersMat in series
	kkn=2.0e6
	ckn=6e6
	j1= 1/kmn
	j2= 1/kkn
	j3= kkn/ckn
	j4= 1/cmn
	a1= cmn/kmn+cmn*(1.0/kmn+1/kmn)
	a2=cmn*cmn/(kmn*kmn)
	b1= cmn
	b2=cmn*cmn/kmn
	z1=(-a1+sqrt(a1*a1-4.0*a2))/(2.0*a2)
	z2=(-a1-sqrt(a1*a1-4.0*a2))/(2.0*a2)
	aa1=(b2*z1+b1)/a2/(z1-z2)
	aa2=(b2*z2+b1)/a2/(z2-z1)
	if O.time < t_loading:
		displacement=f_app*(j1+j2*(1-exp(-(O.time)*j3))+(O.time)*j4)
	else:
		displacement=f_app*((t_loading/cmn)+j2*(exp(-(O.time)*j3))*(exp((t_loading)*j3)-1));
	
        plot.addData(t=O.time,d_numerical=-(0.02-(O.bodies[s2.id].state.pos[2])),d_analytical=displacement)


plot.plots={'t':(('d_numerical',('d_analytical','^:'),))}
plot.plot()

O.dt=1e-6

qt.View()

===================================
===================================


as for "forgotten switch of FUNCTOR2D arguments", I didn't put any kind of switch!

Regards,


Thanks for the comments.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.