ForceEngine on facets and spheres

Asked by Alejandro Jiménez

Hello everyone

I am trying to simulate a triplet shear test for masonry in which I discretize bricks and mortar as spheres and both supports and actuator (vertical displacement) are modeled as boxfacets. In order to simulate such test, a pre-compression force has to be applied in the perpendicular direction (horizontal) to the actuator. I am modelling an extra line of spheres and I am fixing them in order to apply the needed pre-compression force but it seems like such force is not transferred to the spheres of the brick. If I define those load spheres as free and apply the force, the whole model explodes.

What is the correct way to apply forces to either spheres or boxfacets and to make those bodies interact with other static bodies to transfer the applied loads?

Thanks in advance for your help.

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hello,

You may give a look to "addF" and "setPermF" functions of the ForceContainer (O.forces from the python interface). See
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addF and below

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello Alejandro,

please read [1], especially point 3. There are several possible reasons for
your problems and several options how to apply force. The correct way
depends on circumstances in your script.

Model explosion is usually because of too high time step.

cheers
Jan

[1] https://yade-dem.org/wiki/Howtoask

2016-05-16 21:17 GMT+02:00 Alejandro Jiménez <
<email address hidden>>:

> New question #293790 on Yade:
> https://answers.launchpad.net/yade/+question/293790
>
> Hello everyone
>
> I am trying to simulate a triplet shear test for masonry in which I
> discretize bricks and mortar as spheres and both supports and actuator
> (vertical displacement) are modeled as boxfacets. In order to simulate such
> test, a pre-compression force has to be applied in the perpendicular
> direction (horizontal) to the actuator. I am modelling an extra line of
> spheres and I am fixing them in order to apply the needed pre-compression
> force but it seems like such force is not transferred to the spheres of the
> brick. If I define those load spheres as free and apply the force, the
> whole model explodes.
>
> What is the correct way to apply forces to either spheres or boxfacets and
> to make those bodies interact with other static bodies to transfer the
> applied loads?
>
> Thanks in advance for your help.
>
>
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Alejandro Jiménez (aljr-2801) said :
#3

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()

Revision history for this message
Jan Stránský (honzik) said :
#4

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 <
<email address hidden>>:

> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Alejandro Jiménez for more information if necessary.

To post a message you must log in.