translate problem

Asked by MOUSSIER on 2015-08-21

Hello everyone,
I’m a new Yade user. I have made two different versions and there is something I don’t understand in the model behavior. Here is how I proceed:
Clumps generation, version 1:
I need two superposed volumes made by two different materials: the one above is built with horizontal layers (using the function “translate”) and the one below is just a cube. At this stage we only use the function “translate” for the volume above and we can notice that the clumps inside this volume aren’t settling after adding the “gravity”.
Clumps generation, version 2:
The volume above is still built with horizontal layers (using the function “translate”). And, to improve the quality of the model we needed to subdivide the volume below in several vertical layers. So we necessarily need to use the function “translate” again. But, this time the clumps inside the volume above settle a lot (about 20cm on the top of the volume) after adding the gravity.
It is important to notice that in each of those two versions, there is a separation box between the volumes above and below. This box aims at avoiding all interactions between those 2 volumes.
Actions:
In each volume the following operations are done (main steps): the clumps grow until a given pressure is reached between particles. Then we add the gravity to particles. And then we let the soils stabilize (using getUBF<value).
As we can see, the only change between generation 1 and 2 is that we use the function translate for one material in the first, and for both in the second. That is why I think the problem come from this function.
So my question is: Do you also think the problem might come from the function “translate”? If not, with the information I have given to you, do you have any other idea?
And if the problem come from the function “translate” do you have any idea to resolve it and how?
Thanks for your answer
Romain

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2015-08-21
Last reply:
2015-08-21
Jan Stránský (honzik) said : #1

Hello Romain,
please provide MWE [1] (try to make is as minimal as possible). Without the
code it is very hard to guess where the problem could be..
thanks
Jan

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

2015-08-21 10:42 GMT+02:00 MOUSSIER <email address hidden>:

> New question #270627 on Yade:
> https://answers.launchpad.net/yade/+question/270627
>
> Hello everyone,
> I’m a new Yade user. I have made two different versions and there is
> something I don’t understand in the model behavior. Here is how I proceed:
> Clumps generation, version 1:
> I need two superposed volumes made by two different materials: the one
> above is built with horizontal layers (using the function “translate”) and
> the one below is just a cube. At this stage we only use the function
> “translate” for the volume above and we can notice that the clumps inside
> this volume aren’t settling after adding the “gravity”.
> Clumps generation, version 2:
> The volume above is still built with horizontal layers (using the function
> “translate”). And, to improve the quality of the model we needed to
> subdivide the volume below in several vertical layers. So we necessarily
> need to use the function “translate” again. But, this time the clumps
> inside the volume above settle a lot (about 20cm on the top of the volume)
> after adding the gravity.
> It is important to notice that in each of those two versions, there is a
> separation box between the volumes above and below. This box aims at
> avoiding all interactions between those 2 volumes.
> Actions:
> In each volume the following operations are done (main steps): the clumps
> grow until a given pressure is reached between particles. Then we add the
> gravity to particles. And then we let the soils stabilize (using
> getUBF<value).
> As we can see, the only change between generation 1 and 2 is that we use
> the function translate for one material in the first, and for both in the
> second. That is why I think the problem come from this function.
> So my question is: Do you also think the problem might come from the
> function “translate”? If not, with the information I have given to you, do
> you have any other idea?
> And if the problem come from the function “translate” do you have any idea
> to resolve it and how?
> Thanks for your answer
> Romain
>
> --
> 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
>

MOUSSIER (romain-moussier-ext) said : #2

Hello Jan,
Thanks for your answer. Here is the concerned code refering to the clumps creation :

(Previously, boxes where created surrounding softSoilMat clumps and sphereMat clumps, a seperation box between different materials was also set up).

softSoilMatId=O.materials.append(FrictMat(density=1e3,young=softSoilYoung,poisson=0.3,frictionAngle=radians(60.),label='softSoilMat'))
sphereMatId=O.materials.append(FrictMat(density=3100,young=EY,poisson=0.5,frictionAngle=radians(20),label='sphereMat'))

 sp=pack.SpherePack()
 sp2=pack.SpherePack()
 sp3=pack.SpherePack()
 sp4=pack.SpherePack()
 clumpList=[]
 softSoilList=[]

 for i in range(0,1000):
  r=(radiusMax-radiusMin)*rand()**3+radiusMin
  clumpList.append(pack.SpherePack([ ((0,0,0),r),((r*1.00001,0,0),r) ]))
  softSoilList.append(pack.SpherePack([ ((0,0,0),r),((r*1.00001,0,0),r) ]))

 if(enableGrid):
  sp.makeClumpCloud((0.,0.,0.),(length,gridOrigin[1]-gridRadius,width),clumpList,periodic=False,seed=5,num=int(numberOfClumps*(gridPos/(1.5*height))))
  sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
  sp.translate(Vector3(0.,gridOrigin[1]+gridRadius,0.))
  sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
  sp.translate(Vector3(0.,gridOrigin[1]+gridRadius,0.))
  sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
  sp2.makeClumpCloud((RIlength,-height,RIlength),(length-RIlength,0.,2*RIlength),softSoilList,periodic=False,seed=5,num=int(0.2/1.3*numClumpsSoft))
  sp2.translate(Vector3(0.,0.,-RIlength))
  sp2.toSimulation(material='softSoilMat',mask=25,color=orange)
  sp2.translate(Vector3(0.,0.,length-RIlength))
  sp2.toSimulation(material='softSoilMat',mask=25,color=orange)
  sp3.makeClumpCloud((RIlength,-height,RIlength),(2*RIlength,0.,length-RIlength),softSoilList,periodic=False,seed=5,num=int(0.2/1.3*numClumpsSoft))
  sp3.translate(Vector3(-RIlength,0.,0))
  sp3.toSimulation(material='softSoilMat',mask=25,color=orange)
  sp3.translate(Vector3(length-RIlength,0.,0.))
  sp3.toSimulation(material='softSoilMat',mask=25,color=orange)
  sp4.makeClumpCloud((RIlength,-height,RIlength),(length-RIlength,0.,width-RIlength),softSoilList,periodic=False,seed=5,num=numClumpsSoft)
  sp4.toSimulation(material='softSoilMat',mask=25,color=orange)

MOUSSIER (romain-moussier-ext) said : #3

And, just in case, this is not enough for you to localize the problem, here is the part of the program where clumps grow, gravity is added and stabilisation occurs :

 if 0 in phase: #BOOST GROWING
  dS=100*stressGoal-abs(stress) #target is 100x the real target to gain speed in the first growth phase
  growFactor = 1.+dS*growSpeedBoost/stressGoal
  growFactor = max(min(growSpeedBoost+1.,growFactor),1.-growSpeedBoost)
  if(growFactor<0.95 or growFactor>1.05): writeInLog( "WARNING, growFactor =",growFactor)
  growParticles(growFactor,1,1)
  if(dS < 0.):
   writeInLog( "Boost growing finished, perform normal growing.")
   saveSim("Phase_0")
   writeInLog( "Simulation saved to",scriptPath+"/saves/Phase0")
   name="Phase_0"
   extractInfos00()
   phase.remove(0);phase.append(1)
   #O.pause()
 if 1 in phase: #NORMAL GROWING
  dS=stressGoal-abs(stress)
  if(abs(dS)<stressTolerance): stressReachedSince+=1
  else: stressReachedSince=0
  if(stressReachedSince>30 and not 2 in phase):
   phase.append(2)
   writeInLog( "Stress stabilized at",stressGoal,"Pa.")
# saveSim("StressOk") ; writeInLog( "Simulation saved to",scriptPath+"/saves/StressOk")
  growFactor = 1.+dS*growSpeed
  growFactor=max(min(growFactor,1+growSpeedBoost),1-growSpeedBoost)
  growParticles(growFactor,1,1)
 if 2 in phase: #set parameters
  O.materials[sphereMatId].frictionAngle=radians(finalFricDegree); writeInLog( "O.materials[sphereMatId].frictionAngle=radians(",finalFricDegree,")")
  setContactFriction(radians(finalFricDegree)); writeInLog( "setContactFriction(radians(",finalFricDegree,"))")
  newton.gravity=[0.,-9.8,0.]; writeInLog("newton.gravity=[0.,-9.8,0.]")
  phase=[2.5]
  writeInLog( "Paving mass =",getMassFromIds(pavingIds),"Kg.")
  if(enableGrid):writeInLog( "Grid mass =",getMassFromIds(nodesIds),"Kg.")
  writeInLog( "Soil mass =",getSoilMass(),"Kg.")
  O.materials[softSoilMatId].young=softSoilYoungFinal
  writeInLog( "Soft soil Young =",O.materials[softSoilMatId].young,"Pa.")
  for i in O.bodies[lowBoxId].intrs():
   O.interactions.erase(i.id1,i.id2)
  #writeInLog( "separationBoxId =",separationBoxId[0])
  #O.bodies.erase(separationBoxId[0])
 if 2.5 in phase:
  if(getUBF()<2.*stabCrit):
   unlockPaving()
   saveSim("Phase2.5") ;
   writeInLog( "Simulation saved to",scriptPath+"/saves/Phase2.5")
   name="Phase_2.5"
   extractInfos25()
   O.pause()

At the end of the phase 2.5, the settlement of the sphereMatId is abnormally high.

Christian Jakob (jakob-ifgt) said : #4

Hi,

We (Yade community) really try to help people with answers on questions or solutions for problems. Unfortunately sometimes the questions can not be answered and/or the problems can not be solved. In your case the problem for us is to understand what is the question or where is the problem. With comments like "there is something I don’t understand in the model behavior" we can not help you, sorry.

Additionally I think you did not read [1] carefully. There it is said:

"
3. Together with problem statement, send also a code which will let others reproduce your problem. Try to send it as a MWE (Minimal Working Example™). It should be:

    * minimal = short (it is difficult to find mistakes in long pieces of code and it is usually much more annoying).
    * working = before sending, test it to be sure it is working (it has no syntax errors etc.).
"

Regards,

Christian

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

Can you help with this problem?

Provide an answer of your own, or ask MOUSSIER for more information if necessary.

To post a message you must log in.