How to plot the total Force on a Clump
Hi everyone,
I am new to Yade and python and I am trying to simulate a pile and a shallow as a clump. One friend helps me to create a script to generate a sample of my soil and my foundation. I'm studying geotechinical problems. But i don't know how to obtain the total Force acting in the clump, because of a velocity imposed. Can someone tell me how to do this? This is my script:
# -*- coding: utf-8 -*-
from yade import pack,utils,
import math
################
### 1.INPUTS ###
################
# 1.1 IMPORT PARAMETERS FROM TABLE
nRead=readParam
DensidadeP = 2.70,
DensidadeS = 3.50,
YoungP = 1200e6,
PoissonP = 0.20,
AnguloAtritoP = 39.5, #variar angulo de atrito para calibrar com a curva do professor Nakai
Porosidade = 0.20,
MatType = 'frict',
TestDim = '2D',
rate = 0.1,
PSD = [[0.0032,
TensaoIsotropica = 1.9e4,
verlet = 0.035,
unknownOk=True
)
from yade.params import table
# 1.2 PARTICLE/MEDIUM PARAMETERS
mediumPorosity = table.Porosidade
particleDensity = table.DensidadeP #kg/m³
particleYoung = table.YoungP #Pa
particlePoisson = table.PoissonP #Adimensional
particleFricAng = radians(
# 1.3 ELEMENTS DIMENSIONS
# 1.3.1 MEDIUM PARTICLE SIZE DISTRIBUTION
PSD = table.PSD
# 1.3.2 SPHERES RADIUS
meanElementRadus = ((PSD[0]
maxElementRadus
minElementRadus
# 1.4 MATERIAL TYPE
materialType = 'frict' # 'frict', 'cohfrict', 'concrete'
# 1.5 DIMENSIONS (2D OR 3D)
testDimensions = table.TestDim
# 1.6 SHALLOW AND PILE (2D)
AlturaBloco=0.03 #Altura do bloco de fundação
BordasBloco=0.055 #Exedente dos bordos do bloco com relação à(s) estaca(s)
ProfEstaca=0.24 #Profundidade da estaca
CompPonta=0 #Comprimento da ponta da estaca (estacas com ponta ou tubulões)
DiametroEstaca=0.01 #Diâmetro da estaca
Afastamentos=
XCentroE=0. #Coordenada 'x' do centro da estaca
YCentroE1=0.
YCentroE2=0.04
YCentroE3=-0.04 #Coordenada 'y' do centro da estaca
ZCentroE= (0.5-ProfEstaca/2) #Coordenada 'z' do centro da estaca
CentroEstaca1=
TopoEstaca1=
BaseEstaca1=
CentroEstaca2=
TopoEstaca2=
BaseEstaca2=
TopoEstaca3=
BaseEstaca3=
XCentroB=XCentroE #Coordenada 'x' do centro do bloco
YCentroB=YCentroE1 #Coordenada 'y' do centro do bloco
ZCentroB=
CentroBloco=
Vertice1Bloco=
Vertice2Bloco=
# 1.7 IMPORT/EXPORT NAMES
ImportName = 'Packing' + testDimensions + str(materialType)+ '-' + str(table.
ExportName = 'Triaxial' + testDimensions + str(materialType) + '-Phi' + str(table.
# 1.8. USER DEFINED FUNCTIONS
# 1.8.1. POROSITY
def Porosity(Region):
soma=0.
for b in O.bodies:
if isinstance(
soma+
return (Region-
################## ### 2.MATERIAL ### ##################
# 2.1 MEDIUM MATERIAL
if materialType == 'frict':
spheresMateria
O.materials.
# 2.2 BOUNDARY MATERIAL
boundaryMateria
O.materials.
#2.3 SHALLOW AND PILE MATERIAL
AngAtritoA=atan(0)
DensidadeA=27000.
YoungA=70.e9
PoissonA=.33
MatConcreto=
################## ### 3.GEOMETRY ### ##################
# 3.1 PACKING DIMENSIONS
width = 1
height = 0.5
dx = 1.01*2*
dy = width
dz = height
CorteTransversal = dy
baseArea = dy
lateralAreaX = dy
lateralAreaY = 1.
# 3.2 BOUNDARIES
corner1,corner2 = (-.5*dx,
walls = aabbWalls([corner1, corner2], thickness=0., oversizeFactor=2, material=
wallIds = O.bodies.
base=O.bodies[4]
topo=O.bodies[5]
#3.3 SHALLOW AND PILE
GeomEst1=
GeomEst2=
GeomEst3=
GeomBloco=
GeomBloco=
GeomEst1=
GeomEst2=
GeomEst3=
O.bodies.
O.bodies.
O.bodies.
O.bodies.
# 3.4 IMPORT SPHERE PACKING
O.bodies.
# 3.5. ASSIGN MATERIAL PROPERTIES TO THE SPHERES
for b in O.bodies:
if isinstance(
b.material=
# 3.6. DEFINE BLOCKED DOFs
for b in O.bodies:
if isinstance(
b.state.
elif b.isClump:
b.state.
# 4.1. TEST PROCEDURE
def Analise():
O.forces.
def Porosity(Region):
if testDimensions == '3D':
return porosity(Region)
elif testDimensions == '2D':
soma=0.
for b in O.bodies:
if isinstance(
soma+
return (Region-
if testDimensions == '2D':
acelerador = 2
elif testDimensions == '3D':
acelerador = 5
topo.state.pos[2] = topo.state.
def PreencherTriaxi
if Porosity(
for b in O.bodies:
if b.isClump:
b.state.vel = (0,0,-10*
newton.damping = 0.7
else:
print 'fim'
#def force():
# global force
# if O.iter>0.:
# i=6.
# forca=0.
# while i>5 and i<352:
# forca= forca +O.forces.f(i)[2]
# i=i+1
# return list(force)
def myAddData():
plot.plots=
plot.plot()
O.run()
utils.waitIfBatch()
#####
#def Displacement():
# global Displacement
# for b in b.isClump:
# print b.state.pos[2]
######
enlargeFactor = 1.5
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_Sphere_
Bo1_Box_Aabb(),
Bo1_Wall_Aabb(),
Bo1_Facet_Aabb()
],verletDist=
InteractionLoop(
[Ig2_
Ig2_Sphere_
Ig2_Box_
Ig2_Facet_
[Ip2_
[Law2_
),
GlobalStiffnes
active=True,
defaultDt=
timeStepUpdat
),
# PyRunner(
PyRunner(
PyRunner(
NewtonIntegrat
]
######
O.run()
utils.waitIfBatch()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jérôme Duriez
- Solved:
- Last query:
- Last reply: