Re: [Yade-users] [Question #695935]: Floating point exception (core dumped)

2021-03-08 Thread Yuxuan Wen
Question #695935 on Yade changed:
https://answers.launchpad.net/yade/+question/695935

Yuxuan Wen gave more information on the question:
And then I run the second file. The "
Floating point exception (core dumped)" error will show when running this file:

#-
## length (m), time (s), mass (1kg), force (N), pressure (Pa)
from yade import pack, plot, qt, export, os

O.load('consolidation.xml')
step0=O.iter
t0=O.time
rate=0.5
velocity=rate*0.1
radius=O.bodies[2].shape.radius
diameter=2*radius

## delete 2 up and low boxes
z1=O.bodies[0].state.pos[2] 
z2=O.bodies[1].state.pos[2]
thickness=diameter 
upzsurf=max(z1,z2)-0.5*thickness
lowzsurf=min(z1,z2)+0.5*thickness
lx=O.cell.size[0]
ly=O.cell.size[1]
lz=upzsurf-lowzsurf
V=lx*ly*lz
Vs0=O.cell.size[0]*O.cell.size[1]*O.cell.size[2]*(1-porosity())

O.bodies.erase(0,True) 
O.bodies.erase(1,True)

## record all the sphere's id
spherelist=[]
msphere=0.0
for i in O.bodies: # bodies 0 and 1 are already deleted
  spherelist.append(i.id)
  msphere=msphere+i.state.mass
Vs=msphere/2650.0

## clump the walls 
uplist=[]
lowlist=[]
clumplist=[]
for i in O.bodies:
  if i.state.pos[2] >= (upzsurf-1.5*diameter):
uplist.append(i.id)
  if i.state.pos[2] <= (lowzsurf+1.5*diameter):
lowlist.append(i.id)
clumplist=uplist+lowlist
upclump=O.bodies.clump(uplist)
lowclump=O.bodies.clump(lowlist)

upposy0=O.bodies[upclump].state.pos[1]
lowposy0=O.bodies[lowclump].state.pos[1]

## record the data of sphere body that is not in the clump walls
shearspherelist=[]
checklist=[]
for i in spherelist:
  if i not in uplist and i not in lowlist:
shearspherelist.append(i)   
checklist.append(i) 
checklist.append(upclump)
checklist.append(lowclump)


#O.bodies[upclump].dynamic=False
#O.bodies[lowclump].dynamic=False
#O.bodies[upclump].state.vel=(0,velocity,0)
# define engines #
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]), 
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()], 
[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_ScGeom_ViscElPhys_Basic()]
),
PyRunner(command='servo()',iterPeriod=1), # add force must before 
NewtonIntegrator(), otherwise it will be ForceResetter()
GlobalStiffnessTimeStepper(),
NewtonIntegrator(gravity=(0,0,0),damping=0.2), # numerical damping, 
dissipate Ekine because of quasi-static loading
PyRunner(command='if 
O.iter-step0<=1:addPlotData()',iterPeriod=100), 
PyRunner(command='if 
O.iter-step0>1:addPlotData()',iterPeriod=1000), 
PyRunner(command='if O.iter-step0<=10:veldata()',iterPeriod=1000), 
PyRunner(command='if O.iter-step0<=1:fabricdata()',iterPeriod=100),
PyRunner(command='if O.iter-step0>1:fabricdata()',iterPeriod=1000),
PyRunner(command='finished()',iterPeriod=1000),
]
plot.plots={'t':('sxx','syy','szz'),'t ':('upfx','upfy','upfz'),'t  
':('upvx','upvy','upvz'),'t   ':('Eunbal')}
plot.plot()

# define functions #
def servo():
O.bodies[upclump].dynamic=False
O.bodies[lowclump].dynamic=False
O.bodies[upclump].state.vel=(0,velocity,0) # can't blockDOF and add 
velocity at the same time when dynamic is turned to False

def addPlotData():
upforcex=0
upforcey=0
upforcez=0
lowforcex=0
lowforcey=0
lowforcez=0
for i in O.interactions:
if not i.isReal: continue
point = i.geom.contactPoint
norm = i.geom.normal
ovp = i.geom.penetrationDepth
Fn = i.phys.normalForce
Fs = i.phys.shearForce
if (i.id1 in uplist and i.id2 not in uplist): # force direction 
is from id1 to id2  
upforcex=upforcex-Fn[0]-Fs[0]
upforcey=upforcey-Fn[1]-Fs[1]
upforcez=upforcez-Fn[2]-Fs[2]
if (i.id1 not in uplist and i.id2 in uplist): 
upforcex=upforcex+Fn[0]+Fs[0]   
upforcey=upforcey+Fn[1]+Fs[1]
upforcez=upforcez+Fn[2]+Fs[2]
if (i.id1 in lowlist and i.id2 not in lowlist):
lowforcex=lowforcex-Fn[0]-Fs[0] 
lowforcey=lowforcey-Fn[1]-Fs[1]
lowforcez=lowforcez-Fn[2]-Fs[2]
if (i.id1 not in lowlist and i.id2 in lowlist):
lowforcex=lowforcex+Fn[0]+Fs[0] 
lowforcey=lowforcey+Fn[1]+Fs[1]
lowforcez=lowforcez+Fn[2]+Fs[2]
n0=0
n1=0
for i in shearspherelist:
if len(O.bodies[i].intrs())==0:
n0=n0+1
if len(O.bodies[i].intrs())==1:

Re: [Yade-users] [Question #695935]: Floating point exception (core dumped)

2021-03-08 Thread Yuxuan Wen
Question #695935 on Yade changed:
https://answers.launchpad.net/yade/+question/695935

Yuxuan Wen gave more information on the question:
I run this file first:
#-
## length (m), time (s), mass (1kg), force (N), pressure (Pa)
from yade import pack, plot, qt, export, os

##
lx=0.2
ly=0.2
lz=0.14
target_r=0.005 # target r=0.005m=0.5cm, d=0.01m=1cm, l=20d
target_d=2*target_r
target_phi=0.550
target_e=(1-target_phi)/target_phi
num_spheres=int(lx*ly*lz*target_phi/(4.0/3.0*3.1415926*target_r*target_r*target_r))
flag=1 # mark time when changing friction

## space for generating particle cloud
thickness=target_d # top and bottom walls' thickness
wallsurfh=target_r # distance between wall surface to the cell
mn=Vector3(target_d,target_d,wallsurfh+thickness+target_d)
mx=Vector3(2*lx-target_d,2*ly-target_d,wallsurfh+thickness+2*lz-target_d)

## material properties
density=2650.0 # kg/m3
kn=4e5 # kn/2 is the stiffness of the contact
ks=kn*2.0/7.0
gamma=50.0
cn=4.0/3.0*3.1415926*(0.005*0.005*0.005)*density/4*gamma*2 #0.03469
frict=0 
frictnew=26.57 # after stable, change the particle from frictionless to 
frictional

## insert periodic cell
O.periodic=True
O.cell.hSize=Matrix3( 2*lx, 0, 0,
  0, 2*ly, 0,
  0, 0, wallsurfh+thickness+2*lz+thickness+wallsurfh)

## insert the walls for consolidation 
O.materials.append(ViscElMat(kn=kn,ks=ks,frictionAngle=radians(frict),cn=cn,cs=0,density=density,label='Box'))
 
lowbox=O.bodies.append(utils.box(center=(lx,ly,wallsurfh+0.5*thickness), 
extents=(5,5,0.5*thickness), fixed=False, material='Box',wire=False)) 
upbox=O.bodies.append(utils.box(center=(lx,ly,wallsurfh+thickness+2*lz+0.5*thickness),
 extents=(5,5,0.5*thickness), fixed=False, material='Box',wire=False)) 

## use a SpherePack object to generate a random loose particles packing
O.materials.append(ViscElMat(kn=kn,ks=ks,frictionAngle=radians(frict),cn=cn,cs=0,density=density,label='spheres'))
sp=pack.SpherePack()
sp.makeCloud(mn,mx,rMean=target_r,num=num_spheres,periodic=True,seed=1) #"seed" 
make the "random" generation always the same
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])

msphere=0.0
sphereid=[]
for i in O.bodies:
if i.id>=2:
msphere=msphere+i.state.mass
sphereid.append(i.id)


# define engines #
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],allowBiggerThanPeriod=True),
 
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], 
[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_ScGeom_ViscElPhys_Basic()]
),
PyRunner(command='servo()',iterPeriod=1), # add force must before 
NewtonIntegrator(), otherwise it will be ForceResetter()
GlobalStiffnessTimeStepper(),
NewtonIntegrator(damping=0.2), # gravity=(0,0,0), numerical damping, 
dissipate Ekine because of quasi-static loading
PyRunner(command='addPlotData()',iterPeriod=200), 
PyRunner(command='finished()',iterPeriod=200),
#PyRunner(command='fabricdata()',iterPeriod=500),   

#VTKRecorder(fileName='vtkfile/consolidation-',recorders=['spheres','intr','velocity','stress','force'],iterPeriod=2000),

#qt.SnapshotEngine(iterPeriod=2000,fileBase='video/consolidation-',label='snapshooter')
]

#plot.live=True
plot.plots={'t':('sxx','syy','szz'),'t ':('exx','eyy','ezz'),'t  ':('void'),'t  
 ':('Eunbal')}
plot.plot()
#O.run()

# define functions #
def servo():
O.bodies[upbox].dynamic=False
O.bodies[lowbox].dynamic=False
if O.cell.size[0] > (lx+1e-8):
rate1=0.1
else:
rate1=0
O.cell.velGrad=Matrix3(-rate1,0,0, 0,-rate1,0, 0,0,0)

if O.bodies[upbox].state.pos[2]-O.bodies[lowbox].state.pos[2]-thickness 
> (lz+1e-8):
rate2=0.1
else:
rate2=0 

vz=rate2*(O.bodies[upbox].state.pos[2]-O.bodies[lowbox].state.pos[2]-thickness)/2
   
O.bodies[lowbox].state.vel=(0,0,vz)
O.bodies[upbox].state.vel=(0,0,-vz)

def addPlotData():

V=O.cell.size[0]*O.cell.size[1]*(O.bodies[upbox].state.pos[2]-O.bodies[lowbox].state.pos[2]-thickness)
Vs=msphere/density  
n0=0
n1=0
for i in sphereid:
if len(O.bodies[i].intrs())==0:
n0=n0+1
if len(O.bodies[i].intrs())==1:
n1=n1+1

plot.addData( 
nsphere=num_spheres,
N0=n0,
N1=n1,
step=O.iter,
t=O.time,   
phi=Vs/V,
void=(V-Vs)/Vs, 

[Yade-users] [Question #695935]: Floating point exception (core dumped)

2021-03-08 Thread Yuxuan Wen
New question #695935 on Yade:
https://answers.launchpad.net/yade/+question/695935

Hello,

I was using Ubuntu 18.04 and Yade 2018.02b and the code was running good last 
year. But several days ago my Ubuntu updated to 20.04 automatically and Yade 
was also updated to 2020.01a version. Then I found that if I using the same 
code as in Yade 2018.02b, the particle cloud generated in Yade 2020.01a at 
different time is not the same. Even I have set the "seed" value in makeCloud 
command as shown follows, the particle cloud is still changing if I run the 
code at different time. The code is shown as follows:

sp.makeCloud(mn,mx,rMean=target_r,num=num_spheres,periodic=True,seed=1) 

Then I install the Yadedaily, the particle cloud can now be generated 
completely the same if I run it at different time. However, as simulation goes 
on, another error shows up, the simulation will ends automatically and the 
terminal shows "Floating point exception (core dumped)". 

I wonder if anyone could help me or give me some suggestions to solve this 
issue. Is there a bug in "makeCloud" in Yade 2020.01a? Why the Yadedaily will 
show "Floating point exception (core dumped)"?  If I want to make the code 
works, should I still install the Yade 2018.02b?

Thank you and kind regards,
Yuxuan

-- 
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 #695934]: Compression won't stop when the goal of TriaxialStressController is reached

2021-03-08 Thread Huang peilun
New question #695934 on Yade:
https://answers.launchpad.net/yade/+question/695934

Hi,

I'm currently doing a simple compression test. I set the stressMask to be 0 and 
goal1, goal2, goal3 to be -0.1 in the TriaxialStressController. However, when 
the strain reaches -0.1, the compression does not stop. I continue the 
simulation and the strain reaches -0.7 with no tendency to stop. I'm confused 
why this happens. Can anyone help me out?

Here's my code:




from yade import pack

SoilMat=CohFrictMat(young=2e9,poisson=0.3,density=2650,frictionAngle=0.7,alphaKr=50,alphaKtw=50,momentRotationLaw=True)
WallMat=CohFrictMat(young=2e20,poisson=0.5,frictionAngle=0.7,density=1000,label='walls',momentRotationLaw=True)
O.materials.append((SoilMat,WallMat))

mn,mx=Vector3(0,0,0),Vector3(100,100,100)
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

Particle_num=8000
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(100,100,100),rMean=.5,num=Particle_num)
sp.toSimulation(material=SoilMat)

triax=TriaxialStressController(
stressMask = 7,
thickness = 0,
max_vel=0.05,
internalCompaction=True, # If true the confining pressure is generated 
by growing particles
wall_bottom_activated=False,
wall_back_activated=False,
wall_left_activated=False,
goal1 = -3, goal2 = -3, goal3 = -3,
)

newton=NewtonIntegrator(damping=0.2)

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
newton,
PyRunner(command='Step1()',realPeriod=1,label='SLM'),
]

def Step1():
print(abs((3+triax.meanStress)/3))
if abs((3+triax.meanStress)/3)<0.05: 
triax.stressMask=0
triax.internalCompaction=False
triax.goal1=triax.goal2=triax.goal3=-0.1
SLM.command='Step2()'

def Step2():
print("%s: %s, %s" % (O.iter,triax.depth,triax.strain))





-- 
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 #695929]: spheres pass facet

2021-03-08 Thread Othman Sh
Question #695929 on Yade changed:
https://answers.launchpad.net/yade/+question/695929

Status: Answered => Open

Othman Sh is still having a problem:
Hi Jan,

I tried reducing the O.dt from  O.dt=.5*utils.PWaveTimeStep() to
O.dt=.005*utils.PWaveTimeStep(). Although I reduced it 100 times, I
still get spheres pass through the facets. How do I know what O.dt is
suitable for my case? Any other solution?

Thanks,
Othman

-- 
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 #695929]: spheres pass facet

2021-03-08 Thread Jan Stránský
Question #695929 on Yade changed:
https://answers.launchpad.net/yade/+question/695929

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
for both cases, smaller value of O.dt should help
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


[Yade-users] [Question #695929]: spheres pass facet

2021-03-08 Thread Othman Sh
New question #695929 on Yade:
https://answers.launchpad.net/yade/+question/695929

Hi all,

I would like to simulate the compaction of granular material. I am using 
yadedaily and my code is shown below. I have 2 questions:
1- I see that smaller spheres escape from the compaction mold during the 
compaction. How to prevent any sphere from moving out of the mold (i.e. facets)?
2- I want to simulate packing at high compaction force. In my current code, 
after around 6000 iteration, the packing "explode" and spheres get out of the 
modl. Why this happens? Is it a numerical issue or this is what suppose to 
happen based on the Cundall-Strack contact model?

I appreciate your help and comments. 

Thank you,
Othman




from yade import pack, export, ymport, plot
from pprint import pprint
import numpy as np
import matplotlib.pyplot as plt

import time
tic=time.time()

O.materials.append(FrictMat(young = 1e6, poisson = 0.45,frictionAngle = 0.349, 
density=2340))
SG=2.34
##cylinder dimensions
radiuscyl=(500e-6/2)
heightcyl=610e-6
##center of cylinder
cx=0
cy=0
cz=0
##Initial cube dimensions ###
mnx=cx-(radiuscyl*1.1)
mny=cy-(radiuscyl*1.1)
mnz=0
mxx=cx+(radiuscyl*1.1)
mxy=cy+(radiuscyl*1.1)
mxz=heightcyl*1.1

 spheres #
sp=pack.SpherePack()
# sizes and distribution are from gradation curve of basalt aggregates 
###
sizes=1e-6*np.array([1.58*0.98,1.58,3.63,9.16,15.76,22.94,25]) #Diameters of 
portlandite
passing=[0,0.1,0.25,0.5,0.75,0.9,1]
sp.makeCloud((mnx,mny,mnz),(mxx,mxy,mxz),psdSizes=sizes,psdCumm=passing)

 cylinder extraction

pred=pack.inCylinder((cx,cy,cz),(cx,cy,heightcyl),radiuscyl)

spFilter=filterSpherePack(pred,sp,Material=Material, returnSpherePack=True)
print (len (spFilter))

spFilter.toSimulation(color=(0.533, 0.803, 0.780))
print ("runtime = ", time.time()-tic)
mass=utils.getSpheresMass()
 facets #

facets=geom.facetCylinder((cx,cy,heightcyl/2),radiuscyl,heightcyl,segmentsNumber=150,wallMask=4)

cylinder=O.bodies.append(facets)
yade.qt.View()

##creating disks

d1=geom.facetCylinder((cx,cy,heightcyl),radiuscyl*0.99,0,segmentsNumber=300,wallMask=1)
d2=geom.facetCylinder((cy,cx,cz),radiuscyl*0.99,0,segmentsNumber=300,wallMask=1)

disk1IDs= O.bodies.append(d1)
disk2IDs= O.bodies.append(d2)

for i in disk1IDs:
 body= O.bodies[i]
 body.state.vel = (0,0,-3.5)

for n in disk2IDs:
 body= O.bodies[n]
 body.state.vel = (0,0,0)

# compaction #
O.dt=.5*utils.PWaveTimeStep()
O.engines=[
 ForceResetter(),
 InsertionSortCollider([
  Bo1_Sphere_Aabb(),
  Bo1_Facet_Aabb()
 ]),
 InteractionLoop(
  [
   Ig2_Sphere_Sphere_ScGeom(),
   Ig2_Facet_Sphere_ScGeom(),
  ],
  [

   Ip2_FrictMat_FrictMat_FrictPhys(),
   Ip2_FrictMat_FrictMat_FrictPhys(),
  ],
  [

   Law2_ScGeom_FrictPhys_CundallStrack(),
  ],
 ),

 NewtonIntegrator(damping=.3),
# VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=500),
 PyRunner(iterPeriod=500,command='force()',initRun=True),

]
O.run()

stress=[]
Thickness=[]
Packing_d=[]
def force():
f1= [O.forces.f(i)[2] for i in disk1IDs]
f=np.mean(f1)
s=f/(pi*radiuscyl**2) #stress N/m2
stress.append(s)

thickness=(O.bodies[disk1IDs[1]].state.pos[2])-(O.bodies[disk2IDs[1]].state.pos[2])
packing_density=mass/(thickness*pi*radiuscyl**2)/997/SG
print("stress, thickness, packing density ",s,thickness,packing_density)
Thickness.append(thickness)
Packing_d.append(packing_density)  

plot.addData(applied_stress=s,thickness=thickness,packing_density=packing_density)


plot.plots={('applied_stress'):('packing_density')}
plot.plot()

#np.savetxt('compaction_data.txt',np.transpose([stress,Packing_d,Thickness]),delimiter=',')




-- 
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 #695925]: strain deviator

2021-03-08 Thread Jan Stránský
Question #695925 on Yade changed:
https://answers.launchpad.net/yade/+question/695925

Status: Open => Answered

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

please provide full script [4], otherwise we can just guess..
(also note the section "Please, no external links!")

> In my opinion, this value should be smaller than one.

the value can be arbitrary (net necessarily smaller than one), it really
depends on the specific situation (which we know nothing about).

cheers
Jan

[4] https://www.yade-dem.org/wiki/Howtoask

-- 
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 #695925]: strain deviator

2021-03-08 Thread ytang
New question #695925 on Yade:
https://answers.launchpad.net/yade/+question/695925

Hi All,

I use the following command to get the position of particles and then export it.
###
xposition = [] ; yposition = [] ; zposition = [] ; ballid = [] ; radius 
= []
for b in O.bodies:
if isinstance(b.shape,Sphere):  
xposition.append( b.state.pos[0] )  ;   
yposition.append( b.state.pos[1] )
zposition.append( b.state.pos[2] )  ;   radius.append( 
b.shape.radius )  ;  ballid.append( b.id )
f = open('./global-position'+'-' +str(m)+'.txt',"w")
f.write('x\ty\tz\tr\tbid\n')
f.close
j = 0
while j < len(xposition):

f.write(str(xposition[j])+'\t'+str(yposition[j])+'\t'+str(zposition[j])+'\t'+str(radius[j])+'\t'+str(ballid[j])+'\n')
f.close
j = j +1
#
after that I use the TW module to get the micro strain filed. I can get the 
micro strain field.
##
O .bodies.append(ymport.text("./global"+"-"+"position"+"-"+str(i)+".txt"))
TW = TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.setState(0)
O.reset()
O.bodies.append(ymport.text("./global"+"-"+"position"+"-"+str(i+1)+".txt"))
TW.setState(1)
TW.defToVtk("./strain"+"-"+"control"+str(i)+".vtk")
##
when i import the .vtk files into the PARAVIEW.
we can see two potions to coloring the strain. one is strain_deviator, another 
one is the strain_matrix.
here I use the strain_deviator.
undering the coloring mode. I choose the: rescale to data range. the colorbar 
gives me the range from 0 to 4.8e+00. which means the maximum value of the 
strain deviator is around 4.8. when we see the offcial website for the micro 
strain. the maximum value of the strain deviator is 0.478597 [1]. I also saw 
this post[2]. it mentioned that the strain devitor is the  second invariant. 
In my opinion, this value should be smaller than one. but for my case, it's 
larger than one. is there anyone who can give me some hints?

I post the .vtk files here [3].
best,
Yong.



references: [1]https://yade-dem.org/doc/user.html?highlight=micro%20strain
[2] https://answers.launchpad.net/yade/+question/266331
[3]https://www.dropbox.com/sh/lal17mtarct8u51/AAApMr6QgxUY53UopAHtinGEa?dl=0




-- 
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 #695911]: 2PFV - Hollow cylinder

2021-03-08 Thread Robert Caulk
Question #695911 on Yade changed:
https://answers.launchpad.net/yade/+question/695911

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

The answer is always "yes anything is possible with yade." But how to do
it depends on the details of what you want. You can _probably_ just use
the current boundary conditions as is on a cylinder. That said, I don't
really understand what you mean by "applying pressure to the inside of
hollow cylinder." If this means you need to apply some kind pressure
gradient along the inside of cavity surface, then you may need to extend
the alpha boundary condition to TwoPhaseFlow.

Cheers,

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 #695873]: wet phase distribution

2021-03-08 Thread Robert Caulk
Question #695873 on Yade changed:
https://answers.launchpad.net/yade/+question/695873

Status: Open => Answered

Robert Caulk proposed the following answer:
>When I run the code [1], getCellBarycenter giving some strange values
(coordinates totally outside my sample):

Well, nCells includes all cells in the triangulation,  including cells
associated with the boundary. The boundary would by definition not be
inside your specimen. You can filter those out using spatial coordinates
if you only want cells "inside your specimen."

-- 
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 #695911]: 2PFV - Hollow cylinder

2021-03-08 Thread Luis Barbosa
New question #695911 on Yade:
https://answers.launchpad.net/yade/+question/695911

Hi guys,

I came across a practical use of 2PFV, but not sure if it is implemented.

Instead of using a flat surface in the contour (were the pressures are applied) 
would it be possible to apply pressure radially (i.e. in the internal wall of a 
hollow cylindrical sample?)

-- 
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 #695873]: wet phase distribution

2021-03-08 Thread Luis Barbosa
Question #695873 on Yade changed:
https://answers.launchpad.net/yade/+question/695873

Status: Answered => Open

Luis Barbosa is still having a problem:
Thank you all.
When I run the code [1], getCellBarycenter giving some strange values 
(coordinates totally outside my sample):

For instance, these values 125107.48 or -125097.48:
True 0.01797170859509369 
Vector3(125107.4828372159245,1.62543863864436311,3.652322448466255977)
True 0.011656083836606964 
Vector3(9.624066355278376506,1.530915196593882976,4.766563274628489388)
True 0.020528870575860336 
Vector3(7.413446355544288657,-125097.4827497912484,7.885475000566313675)
True 0.01815466910920833 
Vector3(125106.2605586981226,-125096.2810642897675,6.157849618659231083)

is it some mistake in the usage?

[1]
import matplotlib; matplotlib.rc('axes',grid=True)
from yade import pack
import pylab
from numpy import *

utils.readParamsFromTable(seed=1,compFricDegree = 15.0)
from yade.params import table

seed=table.seed
#num_spheres=table.num_spheres# number of spheres
compFricDegree = table.compFricDegree # initial contact friction during the 
confining phase (will be decreased during the REFD compaction 
process),num_spheres=1000
confiningS=-1e5

## creat a packing with a specific particle side distribution (PSD)
#psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] 
psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,
sp=pack.SpherePack()
sp1=pack.SpherePack()
mn,mx=Vector3(0,0,0),Vector3(10,2,10)
mnn,mxx=Vector3(0,2,0),Vector3(10,10,10)
mnc,mxc=Vector3(0,0,0),Vector3(10,10,10)
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=0.15,seed=seed)
sp1.makeCloud(minCorner=mnn,maxCorner=mxx,rMean=0.4,seed=seed)

## create material #0, which will be used as default
O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres1'))
O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless'))

## create walls around the packing
walls=aabbWalls((mnc,mxc),thickness=0,material='frictionless')
wallIds=O.bodies.append(walls)

O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])
O.bodies.append([utils.sphere(center,rad,material='spheres1') for center,rad in 
sp1])

