diff --git a/moorpy/helpers.py b/moorpy/helpers.py index 9da081d..65ec62a 100644 --- a/moorpy/helpers.py +++ b/moorpy/helpers.py @@ -1868,6 +1868,12 @@ def read_mooring_file(dirName,fileName): data2 = np.array(data) + # Check if *** characters in data2 and if so replace with 0 + for i in range(len(data2)): + for j in range(len(data2[i])): + if data2[i][j].count('***') > 0: + data2[i][j] = '0.0' + data3 = data2.astype(float) return data3, ch, channels, units diff --git a/moorpy/line.py b/moorpy/line.py index 5b5968e..87ab36a 100644 --- a/moorpy/line.py +++ b/moorpy/line.py @@ -53,7 +53,8 @@ def __init__(self, mooringSys, num, L, lineType, nSegs=100, cb=0, isRod=0, attac self.type = lineType # dictionary of a System.lineTypes entry self.cost = {} # empty dictionary to contain cost information - self.EA = self.type['EA'] # use the default stiffness value for now (may be modified if using nonlinear elasticity) [N] + if not self.isRod: + self.EA = self.type['EA'] # use the default stiffness value for now (may be modified if using nonlinear elasticity) [N] self.nNodes = int(nSegs) + 1 self.cb = float(cb) # friction coefficient (will automatically be set negative if line is fully suspended) diff --git a/moorpy/system.py b/moorpy/system.py index 34a9558..0ba298f 100644 --- a/moorpy/system.py +++ b/moorpy/system.py @@ -4148,7 +4148,7 @@ def animateLines(self, figure=None, axis=None, color=None, interval=200, repeat= # Animation: update the figure with the updated coordinates from update_Coords function # NOTE: the animation needs to be stored in a variable, return out of the method, and referenced when calling self.animatelines() line_ani = animation.FuncAnimation(fig, self.updateCoords, np.arange(1, nFrames-1, speed), fargs=(colortension, cmap_tension, label, dt), - interval=1, repeat=repeat, repeat_delay=delay, blit=False) + interval=interval, repeat=repeat, repeat_delay=delay, blit=False) # works well when np.arange(...nFrames...) is used. Others iterable ways to do this return line_ani