original_docstring: 
          This method plots reynolds number for a single mesh
          
docstring: This method plots reynolds number for a single mesh
docstring_tokens: This method plots reynolds number for a single mesh
code: def PlotReynolds(self, meshid):
          '''
          This method plots reynolds number for a single mesh
          '''
          try:
              from matplotlib.pyplot import plot, xlabel, ylabel, title, legend, savefig, close
          except ImportError:
              MatPlotLibError()
          meshid = str(meshid)
          for element in self.NetworkMesh.Elements:
              if element.Id == meshid:
                  name = self.NetworkGraph.Edges[self.NetworkMesh.MeshToGraph[meshid]].Name
                  dofs = element.GetPoiseuilleDofs()
                  p1 = self.Solutions[(self.DofMap.DofMap[element.Id, dofs[0]]),self.CardiacFreq*(self.Cycles-1):]
                  p2 = self.Solutions[(self.DofMap.DofMap[element.Id, dofs[1]]),self.CardiacFreq*(self.Cycles-1):]
                  if mean(p1)>=mean(p2):                        
                      Flow = (p1-p2)/element.R
                  else:
                      Flow = (p2-p1)/element.R
  
                  Radius = element.Radius
                  Reynolds = (2.0*Flow*self.SimulationContext.Context['blood_density'])/(pi*mean(Radius)*self.SimulationContext.Context['dynamic_viscosity'])
        
          plot(self.t, Reynolds, 'r-',linewidth = 3, label = 'Reynolds Number')   #red line
          xlabel('Time ($s$)')
          ylabel('Reynolds Number')
          title ('Reynolds N.'+' peak:'+str(round(max(Reynolds),1))+' mean:'+str(round(mean(Reynolds),1))+' min:'+str(round(min(Reynolds),1)))    
          legend()
          savefig(self.images + meshid + '_' + name +'_reynoldsN.png')
          close()
code_tokens: def PlotReynolds ( self , meshid ) : try : from matplotlib . pyplot import plot , xlabel , ylabel , title , legend , savefig , close except ImportError : MatPlotLibError ( ) meshid = str ( meshid ) for element in self . NetworkMesh . Elements : if element . Id == meshid : name = self . NetworkGraph . Edges [ self . NetworkMesh . MeshToGraph [ meshid ] ] . Name dofs = element . GetPoiseuilleDofs ( ) p1 = self . Solutions [ ( self . DofMap . DofMap [ element . Id , dofs [ 0 ] ] ) , self . CardiacFreq * ( self . Cycles - 1 ) : ] p2 = self . Solutions [ ( self . DofMap . DofMap [ element . Id , dofs [ 1 ] ] ) , self . CardiacFreq * ( self . Cycles - 1 ) : ] if mean ( p1 ) >= mean ( p2 ) : Flow = ( p1 - p2 ) / element . R else : Flow = ( p2 - p1 ) / element . R Radius = element . Radius Reynolds = ( 2.0 * Flow * self . SimulationContext . Context [ 'blood_density' ] ) / ( pi * mean ( Radius ) * self . SimulationContext . Context [ 'dynamic_viscosity' ] ) plot ( self . t , Reynolds , 'r-' , linewidth = 3 , label = 'Reynolds Number' ) xlabel ( 'Time ($s$)' ) ylabel ( 'Reynolds Number' ) title ( 'Reynolds N.' + ' peak:' + str ( round ( max ( Reynolds ) , 1 ) ) + ' mean:' + str ( round ( mean ( Reynolds ) , 1 ) ) + ' min:' + str ( round ( min ( Reynolds ) , 1 ) ) ) legend ( ) savefig ( self . images + meshid + '_' + name + '_reynoldsN.png' ) close ( )
short_docstring: This method plots reynolds number for a single mesh
short_docstring_tokens: This method plots reynolds number for a single mesh
comment: '''
          This method plots reynolds number for a single mesh
          '''$SEP$#red line