43 IonFlow(shared_ptr<Solution> sol,
const string&
id=
"",
size_t points = 1);
52 void resize(
size_t components,
size_t points)
override;
71 vector<double>& diff_e,
72 vector<double>& mobi_e);
99 double rdt,
size_t jmin,
size_t jmax)
override;
111 void evalSpecies(
double* x,
double* rsd,
int* diag,
112 double rdt,
size_t jmin,
size_t jmax)
override;
155 double E(
const double* x,
size_t j)
const {
160 double dEdz(
const double* x,
size_t j)
const {
161 return (
E(x,j)-
E(x,j-1))/(
z(j)-
z(j-1));
165 double ND(
const double* x,
size_t k,
size_t j)
const {
170 double rho_e(
double* x,
size_t j)
const {
171 double chargeDensity = 0.0;
175 return chargeDensity;
double z(size_t jlocal) const
Get the coordinate [m] of the point with local index jlocal
size_t index(size_t n, size_t j) const
Returns the index of the solution vector, which corresponds to component n at grid point j.
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
vector< double > m_rho
Density at each grid point.
vector< double > m_wt
Molecular weight of each species.
double Y(const double *x, size_t k, size_t j) const
Get the mass fraction of species k at point j from the local state vector x.
This class models the ion transportation in a flame.
vector< size_t > m_kCharge
index of species with charges
vector< double > m_diff_e_fix
Coefficients of polynomial fit for electron diffusivity as a function of temperature.
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 [V/m]
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
Change the grid size. Called after grid refinement.
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,...
void evalElectricField(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax) override
Evaluate the electric field equation residual by Gauss's law.
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 [molecules/m³]
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
double dEdz(const double *x, size_t j) const
Axial gradient of the electric field [V/m²].
void updateDiffFluxes(const double *x, size_t j0, size_t j1) override
Update the diffusive mass fluxes.
void evalSpecies(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax) override
Evaluate the species equations' residual.
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)
string domainType() const override
Domain type flag.
vector< size_t > m_kNeutral
index of neutral species
vector< double > m_mobi_e_fix
Coefficients of polynomial fit for electron mobility as a function of temperature.
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
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 field