Re: [Yade-users] [Question #686942]: What is random close packing and random loose packing

2019-12-15 Thread Huang peilun
Question #686942 on Yade changed:
https://answers.launchpad.net/yade/+question/686942

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
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 #686942]: What is random close packing and random loose packing

2019-12-11 Thread Huang peilun
New question #686942 on Yade:
https://answers.launchpad.net/yade/+question/686942

Hi,
I have trouble with the 'makecloud'
The document says makecloud create random very loose packing enclosed in a 
parallelepiped.

What is random very loose packing? Does it have a mathematical definition?
I've seen several articles but didn't understand the distribution clearly.

Thanks in advance!

-- 
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 #688156]: How to create a regular prism in Yade

2020-01-23 Thread Huang peilun
Question #688156 on Yade changed:
https://answers.launchpad.net/yade/+question/688156

Huang peilun posted a new comment:
I want to create a body shaped as a prism. 
By "not round cylinder" I mean not the cylinder for yade.gridpfacet module, I 
see from the yade book that there is a class yade.wrapper.Cylinder. However, I 
tried couple of times, I can't create a body shaped as a cylinder by this class.

Thanks.

-- 
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 #688156]: How to create a regular prism in Yade

2020-01-23 Thread Huang peilun
Question #688156 on Yade changed:
https://answers.launchpad.net/yade/+question/688156

Huang peilun posted a new comment:
Thank you, Jan!
That solved my problem.

I'll post what I have tried and why/how it went wrong. 
This time I just use
O.bodies.append(Cylinder(length=1, radius=1))
I didn't figure out what type does the Cylinder class have.

I want to make a penetration test, and I want a cylinder shaped rod to
do this.

Here's another question, I want to apply gravity to this cylinder and
have contact with spheres, what kind of IGeomFunctor and LawFunctor
should I use? Now the current script is as followed. The cylinder just
disappeared at the beginning of the simulation.

from yade import pack

O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))

rod=Body()
rod.shape=Cylinder()
rod.shape.length=.5
rod.shape.radius=.2
rod.state.pos=(.5,.5,1.8)
O.bodies.append(rod)

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.3)
sp.toSimulation()

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Cylinder_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_ChainedCylinder_CylScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_CylScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
if O.forces.f(rod.id)[2]==0: return
ball.state.blockedDOFs='xyXYZ'
ball.state.vel=(0,0,2)
if unbalancedForce()<.05:
O.pause()

O.saveTmp()

Thanks!

-- 
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 #688340]: Problem about running yade in parallel

2020-01-29 Thread Huang peilun
New question #688340 on Yade:
https://answers.launchpad.net/yade/+question/688340

Hi everyone!
I'm learning to run yadedaily in parallel. 

I use 'yadedaily --threads=2 test.py' to run my code.
First few steps works fine but then comes an error which says:

python3.5: 
/builds/yade-dev/trunk/deb/yadedaily/pkg/common/InsertionSortCollider.hpp:127: 
yade::InsertionSortCollider::Bounds& 
yade::InsertionSortCollider::VecBounds::operator[](long int): Assertion `idx < 
long(size()) && idx >= 0' failed.
Aborted (core dumped)

Here's my code:





from yade import pack

SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat))

O.bodies.append(geom.facetCylinder(center=(0,0,.5),radius=.38,height=1,wallMask=6))

sp=pack.SpherePack()
sp.makeCloud((-.38,-.38,0),(.38,.38,1),rMean=.025,rRelFuzz=.3)
cyl=pack.inCylinder((0,0,0),(0,0,1),.355)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
]
O.dt=.2*PWaveTimeStep()

O.saveTmp()





And when I change the rMean of the spherepack, it works.
But I need to simulate a lot of spheres, can anyone help me solve the problem 
when rMean is small?

Thanks in advance!

-- 
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 #688275]: Size problem in yade simulation

2020-01-27 Thread Huang peilun
Question #688275 on Yade changed:
https://answers.launchpad.net/yade/+question/688275

Huang peilun posted a new comment:
Thanks!
I increased the stiffness but there still are spheres that go through the 
bottom of the cylinder. Here's my code.


from yade import pack

Mat=FrictMat(young=2.06e20)
SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat,Mat))

O.bodies.append(geom.facetCylinder(center=(500,500,500),radius=500,height=1000,wallMask=6,color=(1,0,0),material=Mat))

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1000,1000,1000),rMean=50,rRelFuzz=.3)
cyl=pack.inCylinder((500,500,0),(500,500,1000),450)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
print('%s: Unbalanced=%s' % (O.iter,unbalancedForce()))
if O.iter<5000: return 
if unbalancedForce()<.05: 
O.pause()

O.saveTmp()

-- 
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 #688340]: Problem about running yade in parallel

2020-01-29 Thread Huang peilun
Question #688340 on Yade changed:
https://answers.launchpad.net/yade/+question/688340

Huang peilun posted a new comment:
Thanks for your reply!

it's
"
Yade 20200119-3121~146d6de~xenial1.
Ubuntu 16.04 LTS xenial.
"

I can run the first few steps and then this problem occurs.

-- 
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 #688340]: Problem about running yade in parallel

2020-02-03 Thread Huang peilun
Question #688340 on Yade changed:
https://answers.launchpad.net/yade/+question/688340

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Jérôme Duriez, that solved my question.

-- 
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 #688340]: Problem about running yade in parallel

2020-02-03 Thread Huang peilun
Question #688340 on Yade changed:
https://answers.launchpad.net/yade/+question/688340

Huang peilun posted a new comment:
That's great. Thanks!

-- 
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 #688156]: How to create a regular prism in Yade

2020-01-23 Thread Huang peilun
Question #688156 on Yade changed:
https://answers.launchpad.net/yade/+question/688156

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thank you, Jan!
I'll do better next time.

-- 
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 #688275]: Size problem in yade simulation

2020-01-28 Thread Huang peilun
Question #688275 on Yade changed:
https://answers.launchpad.net/yade/+question/688275

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Jan! 
I tried SoilMat=FrictMat(young=25e9,...) and it works!
Now I understand why these spheres go through the cylinder. It's very 
interesting!

-- 
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 #688275]: Size problem in yade simulation

2020-01-28 Thread Huang peilun
Question #688275 on Yade changed:
https://answers.launchpad.net/yade/+question/688275

Huang peilun confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #688275]: Size problem in yade simulation

2020-01-27 Thread Huang peilun
Question #688275 on Yade changed:
https://answers.launchpad.net/yade/+question/688275

Description changed to:
I did a gravity deposition test in a cylinder. The following is the
original code and it works.


from yade import pack

#material
SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat))

#define the chamber
O.bodies.append(geom.facetCylinder(center=(.5,.5,.5),radius=.5,height=1,wallMask=6,color=(1,0,0)))

#create foundation by making spheres in the cylinder.
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.3)
cyl=pack.inCylinder((.5,.5,0),(.5,.5,1),.45)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
print('%s: Unbalanced=%s' % (O.iter,unbalancedForce()))
if O.iter<5000: return 
if unbalancedForce()<.05: 
O.pause()

O.saveTmp()



However, when I magnify all units 1000 times, like the following code, some 
sphere just went through the bottom of the cylinder and I don't know why.



from yade import pack

#material
SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat))

#define the chamber
O.bodies.append(geom.facetCylinder(center=(500,500,500),radius=500,height=1000,wallMask=6,color=(1,0,0)))

#create foundation by making spheres in the cylinder.
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1000,1000,1000),rMean=50,rRelFuzz=.3)
cyl=pack.inCylinder((500,500,0),(500,500,1000),450)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
print('%s: Unbalanced=%s' % (O.iter,unbalancedForce()))
if O.iter<5000: return 
if unbalancedForce()<.05: 
O.pause()

O.saveTmp()



Thanks in advance!

-- 
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 #688275]: Size problem in yade simulation

2020-01-27 Thread Huang peilun
Question #688275 on Yade changed:
https://answers.launchpad.net/yade/+question/688275

Huang peilun posted a new comment:
Thanks Robert.
I haven't tried increasing the stiffness of the facets because I don't know 
how. Can you show me how to do that?

-- 
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 #688275]: Size problem in yade simulation

2020-01-27 Thread Huang peilun
New question #688275 on Yade:
https://answers.launchpad.net/yade/+question/688275

I did a gravity deposition test in a cylinder. The following is the original 
code and it works.


from yade import pack

#material
SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat))

#define the chamber
O.bodies.append(geom.facetCylinder(center=(.5,.5,.5),radius=.5,height=1,wallMask=6,color=(1,0,0)))

#create foundation by making spheres in the cylinder.
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.3)
cyl=pack.inCylinder((.5,.5,0),(.5,.5,1),.45)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
print('%s: Unbalanced=%s' % (O.iter,unbalancedForce()))
if O.iter<5000: return 
if unbalancedForce()<.05: 
O.pause()

O.saveTmp()



However, when I magnify all units 1000 times, like the following code, some 
sphere just went through the bottom of the cylinder and I don't know why.

from yade import pack

#material
SoilMat=FrictMat(young=25e6,poisson=0.2,density=2650,frictionAngle=0.28)
O.materials.append((SoilMat))

#define the chamber
O.bodies.append(geom.facetCylinder(center=(500,500,500),radius=500,height=1000,wallMask=6,color=(1,0,0)))

#create foundation by making spheres in the cylinder.
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1000,1000,1000),rMean=50,rRelFuzz=.3)
cyl=pack.inCylinder((500,500,0),(500,500,1000),450)
sp=pack.filterSpherePack(cyl,sp,True)
sp.toSimulation(material=SoilMat)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
# update position using Newton's equations
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.05),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.2*PWaveTimeStep()

def checkUnbalanced():
print('%s: Unbalanced=%s' % (O.iter,unbalancedForce()))
if O.iter<5000: return 
if unbalancedForce()<.05: 
O.pause()

O.saveTmp()


Thanks in advance!

-- 
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 #688156]: How to create a regular prism in Yade

2020-01-21 Thread Huang peilun
New question #688156 on Yade:
https://answers.launchpad.net/yade/+question/688156

Hi, I just begin to learn Yade.

I'm wondering if there is a function or method to create a regular prism 
without calculate the coordinates of each vertexes by myself.
And if there is a method to create a cylinder(not a round cylinder).

Thanks in advance.

-- 
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 #690752]: How to know the force applied to each particle when Flowengine is activited

2020-05-17 Thread Huang peilun
Question #690752 on Yade changed:
https://answers.launchpad.net/yade/+question/690752

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
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 #690752]: How to know the force applied to each particle when Flowengine is activited

2020-05-15 Thread Huang peilun
New question #690752 on Yade:
https://answers.launchpad.net/yade/+question/690752

Hi, I  just begin to learn the Flowengine. My code is as followed:

import numpy as np
from yade import pack, plot, polyhedra_utils

#define the material(Fontainebleau Sand)
SteelMat = PolyhedraMat(young=2.06e11,poisson=.3,density=7890,frictionAngle=0.3)
SoilMat=FrictMat(young=1e7,poisson=0.2,density=2650,frictionAngle=0.273)
O.materials.append((SteelMat,SoilMat))

#define the chamber
O.bodies.append(geom.facetBox((0,0,2),(0.4,0.4,2),wallMask=31))

#create foundation by making spheres in the cylinder.
sp=pack.SpherePack()
sp.makeCloud((-.4,-.4,0),(.4,.4,4),rMean=.04,rRelFuzz=.5)
sp.toSimulation(material=SoilMat)

#Engine of the simulation
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.2),
#introduced as a dead engine for the moment
FlowEngine(dead=1,label="flow"),
#Run the specific controlled motion.
PyRunner(command='start()',realPeriod=2,label='checker'),
]

#Time step
O.dt=PWaveTimeStep()

def start():
print('\n# Simulation begins #')
print('Stage: Gravitity desposition.')
print('Time step is %ss.' % O.dt)
checker.command='checkUnbalanced()'


def checkUnbalanced():  
print('%s:UnbalancedForce=%s' % (O.iter,unbalancedForce()))
if max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)])>2: return
if unbalancedForce()>0.01: return
checker.command='Active_Flowengine()'

#Compress the soil to achieve a certain dry density of 1.5g/cm^3.
def Active_Flowengine():
flow.dead=0
flow.meshUpdateInterval=200
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=10
flow.bndCondIsPressure=[0,0,0,0,0,1]
flow.bndCondValue=[0,0,0,0,0,0]
flow.boundaryUseMaxMin=[1,1,1,1,1,1]
newton.damping=0
checker.command='Create_Ball()'

def Create_Ball():
#Ball=sphere((0,0,1.6),0.1243186,material=SteelMat)

Cube=polyhedra_utils.polyhedra(SteelMat,(.1,.1,.1),v=((0.05,0.05,1.6),(-0.05,0.05,1.6),(0.05,-0.05,1.6),(-0.05,-0.05,1.6),(0.05,0.05,1.7),(-0.05,0.05,1.7),(0.05,-0.05,1.7),(-0.05,-0.05,1.7)))
O.bodies.append(Cube)
global Cube
#flow.ignoredBody=Cube.id
checker.command='Fall()'

def Fall():
print(O.forces.f(Cube.id)[2])

Here's my question. After  the gravity deposition completed and the FlowEngine 
activated, it shows that the force of the cube element is always zero. Even if 
the cube element has a direct contact with other balls. There must be something 
wrong.
Can anyone help me out?
Thanks in advance.

-- 
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 #692650]: How to use the DFNFlowEngine

2020-09-04 Thread Huang peilun
Question #692650 on Yade changed:
https://answers.launchpad.net/yade/+question/692650

Huang peilun posted a new comment:
Thanks for your advice, Robert.

-- 
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 #692704]: Using flow engine got the wrong pressure field

2020-09-04 Thread Huang peilun
Question #692704 on Yade changed:
https://answers.launchpad.net/yade/+question/692704

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert, it's indeed a stability problem.

I tried the radius expansion method, I think it's a fast way to generate
stable sample. Anyway, both method (the old one I used before and the
radius expansion method) can get the reasonable result in the end. It's
just a matter of time.

I think the answer to my question is to find a way to generate particles
that can reach force balance quickly.

-- 
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 #692650]: How to use the DFNFlowEngine

2020-09-01 Thread Huang peilun
Question #692650 on Yade changed:
https://answers.launchpad.net/yade/+question/692650

Status: Open => Solved

Huang peilun confirmed that the question is solved:
Thanks Jérôme Duriez, that solved my question.

-- 
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 #692704]: Using flow engine got the wrong pressure field

2020-09-01 Thread Huang peilun
New question #692704 on Yade:
https://answers.launchpad.net/yade/+question/692704

Hi,
I'm currently simulating a simple seepage problem. My code is as followed:




from yade import pack, plot, ymport
from numpy import genfromtxt

mn,mx=Vector3(-.25,-.25,0),Vector3(.25,.25,.5) 

SoilMat=CohFrictMat(young=20e9,poisson=0.3,density=2650,frictionAngle=0.7,alphaKr=50,alphaKtw=50,momentRotationLaw=True)
O.materials.append((SoilMat))
O.materials.append(CohFrictMat(young=10e9,poisson=0.5,frictionAngle=0,density=0,label='walls',momentRotationLaw=True))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

O.bodies.append(ymport.text('/home/jp/DEMSimulation/Sample/SP-TestSample5.txt',material=SoilMat))

newton=NewtonIntegrator(damping=0.3)

#Engine of the simulation
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
FlowEngine(dead=1,label="flow"),
newton,
]

#Time step
O.dt=.1*PWaveTimeStep()

O.run(1,1)

newton.damping=0
flow.dead=0
flow.defTolerance=0.3
flow.meshUpdateInterval=200
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=10
flow.bndCondIsPressure=[0,0,0,0,1,1]
flow.bndCondValue=[0,0,0,0,100,0]
flow.boundaryUseMaxMin=[0,0,0,0,0,0]




The problem is that the first iteration gives the right result, like [1], while 
the second and the following gives a wrong pressure field. The pore pressure of 
some cells may reach -1 and more, like [2].

I think the problem is with the sample. When I change the SP-TestSample5.txt to 
the following code:


sp=pack.SpherePack()
sp.makeCloud((-.25,-.25,0),(.25,.25,.5),rMean=.0175,rRelFuzz=.5)
sp.toSimulation(material=SoilMat)


the result is reasonable again. 
However, I don't know what's wrong with the sample of SP-TestSample5.txt. This 
txt file can be found in [3]. The way I generate the SP-TestSample5.txt can be 
found in [4]. Any idea why this happens?

Thank you,
Peilun

[1]https://cloud.tsinghua.edu.cn/f/d076877a726b47808591/
[2]https://cloud.tsinghua.edu.cn/f/ba447f257ddb4caf90e9/
[3]https://cloud.tsinghua.edu.cn/f/7e8ede6246554253aa64/
[4]https://cloud.tsinghua.edu.cn/f/ec0e4790e006474f9c09/

-- 
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 #692704]: Using flow engine got the wrong pressure field

2020-09-02 Thread Huang peilun
Question #692704 on Yade changed:
https://answers.launchpad.net/yade/+question/692704

Huang peilun posted a new comment:
Hi Robert,

Thank you for answering my question. I'm sorry that I didn't read the
posting guidelines carefully. I'll follow the guidelines in the future.

As for the issue, I tried decreasing the time step and turning 
O.dynDt=False.
The result is almost the same. I noticed that the pressure field can be 
calculated by the following formula:

GP=Ev+Qq+Qp

where G is the conductivity matrix, P is the column vector containing
all values of pressure, and E is the matrix defining the rates of volume
change. Qq and Qp are flux vectors reflecting boundary conditions,
respectively source terms (imposed fluxes) in Qq and imposed pressures
in Qp.

I checked the initial velocity of my sample, it appears that all
particles have a high velocity, thus in the second iteration gives a
'unreasonable' pressure field. I tried to slow down the particles, and
the result is more and more 'reasonable'. Therefore, I think the way I
generate the sample is improper. The code that I use to generate the
sample is as followed:




from yade import pack

SoilMat=CohFrictMat(young=1e7,poisson=0.3,density=2650,frictionAngle=0.7,alphaKr=50,alphaKtw=50,momentRotationLaw=True)
O.materials.append((SoilMat))
O.materials.append(CohFrictMat(young=1e7,poisson=0.5,frictionAngle=0,density=0,label='walls',momentRotationLaw=True))

O.bodies.append(geom.facetBox((0,0,0.8),(.25,.25,0.8),wallMask=31,material='walls'))

sp=pack.SpherePack()
sp.makeCloud((-.25,-.25,0),(.25,.25,1.6),rMean=.0175,rRelFuzz=.3)
sp.toSimulation(material=SoilMat)

#Engine of the simulation
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),
#introduced as a dead engine for the moment
NewtonIntegrator(gravity=(0,0,-9.81)),
#Run the specific controlled motion.
PyRunner(command='start()',realPeriod=1,label='checker'),
]

O.dt=.5*PWaveTimeStep()

def start():
newton.damping=0.3
print('\n# Simulation begins #')
print('Stage: Gravitity desposition.')
print('Time step is %ss.' % O.dt)
checker.command='checkUnbalanced()'

def checkUnbalanced():  
print('%s:UnbalancedForce=%s' % (O.iter,unbalancedForce()))
if max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)])>0.7: return
if unbalancedForce()>0.01: return 
Initial_height=max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)])
print('The initial height of the simulation is %s' % Initial_height)
print('Stage: Compression.')
checker.command='Compression()'

def Compression():
O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in 
O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1))
global plate
plate=O.bodies[-1]
plate.state.vel=(0,0,-.2)
print('Wall successfully created! Initial veloctity is %s, initial 
position is %s.' % (plate.state.vel[2],plate.state.pos[2]))
global Volume   
Volume=0
for b in O.bodies:
if isinstance(b.shape,Sphere):

Volume=Volume+b.shape.radius*b.shape.radius*b.shape.radius*4*np.pi/3
print('The volume of the pack is %s' % Volume)
SoilMat.frictionAngle=0
checker.command='Compression_S2()'

def Compression_S2():
void_ratio=plate.state.pos[2]*.5*.5/Volume-1
print('%s: Void ratio=%s' % (O.iter,void_ratio))
if void_ratio>0.6: return
SoilMat.frictionAngle=0.6
plate.state.vel=(0,0,.2)
print('Wait for the particles to settle down after compression.')
checker.command='Density_Checker()'

def Density_Checker():
void_ratio=plate.state.pos[2]*.5*.5/Volume-1
print('%s: Void ratio=%s, Wall Position=%s' % 
(O.iter,void_ratio,plate.state.pos[2]))
if abs(O.forces.f(plate.id)[2])>0: return
if unbalancedForce()>0.01: return 
print(max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)]))
checker.command='Record()'

def Record():
print('The sample is generated successfully!')
O.pause()




I think the way I generate the sample is not stable. And also, to spend
less time, the material is different between when I generate the sample
and when I do the seepage test.

I'm now trying to

Re: [Yade-users] [Question #692704]: Using flow engine got the wrong pressure field

2020-09-07 Thread Huang peilun
Question #692704 on Yade changed:
https://answers.launchpad.net/yade/+question/692704

Huang peilun posted a new comment:
Also, in order to get a stable pressure field, reducing the fluid
viscosity helps a lot.

-- 
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 #692704]: Using flow engine got the wrong pressure field

2020-09-07 Thread Huang peilun
Question #692704 on Yade changed:
https://answers.launchpad.net/yade/+question/692704

Huang peilun posted a new comment:
Thanks, Robert.

I've rewrite my script. The particles generated by my old script appears
to get a 'high' velocity in the first few iterations. And the particle
velocity  affects the change of pressure field. Therefore, I think
careful creation of the specimen has certain effect on the change of
pressure field. But the effect is little and it's not the key point.
What I said not long ago was wrong.

Now I think the key point of the reason why the pressure field changes
rapidly is the high value of the fluid viscosity. I change the viscosity
from 10 to 0.00298 and found out that difference is obvious. The
pressure field doesn't change that much.

-- 
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 #692704]: Using flow engine got the wrong pressure field

2020-09-07 Thread Huang peilun
Question #692704 on Yade changed:
https://answers.launchpad.net/yade/+question/692704

Huang peilun posted a new comment:
>If this is true, then you just need to ensure that your unbalanced
force is lower. This has nothing to do with flow engine.

Yes, I agree with you.

>It changes rapidly or is doesnt change that much?

I found out that:

If the viscosity is high, the pressure field will change dramatically
due to the external disturbance. Like my case, my unbalanced force is
not low enough, so the first iteration gives pressure varies from 0-100
while the pressure of some pore is about -1 in the second.

If the viscosity is low, the pressure field won't change much between
the the first iteration and the second iteration. I think it's because I
increase the value of the elements in the conductivity matrix G,
therefore influence of the velocity of the particles is reduced.

GP=Ev+Qq+Qp

>changing viscosity is the same as changing permeability in the code

Thanks for the information. I didn't know this before.

-- 
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 #693370]: Problems about the flow.multithread

2020-10-09 Thread Huang peilun
Question #693370 on Yade changed:
https://answers.launchpad.net/yade/+question/693370

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
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 #693370]: Problems about the flow.multithread

2020-10-09 Thread Huang peilun
New question #693370 on Yade:
https://answers.launchpad.net/yade/+question/693370

I've been using the "flow.multithread" to accelerate the calculation speed of 
problems about saturated soil recently. I've encounter several problems about 
the "flow.multithread".

1. When I write "multithread=True" before the simulation begins, just like the 
following, it reports that Segmentation fault (core dumped).


O.engines=[
...
FlowEngine(multithread=1, dead=0, label="flow", ompThreads=10),
...
]


However, if I don't set multithread=True at the first time I define the flow 
engine, set flow.multithread=True after running several steps instead, it works 
and the calculation is accelerated. I have no idea why this happens.

2. When I set flow.multithread=True after running several steps, although it 
works, there appears to be a period error. After certain steps, all pore 
pressure turn to zero and the next step everything is back to normal again. 
This error occurs at a fixed interval.

I'm using the 
Linux version 5.4.0-47-generic (buildd@lgw01-amd64-038) (gcc version 7.5.0 
(Ubuntu 7.5.0-3ubuntu1~18.04))
Yade 20201007-4243~57d1c9c~bionic1

Here's a MWE to produce the error. Through the VTK file can get the period 
error.

##
from yade import pack,export

SoilMat=CohFrictMat(young=20e9,poisson=0.3,density=2650,frictionAngle=0.7,alphaKr=50,alphaKtw=50,momentRotationLaw=True,label='soil')
O.materials.append((SoilMat))

mn,mx=Vector3(-.25,-.25,0),Vector3(.25,.25,.5) 
walls=aabbWalls([mn,mx],thickness=0,material='soil')
wallIds=O.bodies.append(walls)

snum=1000
sp=pack.SpherePack()
sp.makeCloud((-.25,-.25,0),(.25,.25,.5),rMean=.001,rRelFuzz=.3,num=snum)
sp.toSimulation(material=SoilMat)

Target_Stress=-100

triax=TriaxialStressController(
stressMask = 7,
thickness = 0,
internalCompaction=True, # If true the confining pressure is generated 
by growing particles
)

Pressure=1
flow=FlowEngine(
dead=1,
defTolerance=0.001,
meshUpdateInterval=200,
useSolver=3,
#multithread=True,
permeabilityFactor=0.001,
bndCondIsPressure=[0,0,0,0,1,1],
bndCondValue=[0,0,0,0,0,Pressure],  #The depth of the water is 5.1m 
boundaryUseMaxMin=[0,0,0,0,0,0],
viscosity=0.00089  #The dynamic viscosity of water is 8.90*10-4 Pa`s at 
about 25 degree.
)

newton=NewtonIntegrator(damping=0.1)

#Engine of the simulation
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
flow,
triax,
PyRunner(command="print('%s: Unbalncedforce %s, Meanstress %s' % 
(O.iter,unbalancedForce(),triax.meanStress))",realPeriod=1,label='Monitor'),
newton, 

PyRunner(command="flow.saveVtk()",iterPeriod=100,dead=1,label='vtksaver2'),
]

triax.goal1=triax.goal2=triax.goal3=Target_Stress

while 1:
  O.run(1000,True)
  if unbalancedForce()<0.1 and 
abs((Target_Stress-triax.meanStress)/Target_Stress)<0.01: 
break

Monitor.dead=1
vtksaver2.dead=0
flow.dead=0
triax.internalCompaction=False
triax.stressMask=0
triax.goal1=triax.goal2=triax.goal3=0
O.run(1,1)
flow.multithread=True
##



-- 
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 #692650]: How to use the DFNFlowEngine

2020-08-29 Thread Huang peilun
New question #692650 on Yade:
https://answers.launchpad.net/yade/+question/692650

Hi,

I am trying to simulation a standard penetration test on saturated soil. I've 
been told that the FlowEngine is restricted to quasi-static regimes and may not 
be suitable for the penetration test. Therefore, I want to use DFNFlowEngine 
instead. 

