Avoid boundary effect by using parameter V in getStress() of non-periodic case

Asked by Hien Nguyen

Hello,
I have a question about the getStress() function (utils.getStress()) in my simulation (triaxial test under TriaxialStressController engine)
In fact my model is a box with the size of the box is (-0.1,-0.1,-0.1) and (0.1,0.1,0.1) and the model is non-periodic case.

To extract the internal stress of the specimen, I use getStress(), as I see in the document, for the non-periodic case, the V = 1, so in order to output stress for the whole specimen, it would be:
utils.getStress(boxVolume)
The problem here is I want to avoid the boundary effect so I want to "getStress" of a smaller space inside the specimen, if I do, for example
utils.getStress(boxVolume*0.75), is that a correct to avoid the boundary effect? Because I don't know how V is considered and calculated in this function, can anyone explain?
Thanks in advance.

https://yade-dem.org/doc/yade.utils.html?highlight=getstress#yade._utils.getStress

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Hien Nguyen
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

Unfortunately no it is not.

The getStress() function would in this case still consider all the interactions (in your whole boxVolume), the only difference is that it will use a wrong (because different than boxVolume) value of V in Love-Weber formula.
See : https://github.com/yade/trunk/blob/master/pkg/dem/Shop_02.cpp#L369

 I do not know any mean to achieve your goal, except rewriting your own getStressInAGivenVolume() function.

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Give maybe a look to https://www.yade-dem.org/doc/user.html#micro-stress-and-micro-strain to evaluate the stress in the core of your sample. But it will probably not be straightforward to apply to your question.

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

Hello Nguyen,

the stress is computed according to [1],
stress = (1/V)*sum(f_i*l_j)
where the sum is done over all interactions in the simulation, regardless
volume parameter. The volume parameter is used only to scale the sum
result. so
getStress(boxVolume*0.75) = getStress(boxVolume) / 0.75
and therefore this approach does not solve your problem..

if you want to avoid boundary effects, you can write your own function,
summing forces and branches vectors of only some interactions, e.g.

def myGetStress():
  ret = Matrix3.Zero
  for i in O.interactions:
    if not someConditionForConsideringInteraction: continue # do not
consider certain onteractions, e.g. with one or both bodies outside defined
boundaries
    f = i.phys.normalForce() + i.phys.shearForce()
    l = O.bodies[i.id2].state.pos - O.bodies[i.id1].state.pos
    ret += f.outer(l)
  return ret

cheers
Jan

[1] https://yade-dem.org/doc/yade.utils.html#yade._utils.getStress

2013/12/11 Nguyen N.G. Hien <email address hidden>

> New question #240621 on Yade:
> https://answers.launchpad.net/yade/+question/240621
>
> Hello,
> I have a question about the getStress() function (utils.getStress()) in my
> simulation (triaxial test under TriaxialStressController engine)
> In fact my model is a box with the size of the box is (-0.1,-0.1,-0.1) and
> (0.1,0.1,0.1) and the model is non-periodic case.
>
> To extract the internal stress of the specimen, I use getStress(), as I
> see in the document, for the non-periodic case, the V = 1, so in order to
> output stress for the whole specimen, it would be:
> utils.getStress(boxVolume)
> The problem here is I want to avoid the boundary effect so I want to
> "getStress" of a smaller space inside the specimen, if I do, for example
> utils.getStress(boxVolume*0.75), is that a correct to avoid the boundary
> effect? Because I don't know how V is considered and calculated in this
> function, can anyone explain?
> Thanks in advance.
>
>
> https://yade-dem.org/doc/yade.utils.html?highlight=getstress#yade._utils.getStress
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Hien Nguyen (giahien) said :
#4

Thanks jduriez and Jan for your clarification + information, those explained a lot.

Revision history for this message
Hien Nguyen (giahien) said :
#5

Hello Jan,
So acording to your suggestion, if I want to avoid the boudary effect by counting only the contact point of a zone inside the specimen, for example hereby I consider only a smaller box which each edge has size 85% of the box, can I use the contact point position instead of bodies position as the criteria? For example:

[...]
  for i in O.interactions:
    if (abs(i.geom.contactPoint[0])<=0.85*(width*0.5) and abs(i.geom.contactPoint[1])<=0.85*(height*0.5) and abs(i.geom.contactPoint[2])<=0.85*(depth*0.5)): continue
# width height and depth if the dimension of the specimen

And I realize that it should be f = i.phys.normalForce + i.phys.shearForce (remove the bracket) sothat the Vector3 is callable when we run the function :)

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

Hi Nguyen

>
> Nguyen N.G. Hien is still having a problem:
> Hello Jan,
> So acording to your suggestion, if I want to avoid the boudary effect by
> counting only the contact point of a zone inside the specimen, for example
> hereby I consider only a smaller box which each edge has size 85% of the
> box, can I use the contact point position instead of bodies position as the
> criteria? For example:
>

I tkink conact point is also good :-)

>
> [...]
> for i in O.interactions:
> if (abs(i.geom.contactPoint[0])<=0.85*(width*0.5) and
> abs(i.geom.contactPoint[1])<=0.85*(height*0.5) and
> abs(i.geom.contactPoint[2])<=0.85*(depth*0.5)): continue
> # width height and depth if the dimension of the specimen
>

the operation should be opposite, i.e.

  if (abs(i.geom.contactPoint[0])>0.85*0.5*width and ...): continue #
continue means skip interactions for those the > operation is true is true
(i.e. skip interactions that are too far away from the center of the
specimen)
  doStressComputation()

or

  if (abs(i.geom.contactPoint[0])<0.85*0.5*width and ...): # consider only
interactions near the center
    doStressComputatuion

>
> And I realize that it should be f = i.phys.normalForce +
> i.phys.shearForce (remove the bracket) sothat the Vector3 is callable
> when we run the function :)
>

sorry, it was quick code from scratch.. :-)

cheers
Jan

Revision history for this message
Hien Nguyen (giahien) said :
#7

Thanks for your great help, Mr Jan Jan Stránský