← Back to team overview

yade-users team mailing list archive

Re: [Question #261724]: Interaction of FrictMat and a new class of material

 

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

Jan Stránský proposed the following answer:
Hi Behzad,

thanks for files. I compiled them and used your py file, with no problem at
all :-)

cheers
Jan

######################################################################
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= 1e13, shearCohesion=
1e13, isCohesive= True, young=1e2,
density=2600, poisson=0.3, frictionAngle= 0.4))
Mat1=O.materials[id_Mat1]

id_Mat2=O.materials.append(FrictMat(young=1.0e8,poisson=0.3,density=1000,frictionAngle=1))
Mat2=O.materials[id_Mat2]

if 0: # works for both 0 and 1
s1=utils.sphere([0.0,0.0,0.0],0.01,fixed=True,material=Mat2)
s2=utils.sphere([0.0,0.0,2.0e-2],0.01,fixed=False,material=Mat1)
else:
s1=utils.sphere([0.0,0.0,0.0],0.01,fixed=True,material=Mat1)
s2=utils.sphere([0.0,0.0,2.0e-2],0.01,fixed=False,material=Mat2)

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

O.engines=[
ForceResetter(),
ForceEngine(force=(0,0,-2e4),ids=[1],label='fEngine'),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_CohBurgersMat_CohBurgersPhys(),Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys()],
[Law2_ScGeom_CohBurgersPhys_CohesiveBurgers()]
),
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=2e4
t_loading=5
cmn=3e8
# kmn=2.0e8
kmn=0.66666667e8
kkn=1.0e8
ckn=3e8
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()
######################################################################



2015-02-20 21:26 GMT+01:00 behzad <question261724@xxxxxxxxxxxxxxxxxxxxx>:

> Question #261724 on Yade changed:
> https://answers.launchpad.net/yade/+question/261724
>
> behzad posted a new comment:
> Hi Jan,
>
> Here you go!
>
> https://www.dropbox.com/s/xs5jr936d2lamus/CohBurgers.7z?dl=0
>
> You've got the hpp and cpp files and a script file showing an example of
> interactions of CohBurgersMat and also a readme file which explains the
> material and the problem.
>
> Cheers,
> Behzad
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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