parameters: (self)
return_statement: return self.solve_adjoint(perturb, self.gas.n_reactions, dgdx) / Su0
docstring: r"""
          Compute the normalized sensitivities of the laminar flame speed
          :math:`S_u` with respect to the reaction rate constants :math:`k_i`:
  
          .. math::
  
              s_i = \frac{k_i}{S_u} \frac{dS_u}{dk_i}
docstring_summary: r"""
          Compute the normalized sensitivities of the laminar flame speed
          :math:`S_u` with respect to the reaction rate constants :math:`k_i`:
docstring_tokens: r Compute the normalized sensitivities of the laminar flame speed : math : S_u with respect to the reaction rate constants : math : k_i :
function: def get_flame_speed_reaction_sensitivities(self):
          r"""
          Compute the normalized sensitivities of the laminar flame speed
          :math:`S_u` with respect to the reaction rate constants :math:`k_i`:
  
          .. math::
  
              s_i = \frac{k_i}{S_u} \frac{dS_u}{dk_i}
          """
  
          def g(sim):
              return sim.velocity[0]
  
          Nvars = sum(D.n_components * D.n_points for D in self.domains)
  
          # Index of u[0] in the global solution vector
          i_Su = self.inlet.n_components + self.flame.component_index('velocity')
  
          dgdx = np.zeros(Nvars)
          dgdx[i_Su] = 1
  
          Su0 = g(self)
  
          def perturb(sim, i, dp):
              sim.gas.set_multiplier(1+dp, i)
  
          return self.solve_adjoint(perturb, self.gas.n_reactions, dgdx) / Su0
function_tokens: def get_flame_speed_reaction_sensitivities ( self ) : def g ( sim ) : return sim . velocity [ 0 ] Nvars = sum ( D . n_components * D . n_points for D in self . domains ) # Index of u[0] in the global solution vector i_Su = self . inlet . n_components + self . flame . component_index ( 'velocity' ) dgdx = np . zeros ( Nvars ) dgdx [ i_Su ] = 1 Su0 = g ( self ) def perturb ( sim , i , dp ) : sim . gas . set_multiplier ( 1 + dp , i ) return self . solve_adjoint ( perturb , self . gas . n_reactions , dgdx ) / Su0