yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15390
Re: [Question #652261]: at the beginning steps, the stresses are the same when i use different young of balls
Question #652261 on Yade changed:
https://answers.launchpad.net/yade/+question/652261
Status: Answered => Open
Wang Wang is still having a problem:
OK, I have edit the code in Yade so that you can see what i met.
the code is :
---------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/python # This is server.py file
# initial yade and the socket
import string
from yade import plot,qt
from yade.pack import *
from yade import pack, plot
import socket # Import socket module
import numpy # initial the math of matrix compute (needed in ns)
# initial the global variables
arrcc =[0]*3 # last step strain(commit)
arrtt =[0]*3 # last step strain(trail)
scc=[0]*3 # last step stress
orst=1 # initialize the orginal save document(trial)
check=[0]*1 # I need to calculate the first step when ag=0
check[0]=0
# load the identical package
O.load('/tmp/cccc.gz') # only load the package, because the O.cell.velGrad is not compatible with the peri3dcontroller eigine
#O.periodic=True ### note!!! add
O.dt=1e-8
# see the example of peri3dcontroller, 1.5 is used to speed up the computation
EnlargeFactor=1.5
EnlargeFactor=1.0
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=EnlargeFactor,label='bo1s')]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=EnlargeFactor,label='ig2ss')],
[Ip2_CpmMat_CpmMat_CpmPhys()],[Law2_ScGeom_CpmPhys_Cpm()]),
NewtonIntegrator(),
#VTKRecorder(fileName='3dfirst-vtk-',recorders=['all','cpm'],iterPeriod=4999),
]
O.cell.velGrad=utils.Matrix3(0,0,0,0,0,0,0,0,0)
O.step()
bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1. # O.step and change 1.5 back to 1. , because the concrete model is developed in the 1. environment
if orst==1:
print "orst1"
for b in O.bodies:
b.material.young = 1.0001*17e10
orst=2
ag = [0]*3 # current - last ie. the changed strain
ag[0] = 0
ag[1]= 0
ag[2] =0
ns=100
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0) # the goal strain xx xy xz, yx yy yz, zx zy zz
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)
stressValue=utils.getStress()
stressxx=stressValue[0,0] # the return stress xx
stressyy=stressValue[1,1] # the return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2 # the return stress xy = (xy + yx)/2
print "stress here from strain[0,0,0] step 1"
print stressxx
print stressyy
print stressxy
O.saveTmp('first') # initialize the orginal save document(trial)
O.loadTmp('first') #step 2
print "orst2"
ag = [0]*3 # current - last ie. the changed strain
ag[0] = 0
ag[1] = 0
ag[2] = 0
ns=100
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0) # the goal strain xx xy xz, yx yy yz, zx zy zz
# the critical time step
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)
# the velocity gradient
stressValue=utils.getStress()
stressxx=stressValue[0,0] # the return stress xx
stressyy=stressValue[1,1] # the return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2 # the return stress xy = (xy + yx)/2
print "stress here from strain[0,0,0] step 2"
print stressxx
print stressyy
print stressxy
O.loadTmp('first') #step 3
print "orst2"
ag = [0]*3 # current - last ie. the changed strain
ag[0] = 1e-7
ag[1] = 0
ag[2] = 0
ns=100
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0) # the goal strain xx xy xz, yx yy yz, zx zy zz
# the critical time step
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)
# the velocity gradient
stressValue=utils.getStress()
stressxx=stressValue[0,0] # the return stress xx
stressyy=stressValue[1,1] # the return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2 # the return stress xy = (xy + yx)/2
print "stress here from strain[1e-7,0,0] step 3"
print stressxx
print stressyy
print stressxy
O.loadTmp('first') #step 4
print "step 4"
ag = [0]*3 # current - last ie. the changed strain
ag[0] = 0
ag[1] = 1e-7
ag[2] = 0
ns=100
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0) # the goal strain xx xy xz, yx yy yz, zx zy zz
# the critical time step
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)
# the velocity gradient
stressValue=utils.getStress()
stressxx=stressValue[0,0] # the return stress xx
stressyy=stressValue[1,1] # the return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2 # the return stress xy = (xy + yx)/2
print "stress here from strain[0,1e-7,0] step 4"
print stressxx
print stressyy
print stressxy
O.loadTmp('first') #step 5
print "step 5"
ag = [0]*3 # current - last ie. the changed strain
ag[0] = 0
ag[1] = 0
ag[2] = 1e-7
ns=100
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0) # the goal strain xx xy xz, yx yy yz, zx zy zz
# the critical time step
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)
# the velocity gradient
stressValue=utils.getStress()
stressxx=stressValue[0,0] # the return stress xx
stressyy=stressValue[1,1] # the return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2 # the return stress xy = (xy + yx)/2
print "stress here from strain[0,0,1e-7] step 5"
print stressxx
print stressyy
print stressxy
-----------------------------------------------------------------------------------------------------------------------------------------------
then I changed the young of balls to :17e10 or 17e5 and run the program again. As you can see, the stress in step 1-step 5 Yade calculated are all the same, they are:
stress here from strain[0,0,0] step 1
2.49977660523e-07
2.45679097973e-07
-1.96241229011e-07
stress here from strain[0,0,0] step 2
2.55622169641e-07
1.04657046985e-07
-4.67055465319e-08
stress here from strain[1e-7,0,0] step 3
3953.77412917
1539.61192698
-27.4963880942
stress here from strain[0,1e-7,0] step 4
1540.44093736
3968.39655557
-21.1902316997
stress here from strain[0,0,1e-7] step 5
-26.6568398791
-21.3899087612
1242.31696115
so i want to know how to solve the problem?
Thanks a lot!!!
--
You received this question notification because your team yade-users is
an answer contact for Yade.