Re: [Yade-users] [Question #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
Question #699462 on Yade changed:
https://answers.launchpad.net/yade/+question/699462

whr posted a new comment:
>PeriTriaxController overwites it to fulfill its goal values

This may not be right. In the original code, I set triax.dead = True
already. After my test, the displacement still occurs even if I remove
the PeriTriaxController from the engine.

-- 
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 #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
Question #699462 on Yade changed:
https://answers.launchpad.net/yade/+question/699462

Status: Answered => Solved

whr 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 #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
Question #699462 on Yade changed:
https://answers.launchpad.net/yade/+question/699462

Status: Solved => Open

whr is still having a problem:
Hello Jan,

Thank you so much for your quick reply.

Use
O.cell.homoDeform=0 # [1]
Sovled my problem. The script works as I expected.

There is one more thing that I am not clear. In my original code, I set
O.cell.velGrad = Matrix3(0,0,0, 0,0,0, 0,0,0). It works and the cell
does not deform. So, where does the displacement come from?

-- 
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 #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
Question #699462 on Yade changed:
https://answers.launchpad.net/yade/+question/699462

Status: Answered => Solved

whr 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 #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
Question #699462 on Yade changed:
https://answers.launchpad.net/yade/+question/699462

Description changed to:
Dear all,

I am trying to fix some particles with blockedDOFs, while others could
move freely under external force. It works fine in an aperiodic scene,
but failed in a periodic scene.

Following is a minimum code to present the situation. I print the
relative position of two particles, which are supposed to be fixed.
Also, the velocity of them is indeed not 0, although I set them to 0 in
the script.

Thanks a lot for any help.
Huanran


from yade import pack

coarseNum = 20 # coarse Number
fineNum = 10 # fine number
coarseSize = 2.5e-3 
fineSize = 0.4e-3
cellLength = 0.05 # initial cell size
mn,mx=Vector3(0,0,0),Vector3(cellLength, cellLength, cellLength)
sigma0 = -5e3 # 5kPa confining pressure
F = 2350 * 4./3. * pi * fineSize**3 * 10 #force
F *= Vector3(0,-1,0)

O.materials.append(FrictMat(young=8.e6, poisson=0.8,
frictionAngle=radians(26.6), density=2350, label='mat1'))

sp=pack.SpherePack()
sp.makeCloud(minCorner=mn, maxCorner=mx, rMean=coarseSize, rRelFuzz=0., 
num=coarseNum, periodic=True, seed=1)
sp.makeCloud(minCorner=mn, maxCorner=mx, rMean=fineSize, rRelFuzz=0., 
num=fineNum, periodic=True, seed=1)
sp.toSimulation(material=O.materials['mat1'],color=(0,0,1))
for p in O.bodies:
   if p.shape.radius == fineSize:
  p.shape.color = (1,0,0)
   
Gl1_Sphere.stripes=1
yade.qt.Controller(), yade.qt.View()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, 
timestepSafetyCoefficient=0.8),
   PeriTriaxController(
  dynCell=True,
  goal=(sigma0,sigma0,sigma0),
  stressMask=7,
  absStressTol=1.,
  relStressTol=1.e-4,
  maxUnbalanced=1.e-4,
  maxStrainRate=(1.,1.,1.),
  doneHook='applyForce()',
  label='triax'
   ),
   NewtonIntegrator(damping=.3,label='newton')
]

def applyForce():
   triax.dead = True
   O.cell.velGrad = Matrix3(0,0,0, 0,0,0, 0,0,0)
   for p in O.bodies:
  if p.shape.radius > fineSize:
 p.state.blockedDOFs = 'xyzXYZ'  
 p.state.vel = Vector3(0,0,0)
 p.state.angVel = Vector3(0,0,0)
  if p.shape.radius == fineSize:
 O.forces.setPermF(p.id, F)
   
O.engines+=[PyRunner(command='print(O.bodies[0].state.pos-O.bodies[1].state.pos)',iterPeriod=100,nDo=20)]
   
print("computing, be patient...")

O.run()

-- 
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 #699462]: Fixed some particles in a periodic cell

2021-11-12 Thread whr
New question #699462 on Yade:
https://answers.launchpad.net/yade/+question/699462

Dear all,

I am trying to fix some particles with blockedDOFs, while others could move 
freely under external force. It works fine in an aperiodic scene, but failed in 
a periodic scene. 

Following is a minimum code to present the situation. I print the relative 
position of two particles, which are supposed to be fixed. Also, the velocity 
of them is indeed not 0, although I set them to 0 in the script.

Thanks a lot for any help.


from yade import pack

