yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24651
Re: [Question #694573]: alphaKr irrelevant - Bending test
Question #694573 on Yade changed:
https://answers.launchpad.net/yade/+question/694573
Nicola posted a new comment:
> please provide a MWE [1]
Code works as it is. I use the yade.plot.plot() to check if any
difference occurs in the force applied vs deflection curve.
###CODE START###
from yade import qt
from yade.gridpfacet import *
from numpy import linspace
from matplotlib.pyplot import *
from yade import plot, pack, utils, export, ymport
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_GridConnection_Aabb(),Bo1_PFacet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),
Ig2_Sphere_GridConnection_ScGridCoGeom(),
Ig2_Sphere_PFacet_ScGridCoGeom(),
Ig2_GridNode_GridNode_GridNodeGeom6D(),
Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
Ig2_GridConnection_PFacet_ScGeom(),
Ig2_PFacet_PFacet_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys(),
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom_FrictPhys_CundallStrack(),
Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True),
Law2_ScGridCoGeom_FrictPhys_CundallStrack(),
Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()]
),
GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.5,label='ts'),
NewtonIntegrator(gravity=(0,0,0),damping=0.8,label='newton'),
PyRunner(initRun=True,iterPeriod=100,command='addData()',label='adddata',dead=1),
PyRunner(initRun=True,iterPeriod=100,command='checkStop()',label='checkstop')]
### BAR FEATURES ###
r=0.008/2.
L=.25
nL=11
I=3.1416*(r**4/4.) #moment of inertia [m4]
### MATERIALS ###
b_alphaKr=.01 #Dimensionless rolling stiffness
O.materials.append(CohFrictMat(young=2.2e11,poisson=0.3,density=7.85e3,frictionAngle=radians(30.),normalCohesion=1.6e9,shearCohesion=1.6e9,
alphaKr=b_alphaKr,
momentRotationLaw=True,label='cohmat'))
O.materials.append(FrictMat(young=2.2e11,poisson=0.3,density=7.85e3,frictionAngle=radians(30.),label='frictmat'))
O.materials.append(FrictMat(young=5e8,poisson=0.3,density=7.85e3,frictionAngle=radians(30.),label='mat'))
### NODES and CONNECTIONS ###
nodesIds=[]
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode([i,0,0],r,wire=False,fixed=False,material='cohmat',color=[1,0,0]) ) )
for i,j in zip(nodesIds[:-1], nodesIds[+1:]):
O.bodies.append(gridConnection(i,j,r,color=[1,1,1],material='frictmat'))
### BOUNDARY CONDITIONS ###
middle=(O.bodies[nodesIds[0]].state.pos[0]+O.bodies[nodesIds[-1]].state.pos[0])*0.5 #beam middle point
span=(0.666666667)*L
pos=(L-span)/2.
sfera=O.bodies.append(sphere((middle,2*r,0),r,material='frictmat',color=[1,1,0]))
#beam supports
support=O.bodies.append(sphere((O.bodies[nodesIds[0]].state.pos[0]+pos,-2*r,0),r,material='frictmat',color=[0,1,0]))
support2=O.bodies.append(sphere((O.bodies[nodesIds[-1]].state.pos[0]-pos,-2*r,0),r,material='frictmat',color=[0,1,0]))
pos_ini=O.bodies[support].state.pos[1]+2*r #sphere t=0 position
O.bodies[support].state.blockedDOFs='xyzXYZ'
O.bodies[support2].state.blockedDOFs='xyzXYZ'
O.bodies[nodesIds[0]].state.blockedDOFs=''
O.bodies[nodesIds[-1]].state.blockedDOFs=''
O.bodies[sfera].dynamic=False
push_vel=-0.05
O.bodies[sfera].state.vel[1]=push_vel
int_barre=[]
for i in O.bodies:
if isinstance(i.shape,GridConnection):
int_barre+=[[i.shape.node1.id,i.shape.node2.id]]
### FUNCTIONS ###
def addData():
plot.addData(iter=O.iter,
disp=abs(O.bodies[nodesIds[5]].state.pos[1]-pos_ini), #middle point bar deflection
F_sphere=abs(O.forces.f(sfera)[1]),
)
plot.plots={'disp':('F_sphere')}
def checkStop():
if abs(O.bodies[nodesIds[5]].state.pos[1]-pos_ini)>.065:
O.pause()
print ('')
print ('THE TEST IS ENDED')
adddata.dead=0
##CODE END###
> please provide specific values / range of values
I tried from 1e-3 to 2e3, nothing changes.
--
You received this question notification because your team yade-users is
an answer contact for Yade.