38 virtual void resize(
size_t components,
size_t points);
45 bool doElectricField(
size_t j) {
69 virtual void evalResidual(
double* x,
double* rsd,
int* diag,
70 double rdt,
size_t jmin,
size_t jmax);
107 double E(
const double* x,
size_t j)
const {
108 return x[index(c_offset_E, j)];
111 double dEdz(
const double* x,
size_t j)
const {
112 return (
E(x,j)-
E(x,j-1))/(z(j)-z(j-1));
116 double ND(
const double* x,
size_t k,
size_t j)
const {
117 return Avogadro * m_rho[j] * Y(x,k,j) / m_wt[k];
121 double rho_e(
double* x,
size_t j)
const {
122 double chargeDensity = 0.0;
126 return chargeDensity;
void solveElectricField(size_t j=npos)
set to solve electric field on a point
virtual void resize(size_t components, size_t points)
Change the grid size. Called after grid refinement.
vector_fp m_mobility
mobility
virtual void updateTransport(double *x, size_t j0, size_t j1)
Update the transport properties at grid points in the range from j0 to j1, based on solution x...
bool m_import_electron_transport
flag for importing transport of electron
size_t m_kElectron
index of electron
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state...
const size_t npos
index returned by functions to indicate "no position"
double ND(const double *x, size_t k, size_t j) const
number density
double E(const double *x, size_t j) const
electric field
std::vector< bool > m_do_electric_field
flag for solving electric field or not
std::vector< int > vector_int
Vector of ints.
double rho_e(double *x, size_t j) const
total charge density
std::vector< size_t > m_kNeutral
index of neutral species
virtual void evalResidual(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
vector_int m_speciesCharge
electrical properties
virtual void _finalize(const double *x)
In some cases, a domain may need to set parameters that depend on the initial solution estimate...
virtual void updateDiffFluxes(const double *x, size_t j0, size_t j1)
Update the diffusive mass fluxes.
virtual void setSolvingStage(const size_t phase)
set the solving stage
virtual void electricFieldMethod(const double *x, size_t j0, size_t j1)
Solving phase two: the electric field equation is added coupled by the electrical drift...
const doublereal Avogadro
Avogadro's Number [number/kmol].
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
This class models the ion transportation in a flame.
std::vector< size_t > m_kCharge
index of species with charges
void fixElectricField(size_t j=npos)
set to fix voltage on a point
vector_fp m_mobi_e_fix
coefficients of polynomial fitting of fixed electron transport profile
Namespace for the Cantera kernel.
void setElectronTransport(vector_fp &tfix, vector_fp &diff_e, vector_fp &mobi_e)
Sometimes it is desired to carry out the simulation using a specified electron transport profile...
virtual void frozenIonMethod(const double *x, size_t j0, size_t j1)
Solving phase one: the fluxes of charged species are turned off.