yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24096
Re: [Question #693437]: does iterperiodaffect the results of simulation?
Question #693437 on Yade changed:
https://answers.launchpad.net/yade/+question/693437
Status: Needs information => Open
Li Zeng gave more information on the question:
Hi Jan and Robert,
Sorry for not providing MWE before. Below is my MWE. I hope the
information is enough. I am simulating a single grain compression
experiment. Then get the load-displacement image. When using strain rate
1e-2 and iterperiod 1000, there was no problem with simulation. But when
I use strain rate 1e-3 and iterperiod 1000 appeared shape mismatch:
objects cannot be broadcast to a single shape. According to the previous
question, I increased iterperiod to 10000. But the load-displacement
image is not the same as iterperiod 1000. I think iterPeriod determines
how often to save simulation data. It should not affect my load-
displacement image. So I am very confused.
"""
A simple grain test
A sphere with radius 2.5e-3
Load in z direction by z-perpendicslar walls.
"""
iterper=1000,
# engines
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb'),Bo1_Wall_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2sc'),Ig2_Wall_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(
cohesiveTresholdIteration=10, label='jcf', xSectionWeibullShapeParameter=xSectionShape,weibullCutOffMin=weibullCutOffMin, weibullCutOffMax=weibullCutOffMax
)],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=True,Key=identifier, label='interactionLaw', neverErase=True,recordCracks=True,recordMoments=True,momentRadiusFactor=momentRadiusFactor),
Law2_ScGeom_FrictPhys_CundallStrack()],
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.4, defaultDt=0.1*utils.PWaveTimeStep()),
VTKRecorder(dead=0,iterPeriod=iterper*2,initRun=True,fileName=(output+'-'),recorders=['jcfpm','cracks','facets','moments','intr'],Key=identifier,label='vtk'),
NewtonIntegrator(damping=0.7),
PyRunner(iterPeriod=100,command='addPlotData()',initRun=True),
PyRunner(iterPeriod=100,command='stopIfDamaged()'),
]
# plot stuff
def addPlotData():
# forces of walls. f1 is "down", f2 is "up" (f1 needs to be negated for evlauation)
f1,f2 = [O.forces.f(i)[2] for i in wallIDs]
f1 *= -1
# average force
f = .5*(f1+f2)
# displacement
wall = O.bodies[wallIDs[1]]
dspl = -1* wall.state.displ()[2]
# store values
plot.addData(
t = O.time,
i = O.iter,
dspl = dspl,
f1 = f1,
f2 = f2,
f = f,
)
plot.saveDataTxt('txt/data'+identifier+'.txt',vars= ('i', 'dspl','f'))
# plot dspl on x axis, loadon y1 axis and f,f1,f2 in y2 axis
plot.plots={'dspl':('f',)}
O.dt = 0
O.step() # to create initial contacts
# now reset the interaction radius and go ahead
# time step
O.dt = 0.004 * utils.PWaveTimeStep()
# run simulation
plot.plot()
O.run()
regards,
Li
--
You received this question notification because your team yade-users is
an answer contact for Yade.