6#ifndef CT_FLOWREACTOR_H
7#define CT_FLOWREACTOR_H
20 FlowReactor(shared_ptr<Solution> sol,
bool clone,
const string&
name=
"(none)");
22 string type()
const override {
43 void eval(
double t,
double* LHS,
double* RHS)
override {
47 void evalDae(
double t,
double* y,
double* ydot,
double* residual)
override;
52 "FlowReactor is not compatible with time-dependent steady-state solver.");
69 double area()
const override {
Base class for exceptions thrown by Cantera classes.
Adiabatic flow in a constant-area duct with homogeneous and heterogeneous reactions.
double m_area
reactor area [m^2]
double area() const override
The cross-sectional area of the reactor [m²].
const size_t m_offset_Y
offset to the species equations
bool isOde() const override
Indicate whether the governing equations for this reactor type are a system of ODEs or DAEs.
void setMassFlowRate(double mdot)
Set the mass flow rate through the reactor [kg/s].
void getConstraints(double *constraints) override
Given a vector of length neq(), mark which variables should be considered algebraic constraints.
bool timeIsIndependent() const override
Indicates whether the governing equations for this reactor are functions of time or a spatial variabl...
void eval(double t, double *LHS, double *RHS) override
Not implemented; FlowReactor implements evalDae() instead.
double speed() const
The current gas speed in the reactor [m/s].
string type() const override
String indicating the reactor model implemented.
double m_u
Axial velocity [m/s]. Second component of the state vector.
size_t componentIndex(const string &nm) const override
Return the index in the solution vector for this reactor of the component named nm.
void getStateDae(double *y, double *ydot) override
Get the current state and derivative vector of the reactor for a DAE solver.
double massFlowRate()
Mass flow rate through the reactor [kg/s].
void getState(double *y) override
Not implemented; FlowReactor implements getStateDae() instead.
vector< size_t > initializeSteady() override
Initialize the reactor before solving a steady-state problem.
double m_rho
Density [kg/m^3]. First component of the state vector.
void evalDae(double t, double *y, double *ydot, double *residual) override
Evaluate the reactor governing equations.
string componentName(size_t k) override
Return the name of the solution component with index i.
void updateState(double *y) override
Set the state of the reactor to correspond to the state vector y.
void setArea(double area) override
Sets the area of the reactor [m²].
vector< double > m_hk
temporary storage for species partial molar enthalpies
Class IdealGasReactor is a class for stirred reactors that is specifically optimized for ideal gases.
An error indicating that an unimplemented function has been called.
string name() const
Return the name of this reactor.
Namespace for the Cantera kernel.