However, I didn't find any instructions about DFNFlowEngine on Yade 
Documentation and don't have a clue how to use it. I'd be appreciate if 
somebody could show me some related articles or examples.

Thanks in advance.


-- 
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 #693017]: How to accelerate Yade's poromechanical coupling

2020-09-24 Thread Huang peilun
Question #693017 on Yade changed:
https://answers.launchpad.net/yade/+question/693017

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert, that solved my question.

-- 
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 #693017]: How to accelerate Yade's poromechanical coupling

2020-09-21 Thread Huang peilun
Question #693017 on Yade changed:
https://answers.launchpad.net/yade/+question/693017

Huang peilun posted a new comment:
Thanks Robert, your comments help me a lot.

I now understand the matrix factorization reuse, multithreaded
factorization and GPU accelerated techniques. I still have some problems
about the parallel task management technique.

In the python scripts that your mentioned, I think the parallel task
management technique is implemented through the following code:

###
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()],label="iloop"
),
FlowEngine(multithread=1,dead=1,label="flow",ompThreads=10),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
#VTKRecorder(Key=identifier,dead=1, label='vtkRec', 
iterPeriod=100,initRun=True,fileName=(outputDir+'/vtkFiles/out-'),recorders=['spheres','facets','boxes']),
newton
]