triax=TriaxialStressController(
internalCompaction=True,
goal1=confiningS,
goal2=confiningS,
goal3=confiningS,
max_vel=10,
label="triax"
)

newton=NewtonIntegrator(damping=0.4)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
#   VTKRecorder(iterPeriod=100,recorders=['all'],fileName="/home/user/Área 
de Trabalho/PVF/vtk/Spheres"),
newton
]

while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break

#
##   REACH NEW EQU. STATE ###
#
finalFricDegree = 30 # contact friction during the deviatoric loading

#We move to deviatoric loading, let us turn internal compaction off to keep 
particles sizes constant
triax.internalCompaction=False
# Change contact friction (remember that decreasing it would generate 
instantaneous instabilities)
setContactFriction(radians(finalFricDegree))

while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break  

triax.depth0=triax.depth
triax.height0=triax.height
triax.width0=triax.width
O.save('1kPacking.yade') #save the packing, which can be reloaded later.

O.run(1000,True)
ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2]
si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2]

from yade import plot
O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')]

def history():
plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, 
e33=-triax.strain[2]-ei2,
s11=-triax.stress(0)[0]-si0,
s22=-triax.stress(2)[1]-si1,
s33=-triax.stress(4)[2]-si2,
pc=-unsat.bndCondValue[2],
sw=unsat.getSaturation(False),
i=O.iter
)

plot.plots={'pc':('sw',None,'e22')}
plot.plot()

###
## Drainage Test under oedometer conditions ###
###
##oedometer conditions
triax.stressMask=2
triax.goal1=triax.goal3=0