yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21749
[Question #688165]: Error after pressing the "Play" button
New question #688165 on Yade:
https://answers.launchpad.net/yade/+question/688165
Hi everyone,
I am using Ubuntu 18.04, and Yade 2019-08-08.git-775ae74
I use the Triaxial code by Bruno Chareyre [1] to run triaxial simulation on my specimen and only made the following changes in [1]:
num_spheres=20000,
targetPorosity = 0.4
young=200000000
poisson=1
mn,mx=Vector3(0,0,0),Vector3(0.02,0.02,0.02)
sigmaIso=-500000
particleDensity=2000
O.materials.append(FrictMat(young=young,poisson=poisson,frictionAngle=radians(compFricDegree),density=particleDensity,label='spheres'))
from yade import pack
sp=pack.SpherePack()
clumps=False
volume = (mx[0]-mn[0])*(mx[1]-mn[1])*(mx[2]-mn[2])
sp.makeCloud(mn,mx,0.0002,0.5,num_spheres,False, 0.95,seed=1)
O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])
triax.goal1 = sigmaIso
triax.goal2 = sigmaIso
triax.goal3 = sigmaIso
f unb<stabilityThreshold and abs(sigmaIso-triax.meanStress)/sigmaIso<0.001:
triax.goal1 = sigmaIso
triax.goal2 = rate
triax.goal3 = sigmaIso
[1] https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py
***********************************************
The code can be run up to opening 3 windows (plot, show3D,remote) and I get the "END" message on the screen successfully. My problem is that when I press the "Play" button, nothing happens and then I get the following error:
============ RECORD AND PLOT DATA ============
/home/ehsan/yade/install/lib/x86_64-linux-gnu/yade-2019-08-08.git-775ae74/py/yade/plot.py:444: MatplotlibDeprecationWarning:
The 'verts' kwarg was deprecated in Matplotlib 3.0 and will be removed in 3.2. Use 'marker' instead.
scatter=pylab.scatter(scatterPt[0] if not math.isnan(scatterPt[0]) else 0,scatterPt[1] if not math.isnan(scatterPt[1]) else 0,s=scatterSize,color=line.get_color(),**scatterMarkerKw)
************** END **************
Analysis has been taken for 987.977 seconds or 16.466283333333333 minutes
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]
Unhandled exception in thread started by <function liveUpdate at 0x7f3808480730>
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/yade/install/lib/x86_64-linux-gnu/yade-2019-08-08.git-775ae74/py/yade/plot.py in liveUpdate(timestamp)
512 for ax in axes:
513 try:
--> 514 ax.relim() # recompute axes limits
515 ax.autoscale_view()
516 except RuntimeError: pass # happens if data are being updated and have not the same dimension at the very moment
~/.local/lib/python3.6/site-packages/matplotlib/axes/_base.py in relim(self, visible_only)
2049 for line in self.lines:
2050 if not visible_only or line.get_visible():
-> 2051 self._update_line_limits(line)
2052
2053 for p in self.patches:
~/.local/lib/python3.6/site-packages/matplotlib/axes/_base.py in _update_line_limits(self, line)
1922 Figures out the data limit of the given line, updating self.dataLim.
1923 """
-> 1924 path = line.get_path()
1925 if path.vertices.size == 0:
1926 return
~/.local/lib/python3.6/site-packages/matplotlib/lines.py in get_path(self)
1025 """
1026 if self._invalidy or self._invalidx:
-> 1027 self.recache()
1028 return self._path
1029
~/.local/lib/python3.6/site-packages/matplotlib/lines.py in recache(self, always)
677 y = self._y
678
--> 679 self._xy = np.column_stack(np.broadcast_arrays(x, y)).astype(float)
680 self._x, self._y = self._xy.T # views
681
<__array_function__ internals> in broadcast_arrays(*args, **kwargs)
~/.local/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in broadcast_arrays(*args, **kwargs)
262 args = [np.array(_m, copy=False, subok=subok) for _m in args]
263
--> 264 shape = _broadcast_shape(*args)
265
266 if all(array.shape == shape for array in args):
~/.local/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in _broadcast_shape(*args)
189 # use the old-iterator because np.nditer does not handle size 0 arrays
190 # consistently
--> 191 b = np.broadcast(*args[:32])
192 # unfortunately, it cannot handle 32 or more arguments directly
193 for pos in range(32, len(args), 31):
ValueError: shape mismatch: objects cannot be broadcast to a single shape
In [1]:
Thank you for your help
Bests,
Ehsan
--
You received this question notification because your team yade-users is
an answer contact for Yade.