[Yade-users] [Question #674229]: float particles

2018-09-19 Thread littleFish
New question #674229 on Yade:
https://answers.launchpad.net/yade/+question/674229

Dear all,
I have run a very simple script to prepare a packing with 10,000 particles. But 
when this process is finished with unbalancedForce lower than 0.01, I find 
there are more than 2,000 particles out of the total 10,000 particles without 
any interactions with other particles or walls ('float particles' for which 
O.bodies[i.id].intrs()==[]). I wonder if this is normal or there is something 
wrong with my simulation. The codes are attached below and thanks for your 
consideration.

from yade import pack, qt, plot
import time
import numpy as np


###   DEFINING VARIABLES AND MATERIALS   ###


ts = time.time()
pressure = -1e5
r = 0.005 
n = 1 
size0 = 0.3
mn,mx=Vector3(0,0,0),Vector3(size0,size0,size0)


## create materials for spheres and plates 
O.materials.append(CohFrictMat(density=2650,young=6e8,poisson=.8,frictionAngle=0.5,isCohesive=True,normalCohesion=5e10,shearCohesion=5e10,momentRotationLaw=False,label='spheres'))
O.materials.append(CohFrictMat(density=0,young=8.8e10,poisson=.8,frictionAngle=0.,isCohesive=False,label='walls'))

## create walls around the packing
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

## use a SpherePack object to generate a random loose particles packing
sp=pack.SpherePack()
sp.makeCloud(mn,mx,rMean=r,rRelFuzz=0.4,periodic=False,num=n,seed=1)
sp.toSimulation(material='spheres')

print(len(O.bodies))

###   DEFINING ENGINES   ###


triax=TriaxialStressController(
## TriaxialStressController will be used to control stress and strain. 
It controls particles size and plates positions.
## this control of boundary conditions was used for instance in 
http://dx.doi.org/10.1016/j.ijengsci.2008.07.002
#maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
#finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth)
thickness = 0,
## switch stress/strain control using a bitmask. What is a bitmask, 
huh?!
## Say x=1 if stess is controlled on x, else x=0. Same for for y and z, 
which are 1 or 0.
## Then an integer uniquely defining the combination of all these tests 
is: mask = x*1 + y*2 + z*4
## to put it differently, the mask is the integer whose binary 
representation is xyz, i.e.
## "100" (1) means "x", "110" (3) means "x and y", "111" (7) means "x 
and y and z", etc.
stressMask = 7,
internalCompaction=False, # If true the confining pressure is generated 
by growing particles
goal1 = pressure,
goal2 = pressure,
goal3 = pressure,
max_vel = 1,
)

newton=NewtonIntegrator(gravity=(0,0,0), damping=.1)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),],

[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionOnNewContacts=False,label='cohesiveIp'),],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),]
),
## We will use the global stiffness of each body to determine an 
optimal timestep (see 
https://yade-dem.org/w/images/1/1b/Chareyre&Villard2005_licensed.pdf)

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
#TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+table.key),
newton,
PyRunner(command='addPlotData()',iterPeriod=1000),
PyRunner(command='check()',iterPeriod=1000),
PyRunner(command='savePack()',iterPeriod=1000),
]

def addPlotData():
   
   pp = utils.porosity()  #this is the porosity of the cell. 
   ee = pp / (1-pp)  #this is the void ratio of the 3D cell.  
   a = [i for i in O.bodies if i.intrs()==[]]
   plot.addData(unbalanced=unbalancedForce(),i=O.iter,   
s11 = -getStress()[0,0],
s22 = -getStress()[1,1],
s33 = -getStress()[2,2],
void = ee,
Num = len(a)
   )

plot.plots={'i':('unbalanced',),'i ':('s11','s22','s33'),
   ' i ':('void',),' i':('Num')
}
# show the plot
plot.plot()

yade.qt.Controller(), yade.qt.View()

def savePack():
   O.save('packing_100kPa_Tmp.yade.gz')

def check():
  unb=unbalancedForce()
  if unb<0.01 and abs(pressure-triax.meanStress)/-pressure<0.001:
print('Packing generated!')
print('time: '+str((time.time()-ts)/60.)+'min')
O.save('packing_100kPa.yade.gz')
O.pause()

-- 
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@lists.launchpad.net
Unsubscribe : https://l

Re: [Yade-users] [Question #674144]: Capillary forces between a network of particles

2018-09-19 Thread Chareyre
Question #674144 on Yade changed:
https://answers.launchpad.net/yade/+question/674144

Status: Open => Answered

Chareyre proposed the following answer:
I don't understand your question. Could you clarify?

Le mer. 19 sept. 2018 18:08, Vinícius Godim <
question674...@answers.launchpad.net> a écrit :

> New question #674144 on Yade:
> https://answers.launchpad.net/yade/+question/674144
>
> The example capillaryLaplaceYoung has two particles interacting via
> capillary force. But how about simulating a network of spheres? I tried
>
> pred = pack.inSphere((0,0,0),1)
> sp=pack.randomDensePack(pred,spheresInCell=100,radius=.1,rRelFuzz=0)
> O.bodies.append(sp)
>
> O.engines=[ForceResetter()
>,InsertionSortCollider([Bo1_Sphere_Aabb()])
>,InteractionLoop(
>[Ig2_Sphere_Sphere_ScGeom()],
>[Ip2_FrictMat_FrictMat_CapillaryPhys()],
>[Law2_ScGeom_FrictPhys_CundallStrack(neverErase=1)]
>)
>,Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=1)
>,NewtonIntegrator()
>,GlobalStiffnessTimeStepper()
>   ]
>
> Nonetheless, any value however low I insert as an argument in
> capillaryPressure leads to a repulsive system while the console displays
> the following error:
>
> In [1]: ERROR
> /build/yade-fDuCoe/yade-2018.02b/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp:147
> action: No meniscus found at a contact. capillaryPressure may be too large
> wrt. the loaded data files.
>
> Is this expected? Do you believe there is a simple way to perform this
> sort of simulation?
>
>
>
>
> --
> 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@lists.launchpad.net
> 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.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #673748]: Unbalanced force in periodic boundary settings

2018-09-19 Thread Mehdi Pouragha
Question #673748 on Yade changed:
https://answers.launchpad.net/yade/+question/673748

Mehdi Pouragha posted a new comment:
Thank Jérôme and Bruno. This solved the problem much better.

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


[Yade-users] [Question #674144]: Capillary forces between a network of particles

2018-09-19 Thread Vinícius Godim
New question #674144 on Yade:
https://answers.launchpad.net/yade/+question/674144

The example capillaryLaplaceYoung has two particles interacting via capillary 
force. But how about simulating a network of spheres? I tried

pred = pack.inSphere((0,0,0),1)
sp=pack.randomDensePack(pred,spheresInCell=100,radius=.1,rRelFuzz=0)
O.bodies.append(sp)

O.engines=[ForceResetter()
   ,InsertionSortCollider([Bo1_Sphere_Aabb()])
   ,InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_CapillaryPhys()],
   [Law2_ScGeom_FrictPhys_CundallStrack(neverErase=1)]
   )
   ,Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=1)
   ,NewtonIntegrator()
   ,GlobalStiffnessTimeStepper()
  ]

Nonetheless, any value however low I insert as an argument in capillaryPressure 
leads to a repulsive system while the console displays the following error:

In [1]: ERROR 
/build/yade-fDuCoe/yade-2018.02b/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp:147
 action: No meniscus found at a contact. capillaryPressure may be too large 
wrt. the loaded data files.

Is this expected? Do you believe there is a simple way to perform this sort of 
simulation?
 



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


Re: [Yade-users] [Question #673748]: Unbalanced force in periodic boundary settings

2018-09-19 Thread Bruno Chareyre
Question #673748 on Yade changed:
https://answers.launchpad.net/yade/+question/673748

Bruno Chareyre posted a new comment:
Hi,
Indeed, as suggested by Jérôme, GlobalStiffnessTimeStepper accounts for shear 
stiffness automatically. PWaveTimeStep doesn't. More details in [1].

Besides, PBC and triaxial engine are based on different servo-controls
so it is not a complete surprise if convergence is not exactly the same.

Bruno

[1] https://link.springer.com/article/10.1007/s10035-016-0687-0

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


Re: [Yade-users] [Question #674139]: Problem after updating to Ubuntu 18.04

2018-09-19 Thread Raphaël Maurin
Question #674139 on Yade changed:
https://answers.launchpad.net/yade/+question/674139

Status: Open => Answered

Raphaël Maurin proposed the following answer:
Hi Rémi,

I just re-installed Yade with ubuntu 18.04 yesterday and I got the same problem 
with libqglviewer library. It does not have the same name on the new version of 
Ubuntu if I understood well, it is now called libqglviewer-dev-qt5 (or at least 
that is what I installed and it worked). 
Regarding the question of python-imaging, it read on a question (I am not able 
to it again) that it is not necessary (and I succeeded to compile the code 
without). 

Hope it will work for you,

Raphael

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


[Yade-users] [Question #674139]: Problem after updating to Ubuntu 18.04

2018-09-19 Thread Rémi Chassagne
New question #674139 on Yade:
https://answers.launchpad.net/yade/+question/674139

Hi,

I have updated to Ubuntu 18.04 LTS and my yade version doesn't work anymore. I 
obtain the following error when I try to launch a simulation which previously 
worked :

Welcome to Yade 2017-12-09.git-4e5f181
Traceback (most recent call last):
  File "/home/remi/myYade/install/bin/./yade-2017-12-09.git-4e5f181", line 129, 
in 
import yade
  File 
"/home/remi/myYade/install/lib/x86_64-linux-gnu/yade-2017-12-09.git-4e5f181/py/yade/__init__.py",
 line 65, in 
import boot
ImportError: libboost_python-py27.so.1.58.0: cannot open shared object file: No 
such file or directory

Thinking that it could be due to the update, I tried to re-install yade from 
the latest version. I tried to install all the necessary packages by copy paste 
the long list in the installation procedure. It seems that 2 packages are not 
found: libqglviewer-dev, python-imaging and then can't be installed. So, cmake 
returns an error.

***
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Note, selecting 'libpython2.7-stdlib' instead of 'python-argparse'
Package python-imaging is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-pil:i386 python-pil

Package libqglviewer-dev is not available, but is referred to by another 
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libqglviewer-headers

E: Package 'libqglviewer-dev' has no installation candidate
E: Package 'python-imaging' has no installation candidate
**

As advised in the procedure in case of errors I tried to add the yade external 
ppa. But again an error. It seems that it does not accept the repository for 
Ubuntu 18.04. 

**
Hit:1 http://www.yade-dem.org/packages xenial/ InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB] 
  
Ign:3 http://ppa.launchpad.net/yade-users/external/ubuntu bionic InRelease  
  
Hit:4 http://fr.archive.ubuntu.com/ubuntu bionic InRelease  

Hit:5 http://archive.canonical.com/ubuntu bionic InRelease  
   
Err:6 http://ppa.launchpad.net/yade-users/external/ubuntu bionic Release
   
  404  Not Found [IP: 91.189.95.83 80]
Hit:7 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease  
 
Hit:8 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done  
E: The repository 'http://ppa.launchpad.net/yade-users/external/ubuntu bionic 
Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore 
disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration 
details.
*

Do you have any idea of what could be the error ?
Thank's by advance,
Rémi

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


Re: [Yade-users] [Question #673748]: Unbalanced force in periodic boundary settings

2018-09-19 Thread Jérôme Duriez
Question #673748 on Yade changed:
https://answers.launchpad.net/yade/+question/673748

Jérôme Duriez posted a new comment:
Hi Mehdi,

Did you try including GlobalStiffnessTimeStepper in O.engines ?
This should solve any timestep issues.

Jérôme

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