hips
Loading...
Searching...
No Matches
batchReactor_cvode Class Reference

Detailed Description

Definition at line 14 of file batchReactor_cvode.h.

#include <batchReactor_cvode.h>

Public Member Functions

 batchReactor_cvode (std::shared_ptr< Cantera::Solution > cantSol)
 Constructor for the batchReactor_cvode class.
 
virtual void react (double &h, std::vector< double > &y, const double tRun)
 Simulates a reaction in the batch reactor.
 
int rhsf (const double t, const double *vars, double *dvarsdt)
 Computes the right-hand side of the ODE system.
 
virtual ~batchReactor_cvode ()
 
- Public Member Functions inherited from batchReactor
 batchReactor ()
 
double getDensity () const
 

Private Attributes

std::shared_ptr< integrator_cvodeintegrator
 cvode integrator wrapper
 

Additional Inherited Members

- Public Attributes inherited from batchReactor
double temperature
 temperature during integrate
 
double rho
 density during integrate
 
- Protected Attributes inherited from batchReactor
std::shared_ptr< Cantera::ThermoPhase > gas
 Cantera thermo object.
 
std::shared_ptr< Cantera::Kinetics > kin
 Cantera kinetics object.
 
int nvar
 number of variables/equations solved
 
double h_fixed
 adiabatic h during integrate
 
double P_fixed
 pressure during integrate
 

Constructor & Destructor Documentation

◆ batchReactor_cvode()

batchReactor_cvode::batchReactor_cvode ( std::shared_ptr< Cantera::Solution > cantSol)

Constructor for the batchReactor_cvode class.

Initializes a batch reactor object using CVODE for simulations.

Parameters
cantSolA shared pointer to a Cantera solution object.

Definition at line 26 of file batchReactor_cvode.cc.

◆ ~batchReactor_cvode()

virtual batchReactor_cvode::~batchReactor_cvode ( )
inlinevirtual

Definition at line 30 of file batchReactor_cvode.h.

Member Function Documentation

◆ react()

void batchReactor_cvode::react ( double & h,
std::vector< double > & y,
const double tRun )
virtual

Simulates a reaction in the batch reactor.

Parameters
hHeat of the reactor.
yVector of species mass fractions.
tRunTime for the simulation.

Implements batchReactor.

Definition at line 50 of file batchReactor_cvode.cc.

◆ rhsf()

int batchReactor_cvode::rhsf ( const double t,
const double * vars,
double * dvarsdt )

Computes the right-hand side of the ODE system.

This function is used by CVODE to compute the derivatives of the variables with respect to time.

Parameters
tCurrent time.
varsPointer to an array containing the variables (species concentrations).
dvarsdtPointer to an array where the computed derivatives will be stored.
Returns
0 on success.

Definition at line 72 of file batchReactor_cvode.cc.

Member Data Documentation

◆ integrator

std::shared_ptr<integrator_cvode> batchReactor_cvode::integrator
private

cvode integrator wrapper

Definition at line 18 of file batchReactor_cvode.h.


The documentation for this class was generated from the following files: