parameters: (self, equilibrate=True, data=None, group=None)
docstring: Set the initial guess for the solution.
  
          If `equilibrate` is True, then the products composition and temperature
          will be set to the equilibrium state of the reactants mixture.
          Alternatively, a previously calculated result can be supplied as an
          initial guess via 'data' and 'key' inputs (see
          `FlameBase.set_initial_guess`).
docstring_summary: Set the initial guess for the solution.
docstring_tokens: Set the initial guess for the solution .
function: def set_initial_guess(self, equilibrate=True, data=None, group=None):
          """
          Set the initial guess for the solution.
  
          If `equilibrate` is True, then the products composition and temperature
          will be set to the equilibrium state of the reactants mixture.
          Alternatively, a previously calculated result can be supplied as an
          initial guess via 'data' and 'key' inputs (see
          `FlameBase.set_initial_guess`).
          """
          super().set_initial_guess(data=data, group=group, equilibrate=equilibrate)
          if data:
              return
  
          Yu = self.reactants.Y
          Tu = self.reactants.T
          self.gas.TPY = Tu, self.flame.P, Yu
          rhou = self.gas.density
          uu = self.reactants.mdot / rhou
  
          self.gas.equilibrate('HP')
          Teq = self.gas.T
          Yeq = self.gas.Y
  
          if equilibrate:
              Tb = Teq
              Yb = Yeq
              self.products.Y = Yb
              self.products.T = Tb
          else:
              Tb = self.products.T
              Yb = self.products.Y
  
          self.gas.TPY = Tb, self.flame.P, Yb
          rhob = self.gas.density
          ub = self.products.mdot / rhob
  
          locs = np.array([0.0, 0.4, 0.6, 1.0])
          self.set_profile('T', locs, [Tu, Tu, Teq, Tb])
          for k in range(self.gas.n_species):
              self.set_profile(self.gas.species_name(k), locs,
                               [Yu[k], Yu[k], Yeq[k], Yb[k]])
  
          # estimate strain rate
          self.gas.TPY = Teq, self.flame.P, Yeq
          zz = self.flame.grid
          dz = zz[-1] - zz[0]
          a = (uu + ub)/dz
          L = - 0.5 * (rhou + rhob) * a**2
          # estimate stagnation point
          x0 = rhou*uu * dz / (rhou*uu + rhob*ub)
  
          self.set_profile('velocity', [0.0, 1.0], [uu, -ub])
          self.set_profile('spread_rate', [0.0, x0/dz, 1.0], [0.0, a, 0.0])
          self.set_profile("lambda", [0.0, 1.0], [L, L])
function_tokens: def set_initial_guess ( self , equilibrate = True , data = None , group = None ) : super ( ) . set_initial_guess ( data = data , group = group , equilibrate = equilibrate ) if data : return Yu = self . reactants . Y Tu = self . reactants . T self . gas . TPY = Tu , self . flame . P , Yu rhou = self . gas . density uu = self . reactants . mdot / rhou self . gas . equilibrate ( 'HP' ) Teq = self . gas . T Yeq = self . gas . Y if equilibrate : Tb = Teq Yb = Yeq self . products . Y = Yb self . products . T = Tb else : Tb = self . products . T Yb = self . products . Y self . gas . TPY = Tb , self . flame . P , Yb rhob = self . gas . density ub = self . products . mdot / rhob locs = np . array ( [ 0.0 , 0.4 , 0.6 , 1.0 ] ) self . set_profile ( 'T' , locs , [ Tu , Tu , Teq , Tb ] ) for k in range ( self . gas . n_species ) : self . set_profile ( self . gas . species_name ( k ) , locs , [ Yu [ k ] , Yu [ k ] , Yeq [ k ] , Yb [ k ] ] ) # estimate strain rate self . gas . TPY = Teq , self . flame . P , Yeq zz = self . flame . grid dz = zz [ - 1 ] - zz [ 0 ] a = ( uu + ub ) / dz L = - 0.5 * ( rhou + rhob ) * a ** 2 # estimate stagnation point x0 = rhou * uu * dz / ( rhou * uu + rhob * ub ) self . set_profile ( 'velocity' , [ 0.0 , 1.0 ] , [ uu , - ub ] ) self . set_profile ( 'spread_rate' , [ 0.0 , x0 / dz , 1.0 ] , [ 0.0 , a , 0.0 ] ) self . set_profile ( "lambda" , [ 0.0 , 1.0 ] , [ L , L ] )