shape mismatch
Hi,
I'm conducting a triaxial test to verify the mechanic properties of my sample. However, after running for 20 minute (iter=3e6), some error occurred.
The simplified script for the triaxial test is shown below:
-------
# encoding: utf-8
# periodic triaxial test simulation
from yade import pack, qt, plot
sigmaIso=-5e4
O.periodic=True
sp=pack.
sp.toSimulation()
idSand=
for b in O.bodies:
b.material=
#for c in O.
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
PeriTriaxCon
# specify target values and whether they are strains or stresses
goal=
# type of servo-control
dynCell=
# wait until the unbalanced force goes below this value
maxUnbala
# call this function when goal is reached and the packing is stable
doneHook=
),
NewtonIntegr
# PyRunner(
PyRunner(
]
O.dt=.5*
def addPlotData():
plot.
sxx=
exx=
n=
)
# define what to plot
plot.plots=
' i ':('n',)
}
# show the plot
plot.plot()
def compressionFini
print
'Compression finished'
# set the current cell configuration to be the reference one
O.cell.trsf = Matrix3.Identity
# change control type: keep constant confinement in x,y, 20% compression in z
triax.goal = (sigmaIso, sigmaIso, -.2)
triax.
# allow faster deformation along x,y to better maintain stresses
triax.
# next time, call triaxFinished instead of compactionFinished
triax.doneHook = 'triaxFinished()'
# do not wait for stabilization before calling triaxFinished
triax.
def triaxFinished():
print(
O.pause()
-------
-------
In [1]:
Unhandled exception in thread started by <function liveUpdate at 0x7f69ce36e140>
ValueError Traceback (most recent call last)
/usr/lib/
506 for ax in axes:
507 try:
--> 508 ax.relim() # recompute axes limits
509 ax.autoscale_view()
510 except RuntimeError: pass # happens if data are being updated and have not the same dimension at the very moment
/usr/lib/
1936 for line in self.lines:
1937 if not visible_only or line.get_visible():
-> 1938 self._update_
1939
1940 for p in self.patches:
/usr/lib/
1799 Figures out the data limit of the given line, updating self.dataLim.
1800 """
-> 1801 path = line.get_path()
1802 if path.vertices.size == 0:
1803 return
/usr/lib/
955 """
956 if self._invalidy or self._invalidx:
--> 957 self.recache()
958 return self._path
959
/usr/lib/
665 y = self._y
666
--> 667 self._xy = np.column_
668 self._x, self._y = self._xy.T # views
669
/usr/lib/
247 args = [np.array(_m, copy=False, subok=subok) for _m in args]
248
--> 249 shape = _broadcast_
250
251 if all(array.shape == shape for array in args):
/usr/lib/
182 # use the old-iterator because np.nditer does not handle size 0 arrays
183 # consistently
--> 184 b = np.broadcast(
185 # unfortunately, it cannot handle 32 or more arguments directly
186 for pos in range(32, len(args), 31):
ValueError: shape mismatch: objects cannot be broadcast to a single shape
-------
The plot nolonger refresh to show the real time stress and strain state of the test.
I think that there may be some limits in the source code when the calculation amount go large.
Actually, I tried the FrictMat and the error didn't occur. So I guess it has something to do with the calculation burden?
Can anyone give me some suggestion? Thanks a lot.
Zhang Wenyue
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Robert Caulk
- Solved:
- Last query:
- Last reply: