yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #11495
Re: [Question #269063]: Metallic plate tension
Question #269063 on Yade changed:
https://answers.launchpad.net/yade/+question/269063
Status: Answered => Open
Alexander is still having a problem:
Hi, Jan.
thank's for fixing __builtin__.my_stresses. Now i'm wondering how to
import strains because of TW.deformation(b.id,i,j) works only for one
sphere, i think i need to create new array strains[] and put all values
in it first and then use __builtin__, or it can be done more elegantly?
Now the problem itself:
1) I'v tried to fix all u remarks (MWE is in the end of the message).
2) Well, let's consider the first component of displacement which i get
with Yade -
(http://i11.pixs.ru/storage/5/5/3/pic1JPG_1997634_18020553.jpg) and
Ansys - (http://i11.pixs.ru/storage/5/5/7/pic3JPG_1380016_18020557.jpg)
As u can see they are different, Yade has values' range
[-0.1038,0.1038] Ansys range is [-0,0018636,0,0018636]
3) The same thing with the x component of normal stress (first component of stress tensor)
Yade - (http://i11.pixs.ru/storage/5/5/9/pic2JPG_1013994_18020559.jpg) Ansys - (http://i11.pixs.ru/storage/5/6/4/pic4JPG_1715017_18020564.jpg) Yade range = [-3.32165e7,6.07687e7] Ansys range = [-2,2244e7,9,8264e7].
The size of model in Ansys is the same (16,16,2) -
(http://i11.pixs.ru/storage/5/8/8/pic6JPG_8207000_18020588.jpg) also u
can see computational mesh
(http://i10.pixs.ru/storage/5/9/1/pic7JPG_2524627_18020591.jpg)
So, any ideas?
MWE
///
import __builtin__
from yade import export
###################################################
# define materials and model configuration
E = 2e9 #11 # Young's modulus of model
v = 0.3 # Poisson's ratio
p = 150e6 # initial stress value (positive - tension, negative - compression)
d = 7850 # density
e = 0.02 # loading rate (strain rate) (positive - tension, negative - compression)
r = 0.5 # spheres radius
# Enlarge interaction radius between spheres using "interaction_radius" parameter (for example in uniax.py this value is 1.5)
interaction_radius = 1.5
# define plate material, create "dense" packing by setting friction to zero initially
O.materials.append(CpmMat(young=E,
frictionAngle=0,
poisson=v,
density=d,
sigmaT=3.5e6,
epsCrackOnset=1e-4,
neverDamage=True,
isoPrestress=0,
relDuctility=30,
label = 'mat'))
# represent plate like a set of regular monosized set of spheres
# also set boundary conditions via predefined tensile force for spheres on ABCD and
# fixed spheres on KGHO
spheres=[]
for i in range(0, 16):
for j in range(0, 16):
for k in range(0, 2):
id = O.bodies.append(sphere([i+0.5,j+0.5,k+0.5],material='mat',radius=r))
spheres.append(O.bodies[id])
if j == 15:
O.forces.addF(id,(0,p,0),permanent=True) # Add force for all spheres connected to ABCD
if j == 0:
spheres[id].state.blockedDOFs='xyzXYZ' # Fixed all spheres connected to KGHO
###################################################
# define engines
# simulation loop
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=interaction_radius,label='bo1s')]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=interaction_radius,label='ig2ss')],
[Ip2_CpmMat_CpmMat_CpmPhys()],
[Law2_ScGeom_CpmPhys_Cpm()]
),
CpmStateUpdater(realPeriod=1),
NewtonIntegrator(damping=0.4)
]
###################################################
# start simulation and compute strain and stress
# try to run script with qt graphical interface
try:
yade.qt.Controller(), yade.qt.View()
except:
print 'Qt graphical interface is not avaliable'
# set the integration timestep to be 1/2 of the "critical" timestep
O.dt=.5*utils.PWaveTimeStep()
# compute strain via tesselation wrapper.
TW=TesselationWrapper()
# store current positions before simulation
TW.setState(0)
# run one single step
O.step()
# reset interaction radius to the default value
bo1s.aabbEnlargeFactor=1.0
ig2ss.interactionDetectionFactor=1.0
# run simulation, until static equilibrium will not reached
while unbalancedForce()>1e-2:
O.run(10,True)
# store positions after simulation (deformed state)
TW.setState(1)
# compute deformation for each body
TW.computeDeformations()
# compute stress tensor for each body
stresses = bodyStressTensors()
###################################################
# save data to vtk. file
__builtin__.my_stresses = stresses
vtk = export.VTKExporter('result')
vtk.exportSpheres(what=[('radius','b.shape.radius'),('displacement','b.state.displ()'),('stress','my_stresses[b.id]')])
///
with regards, Alexander
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.
Follow ups
References