38 IonFlow(shared_ptr<Solution> sol,
const string&
id=
"",
size_t points = 1);
40 string type()
const override;
47 void resize(
size_t components,
size_t points)
override;
66 vector<double>& diff_e,
67 vector<double>& mobi_e);
75 double rdt,
size_t jmin,
size_t jmax)
override;
100 vector<double> m_diff_e_fix;
112 double E(
const double* x,
size_t j)
const {
116 double dEdz(
const double* x,
size_t j)
const {
117 return (
E(x,j)-
E(x,j-1))/(z(j)-z(j-1));
121 double ND(
const double* x,
size_t k,
size_t j)
const {
122 return Avogadro * m_rho[j] * Y(x,k,j) / m_wt[k];
126 double rho_e(
double* x,
size_t j)
const {
127 double chargeDensity = 0.0;
131 return chargeDensity;
This class models the ion transportation in a flame.
vector< size_t > m_kCharge
index of species with charges
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.
bool doElectricField(size_t j) const override
Retrieve flag indicating whether electric field is solved or not (used by IonFlow specialization)
double E(const double *x, size_t j) const
electric field
void evalResidual(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax) override
vector< bool > m_do_electric_field
flag for solving electric field or not
size_t m_kElectron
index of electron
void frozenIonMethod(const double *x, size_t j0, size_t j1)
Solving phase one: the fluxes of charged species are turned off.
void resize(size_t components, size_t points) override
Resize the domain to have nv components and np grid points.
void setElectronTransport(vector< double > &tfix, vector< double > &diff_e, vector< double > &mobi_e)
Sometimes it is desired to carry out the simulation using a specified electron transport profile,...
string type() const override
String indicating the domain implemented.
double rho_e(double *x, size_t j) const
total charge density
size_t getSolvingStage() const override
Get the solving stage (used by IonFlow specialization)
double ND(const double *x, size_t k, size_t j) const
number density
void updateTransport(double *x, size_t j0, size_t j1) override
Update the transport properties at grid points in the range from j0 to j1, based on solution x.
vector< double > m_mobility
mobility
void updateDiffFluxes(const double *x, size_t j0, size_t j1) override
Update the diffusive mass fluxes.
size_t m_stage
solving stage
void _finalize(const double *x) override
In some cases, a domain may need to set parameters that depend on the initial solution estimate.
void setSolvingStage(const size_t stage) override
Solving stage mode for handling ionized species (used by IonFlow specialization)
bool m_import_electron_transport
flag for importing transport of electron
void solveElectricField(size_t j=npos) override
Set to solve electric field in a point (used by IonFlow specialization)
void fixElectricField(size_t j=npos) override
Set to fix voltage in a point (used by IonFlow specialization)
vector< size_t > m_kNeutral
index of neutral species
vector< double > m_mobi_e_fix
coefficients of polynomial fitting of fixed electron transport profile
bool componentActive(size_t n) const override
Returns true if the specified component is an active part of the solver state.
vector< double > m_speciesCharge
electrical properties
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
Base class for a phase with thermodynamic properties.
const double Avogadro
Avogadro's Number [number/kmol].
const double ElectronCharge
Elementary charge [C].
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
@ c_offset_E
electric poisson's equation