36 IonFlow(shared_ptr<Solution>
phase,
const string&
id=
"",
size_t points = 1);
40 void resize(
size_t components,
size_t points)
override;
57 span<const double> mobi_e);
84 double rdt,
size_t jmin,
size_t jmax)
override;
96 void evalSpecies(span<const double> x, span<double> rsd, span<int> diag,
97 double rdt,
size_t jmin,
size_t jmax)
override;
98 void updateTransport(span<const double> x,
size_t j0,
size_t j1)
override;
138 double E(span<const double> x,
size_t j)
const {
143 double dEdz(span<const double> x,
size_t j)
const {
144 return (
E(x,j)-
E(x,j-1))/(
z(j)-
z(j-1));
148 double ND(span<const double> x,
size_t k,
size_t j)
const {
153 double rho_e(span<const double> x,
size_t j)
const {
154 double chargeDensity = 0.0;
158 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...
ThermoPhase & phase()
Access the phase object used to compute thermodynamic properties for points in this domain.
vector< double > m_rho
Density at each grid point.
double Y(span< 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.
vector< double > m_wt
Molecular weight of each species.
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.
size_t m_kElectron
index of electron
void setElectronTransport(span< const double > tfix, span< const double > diff_e, span< const double > mobi_e)
Sometimes it is desired to carry out the simulation using a specified electron transport profile,...
void resize(size_t components, size_t points) override
Change the grid size. Called after grid refinement.
bool m_do_electric_field
flag for solving electric field or not
void evalElectricField(span< const double > x, span< double > rsd, span< int > diag, double rdt, size_t jmin, size_t jmax) override
Evaluate the electric field equation residual by Gauss's law.
void electricFieldMethod(span< const double > x, size_t j0, size_t j1)
Solving phase two: the electric field equation is added coupled by the electrical drift.
double rho_e(span< const double > x, size_t j) const
total charge density
double ND(span< const double > x, size_t k, size_t j) const
number density [molecules/m³]
void frozenIonMethod(span< const double > x, size_t j0, size_t j1)
Solving phase one: the fluxes of charged species are turned off and the electric field is not solved.
vector< double > m_mobility
mobility
void fixElectricField() override
Set to fix voltage in a point (used by IonFlow specialization)
bool doElectricField() const override
Retrieve flag indicating whether electric field is solved or not (used by IonFlow specialization)
double E(span< const double > x, size_t j) const
electric field [V/m]
void updateDiffFluxes(span< const double > x, size_t j0, size_t j1) override
Update the diffusive mass fluxes.
bool m_import_electron_transport
flag for importing transport of electron
void evalSpecies(span< const double > x, span< double > rsd, span< int > diag, double rdt, size_t jmin, size_t jmax) override
Evaluate the species equations' residual.
double dEdz(span< const double > x, size_t j) const
Axial gradient of the electric field [V/m²].
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.
void solveElectricField() override
Set to solve electric field in a point (used by IonFlow specialization)
bool componentActive(size_t n) const override
Returns true if the specified component is an active part of the solver state.
void updateTransport(span< const 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_speciesCharge
electrical 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