triaxial test - flexible membrane
Hi everyone,
I am trying to modify an example (concrete triaxial) to do a triaxial test with a flexible membrane, but I want to apply the load using facets. I dont undertand why the facets at the top and bottom of the sample do not apply forces at the particles. The particles crossing the facets as it do not exits. I don't understand why the facets at the top and bottom of the sample do not apply forces at the particles. The particles acrossing the facets. Anyone can help me? Thanks.
#######
#
# Triaxial test. Axial strain rate is prescribed and transverse prestress.
# Test is possible on prism or cylinder
# An independent c++ engine may be created from this script in the future.
#
#######
from yade import pack, plot
import os
O.periodic=False
# default parameters or from table
readParamsFromT
# type of test ['cyl','cube']
testType = 'cyl',
# material parameters
young = 2.e9,
youngWall=2e15,
poisson = .4,
frictionAngle = radians(5.),
sigmaT = 1.5e6,
epsCrackOnset = 1e-4,
relDuctility = 30,
# prestress
preStress = -20.e6,
# axial strain rate
strainRate = -100,
#velocity plates
velPlates = 0.01,
# assamlby parameters
rParticle = 0.001,#0.0005, #
width = 3.81e-2,
height = 7.62e-2,
bcCoeff = 5,
# facets division
nw = 10,#24,
nh = 5,#15,
# output specifications
fileName = 'test',
exportDir = '/tmp',
runGnuplot = False,
runInGui = True,
)
from yade.params.table import *
assert testType in ['cyl','cube']
# materials
sand = O.materials.
frictMat = O.materials.
WallMat = O.materials.
# spheres
pred = pack.inCylinder
sp=SpherePack()
sp = pack.randomDens
spheres=
# bottom and top of specimen. Will have prescribed velocity
bot = [O.bodies[s] for s in spheres if O.bodies[
top = [O.bodies[s] for s in spheres if O.bodies[
vel = -strainRate*
# facets
facets = []
if testType == 'cyl':
rCyl2 = .5*width / cos(pi/float(nw))
for r in xrange(nw):
for h in xrange(nh):
v1 = Vector3( rCyl2*cos(
v2 = Vector3( rCyl2*cos(
v3 = Vector3( rCyl2*cos(
v4 = Vector3( rCyl2*cos(
f1 = facet((
f2 = facet((
facets.
elif testType == 'cube':
nw2 = nw/4
for r in xrange(nw2):
for h in xrange(nh):
v11 = Vector3( -.5*width + (r+0)*width/nw2, -.5*width, height*
v12 = Vector3( -.5*width + (r+1)*width/nw2, -.5*width, height*
v13 = Vector3( -.5*width + (r+1)*width/nw2, -.5*width, height*
v14 = Vector3( -.5*width + (r+0)*width/nw2, -.5*width, height*
f11 = facet((
f12 = facet((
v21 = Vector3( +.5*width, -.5*width + (r+0)*width/nw2, height*
v22 = Vector3( +.5*width, -.5*width + (r+1)*width/nw2, height*
v23 = Vector3( +.5*width, -.5*width + (r+1)*width/nw2, height*
v24 = Vector3( +.5*width, -.5*width + (r+0)*width/nw2, height*
f21 = facet((
f22 = facet((
v31 = Vector3( +.5*width - (r+0)*width/nw2, +.5*width, height*
v32 = Vector3( +.5*width - (r+1)*width/nw2, +.5*width, height*
v33 = Vector3( +.5*width - (r+1)*width/nw2, +.5*width, height*
v34 = Vector3( +.5*width - (r+0)*width/nw2, +.5*width, height*
f31 = facet((
f32 = facet((
v41 = Vector3( -.5*width, +.5*width - (r+0)*width/nw2, height*
v42 = Vector3( -.5*width, +.5*width - (r+1)*width/nw2, height*
v43 = Vector3( -.5*width, +.5*width - (r+1)*width/nw2, height*
v44 = Vector3( -.5*width, +.5*width - (r+0)*width/nw2, height*
f41 = facet((
f42 = facet((
facets.
O.bodies.
# walls top and bottom
#------
walls = []
v1t=Vector3(
v2t=Vector3(
v3t=Vector3(
v4t=Vector3(
v1b=Vector3(
v2b=Vector3(
v3b=Vector3(
v4b=Vector3(
#------
#------
ftop1=facet(
ftop2=facet(
fbot1=facet(
fbot2=facet(
walls.extend(
O.bodies.
#------
mass = O.bodies[
for f in facets:
f.state.mass = mass
f.state.
for w in walls:
w.state.mass = mass
w.state.
print 'mass:',mass
# plots
plot.plots = { 'e':('s',), }
def plotAddData():
f1 = sum(O.forces.
f2 = sum(O.forces.
f = .5*(f2-f1)
s = f/(pi*.
e = (top[0]
plot.addData(
i = O.iter,
s = -s,
e = -e,
)
# apply prestress to facets
def addForces():
for f in facets:
n = f.shape.normal
a = f.shape.area
O.forces.
#apply velocity on walls (Plates)
def velWall():
for w in walls:
wID = w.id
print 'gwID',wID
if O.bodies[
O.bodies[
O.bodies[
if O.bodies[
O.bodies[
O.bodies[
# stop condition and exit of the simulation
def stopIfDamaged(
extremum = max(abs(s) for s in plot.data['s'])
s = abs(plot.
e = abs(plot.
if O.iter < 1000 or s > .5*extremum and e < maxEps:
return
f = os.path.
print 'gnuplot'
if runGnuplot:
import subprocess
os.chdir(
subprocess.
print 'Simulation finished'
O.pause()
#sys.exit(0) # results in some threading exception
O.dt=.1*
enlargeFactor=1.5
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_Sphere_
Bo1_Facet_Aabb()
]),
InteractionLoop(
[
Ig2_
Ig2_
],
[
Ip2_
],
[
Law2_
],
),
PyRunner(
NewtonIntegrat
PyRunner(
#PyRunner(
#velWall(),
]
# run one step
velWall()
O.step()
# reset interaction detection enlargement
bo1s.aabbEnlarg
# initialize auto-updated plot
if runInGui:
plot.plot()
try:
from yade import qt
renderer=
# uncomment following line to exagerate displacement
#renderer.
except:
pass
# run
#O.run()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: