@@ -248,10 +248,68 @@ class ReactorBase
248
248
// ! Set the ReactorNet that this reactor belongs to.
249
249
void setNetwork (ReactorNet* net);
250
250
251
+ /* ! Calculate the derivative of temperature with respect to the temperature in the
252
+ * heat transfer equation based on the reactor specific equation of state.
253
+ * This function should also transform the state of the derivative to that
254
+ * appropriate for the jacobian's state/
255
+ * @warning This function is an experimental part of the %Cantera API and may be changed
256
+ * or removed without notice.
257
+ * @since New in %Cantera 3.0.
258
+ */
259
+ virtual double temperatureDerivative () {
260
+ throw NotImplementedError (" Reactor::temperatureDerivative" );
261
+ }
262
+
263
+ /* ! Calculate the derivative of temperature with respect to the temperature in the
264
+ * heat transfer radiation equation based on the reactor specific equation of state.
265
+ * This function should also transform the state of the derivative to that
266
+ * appropriate for the jacobian's state/
267
+ * @warning This function is an experimental part of the %Cantera API and may be changed
268
+ * or removed without notice.
269
+ * @since New in %Cantera 3.0.
270
+ */
271
+ virtual double temperatureRadiationDerivative () {
272
+ throw NotImplementedError (" Reactor::temperatureRadiationDerivative" );
273
+ }
274
+
275
+ /* ! Calculate the derivative of T with respect to the ith species in the heat
276
+ * transfer equation based on the reactor specific equation of state.
277
+ * @param index index of the species the derivative is with respect too
278
+ * @warning This function is an experimental part of the %Cantera API and may be changed
279
+ * or removed without notice.
280
+ * @since New in %Cantera 3.0.
281
+ */
282
+ virtual double moleDerivative (size_t index) {
283
+ throw NotImplementedError (" Reactor::moleDerivative" );
284
+ }
285
+
286
+ /* ! Calculate the derivative of T with respect to the ith species in the heat
287
+ * transfer radiation equation based on the reactor specific equation of state.
288
+ * @param index index of the species the derivative is with respect too
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 moleRadiationDerivative (size_t index) {
294
+ throw NotImplementedError (" Reactor::moleRadiationDerivative" );
295
+ }
296
+
297
+ // ! Return the index associated with energy of the system
298
+ virtual size_t energyIndex () const { return m_eidx; };
299
+
300
+ // ! Return the offset between species and state variables
301
+ virtual size_t speciesOffset () const { return m_sidx; };
302
+
251
303
protected:
252
304
// ! Number of homogeneous species in the mixture
253
305
size_t m_nsp = 0 ;
254
306
307
+ // ! species offset in the state vector
308
+ const size_t m_sidx = 3 ;
309
+
310
+ // ! index of state variable associated with energy
311
+ const size_t m_eidx = 1 ;
312
+
255
313
ThermoPhase* m_thermo = nullptr ;
256
314
double m_vol = 1.0 ; // !< Current volume of the reactor [m^3]
257
315
double m_enthalpy = 0.0 ; // !< Current specific enthalpy of the reactor [J/kg]
0 commit comments