Re: [Yade-users] [Question #226679]: Clump with wall

2013-04-15 Thread Christian Jakob
Question #226679 on Yade changed:
https://answers.launchpad.net/yade/+question/226679

Status: Open = Answered

Christian Jakob proposed the following answer:
Hi,

In your script you create walls and new engines in each step, since
O.iter  500

if O.iter500: return
fIDSIII=O.bodies.append(utils.wall(max([b.state.pos[2]+b.shape.radius+0.020 for 
b in O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1,material=Mat))
...
O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=1000)]

I think this is not what you wanted.

Try to call this commands once, not every step ...

Regards,

Christian

P.s. I did not get the NameError ... typo?

-- 
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 #219806]: Cannot run the script for periodic simple shear test, with periodic boundary

2013-04-15 Thread Bruno Chareyre
Question #219806 on Yade changed:
https://answers.launchpad.net/yade/+question/219806

Bruno Chareyre posted a new comment:
Dear liucheng83,

Besides I don't understand what comment #10 actually means, please don't
post comments at the bottom of a question closed 4 months ago (#9). If
you have a question, open a new question.

The original problems of Liqing's were due to wrong modifications of a
script taken from the documentation.  Feel free to report bugs, as
suggested by Anton Gladky (https://bugs.launchpad.net/yade) if you
detect problems in original scripts.

Your offer to test and fix all scripts is really nice. Let us know when
it is done, then we can release Yade 1.00.  We can assist for
incorporating your changes in the development version of Yade.

Bruno

-- 
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 #226679]: Clump with wall

2013-04-15 Thread Christian Jakob
Question #226679 on Yade changed:
https://answers.launchpad.net/yade/+question/226679

Christian Jakob posted a new comment:
@jan:

 RuntimeError: Clump::updateProperties: NaNs in eigen-decomposition of
inertia matrix?!

This was solved in

https://github.com/yade/trunk/commit/164769edd61da2056434f890d7f5de5f1568aaaf

-- 
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 #226679]: Clump with wall

2013-04-15 Thread Jan Stránský
Question #226679 on Yade changed:
https://answers.launchpad.net/yade/+question/226679

Jan Stránský proposed the following answer:
Ok, sorry, I have not updated for some time..
btw, Xin, what version of Yade are you using?
Jan


2013/4/15 Christian Jakob question226...@answers.launchpad.net

 Question #226679 on Yade changed:
 https://answers.launchpad.net/yade/+question/226679

 Christian Jakob posted a new comment:
 @jan:

  RuntimeError: Clump::updateProperties: NaNs in eigen-decomposition of
 inertia matrix?!

 This was solved in


 https://github.com/yade/trunk/commit/164769edd61da2056434f890d7f5de5f1568aaaf

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


-- 
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 #226679]: Clump with wall

2013-04-15 Thread Jan Stránský
Question #226679 on Yade changed:
https://answers.launchpad.net/yade/+question/226679

Jan Stránský proposed the following answer:
With the newest version, I did not get this error
Jan


2013/4/15 Jan Stránský question226...@answers.launchpad.net

 Question #226679 on Yade changed:
 https://answers.launchpad.net/yade/+question/226679

 Jan Stránský proposed the following answer:
 Ok, sorry, I have not updated for some time..
 btw, Xin, what version of Yade are you using?
 Jan


 2013/4/15 Christian Jakob question226...@answers.launchpad.net

  Question #226679 on Yade changed:
  https://answers.launchpad.net/yade/+question/226679
 
  Christian Jakob posted a new comment:
  @jan:
 
   RuntimeError: Clump::updateProperties: NaNs in eigen-decomposition of
  inertia matrix?!
 
  This was solved in
 
 
 
 https://github.com/yade/trunk/commit/164769edd61da2056434f890d7f5de5f1568aaaf
 
  --
  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
 

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


-- 
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 #226352]: 2D biaxial compression task completion

2013-04-15 Thread Fu zuoguang
Question #226352 on Yade changed:
https://answers.launchpad.net/yade/+question/226352

Status: Answered = Open

Fu zuoguang is still having a problem:
Dear Jan Stránský:
 Thanks for helping me last time and I can getting a correct color 
assignation for particles in the cell, it also bring me the right mothed of 
attributes-determination for particles. And now I have other deep questions for 
asking your help as follows:
(1). I wanna employ a strict pattern for particles-generation rather than make 
a randomly distribution and a simple example can be taken here for describing 
what the problem is like that:
There are 3 types of particles in my specimen and the radii of which are a,b 
and c. Each type of particles has a equal proportion, which is,of course, 
33.3%. The total number of particles in my specimen is d. So, I want to obtain 
a perfect particles generation with the parameters a,b,c and d.
how can I do for this purpose?
(2). In the process of initial state determination, I wanna use the porosity as 
simulation stop condition and once the porosity of my specimen is equal to 
which I specified before the simulation starting, the simulation can be stopped 
immediately. how can I write this orders in my script.
(3). I use the classes ThreeDTriaxialEngine for applying loads in the second 
step of biaxial compression(named triax02) and I copy this from the examples of 
YADE without understanding how it works. I am not sure whether it is correct 
for me to apply such loads as that:
1. In the horizontal direction, I want to apply constant forces 2N/m;
2. In the Vertical direction, I want to apply constant velocities 0.05m/s.

SEEKING for your help for correction this script:

### fundamental details of application ###
# unicode: UTF-8 
Filename='2D-simulation'
from yade import pack,os
# preprocessing for simulation 
##  
### prescribing variables and functions for simulation controller ###
# material defination
spheremat = 
O.materials.append(ViscElMat(kn=4e5,ks=4e5,cn=.0,cs=.0,density=1500,frictionAngle=25.565))
wallmat = 
O.materials.append(ViscElMat(kn=4e5,ks=4e5,cn=.0,cs=.0,density=2600,frictionAngle=25.565))
# walls defination
mn,mx=Vector3(0,0,0),Vector3(0.07,0.07,0.1)
wallIds=O.bodies.append(utils.aabbWalls([mn,mx],thickness=.0001,material=wallmat))
# ThreeDTriaxialEngine defination for initial-state determination(the first 
calculation step)
triax01=ThreeDTriaxialEngine(
wall_bottom_id=wallIds[2],wall_top_id=wallIds[3],
wall_left_id=wallIds[0],wall_right_id=wallIds[1],
wall_back_id=wallIds[4],wall_front_id=wallIds[5],
wall_front_activated = False,wall_back_activated = False,
internalCompaction=False, 
stressControl_1 = True, stressControl_2 = True,stressControl_3 = True,
computeStressStrainInterval =10,
sigma_iso = 1.25e4,
sigma1 = 1.25e4,
sigma2 = 1.25e4,
sigma3 = 1.25e4,
strainRate1 = 0.03,strainRate2 = 0.03,
)
# ThreeDTriaxialEngine defination for triaxial compression(the second 
calculation step)
triax02=ThreeDTriaxialEngine(
wall_bottom_id=wallIds[2],wall_top_id=wallIds[3],
wall_left_id=wallIds[0],wall_right_id=wallIds[1],
wall_back_id=wallIds[4],wall_front_id=wallIds[5],
wall_front_activated = False,wall_back_activated = False,
internalCompaction=False, 
stressControl_1 = True, stressControl_2 = False,stressControl_3 = True,
computeStressStrainInterval =10,
sigma_iso = 3,
sigma1 = 3,
#   sigma2 = 3,
#   sigma3 = 1.25e4,
strainRate1 = -0.008,strainRate2 = 0.05,
)
# Simulation stop controller defination 
'''#def checkUnbalanced():
unb=unbalancedForce()

meanS=(triax01.stress(triax01.wall_right_id)[0]+triax01.stress(triax01.wall_top_id)[1])/2
q=unb
r=abs(meanS-triax01.sigma_iso)/triax01.sigma_iso
if q0.01 and r1e-4:
   O.pause()
   O.save('first-step.xml'.format(Filename))'''
# control flow for simulation 
##  
# particles generation
O.periodic=1
O.cell.setBox(0.07,0.07,0.07)
sp=pack.SpherePack()
sp.makeCloud((0,0,.05),(0.07,0.07,.05),rMean=0.0008,rRelFuzz=0.3,num=840,periodic=True)
sp.toSimulation(material=spheremat)
# determining colors for particles in different aeras of the cell
for b in O.bodies:
if isinstance(b.shape,Sphere):
 pos = b.state.pos
 if pos[0] 0.035 and pos[1]  0.035: b.shape.color = (1,0,0)   # 
area 1
 elif pos[0] = 0.035 and pos[1] 0.035: b.shape.color = (0,1,0)# 
area 2
 elif pos[0] = 0.035 and pos[1] = 0.035: b.shape.color = (0,0,1)  # 
area 3
 elif pos[0]  0.035 and pos[1] = 0.035: b.shape.color = (0,10,1)  # 
area 4
 else: b.shape.pos = (1,1,0) 
O.periodic=0
# blockedDOFs
for b in O.bodies:
if isinstance(b.shape,Sphere):
 

Re: [Yade-users] [Question #226679]: Clump with wall

2013-04-15 Thread Xin Wu
Question #226679 on Yade changed:
https://answers.launchpad.net/yade/+question/226679

Xin Wu posted a new comment:
hallo Jan, Christian,
I have used the Version 0.95.0. I have corrected the Code what  Christian have 
showed.
And now the Facet work with Clump. But I want to use the wall in the Simulation 
and it cann't play.
I donn't know why, but I think that wall cann't work with Clump.

regards
xin

-- 
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 #219806]: Cannot run the script for periodic simple shear test, with periodic boundary

2013-04-15 Thread liucheng83
Question #219806 on Yade changed:
https://answers.launchpad.net/yade/+question/219806

liucheng83 posted a new comment:
Hi, Anton and Chareyre,
I really want to do something for the yade If I can, it's a prize for me. 

Sorry for this:
Besides I don't understand what comment #10 actually means, please don't post 
comments at the bottom of a question closed 4 months ago (#9). If you have a 
question, open a new 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


Re: [Yade-users] [Question #226352]: 2D biaxial compression task completion

2013-04-15 Thread Jan Stránský
Question #226352 on Yade changed:
https://answers.launchpad.net/yade/+question/226352

Status: Open = Answered

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

(1). I wanna employ a strict pattern for particles-generation rather than
 make a randomly distribution and a simple example can be taken here for
 describing what the problem is like that:
 There are 3 types of particles in my specimen and the radii of which are
 a,b and c. Each type of particles has a equal proportion, which is,of
 course, 33.3%. The total number of particles in my specimen is d. So, I
 want to obtain a perfect particles generation with the parameters a,b,c and
 d.
 how can I do for this purpose?


see [1] and parameters psdSizes and psdCumm. I've never used it myself, but
I think that you can define some psd close to only three discrete particle
sizes. Probably the number of particles would not be exactly what you
defined, but it should be close. Alternatively, you can write your own
myMakeCloud function, it should not be a big deal.


 (2). In the process of initial state determination, I wanna use the
 porosity as simulation stop condition and once the porosity of my specimen
 is equal to which I specified before the simulation starting, the
 simulation can be stopped immediately. how can I write this orders in my
 script.


def checkPorosity():
  porosity = someCommandToDeterminePorosity() # maybe something like1 -
sum(4/3.*pi*b.shape.radius**3 for b in O.bodies)/O.cell.volume
  if porosity  definedPorosity: O.pause()
O.engines = [
  ...
  PyRunner(iterPeriod=10,command=checkPorosity())
]


 (3). I use the classes ThreeDTriaxialEngine for applying loads in the
 second step of biaxial compression(named triax02) and I copy this from the
 examples of YADE without understanding how it works. I am not sure whether
 it is correct for me to apply such loads as that:
 1. In the horizontal direction, I want to apply constant forces 2N/m;
 2. In the Vertical direction, I want to apply constant velocities 0.05m/s.


personally I have never used ThreeDTriaxialEngine, so perhaps somebody else
can help you

cheers
Jan

[1]
https://yade-dem.org/doc/yade.pack.html#yade._packSpheres.SpherePack.makeCloud

-- 
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 #226352]: 2D biaxial compression task completion

2013-04-15 Thread Bruno Chareyre
Question #226352 on Yade changed:
https://answers.launchpad.net/yade/+question/226352

Bruno Chareyre proposed the following answer:

(1) You could do this:

Yade [8]: sp2.makeCloud((0,0,0),(1,1,1),rMean=0.1, rRelFuzz=0,num=10,periodic=1)
Yade [9]: sp2.makeCloud((0,0,0),(1,1,1),rMean=0.07, 
rRelFuzz=0,num=10,periodic=1)
Yade [10]: sp2.makeCloud((0,0,0),(1,1,1),rMean=0.05, 
rRelFuzz=0,num=10,periodic=1)
Yade [11]: sp.toSimulation()

(2) - is shown in triax tutorial script no 1 (#1, L148)

(3) Triaxial engines keeps stress constant, not force. If you want constant 
force, you will have to update the target stress periodicaly in the script, 
using the target force and the updated surface:
triax.sigma1 = force/triax.height #or something like that

I copy this from the examples of YADE without understanding how it
works

Maybe try understanding the tutorial scripts in details first, check also the 
documentation of ThreeDTriax, then back to your own script. It would probably 
be easier that way, and it would also help to narrow down what is not clear. 
Note that ThreeDTriax is deprecated. TriaxialStressController is relatively 
similar and easier to use.

Bruno

#1. https://github.com/yade/trunk/blob/master/examples/triax-tutorial
/script-session1.py

-- 
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 #226746]: Question for yade.kdev4

2013-04-15 Thread Xin Wu
New question #226746 on Yade:
https://answers.launchpad.net/yade/+question/226746

Hello All,
I have used Kdev4, but I have become the warn 
/usr/bin/python: can't open file 
'/home/3S-LAB/bchareyre/yade/yade-test-kdev/bin/yade-true-true': [Errno 2] No 
such file or directory
*** Exited with return code: 02 ***

Can anyone help me? Thanks

regards
Xin

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