#Some of the original code is omitted here

if setEnginesParallel:


O.engines=[ParallelEngine([flow,[O.engines[0],O.engines[1],O.engines[2],O.engines[4]]]),
O.engines[5],
O.engines[6]
]

triax = O.engines[1]
newton = O.engines[2]

O.engines[0].slaves[1][0].ompThreads=O.engines[0].slaves[1][1].ompThreads=O.engines[0].slaves[1][2].ompThreads=O.engines[0].slaves[1][3].ompThreads=5

flow.ompThreads=4
###

I think based on the above code, FlowEngine runs before the
ForceResetter() which is now the O.engines[0].slaves[1][0]. However, in
this case, the fluid force cannot be applied to the sphere particles.
Did I get this right?

Besides, I noticed that the parallelism in Yade has 3 levels. According
to my understanding, by using the -j/--thread option, one can implement
parallelism inside Engines and parallelism between Computation,
interaction (python, GUI) and rendering. Parallelism inside multiple
engine groups can only be implemented by ParallelEngine. Did I get it
right?

I'm not sure if I should open a new question.

Thanks
Peilun

-- 
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 #693017]: How to accelerate Yade's poromechanical coupling

2020-09-21 Thread Huang peilun
New question #693017 on Yade:
https://answers.launchpad.net/yade/+question/693017

Hi,

I learned from this paper [1] that Yade's poromechanically coupled DEM+PFV 
scheme can be accelerated by 170x by combining four techniques: matrix factor 
reuse, multithreaded factorization, GPU accelerated factorization, and parallel 
task management.

I'm wondering that are these four technologies, especially the matrix factor 
reuse technique, currently being implemented in YADE? How can I apply these 
four techniques to the coupling problem in practice?

Thanks
Peilun

[1]Caulk R A, Catalano E, Chareyre B. Accelerating yade’s poromechanical 
coupling with matrix factorization reuse, parallel task management, and gpu 
computing[J]. Computer Physics Communications, 2020, 248: 106991.

-- 
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 #693803]: How to model seismic wave propagation

2020-11-03 Thread Huang peilun
New question #693803 on Yade:
https://answers.launchpad.net/yade/+question/693803

Hi,

I want to model seismic wave propagation in granular soil. However, I didn't 
find many examples. I find the method in [1] interesting, but I don't know how 
to apply this method in Yade. 

In [1], soil response to sinusoidal motions in a dry granular soil column is 
investigated. The concept of viscous boundary developed by Lysmer et al. [2] 
and White et al. [3] is implemented at the base. This kind of dynamic boundary 
utilize dashpots attached independently to the boundary for two functions: (1) 
applying the base input motion to the soil deposit, and (2) absorbing all or 
part of elastic energy of the shear wave approaching the boundary. To have an 
absorbing boundary at the base, a frictionless wall was placed to the base of 
the deposit. The upper boundary is free. Periodic boundaries were employed to 
simulate a semi-infinite system in the two lateral directions of shaking. At 
each time step, particles in contact with the base wall were identified. 
External force promotion to the velocity of each particle in the direction of 
shaking was applied at the center of the particle in order to simulate the 
input seismic wave.

My questions are as followed:

1.
In Yade, I find that the periodic boundary must contain all the six faces, 
including the lateral boundary, the base and the top. (Am I right?) How can I 
make the base to be a frictionless wall and the upper boundary to be free?

2.
Is there a better way to simulate seismic wave propagation in granular soil? 
How to deal with the dynamic boundary setting and the input of seismic waves?

Thanks!


[1]Zamani N, El Shamy U. Analysis of wave propagation in dry granular soils 
using DEM simulations[J]. Acta Geotechnica, 2011, 6(3): 167.
[2]Lysmer J, Roger L, Kuhlemeyer A (1969) Finite dynamic model for infinite 
media. J Eng Mech Div 95:858–877
[3]White W, Villiappan S, Lee IK (1977) Unified boundary for finite dynamic 
models. J Eng Mech Div 103(5):949–964


-- 
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 #693803]: How to model seismic wave propagation

2020-11-05 Thread Huang peilun
Question #693803 on Yade changed:
https://answers.launchpad.net/yade/+question/693803

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #693831]: How to deal with the dynamic boundary setting and the input of seismic waves in YADE

2020-11-05 Thread Huang peilun
New question #693831 on Yade:
https://answers.launchpad.net/yade/+question/693831

Hi,

I want to model seismic wave propagation in granular soil. Unlike static 
analysis, fixed boundaries reflect outward propagating waves back into the 
model and trap energy of the outward traveling waves which may lead to great 
inaccuracies. Instead, nonreflecting boundaries that allow the necessary energy 
radiation is a better option.

I want to have a comprehensive view of how to set up the dynamic boundary and 
input seismic waves in terms of the discrete element method. Through other's 
work, I could learn how they solved these problems, but I didn't find a 
literature review about this problem. I would like to know which method is the 
most appropriate one and how to apply this method in YADE. Can someone give me 
some guidance? 

Thanks!

-- 
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 #696228]: How to get a pressure boundary condition as triangle distribution by FlowEngine

2021-03-24 Thread Huang peilun
New question #696228 on Yade:
https://answers.launchpad.net/yade/+question/696228

Hello all,

As we know, water pressure increases with depth. (Pressure=denstiy*g*depth) 
I want to use FlowEngine to get a pressure boundary that the pressure is 
increasing with depth. However, I find that by setting "bndCondValue"[1] can 
only get a uniform pressure at the boundary, which doesn't change with depth. 
I've read through the  FlowEngine class reference [2] to get some ideas. I 
think I can search for the cells which are outermost and use "setCellPressure" 
[3] to get a boundary that the pressure increases with depth. But this is too 
complicated. Is there any better idea?

Thank you for any suggestions.

[1] 
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.bndCondValue
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine
[3] 
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.setCellPressure

-- 
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 #696228]: How to get a pressure boundary condition as triangle distribution by FlowEngine

2021-03-24 Thread Huang peilun
Question #696228 on Yade changed:
https://answers.launchpad.net/yade/+question/696228

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
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 #695934]: Compression won't stop when the goal of TriaxialStressController is reached

2021-03-10 Thread Huang peilun
Question #695934 on Yade changed:
https://answers.launchpad.net/yade/+question/695934

Huang peilun posted a new comment:
Thanks Jan Stránský, that solved my question.

-- 
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 #695934]: Compression won't stop when the goal of TriaxialStressController is reached

2021-03-10 Thread Huang peilun
Question #695934 on Yade changed:
https://answers.launchpad.net/yade/+question/695934

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
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 #696055]: O.load: Input stream error

2021-03-15 Thread Huang peilun
Question #696055 on Yade changed:
https://answers.launchpad.net/yade/+question/696055

Huang peilun posted a new comment:
Thanks a lot.

-- 
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 #696056]: Can't clump facet together

2021-03-15 Thread Huang peilun
Question #696056 on Yade changed:
https://answers.launchpad.net/yade/+question/696056

Huang peilun posted a new comment:
> for discussion continuation, why not providing more info already this
time? :-)

Really sorry about that.

> what is "a boudary"?

I want to simulate the sampler of the standard penetration test. The
shape of the driving shoe is not of regular shape, therefore can not be
represented by box object or cylinder. It's like a tube and with a
contraction at the top. I was told that the shape of the driving shoe do
have effect on the result of the SPT but I am not sure how large the
impact is. So I want to simulate the exact shape. I tried polyhedron but
in that case I can't use CohFrictMat. Because Ig2 for sphere and
polyhedra only support ScGeom and CohFrictPhys need ScGeom6D. If I don't
use CohFrictPhys, the macroscopic friction angle is too small and not
like the real soil.

> Why are (fixed, not moving) individual facets not suitable and why you
need a clump?

I clump the facets together so that I can simulate the exact shape. In
my understanding, individual facets are of triangle shape and can not
move together. In my case I need the boundary of the sampler to move
together. Thus I have to clump them together.

>Using facets for this purpose is fine [2,3,4,5], but normally you do
not need at all to clump the facets [2,3,4,5].

Thanks for your advice. I am going to study these code to see if they
can 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 : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #696056]: Can't clump facet together

2021-03-15 Thread Huang peilun
Question #696056 on Yade changed:
https://answers.launchpad.net/yade/+question/696056

Huang peilun posted a new comment:
Yes, I need a clump for the boundary. I want to create a boundary that
is not cuboid, like a polyhedron. But I'm not proficient in using Yade.
The only thought that came up to me is using facets and put them
together. Can you give me some advice?

-- 
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 #696055]: O.load: Input stream error

2021-03-15 Thread Huang peilun
Question #696055 on Yade changed:
https://answers.launchpad.net/yade/+question/696055

Huang peilun posted a new comment:
Thanks. Now I understand. I saved the files with the old version. But in
this case if I want to repeat the simulation or try some other
conditions, I should not update Yade often?

-- 
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 #696055]: O.load: Input stream error

2021-03-15 Thread Huang peilun
Question #696055 on Yade changed:
https://answers.launchpad.net/yade/+question/696055

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #696055]: O.load: Input stream error

2021-03-15 Thread Huang peilun
New question #696055 on Yade:
https://answers.launchpad.net/yade/+question/696055

Hi,

I just update the yadedaily. It's now Yade 20210313-5135~5285d37~bionic1.
Before I update, O.load works fine. Now it reports this error:

---
RuntimeError  Traceback (most recent call last)
/usr/bin/yadedaily in ()
> 1 O.load('Triax_PSD1.xml.bz2')

RuntimeError: input stream error

I don't know why this happen. Can someone help me out? 
Thanks.

-- 
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 #696056]: Can't clump facet together

2021-03-15 Thread Huang peilun
New question #696056 on Yade:
https://answers.launchpad.net/yade/+question/696056

Hi, 
I'm trying to clump facet together to create a boundary that is not cuboid. My 
code is as followed:



f1=facet(vertices=[(0,0,0),(0,1,0),(1,0,0)],wire=False)
f2=facet(vertices=[(1,1,0),(0,1,0),(1,0,0)],wire=False)
O.bodies.appendClumped((f1,f2))



But it reports error like this:

python3.6: /builds/yade-dev/trunk/deb/yadedaily/core/Clump.cpp:242: static void 
yade::Clump::updateProperties(const boost::shared_ptr&, unsigned 
int): Assertion `M > 0' failed.
Aborted (core dumped)

Can someone help me? Thanks.

-- 
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 #696056]: Can't clump facet together

2021-03-15 Thread Huang peilun
Question #696056 on Yade changed:
https://answers.launchpad.net/yade/+question/696056

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
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 #696056]: Can't clump facet together

2021-03-15 Thread Huang peilun
Question #696056 on Yade changed:
https://answers.launchpad.net/yade/+question/696056

Huang peilun posted a new comment:
Thanks, I'll pay attention to provide more information next time.

-- 
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 #696056]: Can't clump facet together

2021-03-16 Thread Huang peilun
Question #696056 on Yade changed:
https://answers.launchpad.net/yade/+question/696056

Huang peilun posted a new comment:
Thanks, that solved my question.

-- 
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 #695934]: Compression won't stop when the goal of TriaxialStressController is reached

2021-03-09 Thread Huang peilun
Question #695934 on Yade changed:
https://answers.launchpad.net/yade/+question/695934

Huang peilun posted a new comment:
Thanks Robert, but is the assigned strain rate the rate of the true
(logarithmic) strain?

-- 
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 #695934]: Compression won't stop when the goal of TriaxialStressController is reached

2021-03-08 Thread Huang peilun
New question #695934 on Yade:
https://answers.launchpad.net/yade/+question/695934

Hi,

I'm currently doing a simple compression test. I set the stressMask to be 0 and 
goal1, goal2, goal3 to be -0.1 in the TriaxialStressController. However, when 
the strain reaches -0.1, the compression does not stop. I continue the 
simulation and the strain reaches -0.7 with no tendency to stop. I'm confused 
why this happens. Can anyone help me out?

Here's my code:




from yade import pack

SoilMat=CohFrictMat(young=2e9,poisson=0.3,density=2650,frictionAngle=0.7,alphaKr=50,alphaKtw=50,momentRotationLaw=True)
WallMat=CohFrictMat(young=2e20,poisson=0.5,frictionAngle=0.7,density=1000,label='walls',momentRotationLaw=True)
O.materials.append((SoilMat,WallMat))

mn,mx=Vector3(0,0,0),Vector3(100,100,100)
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

Particle_num=8000
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(100,100,100),rMean=.5,num=Particle_num)
sp.toSimulation(material=SoilMat)

triax=TriaxialStressController(
stressMask = 7,
thickness = 0,
max_vel=0.05,
internalCompaction=True, # If true the confining pressure is generated 
by growing particles
wall_bottom_activated=False,
wall_back_activated=False,
wall_left_activated=False,
goal1 = -3, goal2 = -3, goal3 = -3,
)

newton=NewtonIntegrator(damping=0.2)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
newton,
PyRunner(command='Step1()',realPeriod=1,label='SLM'),
]

def Step1():
print(abs((3+triax.meanStress)/3))
if abs((3+triax.meanStress)/3)<0.05: 
triax.stressMask=0
triax.internalCompaction=False
triax.goal1=triax.goal2=triax.goal3=-0.1
SLM.command='Step2()'

def Step2():
print("%s: %s, %s" % (O.iter,triax.depth,triax.strain))





-- 
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 #700748]: how to calculate the plastic part of shear displacement in law2-cohesionMoment

2022-03-09 Thread Huang peilun
Question #700748 on Yade changed:
https://answers.launchpad.net/yade/+question/700748

Status: Answered => Solved

Huang peilun confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
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 #700748]: how to calculate the plastic part of shear displacement in law2-cohesionMoment

2022-02-26 Thread Huang peilun
New question #700748 on Yade:
https://answers.launchpad.net/yade/+question/700748

Hi,
I want to calculate the plastic shear displacement of any specific contact 
during every time step. I'm using Law2_ScGeom6D_CohFrictPhys_CohesionMoment[1]. 
In the source code, the plastic displacement is calculated by the following 
code (L140-L159):

Vector3r&   shearForce = geom->rotate(phys->shearForce);
const Vector3r& dus= geom->shearIncrement();

//Linear elasticity giving "trial" shear force
shearForce -= phys->ks * dus;

Real Fs= phys->shearForce.norm();
Real maxFs = phys->shearAdhesion;
if (!phys->cohesionDisablesFriction || maxFs == 0) maxFs += Fn 
* phys->tangensOfFrictionAngle;
maxFs = math::max((Real)0, maxFs);
if (Fs > maxFs) { //Plasticity condition on shear force
if (phys->fragile && !phys->cohesionBroken) {
phys->SetBreakingState();
maxFs = max((Real)0, Fn * 
phys->tangensOfFrictionAngle);
}
maxFs   = maxFs / Fs;
Vector3r trialForce = shearForce;
shearForce *= maxFs;
if (scene->trackEnergy || traceEnergy) {
Real sheardissip = ((1 / phys->ks) * 
(trialForce - shearForce)) /*plastic disp*/.dot(shearForce) /*active force*/;

Briefly, the plastic shear displacement is calculated by 1/ks*(trialForce - 
shearForce). However, it seems trialForce is not available during the 
simulation process. Though shearInc is available, which is dus in the source 
code, it is not exactly the same as 1/ks*(trialForce - shearForce). Therefore I 
want to ask if there is a simple way to get the plastic shear displacement 
instead of modify the source code?

Thank you!

[1] 
https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/CohesiveFrictionalContactLaw.cpp

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