yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12723
Re: [Question #293790]: ForceEngine on facets and spheres
Question #293790 on Yade changed:
https://answers.launchpad.net/yade/+question/293790
Status: Open => Answered
Jan Stránský proposed the following answer:
Hi Alejandro,
1) facets are "fixed" by default. Put 'fixed':False into kwBoxes
2) facets has 0 mass and inertia by default (does not matter if they are
fixed, matters a lot if they are not fixed as then there would be zero
division). Use following code after creation of load_right and load_left:
###################
for i in left_load + right_load:
b = O.bodies[i]
b.state.mass = 1 # or other suitable value
b.state.inertia = (1,1,1) # or other suitable value
###################
cheers
Jan
2016-05-17 14:32 GMT+02:00 Alejandro Jiménez <
question293790@xxxxxxxxxxxxxxxxxxxxx>:
> Question #293790 on Yade changed:
> https://answers.launchpad.net/yade/+question/293790
>
> Status: Answered => Open
>
> Alejandro Jiménez is still having a problem:
> Thank you both for your answers and I am sorry I didn't provide any
> example before, this is my first question in the forum. Here it is now,
> to better clarify my point, you can see that there is no contact and
> therefore no load transfer between the lateral boxfacets and the
> spheres:
>
> ###Import libraries
> from yade import geom,pack,plot
>
>
> ###Materials definition
> mat_bri = O.materials.append(CpmMat(young=9.792e9, #[Pa]
> frictionAngle=radians(30),
> #[rad] *hint ---> radians(degrees value)
> poisson=.17, #[-]
> density=2000*1.91, #[kg/m3]
> sigmaT=2e6, #Initial
> cohesion [Pa]
> relDuctility=100, #Ductility
> of bonds in normal direction
> epsCrackOnset=2.38e-4))
>
> ##Facet material
> mat_fac = O.materials.append(FrictMat(young=210e9, poisson=.15,
> density=3000, frictionAngle=1))
>
> ##Box material
> kwBoxes = {'color':[1,1,0],'wire':False,'dynamic':False, 'material':1}
>
> ###Geometry definition
> ##Wall geometry parameters
> r=.0025
> pComp = 1e6 #Pre-compression in Pa
>
>
> spheres=[]
> for i in range(0, trunc(.2*10000-r*10000), trunc(r*20000)):
> for k in range(0, trunc(.3*10000-r*10000),trunc(r*20000)):
>
> O.bodies.append(sphere([r+i/10000.,0.0,r+k/10000.],radius=r,
> material=mat_bri))
>
>
> left_load = O.bodies.append(utils.geom.facetBox((.225,0,.15),
> Vector3(.025,r/2.,.15), orientation=Quaternion((1,0,0),0), wallMask=63,
> **kwBoxes))
>
> right_load = O.bodies.append(utils.geom.facetBox((-.025,0,.15),
> Vector3(.025,r/2.,.15), orientation=Quaternion((1,0,0),0), wallMask=63,
> **kwBoxes))
>
> dis_ele_1 = O.bodies.append(utils.geom.facetBox((.1,0,.325),
> Vector3(.025,r/2.,.025), orientation=Quaternion((1,0,0),0), wallMask=63,
> **kwBoxes))
>
> fix_ele_1 = O.bodies.append(utils.geom.facetBox((.025,0,-.025),
> Vector3(.025,r/2.,.025), orientation=Quaternion((1,0,0),0), wallMask=63,
> **kwBoxes))
>
> fix_ele_1 = O.bodies.append(utils.geom.facetBox((.175,0,-.025),
> Vector3(.025,r/2.,.025), orientation=Quaternion((1,0,0),0), wallMask=63,
> **kwBoxes))
>
>
> ###Engines definition
> O.engines = [ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
>
> InteractionLoop([Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor =
> 1.1),Ig2_Facet_Sphere_ScGeom()],
> [Ip2_CpmMat_CpmMat_CpmPhys(),
> Ip2_FrictMat_CpmMat_FrictPhys(), Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_CpmPhys_Cpm(),
> Law2_ScGeom_FrictPhys_CundallStrack()]),
> ForceEngine(dead = False,
> force = [pComp * r * .01,0,0],
> ids = left_load,
> label = 'precompre_left'),
> ForceEngine(dead = False,
> force = [-pComp * r * .01 ,0,0],
> ids = right_load,
> label = 'precompre_right'),
> NewtonIntegrator(damping=.4,gravity=[0,0,-9.81]),
> CpmStateUpdater(realPeriod=.5),
> TranslationEngine(translationAxis=[0,0,1],
> velocity = -7.e-3,
> ids = dis_ele_1,
> dead = False,
> label='translat'),
> PyRunner(command='CallForce()', iterPeriod=500)
> ]
>
> O.dt = 1e-6
>
> ##Ploting Force against displacement
> def CallForce():
> fc=0
> for b in dis_ele_1:
> fc += O.forces.f(b)[2]
>
> dt = O.time
> disp = dt*7.e-6*1000
> plot.addData(force=fc, displacement=disp)
>
> plot.plots = {'displacement':('force')}
> plot.plot()
>
> --
> You received this question notification because your team yade-users 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 your team yade-users is
an answer contact for Yade.