Re: [Yade-users] [Question #562171]: Why I can't get stress?

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

Robert Caulk posted a new comment:
I am unsure what you mean by "it is still the same".

I have run your script, including O.run(), and it runs without error.
triax.stress returns stresses.

Can you provide more details about your setup? 
-which version of yade are you using?
-what distribution of linux are you using?
-details about the behavior of yade and your specific interactions with it when 
the behavior seems abnormal? 

Here is your code, including O.run().

O.dt=PWaveTimeStep()
O.run()

def controlporosity():
 targateporosity=0.36
 a=utils.porosity()
 print 'stress tensor ', triax.stress
 if ahttps://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 #556907]: Apply cohesive interaction on JCFpmMat

2017-03-15 Thread weijy
Question #556907 on Yade changed:
https://answers.launchpad.net/yade/+question/556907

weijy posted a new comment:
Hi Luc, here is my script:

from yade import pack,export

compFricDegree = 30
confiningPressure = 1e4

O.materials.append(JCFpmMat(young=5e6, poisson=0.5, frictionAngle = 
radians(compFricDegree), cohesion = 1e3, tensileStrength = 1e2, density=2770, 
label='spheres'))
O.materials.append(FrictMat(young=5e6, poisson=0.5, frictionAngle = 0, 
density=0, label='walls'))
walls=aabbWalls([Vector3(0,0,0),Vector3(0.10,0.2,0.10)],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
sp=pack.SpherePack()
sp.makeCloud(Vector3(0,0,0),Vector3(0.10,0.2,0.10),rRelFuzz = 0.2,num = 
500,porosity = 0.95,seed = 1)
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])
triax=TriaxialStressController(maxMultiplier=1.+5e-4,finalMaxMultiplier=1.+3e-5,thickness
 = 0,stressMask = 7,internalCompaction = True)
triax.goal1=triax.goal2=triax.goal3=-confiningPressure

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(label = 'bo1s'),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(label = 
'ig2ss'),Ig2_Box_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(label = 
'ip2jj')],

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
NewtonIntegrator(),
PyRunner(command = 'set_friction()', iterPeriod = 1000, label = 'checker'),
]

def set_friction():
global compFricDegree
print '*'
print 'current step is ',O.iter
print 'unbalanced force:',unbalancedForce(),' mean stress: 
',triax.meanStress
if unbalancedForce()<0.01 and 
abs(-confiningPressure-triax.meanStress)/confiningPressure<0.001:
checker.command = 'set_interaction()'
checker.ietrPeriod = 1

def set_interaction():
num_intr = 0
bo1s.aabbEnlargeFactor = 1.2
ig2ss.interactionDetectionFactor = 1.2
for i in O.interactions:
num_intr = num_intr + 1
print '*'
print 'current step is ',O.iter
print 'total interactions before setting intR is ', num_intr
ip2jj.cohesiveTresholdIteration = O.iter + 1
checker.iterPeriod = 1
checker.command = 'check_cohesion()'

def check_cohesion():
num_intr = 0
num_coh = 0
bo1s.aabbEnlargeFactor = -1
ig2ss.interactionDetectionFactor = -1   
for i in O.interactions:
if isinstance(O.bodies[i.id1].shape,Sphere) and 
isinstance(O.bodies[i.id2].shape,Sphere):
num_intr += 1
if i.phys.FnMax > 0:
num_coh +=1
print '*'
print 'current step is ',O.iter
print 'total interactions after setting intR is ', num_intr 
print 'number of cohesive interactions is ',num_coh
O.pause()

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

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


Re: [Yade-users] [Question #562171]: Why I can't get stress?

2017-03-15 Thread 张文卿
Question #562171 on Yade changed:
https://answers.launchpad.net/yade/+question/562171

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Hello,what do you mean?I have added O.run() to my script.It is still the
same.

-- 
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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Gastbye Liu
Question #562190 on Yade changed:
https://answers.launchpad.net/yade/+question/562190

Status: Answered => Open

Gastbye Liu is still having a problem:
Thanks for your reply!

After your advise, I made some output on datafile, which contains 
O.iterations.id1 and O.iterations.id2. I compared the version output on the 
same condition. On the first time step, the difference is clear. The two 
version's output data is same but the order changed. ( The first step don't use 
my Ig2_Facet_Sphere_ScGeom.cpp. )
When I use my new.cpp do calculation, then the second step has wrong data and 
the wrong data is more and more as the timestep grows.

What should I do? Make change on my new.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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Gastbye Liu
Question #562190 on Yade changed:
https://answers.launchpad.net/yade/+question/562190

Gastbye Liu posted a new comment:
Thanks for your reply!

After your advise, I made some output on datafile, which contains 
O.iterations.id1 and O.iterations.id2. I compared the version output on the 
same condition.  On the first time step,  the difference is clear. The two 
version's output data is same but the order changed.  ( The first step don't 
use my Ig2_Facet_Sphere_ScGeom.cpp. )  
When I use my new.cpp do calculation, then the second step has wrong data and 
the wrong data is more and more as the timestep grows.

What should I do? Make change on my new.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 #562171]: Why I can't get stress?

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

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

Looks like you need to add the O.run() command to start your simulation.

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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Bruno Chareyre
Question #562190 on Yade changed:
https://answers.launchpad.net/yade/+question/562190

Status: Open => Answered

Bruno Chareyre proposed the following answer:
You generate a diff by comparing two source folders (original vs. the one you 
modified). It gives a text file you can send to us.
If you reach the point where you have a clean code, no excessive side effects 
and you can explain to us what is changed and why, then we can go in more 
details into how to generate such a patch.
Bruno

-- 
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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Gastbye Liu
Question #562190 on Yade changed:
https://answers.launchpad.net/yade/+question/562190

Status: Answered => Open

Gastbye Liu is still having a problem:
How cound I use the patch to be applied on trunk?

-- 
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 #562184]: I want to know the the proper constitute law for rock

2017-03-15 Thread JIPEIQI
Question #562184 on Yade changed:
https://answers.launchpad.net/yade/+question/562184

Status: Answered => Solved

JIPEIQI confirmed that the question is solved:
Thanks Luc Scholtès, 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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Bruno Chareyre
Question #562190 on Yade changed:
https://answers.launchpad.net/yade/+question/562190

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hello, it is not surprising that a in-house source code does not survive 
multiple versions, unfortunatlely.
The only backward compatibility we can hope is for python script.
We can't tell what the problem is based on your explanation, but my advice 
would be to start from the current Ig2_Facet_Sphere_ScGeom and modify it to 
your needs.
And possibly, suggest a patch to be applied on trunk so that in the future you 
don't have the same problem again.
Bruno

-- 
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 #562190]: Change about Ig2_Facet_Sphere_ScGeom.cpp

2017-03-15 Thread Gastbye Liu
New question #562190 on Yade:
https://answers.launchpad.net/yade/+question/562190

Because I want to do FEM*DEM coupling project, I have to add functions about 
the geo-information for the contact between facet and sphere.
My senior had made a new cpp named Ig2_Facet_Sphere_ScGeom_new.cpp, it worked 
on the version Yade-1.07.  Just put the new.cpp on the folder of pkg/dem/, then 
compile it and make.   But now I use the new version Yade-2017.01a and in the 
same way  compile it and make and make install.  It seems that there is no 
strange thing happened.
But when I use that to calculate,  I found problem.  After initialization and 
O.engine started working, the vtk-output said  some data are "nan" . In other 
words, the sphere's position are not right.  But I don't use the new.cpp, it 
works fine.
I tried but it also don't work. I am wondering that it need another change (in 
other file) beacause of the version changing.

Please help me. Hope your reply.
Many 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 #562184]: I want to know the the proper constitute law for rock

2017-03-15 Thread Luc Scholtès
Question #562184 on Yade changed:
https://answers.launchpad.net/yade/+question/562184

Status: Open => Answered

Luc Scholtès proposed the following answer:
Hi,

Have a look at the JCFPM class which has been used for modelling of rock
like materials:

See for instance:

- http://www.sciencedirect.com/science/article/pii/S1365160912000391
- http://www.sciencedirect.com/science/article/pii/S0022509612002268
- http://www.sciencedirect.com/science/article/pii/S0013794415007225


Luc

-- 
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 #562184]: I want to know the the proper constitute law for rock

2017-03-15 Thread JIPEIQI
Question #562184 on Yade changed:
https://answers.launchpad.net/yade/+question/562184

Description changed to:
Hey I am the new comer here. I am trying to simulate the rock behavior. I 
checked the help manual and I'm totally confused.
So I wonder if there are any mature rock model or bond model in Yade. Is the 
CPMat a proper choice for rock?
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


[Yade-users] [Question #562184]: I want to know the the proper constitute law for rock

2017-03-15 Thread JIPEIQI
New question #562184 on Yade:
https://answers.launchpad.net/yade/+question/562184

Hey I am the new comer here. I am trying to simulate the rock behavior. I 
checked the help manual and I'm totally confused.
So I wonder if there are any mature rock model or bond model in Yade. 
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


[Yade-users] [Question #562171]: Why I can't get stress?

2017-03-15 Thread 张文卿
New question #562171 on Yade:
https://answers.launchpad.net/yade/+question/562171

I’m using PeriTriaxController to get packing with desired porosity.But when I 
used ‘triax.stress' to get average stresses ,it showed (0,0,0).And it's weird 
this script can work.So where should I change?Here is my script:
r=1.75e-05
O.periodic=True
O.cell.hSize=Matrix3(41*r,0,0,
0,41*r,0,
0,0,41*r)

O.materials.append(FrictMat(young=1.1e11,poisson=0.3,density=8900e12,frictionAngle=0,label='sphere'))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(40*r,40*r,40*r),r,0,4000,False)
O.bodies.append([sphere(center,rad,material='sphere') for center,rad in sp])


triax
triax=PeriTriaxController(goal=(-2e4,-2e4,-2e4),stressMask=7)
Engine###
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=0.05*r),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys()],
[Law2_ScGeom_MindlinPhys_HertzWithLinearShear()]
),
PyRunner(command='controlporosity()',iterPeriod=1),
triax,
NewtonIntegrator(damping=.2)
]

O.dt=PWaveTimeStep()
def controlporosity():
targateporosity=0.36
a=utils.porosity()
if ahttps://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 #556997]: How to compute average contact radius

2017-03-15 Thread 张文卿
Question #556997 on Yade changed:
https://answers.launchpad.net/yade/+question/556997

张文卿 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 #556997]: How to compute average contact radius

2017-03-15 Thread 张文卿
Question #556997 on Yade changed:
https://answers.launchpad.net/yade/+question/556997

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks,Bruno,Jan.I have understood where I was wrong.  That 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