original_docstring: 
          This method writes reynolds number output values in a .txt file.
          
docstring: This method writes reynolds number output values in a .txt file.
docstring_tokens: This method writes reynolds number output values in a . txt file .
code: def WriteReynolds(self, meshid, txtpath):
          '''
          This method writes reynolds number output values in a .txt file.
          '''
          meshid = str(meshid)
          for element in self.NetworkMesh.Elements:
              if element.Id == meshid:
                  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*max(Radius)*self.SimulationContext.Context['dynamic_viscosity'])
                      
          text_file = open(txtpath, "w")
          text_file.write("Reynolds Number\n")
          for word in Reynolds:     
              text_file.write(str(word))
              text_file.write("\n")
          text_file.close()
code_tokens: def WriteReynolds ( self , meshid , txtpath ) : meshid = str ( meshid ) for element in self . NetworkMesh . Elements : if element . Id == meshid : 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 * max ( Radius ) * self . SimulationContext . Context [ 'dynamic_viscosity' ] ) text_file = open ( txtpath , "w" ) text_file . write ( "Reynolds Number\n" ) for word in Reynolds : text_file . write ( str ( word ) ) text_file . write ( "\n" ) text_file . close ( )
short_docstring: This method writes reynolds number output values in a .txt file.
short_docstring_tokens: This method writes reynolds number output values in a . txt file .
comment: '''
          This method writes reynolds number output values in a .txt file.
          '''