original_docstring: Plot undamped critical speed map.
  
          This method will plot the undamped critical speed map for a given range
          of stiffness values. If the range is not provided, the bearing
          stiffness at rated speed will be used to create a range.
  
          Parameters
          ----------
          stiffness_range : tuple, optional
              Tuple with (start, end) for stiffness range.
          num : int
              Number of steps in the range.
              Default is 20.
  
          Returns
          -------
          fig : bokeh figure
              Returns the axes object with the plot.
  
          Example
          -------
          >>> import ross as rs
          >>> report = rs.report_example()
          >>> report.plot_ucs(stiffness_range=(5, 8)) # doctest: +ELLIPSIS
          Figure...
          
docstring: Plot undamped critical speed map.
  This method will plot the undamped critical speed map for a given range
  of stiffness values. If the range is not provided, the bearing
  stiffness at rated speed will be used to create a range.
  
  Parameters
  
  stiffness_range : tuple, optional
  Tuple with (start, end) for stiffness range.
  num : int
  Number of steps in the range.
  Default is 20.
  
  Returns
  
  fig : bokeh figure
  Returns the axes object with the plot.
  
  Example
  
  
docstring_tokens: Plot undamped critical speed map . This method will plot the undamped critical speed map for a given range of stiffness values . If the range is not provided the bearing stiffness at rated speed will be used to create a range . Parameters stiffness_range : tuple optional Tuple with ( start end ) for stiffness range . num : int Number of steps in the range . Default is 20 . Returns fig : bokeh figure Returns the axes object with the plot . Example
code: def plot_ucs(self, stiffness_range=None, num=20):
          """Plot undamped critical speed map.
  
          This method will plot the undamped critical speed map for a given range
          of stiffness values. If the range is not provided, the bearing
          stiffness at rated speed will be used to create a range.
  
          Parameters
          ----------
          stiffness_range : tuple, optional
              Tuple with (start, end) for stiffness range.
          num : int
              Number of steps in the range.
              Default is 20.
  
          Returns
          -------
          fig : bokeh figure
              Returns the axes object with the plot.
  
          Example
          -------
          >>> import ross as rs
          >>> report = rs.report_example()
          >>> report.plot_ucs(stiffness_range=(5, 8)) # doctest: +ELLIPSIS
          Figure...
          """
          if stiffness_range is None:
              if self.rotor.rated_w is not None:
                  bearing = self.rotor.bearing_elements[0]
                  k = bearing.kxx.interpolated(self.rotor.rated_w)
                  k = int(np.log10(k))
                  stiffness_range = (k - 3, k + 3)
              else:
                  stiffness_range = (6, 11)
  
          stiffness_log = np.logspace(*stiffness_range, num=num)
          rotor_wn = np.zeros((4, len(stiffness_log)))
  
          bearings_elements = []  # exclude the seals
          for bearing in self.rotor.bearing_elements:
              if not isinstance(bearing, SealElement):
                  bearings_elements.append(bearing)
  
          for i, k in enumerate(stiffness_log):
              bearings = [BearingElement(b.n, kxx=k, cxx=0) for b in bearings_elements]
              rotor = self.rotor.__class__(
                  self.rotor.shaft_elements,
                  self.rotor.disk_elements,
                  bearings,
                  n_eigen=16,
              )
              modal = rotor.run_modal(speed=0)
              rotor_wn[:, i] = modal.wn[:8:2]
  
          bearing0 = bearings_elements[0]
  
          fig = figure(
              tools="pan, box_zoom, wheel_zoom, reset, save",
              width=640,
              height=480,
              title="Undamped Critical Speed Map",
              x_axis_label="Bearing Stiffness",
              y_axis_label="Critical Speed",
              x_axis_type="log",
              y_axis_type="log",
          )
          fig.title.text_font_size = "14pt"
          fig.xaxis.axis_label_text_font_size = "14pt"
          fig.yaxis.axis_label_text_font_size = "14pt"
          fig.axis.major_label_text_font_size = "14pt"
  
          fig.circle(
              bearing0.kxx.interpolated(bearing0.frequency),
              bearing0.frequency,
              size=5,
              fill_alpha=0.5,
              fill_color=bokeh_colors[0],
              legend_label="Kxx",
          )
          fig.square(
              bearing0.kyy.interpolated(bearing0.frequency),
              bearing0.frequency,
              size=5,
              fill_alpha=0.5,
              fill_color=bokeh_colors[0],
              legend_label="Kyy",
          )
  
          for j in range(rotor_wn.T.shape[1]):
              fig.line(
                  stiffness_log,
                  np.transpose(rotor_wn.T)[j],
                  line_width=3,
                  line_color="red",
              )
  
          fig.line(
              stiffness_log,
              [self.maxspeed] * num,
              line_dash="dotdash",
              line_width=3,
              line_color=bokeh_colors[-1],
              legend_label="MCS Speed",
          )
          fig.line(
              stiffness_log,
              [self.minspeed] * num,
              line_dash="dotdash",
              line_width=3,
              line_color=bokeh_colors[-2],
              legend_label="MOS Speed",
          )
          fig.line(
              stiffness_log,
              [self.tripspeed] * num,
              line_dash="dotdash",
              line_width=3,
              line_color=bokeh_colors[-3],
              legend_label="Trip Speed",
          )
          fig.line(
              stiffness_log,
              [1.25 * self.tripspeed] * num,
              line_dash="dotdash",
              line_width=3,
              line_color=bokeh_colors[-4],
              legend_label="125% Trip Speed",
          )
          fig.legend.background_fill_alpha = 0.1
          fig.legend.location = "bottom_right"
  
          return fig
