Re: [Yade-users] [Question #656214]: problem replacing TriaxialStressController with PeriTriaxController

2017-08-22 Thread Robert Caulk
Question #656214 on Yade changed:
https://answers.launchpad.net/yade/+question/656214

Status: Open => Answered

Robert Caulk proposed the following answer:
As Jan says[1], increase the maxStrainRate to speed up compression.

[1] comment #18 of this thread

-- 
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 #656214]: problem replacing TriaxialStressController with PeriTriaxController

2017-08-22 Thread rhaven
Question #656214 on Yade changed:
https://answers.launchpad.net/yade/+question/656214

Status: Answered => Open

rhaven is still having a problem:
Hi Robert,
Thank you for the code to check what is happening with the compression. 
Ive modified it a bit to run longer. The code is below and the result is below 
the code. I see the strain rate value slowly increasing, but this is after 10 * 
50,000 steps! 

clump1 is :

[(Vector3(5.909274815666576e-8,6.604810944051645e-8,2.2856300690077526e-7),
5.909090909090909e-08),
(Vector3(1.33464963673031e-7,1.3998894180339492e-7,1.114205347590509e-7),
5.727272727272727e-08),
(Vector3(1.010434819522126e-7,1.3355465672055947e-7,3.431244420289289e-7),
5.5454545454545454e-08),
(Vector3(5.682727445722134e-8,6.209460981215949e-8,8.464063183667366e-8),
5.3636363636363635e-08),
(Vector3(1.441769958165514e-7,1.3685605985835674e-7,2.412455564359458e-7),
5.1818181818181817e-08)]



#
from yade import pack

clump1 = makeClump(1)

#minCorner = (0,0,0)
#maxCorner = (1e-6,1e-6,1e-6)

O.resetThisScene()

O.periodic=True
#O.cell.setBox(2e-6,2e-6,2e-6)
O.cell.hSize=Matrix3(1.5e-6, 0, 0, 0 ,1.5e-6, 0, 0, 0, 1.5e-6)

sp=pack.SpherePack()
sp=pack.SpherePack()

#c1=pack.SpherePack([((0,0,0),.1),((.15,0,0),.05),((0,.1,0),.05)])

print clump1
c1 = pack.SpherePack(clump1)
raw_input('Generating Clump Cloud, Press any Key to continue')
#sp.makeClumpCloud(minCorner, maxCorner, [c1], periodic=True, num = 1000)#, 
periodic=True, num=-1, seed=1)


sp.makeClumpCloud(Vector3().Zero,O.cell.refSize,[c1],periodic=True)
sp.toSimulation()

#genClumps()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 
#PeriTriaxController(maxUnbalanced=0.01,relStressTol=0.02,goal=[-1e4,-1e4,0],stressMask=3,globUpdate=5,maxStrainRate=[1.,1.,1.],doneHook='triaxDone()',label='triax'),
 #using cell inertia
 
PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01,relStressTol=0.02,goal=(-1e6,-1e6,-1e6),stressMask=3,globUpdate=5,maxStrainRate=(1.,1.,1.),doneHook='triaxDone()',label='compressor'),
 
#PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01,relStressTol=0.02,goal=(-1e4,-1e4,0),stressMask=3,globUpdate=5,maxStrainRate=(1e6,1e6,1e6),doneHook='triaxDone()',label='compressor'),
 NewtonIntegrator(damping=.2),
]

O.dt=PWaveTimeStep()
raw_input("Pausing for Compression, Press any Key to continue")
#O.run();
for i in range(10):
   print('strain: ', compressor.strain)
   O.run(5,True)
   
print('max strain: ', compressor.maxStrainRate)
##
#qt.View()

phase=0

# RESULT

('strain: ', Vector3(0,0,0))
('strain: ', 
Vector3(-0.25776189076416675,-0.25776189076416675,-0.25909090915674364))
('strain: ', 
Vector3(-0.5168527999089578,-0.5168527999089578,-0.5181818183147237))
('strain: ', 
Vector3(-0.7759437090450382,-0.7759437090450382,-0.7772727274642117))
('strain: ', 
Vector3(-0.00010350346181927866,-0.00010350346181927866,-0.00010363636366289179))
('strain: ', 
Vector3(-0.000129412552734705,-0.000129412552734705,-0.00012954545457970272))
('strain: ', 
Vector3(-0.0001553216436504901,-0.0001553216436504901,-0.00015545454549700528))
('strain: ', 
Vector3(-0.00018123073456645253,-0.00018123073456645253,-0.0001813636364147292))
('strain: ', 
Vector3(-0.00020713982548285556,-0.00020713982548285556,-0.00020727272732947322))
('strain: ', 
Vector3(-0.00023304891639974086,-0.00023304891639974086,-0.0002331818182436108))
('max strain: ', Vector3(1,1,1))

-- 
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 #656214]: problem replacing TriaxialStressController with PeriTriaxController

2017-08-22 Thread Jan Stránský
Question #656214 on Yade changed:
https://answers.launchpad.net/yade/+question/656214

Status: Open => Answered

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

> PeriTriaxController no longer runs (periodic spheres are added but
spheres are not compressed).

always try to get numerical evidence of such statements, do not make judgments 
from visual observing.
In this case, you can simply try
##
for i in range(10):
   print compressor.strain
   O.run(1000,True)
##
to see that the strain is constantly increasing. If you add "print 
compressor.strainRate" and compare it to compressor.maxStrainRate, the reason 
for "no longer runs" and "are not compress" pops out.

I added "maxStrainRate=(1e6,1e6,1e6)" argument to PeriTriaxController
and see the cell being compressed.

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 #656214]: problem replacing TriaxialStressController with PeriTriaxController

2017-08-22 Thread rhaven
Question #656214 on Yade changed:
https://answers.launchpad.net/yade/+question/656214

Status: Answered => Open

rhaven is still having a problem:
Hi Robert,
I ran your script and indeed it runs fine. I then merged in my clump generation 
script and the PeriTriaxController no longer runs (periodic spheres are added 
but spheres are not compressed). 
I have updated yadedaily just in case, but to no avail.

I am thinking that one reason peritriaxcontroller is not compressing the clumps 
could be due to some of the spheres from my generated clumps overlapping. Could 
this be the case?
thank you
Jesse

-- 
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 #656614]: Sphere size Distribution

2017-08-22 Thread Seti
Question #656614 on Yade changed:
https://answers.launchpad.net/yade/+question/656614

Seti posted a new comment:
Hi Jan,

Much appreciated :)

-- 
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 #656614]: Sphere size Distribution

2017-08-22 Thread Seti
Question #656614 on Yade changed:
https://answers.launchpad.net/yade/+question/656614

Status: Answered => Solved

Seti 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 #655866]: Rel. to Uniaxial test

2017-08-22 Thread Jan Stránský
Question #655866 on Yade changed:
https://answers.launchpad.net/yade/+question/655866

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

read [1]
You can start yade simply by "yade", opening yade prompt and allowing you to 
type commands
Or you can pass a script name as an command line argument.
so instead of 

yade
yade script1.py # this one already inside yade

just run (see [1] for details)

yade script1.py

cheers
Jan

[1] https://yade-dem.org/doc/tutorial-hands-on.html

-- 
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 #656657]: tension test on grids

2017-08-22 Thread nicole khoueiry
New question #656657 on Yade:
https://answers.launchpad.net/yade/+question/656657

Hello,
I am trying to write a tension test script on a grid, so i can calibrate my 
grid parameters,
My script is based on the example : 
trunk/examples/grids/CohesiveGridConnectionSphere.py
The problem is that the velocity is applied instantly not permanently, so the 
force in my grid go through an oscillation once the velocity is applied, even 
if the iterperiod is set to 1,
The tension force in my grid does not cumulate; it goes through the same value 
and then return to the initial state for every velocity application, 
Therefore, I cannot reach the rupture state, 
Anyone can help my with this problem?
This is my script,
# materials properties

O.materials.append(CohFrictMat(young=20e5,poisson=0.3,density=3e2,frictionAngle=radians(10),normalCohesion=8.5e6,shearCohesion=8.5e6,momentRotationLaw=True,label='spheremat'))


# functions and laws


O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_GridConnection_Aabb()]),
InteractionLoop([Ig2_GridNode_GridNode_GridNodeGeom6D()],

[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]),
GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.7),
NewtonIntegrator(gravity=(0,0,-10),damping=0.9,label='newton'),
PyRunner(command='history1()',iterPeriod=100,label='recorder',dead=True),

PyRunner(iterPeriod=20,command='myAddPlotData()',label='recorder1',dead=True)
]

L=0.6 #length[m]  
l=0.21 #width[m] 
nbL=21
nbl=8
r=0.006
nodesIds=[]
color=[255./255.,102./255.,0./255.]
for i in range(0,nbL):
for j in range(0,nbl):

nodesIds.append(O.bodies.append(gridNode([0,j*l/(nbl-1),-i*L/(nbL-1)],r,wire=False,fixed=False,material='spheremat',color=color)))

#Create connection between the nodes
for i in range(0,len(nodesIds)):
for j in range(i+1,len(nodesIds)):
dist=(O.bodies[i].state.pos - O.bodies[j].state.pos).norm()
if(dist<=(L/(nbL-1))*1.01):
O.bodies.append(gridConnection(i,j,r,color=color))

#nodes fixe :
for i in range (0,72):
O.bodies[i].state.blockedDOFs='xyzXYZ'

#apply the tension force :
def history1():

global Fn,Ft

if O.iter>5000:
for i in range (len(nodesIds)-72,len(nodesIds)):
O.bodies[i].state.dynamic=False
O.bodies[i].state.vel[2]=-0.0002


plot.plots={'epz':('Fz')}

#plot tension force in grid :
def myAddPlotData():



F=(abs(O.forces.f(64)[2])+abs(O.forces.f(65)[2])+abs(O.forces.f(66)[2])+abs(O.forces.f(67)[2])+abs(O.forces.f(68)[2])+abs(O.forces.f(69)[2])+abs(O.forces.f(70)[2])+abs(O.forces.f(71)[2]))/(210)
s1=O.bodies[68]
s2=O.bodies[100]
ep=((s2.state.pos-s1.state.pos).norm()-(4*0.03))*100/(4*0.03)

plot.addData(Fz=F,epz=ep)

#plot.saveDataTxt('dataFile.txt.bz2',vars=('Fz','epz'))


plot.plot()
recorder.dead=False
recorder1.dead=False
O.run(10,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


Re: [Yade-users] [Question #655866]: Rel. to Uniaxial test

2017-08-22 Thread Swapnil
Question #655866 on Yade changed:
https://answers.launchpad.net/yade/+question/655866

Swapnil posted a new comment:
Here is the script Jan:

from yade import pack,plot
pred=pack.inCylinder((0,0,0),(0,0,0.2),0.05) 
sp=pack.randomDensePack(pred,radius=0.008) 
O.bodies.append(sp) 
bb=uniaxialTestFeatures()
negIds,posIds,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']
O.dt=0.005*PWaveTimeStep()
O.engines=[ForceResetter(),InsertionSortCollider([Bo1_Sphere_Aabb()]),InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_ScGeom_FrictPhys_CundallStrack()]),NewtonIntegrator(),UniaxialStrainer(strainRate=-0.5,axis=axis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=False,blockRotations=False,setSpeeds=False,label='strainer'),PyRunner(virtPeriod=1e-6/0.5,realPeriod=1,command='addPlotData()',label='plotDataCollector',initRun=True)]
 
plot.plots={'eps':('sigma')}

def addPlotData():
yade.plot.addData(t=O.time,i=O.iter,eps=-strainer.strain,sigma=-strainer.avgStress)

O.run(10,True)
---
saved as file script1.py. I am typing "yade script1.py" in the terminal and I 
get the following error:
 
File "", line 1
yade script1.py
   ^
SyntaxError: invalid syntax

---

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