@@ -282,52 +282,15 @@ class ReactorBase
282282 return m_sensParams.size ();
283283 }
284284
285- // ! Calculate the derivative of temperature with respect to the temperature in the
286- // ! heat transfer equation based on the reactor specific equation of state.
287- // ! This function should also transform the state of the derivative to that
288- // ! appropriate for the jacobian's state/
289- // ! @warning This function is an experimental part of the %Cantera API and may be changed
290- // ! or removed without notice.
291- // ! @since New in %Cantera 3.0.
292- // !
293- virtual double temperatureDerivative () {
294- throw NotImplementedError (" Reactor::temperatureDerivative" );
295- }
296-
297- // ! Calculate the derivative of temperature with respect to the temperature in the
298- // ! heat transfer radiation equation based on the reactor specific equation of
299- // ! state.
300- // ! This function should also transform the state of the derivative to that
301- // ! appropriate for the jacobian's state/
302- // ! @warning This function is an experimental part of the %Cantera API and may be
303- // ! changed
304- // ! or removed without notice.
305- // ! @since New in %Cantera 3.0.
306- // !
307- virtual double temperatureRadiationDerivative () {
308- throw NotImplementedError (" Reactor::temperatureRadiationDerivative" );
309- }
310-
311- // ! Calculate the derivative of T with respect to the ith species in the heat
312- // ! transfer equation based on the reactor specific equation of state.
285+ // ! Calculate the derivative of T with respect to the ith species in the energy
286+ // ! conservation equation based on the reactor specific equation of state.
313287 // ! @param index index of the species the derivative is with respect too
314- // ! @warning This function is an experimental part of the %Cantera API and may be changed
315- // ! or removed without notice.
316- // ! @since New in %Cantera 3.0.
317- // !
318- virtual double moleDerivative (size_t index) {
319- throw NotImplementedError (" Reactor::moleDerivative" );
320- }
321-
322- // ! Calculate the derivative of T with respect to the ith species in the heat
323- // ! transfer radiation equation based on the reactor specific equation of state.
324- // ! @param index index of the species the derivative is with respect too
325- // ! @warning This function is an experimental part of the %Cantera API and may be changed
326- // ! or removed without notice.
327- // ! @since New in %Cantera 3.0.
288+ // ! @warning This function is an experimental part of the %Cantera API and may
289+ // ! be changed or removed without notice.
290+ // ! @since New in %Cantera 3.1.
328291 // !
329- virtual double moleRadiationDerivative (size_t index) {
330- throw NotImplementedError (" Reactor::moleRadiationDerivative " );
292+ virtual double temperature_ddni (size_t index) {
293+ throw NotImplementedError (" Reactor::temperature_ddni " );
331294 }
332295
333296 // ! Return the index associated with energy of the system
@@ -336,6 +299,17 @@ class ReactorBase
336299 // ! Return the offset between species and state variables
337300 virtual size_t speciesOffset () const { return m_sidx; };
338301
302+ // ! Returns `true` if solution of the energy equation is enabled.
303+ virtual bool energyEnabled () const {
304+ return m_energy;
305+ }
306+
307+ // ! Returns `true` if changes in the reactor composition due to chemical reactions
308+ // ! are enabled.
309+ bool chemistryEnabled () const {
310+ return m_chem;
311+ }
312+
339313protected:
340314 // ! Specify the mixture contained in the reactor. Note that a pointer to
341315 // ! this substance is stored, and as the integration proceeds, the state of
@@ -389,6 +363,12 @@ class ReactorBase
389363
390364 // Data associated each sensitivity parameter
391365 vector<SensitivityParameter> m_sensParams;
366+
367+ // ! A bool that enables the energy equation
368+ bool m_energy = true ;
369+
370+ // ! A bool that enables the chemical kinetics equations
371+ bool m_chem = false ;
392372};
393373}
394374
0 commit comments