coarseNum = 20 # coarse Number
fineNum = 10 # fine number
coarseSize = 2.5e-3 
fineSize = 0.4e-3
cellLength = 0.05 # initial cell size
mn,mx=Vector3(0,0,0),Vector3(cellLength, cellLength, cellLength)
sigma0 = -5e3 # 5kPa confining pressure
F = 2350 * 4./3. * pi * fineSize**3 * 10 #force
F *= Vector3(0,-1,0)

O.materials.append(FrictMat(young=8.e6, poisson=0.8, 
frictionAngle=radians(26.6), density=2350, label='mat1'))

sp=pack.SpherePack()
sp.makeCloud(minCorner=mn, maxCorner=mx, rMean=coarseSize, rRelFuzz=0., 
num=coarseNum, periodic=True, seed=1)
sp.makeCloud(minCorner=mn, maxCorner=mx, rMean=fineSize, rRelFuzz=0., 
num=fineNum, periodic=True, seed=1)
sp.toSimulation(material=O.materials['mat1'],color=(0,0,1))
for p in O.bodies:
   if p.shape.radius == fineSize:
  p.shape.color = (1,0,0)
   
Gl1_Sphere.stripes=1
yade.qt.Controller(), yade.qt.View()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, 
timestepSafetyCoefficient=0.8),
   PeriTriaxController(
  dynCell=True,
  goal=(sigma0,sigma0,sigma0),
  stressMask=7,
  absStressTol=1.,
  relStressTol=1.e-4,
  maxUnbalanced=1.e-4,
  maxStrainRate=(1.,1.,1.),
  doneHook='applyForce()',
  label='triax'
   ),
   NewtonIntegrator(damping=.3,label='newton')
]

def applyForce():
   triax.dead = True
   O.cell.velGrad = Matrix3(0,0,0, 0,0,0, 0,0,0)
   for p in O.bodies:
  if p.shape.radius > fineSize:
 p.state.blockedDOFs = 'xyzXYZ'  
 p.state.vel = Vector3(0,0,0)
 p.state.angVel = Vector3(0,0,0)
  if p.shape.radius == fineSize:
 O.forces.setPermF(p.id, F)
   
O.engines+=[PyRunner(command='print(O.bodies[0].state.pos-O.bodies[1].state.pos)',iterPeriod=100,nDo=20)]
   
print("computing, be patient...")

O.run()

-- 
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 #690815]: CPU random generator warning

2020-05-21 Thread whr
Question #690815 on Yade changed:
https://answers.launchpad.net/yade/+question/690815

whr posted a new comment:
Just add a comment on the bug Janek mentioned.

I tested it and yade-2020.01a indeed has this bug. makeCloud generate
different set of particle with same seed. The source code is the same as
those before fixed in [1].

>If you check line 52 [1] you'll see that seed was not fully ignored, it
was just always zero regardless of user input.

The bug is caused by line 128 in [1] where seed is ignored. Defaulting
to -1 makes it random in case no seed is defined in the fixed version,
am I right?

[1]https://gitlab.com/yade-dev/trunk/-/merge_requests/428/diffs

-- 
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 #690815]: CPU random generator warning

2020-05-20 Thread whr
Question #690815 on Yade changed:
https://answers.launchpad.net/yade/+question/690815

Status: Answered => Solved

whr confirmed that the question is solved:
Thank you, Robert and Janek.

>Robert,
I tested Python, it's able to generate different random number with your 
suggested code.

I didn't know the bug in makeCloud then. I noticed somebody on Internet
said AMD tested their CPU on ubuntu 18.04 so I reinstalled my OS to
18.04. Although the RDRND bug persist (tested with a code from
https://arstechnica.com/gadgets/2019/10/how-a-months-old-amd-microcode-
bug-destroyed-my-weekend/), I compiled yade-2020.01a without warning and
it worked fine now, including makeCloud.

>Janek,
Thanks for the info. Since makeCloud in yade-2020.01a works fine in ubuntu 
18.04, I assume it's not affected by the bug you mentioned and I cannot test a 
newer version of yade on ubuntu 20.04 now. BTW, based on my understanding of 
seed, if it's ignored makeCloud should generate different set of particles with 
same seed?

Yade works fine on my desktop now, but I'm not sure if it's a good idea
to move to ThreadRipper now. ;)

Thanks,
Huanran

-- 
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 #690815]: CPU random generator warning

2020-05-19 Thread whr
Question #690815 on Yade changed:
https://answers.launchpad.net/yade/+question/690815

whr gave more information on the question:
I did more tests. I change seed in makeCloud and found out different
seed produce the same set of particles.

Sad news. Seems I need to find a solution to this problem.

Thx,
Huanran

-- 
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 #690815]: CPU random generator warning

2020-05-19 Thread whr
New question #690815 on Yade:
https://answers.launchpad.net/yade/+question/690815

Dear all,

I'm trying to move my working environment to one with AMD cpu to take advantage 
of the AMD ThreadRipper. Before that, I made a test with Ryzen 3700x and the 
latest Ubuntu 20.04.

I'm installing the 2020.01a version. During configuring the compilation 
process, I get a warning :
WARNING: CPU random generator seem to be failing, disable hardware random 
number generation
WARNING: RDRND generated: 0x 0x 0x 0x

Ignoring this, I finished the installation successfully.  I have run some tests 
involving makeCloud (considering some random number is involved). They works 
fine, although I can still get the same warning every time I open yade through 
terminal.

Google told me this is a known problem with Ryzen 3000-series CPU. I am working 
on a lenovo desktop and the problem is still there after I updated BIOS to the 
latest version.  I am wandering, how much this problem will affect yade and how 
to get rid of this warning.

Thx,
Huanran



-- 
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 #684030]: example of FEMxDEM simulation

2019-09-18 Thread whr
Question #684030 on Yade changed:
https://answers.launchpad.net/yade/+question/684030

Status: Open => Answered

whr proposed the following answer:
Hi Alireza,

The python codes are already included in the source code in
trunk/examples/FEMxDEM.

To couple them together, you need scripts in trunk/py/FEMxDEM. I suggest
you put the codes in the two folders together to run a test simulation
first.

Huanran

-- 
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 #679154]: run FEMxDEM examples

2019-04-02 Thread whr
Question #679154 on Yade changed:
https://answers.launchpad.net/yade/+question/679154

whr posted a new comment:
Based on my understanding, both of them are defined on the function
space. So they should be the same.

You can try to ask on the escript forum.

-- 
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 #679154]: run FEMxDEM examples

2019-04-01 Thread whr
Question #679154 on Yade changed:
https://answers.launchpad.net/yade/+question/679154

whr posted a new comment:
The packings are just DEM packings. You can analyze them as you analyze
a DEM simulation.

I'm not clear about the second one. How are dispx and shearx defined?

-- 
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 #679154]: run FEMxDEM examples

2019-03-19 Thread whr
Question #679154 on Yade changed:
https://answers.launchpad.net/yade/+question/679154

whr posted a new comment:
I suggest you try to install from the source code at following link:
https://launchpad.net/escript-finley

There is a installation guide 'install.pdf' on the site.

And yes. I think you need to modify the corresponding path to locate
escript after installation.

-- 
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 #679154]: run FEMxDEM examples

2019-03-18 Thread whr
Question #679154 on Yade changed:
https://answers.launchpad.net/yade/+question/679154

whr posted a new comment:
This error is on 'escript' side.

It can be solved following the instruction on 
https://answers.launchpad.net/escript-finley/+question/294604
 (copied as below)

##
You will need to find the options file you are using to compile. For example 
(as Meng Qing Xiang suggested above)

scons/templates/trusty_options.py

Find the line which says:

umfpack =

And make sure that it says

umfpack = True

If you can't find the line at all, you can add it to the file.

Note that switching this on means that you will need to have umfpack installed.
On Debian/Ubuntu systems, I think this will be in the libsuitesparse-dev 
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


Re: [Yade-users] [Question #679154]: run FEMxDEM examples

2019-03-17 Thread whr
Question #679154 on Yade changed:
https://answers.launchpad.net/yade/+question/679154

whr posted a new comment:
Hi,

I think the successors of Ning in HK Bruno mentioned is me. I am using
an earlier version and not familiar with the lastest trunk version. But
I'm willing to offer help or improve the documentation if you cannot
reach Ning.

To the lastest question:
>run `mv biaxialSmooth.yade.gz 0.yade.gz` 
is to generate the initial RVE packing. You don't need to run this command 
since the packing is already saved as "0.yade.gz".
The packing is related to biaxialSmooth.py through 'simDEM.py' in which the 
initial packing '0.yade.gz' is loaded.

Huanran

-- 
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 #671340]: FEM-DEM - Example TEST error

2018-08-08 Thread whr
Question #671340 on Yade changed:
https://answers.launchpad.net/yade/+question/671340

Status: Open => Answered

whr proposed the following answer:
The DIRECT solver error is related to the way you install Escript. See the link 
below to solve it.
https://answers.launchpad.net/escript-finley/+question/294604

As to the importError about saveGauss, have you put "saveGauss" at the
same folder of your script?

-- 
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 #660090]: can't open yade when I have already opened 64 yade

2017-10-31 Thread whr
Question #660090 on Yade changed:
https://answers.launchpad.net/yade/+question/660090

Status: Needs information => Answered

whr proposed the following answer:
You can check this page:
https://yade-dem.org/doc/FEMxDEM.html?highlight=femxdem

The FEMxDEM part does exactly the way you described.

Huanran

-- 
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 #293295]: Want to connect all the particles in an aggregate using cohesive bond

2016-05-09 Thread whr
Question #293295 on Yade changed:
https://answers.launchpad.net/yade/+question/293295

whr proposed the following answer:
Hello Varun,

If you do another setCohesionNow, the cohesion for the existing
interactions will change after another timestep. You can write a minimal
script to verify it or check that in the source code.

If you prefer to keep to keep the cohesion parameters at their original
value (this make sense), you'd better choose a proper value, not too
high (bonds wouldn't break) or too low (seems no bonds at all).

Cheers,
Huanran

-- 
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 #293295]: Want to connect all the particles in an aggregate using cohesive bond

2016-05-08 Thread whr
Question #293295 on Yade changed:
https://answers.launchpad.net/yade/+question/293295

Status: Open => Answered

whr proposed the following answer:
Hi varun,

I did not go through your script. But from your description in  #3, this may be 
due to the value of cohesion. 
The value of shearCohesion/normalCohesion within the existing interactions will 
not change if you just change the value. You need another setCohesionNow to 
reset it. 
Since the very high cohesion value result in the correct number of cohesive 
interactions, you may want to find a proper value that make the initial 
interaction number correct and these bonds could be broken in the following 
process.

Cheers,
Huanran

-- 
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 #261272]: Can not access to the documentation

2015-01-27 Thread whr
Question #261272 on Yade changed:
https://answers.launchpad.net/yade/+question/261272

Status: Answered = Solved

whr confirmed that the question is solved:
It works for me now.
Thank you.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


[Yade-users] [Question #261272]: Can not access to the documentation

2015-01-26 Thread whr
New question #261272 on Yade:
https://answers.launchpad.net/yade/+question/261272

Dear all,

Recently, I got a 403 Forbidden when I try to access the yade documentation.

https://www.yade-dem.org/doc/

It shows that You don't have permission to access /doc/ on this server.

have you met the problem?

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


Re: [Yade-users] [Question #259419]: How to record the breakage of the cohesion?

2014-12-28 Thread whr
Question #259419 on Yade changed:
https://answers.launchpad.net/yade/+question/259419

Status: Answered = Open

whr is still having a problem:
Dear Jan,

Thanks for your reply.

Actually, I'm trying to count the number of the cohesion-breakage during
compression to compare with data on acoustic emission (AE) activity.

I tried the following code to count the interactions with broken
cohesion every 100 steps.

   num = 0
   for i in O.interactions:
  if i.phys.cohesionBroken:
 num+=1

However, when I used that code, I found the number decrease sometimes. The 
amount of interactions (len(O.interactions)) also varies.  FYI, I use periodic 
boundary.
So, any suggestions?

Cheers
Huanran

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


Re: [Yade-users] [Question #259419]: How to record the breakage of the cohesion?

2014-12-28 Thread whr
Question #259419 on Yade changed:
https://answers.launchpad.net/yade/+question/259419

Status: Answered = Open

whr is still having a problem:
Hi Jan,

Thanks for your answer. I followed your suggestion and try that code.
Then I got following error information:

Traceback (most recent call last):
  File string, line 1, in module
  File test_load.py, line 25, in saveAddData
if i.phys.cohesionBroken:
AttributeError: 'NoneType' object has no attribute 'cohesionBroken'

I added following code and got results that seems right.

  except AttributeError:
  ret +=1

Am I right? Where did this AttributeError come from? It seems the
interaction remains but no physical information.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


Re: [Yade-users] [Question #259419]: How to record the breakage of the cohesion?

2014-12-28 Thread whr
Question #259419 on Yade changed:
https://answers.launchpad.net/yade/+question/259419

Status: Answered = Solved

whr confirmed that the question is solved:
Dear Jan,

Thanks for your answer. This way is better.

However, the interaction is not real should be counted into the broken one, 
right?
So I think the code should be:

if not i.isReal:
   ret +=1
   continue

Am I right?
In this way, the result is same as my previous method.

Cheers
Huanran

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


Re: [Yade-users] [Question #259419]: How to record the breakage of the cohesion?

2014-12-28 Thread whr
Question #259419 on Yade changed:
https://answers.launchpad.net/yade/+question/259419

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

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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


[Yade-users] [Question #259419]: How to record the breakage of the cohesion?

2014-12-21 Thread whr
New question #259419 on Yade:
https://answers.launchpad.net/yade/+question/259419

Dear all,

I am a new yade user. I'm trying to use the cohesion friction model to simulate 
the behavior of sand stone. 

The material type is 'CohFrictMat'. 
I choose the following three to form the Interaction loop:
Ig2_Sphere_Sphere_ScGeom6D()
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys
Law2_ScGeom6D_CohFrictPhys_CohesionMoment

I'd like to know if there is a way to track the breakage of the cohesion. Or 
should I write in the script to record the events that satisfy breakage 
condition myself.

Thanks in advance.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

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