Re: [Yade-users] [Question #515323]: convergence using HydrodynamicsLawLBM

2017-03-02 Thread Seungcheol Yeom
Question #515323 on Yade changed:
https://answers.launchpad.net/yade/+question/515323

Seungcheol Yeom posted a new comment:
Thank you for your response Rob.

Yes, I was going to do that because when I looked into to cpp file, it was 
commented.
I just want to confirm that it is active or not.
Let me try and see what happens.
Thanks again.

Seungcheol

-- 
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 #517125]: How to set an correct Id of a particle assembly

2017-03-02 Thread Robert Caulk
Question #517125 on Yade changed:
https://answers.launchpad.net/yade/+question/517125

Robert Caulk posted a new comment:
Can you post your script that uses the first method?

-- 
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 #515323]: convergence using HydrodynamicsLawLBM

2017-03-02 Thread Robert Caulk
Question #515323 on Yade changed:
https://answers.launchpad.net/yade/+question/515323

Robert Caulk posted a new comment:
Check out [1]. I looked around and concluded that the stop criterion is
not currently active.

If it were active, it looks like it calculates the error in one of two
ways, mean force or mean velocity.

Maybe try compiling the code with an uncommented stop criteria in [1] to
see if your simulation behaves the way you expect it should.

[1]
https://github.com/yade/trunk/blob/e4e757f2e98a620e3177b7a36a1d10f69f6a6a28/pkg/lbm/HydrodynamicsLawLBM.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


Re: [Yade-users] [Question #497350]: Export a polyhedron into a *.stl or * .gts file

2017-03-02 Thread Jan Stránský
Question #497350 on Yade changed:
https://answers.launchpad.net/yade/+question/497350

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Tina,
thanks for clarification :-) you have several options here, using existing
answers of this question:
(ymport.stl returns list of facets, it cannot be used as a predicate for
randomDensePack. For this case, you have to use pack.inGtsSurface)
###
import gts
facets = ymport.stl('tina.stl')
surf = gts.Surface()
for f in facets:
  vs = [f.state.pos + f.state.ori*v for v in f.shape.vertices]
  gtsvs = [gts.Vertex(v[0],v[1],v[2]) for v in vs]
  es = [gts.Edge(gtsvs[i],gtsvs[j]) for i,j in ((0,1),(1,2),(2,0))]
  face = gts.Face(es[0],es[1],es[2])
  surf.add(face)
surf.cleanup(1e-6)
assert surf.is_closed()
pred = pack.inGtsSurface(surf)
sphs = pack.randomDensePack(pred,radius=0.001,spheresInCell=500)
O.bodies.append(sphs)
###

cheers
Jan

-- 
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 #515400]: Introduction of defects

2017-03-02 Thread Jan Stránský
Question #515400 on Yade changed:
https://answers.launchpad.net/yade/+question/515400

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

I am new to Yade


welcome :-)

for f in O.forces :
> f.addF((-1,0,0))


for b in O.bodies:
   O.forces.addF(b.id,(-1,0,0)) # [1]

cheers
Jan

[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addF

-- 
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 #516898]: Using radius expansion method to build a DEM model

2017-03-02 Thread Robert Caulk
Question #516898 on Yade changed:
https://answers.launchpad.net/yade/+question/516898

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

It sounds like you are interested in using the TriaxialStressController.
Within this engine, you can indicate whether you want to achieve
confining stress by internal compaction (radius expansion) or by moving
the walls. If you would like to see this method in action and improve
your programming skills, there is a wonderful tutorial located in your
Yade examples folder:

/examples/triax-tutorial

If you have not installed Yade, you can look at the code here:
https://github.com/yade/trunk/tree/17ef98c3639aad5f474586eed13e2ccae98dcf4a/examples/triax-tutorial

As for PFC, you may want to seek assistance elsewhere since it is an
entitely different software package.

-- 
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 #517125]: How to set an correct Id of a particle assembly

2017-03-02 Thread Huihuang Xia
New question #517125 on Yade:
https://answers.launchpad.net/yade/+question/517125

Hi,

This question bothers me for a long time, i.e. when I create a particle 
assembly, I do want to use body.state.vel and body.state.blockedDOFs to set a 
particular motion for the particle assembly. But, I failed for several times. 

I have tried this two methods, the first one is posted in 
https://answers.launchpad.net/yade/+question/404127, namely
ball_id = O.bodies.append(...)
ball = O.bodies[ball_id]
but I got an error:

Traceback (most recent call last):
  File "/home/huihuang/YADE/install/bin/yade", line 182, in runScript
execfile(script,globals())
  File "cube.py", line 8, in 
cube.state.blockDOFs='xyzXY'
AttributeError: 'list' object has no attribute 'state'

The second method is:

cube=pack.randomDensePack(pred,radius=0.5,rRelFuzz=0.5,spheresInCell=1000)
O.bodies.append(cube)
cube.state.blockDOFs='xyzXY'
cube.state.vel=(0,0,-0.1)

and this one also got a same error, AttributeError: 'list' object has no 
attribute 'state'.

Can anyone help me solving this problem?
Thanks in advance,

Huihuang Xia


-- 
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 #516898]: Using radius expansion method to build a DEM model

2017-03-02 Thread Shayan hashemi
New question #516898 on Yade:
https://answers.launchpad.net/yade/+question/516898

Dear developers of Yade or PFC
I am a new user of PFC, I want to build a DEM model using many sub-spheres to 
fill a given regular shape with radius expansion method, such as a sand 
particle. But, I cannot find even an example using this radius expansion method 
in Yade's tutorial. Can you give me such an example to help me improving my 
programming skills?
Many thanks and regards,

-- 
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 #515400]: Introduction of defects

2017-03-02 Thread loiseaurare
New question #515400 on Yade:
https://answers.launchpad.net/yade/+question/515400

Hi everybody, 

I am new to Yade, and I am trying to model the fragmentation of a very simple 
sample.

Up to now I have managed to create the sample, and make it fall on a plate. I 
would like to complexify this model and introduce a serie of defects in the 
bonds of the material.

Initially I thought working directly on the interaction would be a good idea, 
but then searching trough the launchpad, I found out that apparently it was 
possible to add forces directly in the force container.

However Yade seems to say it is not possible to iterate on the force container. 
Does anybody have an idea of how to deal with that ?

Here is my script :

from yade import pack

# INPUTS
# Geometry
LxBox = 0.1 
LyBox = 0.1 
LzBox = 0.1 
LzImp = 0.3
RadSphere = 0.02
WallPos = -LzBox
WallAxis = (0.,0.,1.)

# Material
EyCohFrictMat = 1e7
poissonCohFrictMat = 0.25
densityCohFrictMat = 2600.
FrictAngSphere = 30.*pi/180.
NCohesionCohFrictMat = 6.5e4
SCohesionCohFrictMat = 6.5e4


EyFrictMat = 1e7
poissonFrictMat = 0.25
densityFrictMat = 2600.
FrictAngWall = 30.*pi/180.

# Calculation
damp=0.5
gz=-9.81





"
# SIMULATION BEGINNING -  SIMULATION BEGINNING -  SIMULATION BEGINNING


## CREATE MATERIAL - CREATE MATERIAL - CREATE MATERIAL 
O.materials.append(
  CohFrictMat(
  young = EyCohFrictMat,
  poisson= poissonCohFrictMat,
  density= densityCohFrictMat ,
  frictionAngle = FrictAngSphere,
  normalCohesion = NCohesionCohFrictMat ,
  shearCohesion = SCohesionCohFrictMat ,
  momentRotationLaw=False,
  etaRoll=0.1,
  isCohesive =True,
  label='MatSpheres'))


O.materials.append(
  FrictMat(
  young = EyFrictMat,
  poisson= poissonFrictMat,
  frictionAngle=FrictAngWall,
  density= densityFrictMat ,
  label='MatFrictWalls'))


## CREATE SPHERES - CREATE SPHERES - CREATE SPHERES -
pred=pack.inAlignedBox((0.,0.,0.),(LxBox,LyBox,LzBox))

block=pack.randomDensePack(pred,radius=0.005, material = 'MatSpheres', 
rRelFuzz=0.3,spheresInCell=200,color=(1,0,1), returnSpherePack = False)

O.bodies.append(block)


### Create BOX - Create BOX - Create BOX (Changer )
O.bodies.append(utils.box(center=(0.,0.,-LzImp),extents=(25*LxBox,25*LyBox,0.01*LxBox),material='MatFrictWalls',fixed=True))

#O.bodies.append( à tester sur un autre script )
#utils.wall(
#position=WallPos, 
#axis=WallAxis, 
#sense=0, 
#color=(10, 25, 51), 
#material='MatFricWalls'
#))

## CALCULATION - CALCULATION - CALCULATION
newton=NewtonIntegrator(damping=damp)
newton.gravity=(0,0,gz)

def introduceDefects () :
print O.iter 
for f in O.forces :
f.addF((-1,0,0))

O.engines=[

#introduceDefects(),
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
#Il faut rentrer toutes les lois pour tout les types de matériau
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True),
Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm = 
True, label='cohlaw'),
Law2_ScGeom_FrictPhys_CundallStrack()]
),

#GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=0.2,
 defaultDt=4*PWaveTimeStep()),
NewtonIntegrator(gravity=(0,0,gz),damping=damp),
]



O.dt = 1e-4



## DISPLAY CONTROLLERS - DISPLAY CONTROLLERS - DISPLAY CONTROLLERS
yade.qt.Controller(), yade.qt.View()

## CHECK - CHECK - CHECK

O.step()
print  'maxOverlap', max(i.geom.penetrationDepth for i in O.interactions)
print  'maxNormalForce', max(i.phys.normalForce.norm for i in O.interactions)
print  'maxShearForce', max(i.phys.shearForce.norm for i in O.interactions)


O.run(1000,True)
print  'maxOverlap', max(i.geom.penetrationDepth for i in O.interactions)
print  'maxNormalForce', max(i.phys.normalForce.norm for i in O.interactions)
print  'maxShearForce', max(i.phys.shearForce.norm for i in O.interactions)



from yade import export
export.text("bloc.txt")


Cheers


-- 
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 #509268]: Error in installation from source code

2017-03-02 Thread Mike
Question #509268 on Yade changed:
https://answers.launchpad.net/yade/+question/509268

Status: Answered => Open

Mike is still having a problem:
Hi Jan,
I'm using Ubuntu 14.04

-- 
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 #497350]: Export a polyhedron into a *.stl or * .gts file

2017-03-02 Thread Tina Asia
Question #497350 on Yade changed:
https://answers.launchpad.net/yade/+question/497350

Status: Answered => Open

Tina Asia is still having a problem:
Hi Jan,

Thanks for your patience, but I got an error by importing the *.stl file
generated by the above code. The error and my new code are as follows.

from yade import ymport
from yade import pack
from yade import qt

pred=O.bodies.append(ymport.stl('tina.stl'))
spheres=pack.randomDensePack(pred,radius=0.001,rRelFuzz=0.3,spheresInCell=500,color=(1,0,1))
O.bodies.append(spheres)

qt.View()
qt.Controller()

I got this error:

$ yade fillsphere.pyWelcome to Yade 2017.01a 
TCP python prompt on localhost:9000, auth cookie `sdcaek'
XMLRPC info provider on http://localhost:21000
Running script fillsphere.py
ERROR /home/tina/YADE/trunk/pkg/dem/STLImporter.cpp:23 import: Can't open file: 
tina.stl
Traceback (most recent call last):
  File "/home/tina/YADE/install/bin/yade", line 182, in runScript
execfile(script,globals())
  File "fillsphere.py", line 6, in 

spheres=pack.randomDensePack(pred,radius=0.001,rRelFuzz=0.3,spheresInCell=500,color=(1,0,1))
  File "/home/tina/YADE/install/lib/x86_64-linux-gnu/yade/py/yade/pack.py", 
line 490, in randomDensePack
if not dim: dim=predicate.dim()
AttributeError: 'list' object has no attribute 'dim'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for 
showing help), F10 both, F9 generator, F8 plot. ]]

Besides, I also tried pack.inConvexPolyhedron (https://www.yade-
dem.org/doc/yade.pack.html?highlight=pack.in#yade.pack.inConvexPolyhedron)
to fill a polyhedron with many sub-particles, but this one got error
too:

This is my code:

from yade import polyhedra_utils

rock = PolyhedraMat()
rock.IsSplitable = True
rock.strength = 6e3

poly = polyhedra_utils.polyhedra(rock, size=(0.01,0.02,0.01), seed=1)
O.bodies.append(poly)

pred=pack.inConvexPolyhedron(poly)
aabb=pred.aabb()
dim0=aabb[1][0]-aabb[0][0]
spheres=O.bodies.append(pack.randomDensePack(pred,radius=0.001,rRelFuzz=0.3,spheresInCell=300))
O.bodies.append(spheres)

from yade import qt
qt.View()
qt.Controller()

and this is the error:

~/Desktop/polyhedra$ yade poly.py
Welcome to Yade 2017.01a 
TCP python prompt on localhost:9000, auth cookie `yudssc'
XMLRPC info provider on http://localhost:21000
Running script poly.py
Traceback (most recent call last):
  File "/home/tina/YADE/install/bin/yade", line 182, in runScript
execfile(script,globals())
  File "poly.py", line 10, in 
pred=pack.inConvexPolyhedron(poly)
  File "/home/tina/YADE/install/lib/x86_64-linux-gnu/yade/py/yade/pack.py", 
line 208, in __init__
self._inHalfSpaces = [inHalfSpace(c,d) for c,d in planes]
TypeError: 'Body' object is not iterable
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for 
showing help), F10 both, F9 generator, F8 plot. ]]

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

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


[Yade-users] [Question #515323]: convergence using HydrodynamicsLawLBM

2017-03-02 Thread Seungcheol Yeom
New question #515323 on Yade:
https://answers.launchpad.net/yade/+question/515323

Hello all,

I have a quick question regarding ConvergenceThreshold using 
HydrodynamicsLawLBM.

I am wondering whether ConvergenceThreshold is working or not. 
If I assume that it works, is my simulation terminated when it get to the 
threshold?
Also, how does it calculate? based on the velocity between previous and current 
iteration step?
Finally, is there any way to print current convergence value at every certain 
iteration? like unbalanced force?

Thank you for your help!

Sincerely,

Seungcheol


-- 
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 #482413]: TriaxialStressController lose control of stress

2017-03-02 Thread Wei Cao
Question #482413 on Yade changed:
https://answers.launchpad.net/yade/+question/482413

Status: Answered => Open

Wei Cao is still having a problem:
Hi Bruno, thank you for your answer!

But I don't think that works.

1. triax.goal1 /goal2/goal3 are strain rate goals, not strain goal. So
triax.goal1 = 0.00 should mean to keep the wall unmoved in direction,
not uncompacting.

2. O.cell.trsf=Matrix3.Identity  could be used for PeriTriaxController, but 
here I use TriaxialStressController, so I  change the reference geometry by 
typing:
triax.depth0 = triax.depth
triax.height0 = triax.height
triax.width0 = triax.width

I'am still confuse why my code DOES NOT WORK.

Anyway, 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 #497350]: Export a polyhedron into a *.stl or * .gts file

2017-03-02 Thread Jan Stránský
Question #497350 on Yade changed:
https://answers.launchpad.net/yade/+question/497350

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Tina,
it pretty much depends on what program/method you use for filling. In my
opinion, both gts and stl are equally good, since they are relatively
easily convertible and saving basically the same information.
cheers
Jan

-- 
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 #509268]: Error in installation from source code

2017-03-02 Thread Jan Stránský
Question #509268 on Yade changed:
https://answers.launchpad.net/yade/+question/509268

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Mike,
what Ubuntu version do you use?
thanks
Jan

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