code_tokens: def plot_ucs ( self , stiffness_range = None , num = 20 ) : if stiffness_range is None : if self . rotor . rated_w is not None : bearing = self . rotor . bearing_elements [ 0 ] k = bearing . kxx . interpolated ( self . rotor . rated_w ) k = int ( np . log10 ( k ) ) stiffness_range = ( k - 3 , k + 3 ) else : stiffness_range = ( 6 , 11 ) stiffness_log = np . logspace ( * stiffness_range , num = num ) rotor_wn = np . zeros ( ( 4 , len ( stiffness_log ) ) ) bearings_elements = [ ] for bearing in self . rotor . bearing_elements : if not isinstance ( bearing , SealElement ) : bearings_elements . append ( bearing ) for i , k in enumerate ( stiffness_log ) : bearings = [ BearingElement ( b . n , kxx = k , cxx = 0 ) for b in bearings_elements ] rotor = self . rotor . __class__ ( self . rotor . shaft_elements , self . rotor . disk_elements , bearings , n_eigen = 16 , ) modal = rotor . run_modal ( speed = 0 ) rotor_wn [ : , i ] = modal . wn [ : 8 : 2 ] bearing0 = bearings_elements [ 0 ] fig = figure ( tools = "pan, box_zoom, wheel_zoom, reset, save" , width = 640 , height = 480 , title = "Undamped Critical Speed Map" , x_axis_label = "Bearing Stiffness" , y_axis_label = "Critical Speed" , x_axis_type = "log" , y_axis_type = "log" , ) fig . title . text_font_size = "14pt" fig . xaxis . axis_label_text_font_size = "14pt" fig . yaxis . axis_label_text_font_size = "14pt" fig . axis . major_label_text_font_size = "14pt" fig . circle ( bearing0 . kxx . interpolated ( bearing0 . frequency ) , bearing0 . frequency , size = 5 , fill_alpha = 0.5 , fill_color = bokeh_colors [ 0 ] , legend_label = "Kxx" , ) fig . square ( bearing0 . kyy . interpolated ( bearing0 . frequency ) , bearing0 . frequency , size = 5 , fill_alpha = 0.5 , fill_color = bokeh_colors [ 0 ] , legend_label = "Kyy" , ) for j in range ( rotor_wn . T . shape [ 1 ] ) : fig . line ( stiffness_log , np . transpose ( rotor_wn . T ) [ j ] , line_width = 3 , line_color = "red" , ) fig . line ( stiffness_log , [ self . maxspeed ] * num , line_dash = "dotdash" , line_width = 3 , line_color = bokeh_colors [ - 1 ] , legend_label = "MCS Speed" , ) fig . line ( stiffness_log , [ self . minspeed ] * num , line_dash = "dotdash" , line_width = 3 , line_color = bokeh_colors [ - 2 ] , legend_label = "MOS Speed" , ) fig . line ( stiffness_log , [ self . tripspeed ] * num , line_dash = "dotdash" , line_width = 3 , line_color = bokeh_colors [ - 3 ] , legend_label = "Trip Speed" , ) fig . line ( stiffness_log , [ 1.25 * self . tripspeed ] * num , line_dash = "dotdash" , line_width = 3 , line_color = bokeh_colors [ - 4 ] , legend_label = "125% Trip Speed" , ) fig . legend . background_fill_alpha = 0.1 fig . legend . location = "bottom_right" return fig
short_docstring: Plot undamped critical speed map.
short_docstring_tokens: Plot undamped critical speed map .
comment: """Plot undamped critical speed map.
  
          This method will plot the undamped critical speed map for a given range
          of stiffness values. If the range is not provided, the bearing
          stiffness at rated speed will be used to create a range.
  
          Parameters
          ----------
          stiffness_range : tuple, optional
              Tuple with (start, end) for stiffness range.
          num : int
              Number of steps in the range.
              Default is 20.
  
          Returns
          -------
          fig : bokeh figure
              Returns the axes object with the plot.
  
          Example
          -------
          >>> import ross as rs
          >>> report = rs.report_example()
          >>> report.plot_ucs(stiffness_range=(5, 8)) # doctest: +ELLIPSIS
          Figure...
          """$SEP$# exclude the seals