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 {
39 void getStateDae(span<double> y, span<double> ydot)
override;
43 void eval(
double t, span<double> LHS, span<double> RHS)
override {
47 void evalDae(
double t, span<const double> y, span<const double> ydot,
48 span<double> residual)
override;
53 "FlowReactor is not compatible with time-dependent steady-state solver.");
70 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]
void eval(double t, span< double > LHS, span< double > RHS) override
Not implemented; FlowReactor implements evalDae() instead.
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].
bool timeIsIndependent() const override
Indicates whether the governing equations for this reactor are functions of time or a spatial variabl...
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 getConstraints(span< double > constraints) override
Given a vector of length neq(), mark which variables should be considered algebraic constraints.
double massFlowRate()
Mass flow rate through the reactor [kg/s].
void evalDae(double t, span< const double > y, span< const double > ydot, span< double > residual) override
Evaluate the reactor governing equations.
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.
string componentName(size_t k) override
Return the name of the solution component with index i.
void setArea(double area) override
Sets the area of the reactor [m²].
void updateState(span< const double > y) override
Set the state of the reactor to correspond to the state vector y.
vector< double > m_hk
temporary storage for species partial molar enthalpies
void getState(span< double > y) override
Not implemented; FlowReactor implements getStateDae() instead.
void getStateDae(span< double > y, span< double > ydot) override
Get the current state and derivative vector of the reactor for a DAE solver.
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.