8#include "cantera/oneD/refine.h"
49 m_do_species.resize(
m_nsp,
true);
71 for (
size_t k = 0; k <
m_nsp; k++) {
82 for (
size_t ng = 0; ng <
m_points; ng++) {
94 :
StFlow(th.get(), nsp, points)
101 :
StFlow(sol->thermo().get(), sol->thermo()->nSpecies(), points)
110 "An appropriate transport model\nshould be set when instantiating the "
111 "Solution ('gas') object.\nImplicit setting of the transport model "
112 "is deprecated and\nwill be removed after Cantera 3.0.");
115 m_solution->registerChangedCallback(
this, [
this]() {
133 return "axisymmetric-flow";
135 return "unstrained-flow";
139 warn_deprecated(
"StFlow::setThermo",
"To be removed after Cantera 3.0.");
148 "Unable to update object that was not constructed from smart pointers.");
156 warn_deprecated(
"StFlow::setKinetics(Kinetics&)",
"To be removed after Cantera 3.0."
157 " Replaced by setKinetics(shared_ptr<Kinetics>).");
166 "Unable to update object that was not constructed from smart pointers.");
169 throw CanteraError(
"StFlow::setTransport",
"Unable to set empty transport.");
171 m_trans = trans.get();
173 throw CanteraError(
"StFlow::setTransport",
"Invalid Transport model 'none'.");
175 m_do_multicomponent = (m_trans->
transportModel() ==
"multicomponent" ||
179 if (m_do_multicomponent) {
196 if (m_do_multicomponent) {
217 for (
size_t j = 1; j <
m_points; j++) {
218 if (z[j] <= z[j-1]) {
220 "grid points must be monotonically increasing");
223 m_dz[j-1] = m_z[j] - m_z[j-1];
229 double* x = xg +
loc();
230 for (
size_t j = 0; j <
m_points; j++) {
242 "Unable to set Transport manager by name as object was not initialized\n"
243 "from a Solution manager: set Transport object directly instead.");
254 warn_deprecated(
"StFlow::setTransport(Transport&)",
"To be removed after"
255 " Cantera 3.0. Replaced by setTransport(shared_ptr<Transport>).");
259 "Invalid Transport model 'none'.");
261 m_do_multicomponent = (m_trans->
transportModel() ==
"multicomponent" ||
265 if (m_do_multicomponent) {
273 for (
size_t j = 0; j <
m_points; j++) {
276 m_rho[j] = m_thermo->
density();
292 const double* yyjp = x + m_nv*(j+1) +
c_offset_Y;
293 for (
size_t k = 0; k <
m_nsp; k++) {
294 m_ybar[k] = 0.5*(yyj[k] + yyjp[k]);
302 " Cantera 3.0. Replaced by isFree().");
308 if (!m_do_multicomponent && m_do_soret) {
310 "Thermal diffusion (the Soret effect) is enabled, and requires "
311 "using a multicomponent transport model.");
314 size_t nz = m_zfix.size();
315 bool e = m_do_energy[0];
316 for (
size_t j = 0; j <
m_points; j++) {
318 m_fixedtemp[j] = T(x, j);
320 double zz = (z(j) - z(0))/(z(
m_points - 1) - z(0));
334 for (
size_t j = 0; j <
m_points; j++) {
340 for (
size_t j = 0; j <
m_points - 1; j++) {
353void StFlow::eval(
size_t jg,
double* xg,
double* rg, integer* diagg,
double rdt)
362 double* x = xg +
loc();
363 double* rsd = rg +
loc();
364 integer* diag = diagg +
loc();
371 size_t jpt = (jg == 0) ? 0 : jg -
firstPoint();
372 jmin = std::max<size_t>(jpt, 1) - 1;
383 size_t j0 = std::max<size_t>(jmin, 1) - 1;
384 size_t j1 = std::min(jmax+1,
m_points-1);
387 if (jg ==
npos || m_force_full_update) {
396 m_kExcessRight = distance(Yright, max_element(Yright, Yright +
m_nsp));
405 double rdt,
size_t jmin,
size_t jmax)
416 double k_P_ref = 1.0*
OneAtm;
419 const double c_H2O[6] = {-0.23093, -1.12390, 9.41530, -2.99880,
420 0.51382, -1.86840e-5};
421 const double c_CO2[6] = {18.741, -121.310, 273.500, -194.050,
425 double boundary_Rad_left = m_epsilon_left *
StefanBoltz * pow(T(x, 0), 4);
429 for (
size_t j = jmin; j < jmax; j++) {
431 double radiative_heat_loss = 0;
438 for (
size_t n = 0; n <= 5; n++) {
439 k_P_H2O += c_H2O[n] * pow(1000 / T(x, j), (
double) n);
447 for (
size_t n = 0; n <= 5; n++) {
448 k_P_CO2 += c_CO2[n] * pow(1000 / T(x, j), (
double) n);
455 radiative_heat_loss = 2 * k_P *(2 *
StefanBoltz * pow(T(x, j), 4)
456 - boundary_Rad_left - boundary_Rad_right);
463 for (
size_t j = jmin; j <= jmax; j++) {
475 -(rho_u(x,1) - rho_u(x,0))/m_dz[0]
476 -(density(1)*V(x,1) + density(0)*V(x,0));
494 for (
size_t k = 0; k <
m_nsp; k++) {
497 -(m_flux(k,0) + rho_u(x,0)* Y(x,k,0));
518 (shear(x, j) - lambda(x, j) - rho_u(x, j) * dVdz(x, j)
519 - m_rho[j] * V(x, j) * V(x, j)) / m_rho[j]
520 - rdt * (V(x, j) - V_prev(j));
534 for (
size_t k = 0; k <
m_nsp; k++) {
535 double convec = rho_u(x,j)*dYdz(x,k,j);
536 double diffus = 2.0*(m_flux(k,j) - m_flux(k,j-1))
539 = (m_wt[k]*(wdot(k,j))
540 - convec - diffus)/m_rho[j]
541 - rdt*(Y(x,k,j) - Y_prev(k,j));
553 if (m_do_energy[j]) {
556 double dtdzj = dTdz(x,j);
560 for (
size_t k = 0; k <
m_nsp; k++) {
561 double flxk = 0.5*(m_flux(k,j-1) + m_flux(k,j));
562 sum += wdot(k,j)*
m_hk(k,j);
563 sum += flxk *
m_dhk_dz(k,j) / m_wt[k];
566 rsd[index(
c_offset_T, j)] = - m_cp[j]*rho_u(x,j)*dtdzj
567 - divHeatFlux(x,j) - sum;
568 rsd[index(
c_offset_T, j)] /= (m_rho[j]*m_cp[j]);
569 rsd[index(
c_offset_T, j)] -= rdt*(T(x,j) - T_prev(j));
579 rsd[index(
c_offset_L, j)] = lambda(x, j) - lambda(x, j - 1);
590 if (m_do_multicomponent) {
591 for (
size_t j = j0; j < j1; j++) {
594 double rho = m_thermo->
density();
595 m_visc[j] = (m_dovisc ? m_trans->
viscosity() : 0.0);
599 for (
size_t k = 0; k <
m_nsp; k++) {
600 m_diff[k+j*
m_nsp] = m_wt[k] * rho / (wtm*wtm);
609 for (
size_t j = j0; j < j1; j++) {
611 m_visc[j] = (m_dovisc ? m_trans->
viscosity() : 0.0);
620 writelog(
" Pressure: {:10.4g} Pa\n", m_press);
625 writeline(
'-', 79,
false,
true);
626 writelog(
"\n z radiative heat loss");
627 writeline(
'-', 79,
false,
true);
628 for (
size_t j = 0; j <
m_points; j++) {
637 if (m_do_multicomponent) {
638 for (
size_t j = j0; j < j1; j++) {
639 double dz = z(j+1) - z(j);
640 for (
size_t k = 0; k <
m_nsp; k++) {
642 for (
size_t m = 0; m <
m_nsp; m++) {
643 sum += m_wt[m] * m_multidiff[mindex(k,m,j)] * (X(x,m,j+1)-X(x,m,j));
645 m_flux(k,j) = sum * m_diff[k+j*
m_nsp] / dz;
649 for (
size_t j = j0; j < j1; j++) {
651 double wtm = m_wtm[j];
652 double rho = density(j);
653 double dz = z(j+1) - z(j);
654 for (
size_t k = 0; k <
m_nsp; k++) {
655 m_flux(k,j) = m_wt[k]*(rho*m_diff[k+
m_nsp*j]/wtm);
656 m_flux(k,j) *= (X(x,k,j) - X(x,k,j+1))/dz;
660 for (
size_t k = 0; k <
m_nsp; k++) {
661 m_flux(k,j) += sum*Y(x,k,j);
667 for (
size_t m = j0; m < j1; m++) {
668 double gradlogT = 2.0 * (T(x,m+1) - T(x,m)) /
669 ((T(x,m+1) + T(x,m)) * (z(m+1) - z(m)));
670 for (
size_t k = 0; k <
m_nsp; k++) {
671 m_flux(k,m) -= m_dthermal(k,m)*gradlogT;
683 return "spread_rate";
701 if (name==
"velocity") {
703 }
else if (name==
"spread_rate") {
705 }
else if (name==
"T") {
707 }
else if (name==
"lambda") {
709 }
else if (name ==
"eField") {
718 "no component named " + name);
741 state[
"phase"][
"name"] = m_thermo->
name();
743 state[
"phase"][
"source"] = source.
empty() ?
"<unknown>" : source.
asString();
747 state[
"emissivity-left"] = m_epsilon_left;
748 state[
"emissivity-right"] = m_epsilon_right;
751 set<bool> energy_flags(m_do_energy.begin(), m_do_energy.end());
752 if (energy_flags.size() == 1) {
753 state[
"energy-enabled"] = m_do_energy[0];
755 state[
"energy-enabled"] = m_do_energy;
758 state[
"Soret-enabled"] = m_do_soret;
760 set<bool> species_flags(m_do_species.begin(), m_do_species.end());
761 if (species_flags.size() == 1) {
762 state[
"species-enabled"] = m_do_species[0];
764 for (
size_t k = 0; k <
m_nsp; k++) {
765 state[
"species-enabled"][m_thermo->
speciesName(k)] = m_do_species[k];
769 state[
"refine-criteria"][
"ratio"] = m_refiner->maxRatio();
770 state[
"refine-criteria"][
"slope"] = m_refiner->maxDelta();
771 state[
"refine-criteria"][
"curve"] = m_refiner->maxSlope();
772 state[
"refine-criteria"][
"prune"] = m_refiner->prune();
773 state[
"refine-criteria"][
"grid-min"] = m_refiner->gridMin();
774 state[
"refine-criteria"][
"max-points"] =
775 static_cast<long int>(m_refiner->maxPoints());
778 state[
"fixed-point"][
"location"] =
m_zfixed;
779 state[
"fixed-point"][
"temperature"] =
m_tfixed;
789 arr->addExtra(
"grid",
false);
792 arr->setComponent(
"grid", value);
793 vector<double> data(
nPoints());
797 for (
size_t j = 0; j <
nPoints(); j++) {
798 data[j] = soln[index(i, j)];
800 if (!arr->hasComponent(name)) {
804 arr->setComponent(name, value);
808 arr->setComponent(
"D", value);
811 arr->addExtra(
"radiative-heat-loss",
true);
813 arr->setComponent(
"radiative-heat-loss", value);
823 auto phase = arr.
thermo();
835 const vector<double> data = arr.
getComponent(name).
as<vector<double>>();
836 for (
size_t j = 0; j <
nPoints(); j++) {
837 soln[index(i,j)] = data[j];
840 warn_user(
"StFlow::fromArray",
"Saved state does not contain values for "
841 "component '{}' in domain '{}'.", name,
id());
851 "To be removed after Cantera 3.0; superseded by 'type'.");
852 if (
m_type == cFreeFlow) {
854 }
else if (
m_type == cAxisymmetricStagnationFlow) {
855 return "Axisymmetric Stagnation";
857 throw CanteraError(
"StFlow::flowType",
"Unknown value for 'm_type'");
863 if (state.
hasKey(
"energy-enabled")) {
864 const AnyValue& ee = state[
"energy-enabled"];
874 if (state.
hasKey(
"Soret-enabled")) {
875 m_do_soret = state[
"Soret-enabled"].asBool();
878 if (state.
hasKey(
"species-enabled")) {
879 const AnyValue& se = state[
"species-enabled"];
887 if (state.
hasKey(
"radiation-enabled")) {
890 m_epsilon_left = state[
"emissivity-left"].asDouble();
891 m_epsilon_right = state[
"emissivity-right"].asDouble();
895 if (state.
hasKey(
"refine-criteria")) {
896 const AnyMap& criteria = state[
"refine-criteria"].as<
AnyMap>();
897 double ratio = criteria.
getDouble(
"ratio", m_refiner->maxRatio());
898 double slope = criteria.
getDouble(
"slope", m_refiner->maxDelta());
899 double curve = criteria.
getDouble(
"curve", m_refiner->maxSlope());
900 double prune = criteria.
getDouble(
"prune", m_refiner->prune());
901 m_refiner->setCriteria(ratio, slope, curve, prune);
903 if (criteria.
hasKey(
"grid-min")) {
904 m_refiner->setGridMin(criteria[
"grid-min"].asDouble());
906 if (criteria.
hasKey(
"max-points")) {
907 m_refiner->setMaxPoints(criteria[
"max-points"].asInt());
911 if (state.
hasKey(
"fixed-point")) {
912 m_zfixed = state[
"fixed-point"][
"location"].asDouble();
913 m_tfixed = state[
"fixed-point"][
"temperature"].asDouble();
917void StFlow::solveEnergyEqn(
size_t j)
919 bool changed =
false;
921 for (
size_t i = 0; i <
m_points; i++) {
922 if (!m_do_energy[i]) {
925 m_do_energy[i] =
true;
928 if (!m_do_energy[j]) {
931 m_do_energy[j] =
true;
944 "Not used by '{}' objects.",
type());
950 "Not used by '{}' objects.",
type());
956 "Not used by '{}' objects.",
type());
962 "Not used by '{}' objects.",
type());
968 "Not used by '{}' objects.",
type());
973 if (e_left < 0 || e_left > 1) {
975 "The left boundary emissivity must be between 0.0 and 1.0!");
976 }
else if (e_right < 0 || e_right > 1) {
978 "The right boundary emissivity must be between 0.0 and 1.0!");
980 m_epsilon_left = e_left;
981 m_epsilon_right = e_right;
985void StFlow::fixTemperature(
size_t j)
987 bool changed =
false;
989 for (
size_t i = 0; i <
m_points; i++) {
990 if (m_do_energy[i]) {
993 m_do_energy[i] =
false;
996 if (m_do_energy[j]) {
999 m_do_energy[j] =
false;
1022 for (
size_t k = 0; k <
m_nsp; k++) {
1024 rsd[index(k+
c_offset_Y,j)] = m_flux(k,j-1) + rho_u(x,j)*Y(x,k,j);
1031 rsd[index(
c_offset_U, j)] = rho_u(x, j) - rho_u(x, j-1);
1034 rsd[index(
c_offset_L, j)] = lambda(x, j) - lambda(x, j-1);
1053 -(rho_u(x,j+1) - rho_u(x,j))/m_dz[j]
1054 -(density(j+1)*V(x,j+1) + density(j)*V(x,j));
1055 }
else if (m_isFree) {
1059 - (rho_u(x,j) - rho_u(x,j-1))/m_dz[j-1];
1061 if (m_do_energy[j]) {
1069 - (rho_u(x,j+1) - rho_u(x,j))/m_dz[j];
1073 rsd[index(
c_offset_U, j)] = rho_u(x, j) - rho_u(x, j - 1);
1079 for(
size_t k = 0; k <
m_nsp; k++) {
1080 if (u(x, j) > 0.0) {
Header file defining class TransportFactory (see TransportFactory)
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
const AnyValue & getMetadata(const string &key) const
Get a value from the metadata applicable to the AnyMap tree containing this node.
A map of string keys to values whose type can vary at runtime.
double getDouble(const string &key, double default_) const
If key exists, return it as a double, otherwise return default_.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
const string & getString(const string &key, const string &default_) const
If key exists, return it as a string, otherwise return default_.
A wrapper for a variable whose type is determined at runtime.
const string & asString() const
Return the held value, if it is a string.
bool & asBool()
Return the held value, if it is a bool.
bool empty() const
Return boolean indicating whether AnyValue is empty.
bool isScalar() const
Returns true if the held value is a scalar type (such as double, long int, string,...
const vector< T > & asVector(size_t nMin=npos, size_t nMax=npos) const
Return the held value, if it is a vector of type T.
const T & as() const
Get the value of this key as the specified type.
double * ptrColumn(size_t j)
Return a pointer to the top of column j, columns are contiguous in memory.
virtual void resize(size_t n, size_t m, double v=0.0)
Resize the array, and fill the new entries with 'v'.
Base class for exceptions thrown by Cantera classes.
Base class for one-dimensional domains.
size_t lastPoint() const
The index of the last (that is, right-most) grid point belonging to this domain.
shared_ptr< Solution > m_solution
Composite thermo/kinetics/transport handler.
size_t nComponents() const
Number of components at each grid point.
virtual void setMeta(const AnyMap &meta)
Retrieve meta data.
size_t nPoints() const
Number of grid points in this domain.
virtual void resize(size_t nv, size_t np)
Resize the domain to have nv components and np grid points.
size_t m_points
Number of grid points.
string m_id
Identity tag for the domain.
size_t firstPoint() const
The index of the first (that is, left-most) grid point belonging to this domain.
void needJacUpdate()
Set this if something has changed in the governing equations (for example, the value of a constant ha...
virtual size_t loc(size_t j=0) const
Location of the start of the local solution vector in the global solution vector,.
virtual AnyMap getMeta() const
Retrieve meta data.
virtual void show(std::ostream &s, const double *x)
Print the solution.
Public interface for kinetics managers.
An error indicating that an unimplemented function has been called.
size_t nSpecies() const
Returns the number of species in the phase.
virtual void setMassFractions_NoNorm(const double *const y)
Set the mass fractions to the specified values without normalizing.
double temperature() const
Temperature (K).
virtual void setPressure(double p)
Set the internally stored pressure (Pa) at constant temperature and composition.
double meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
string speciesName(size_t k) const
Name of the species with index k.
const vector< double > & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
size_t speciesIndex(const string &name) const
Returns the index of a species named 'name' within the Phase object.
virtual double density() const
Density (kg/m^3).
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
virtual void setMassFractions(const double *const y)
Set the mass fractions to the specified values and normalize them.
void getMassFractions(double *const y) const
Get the species mass fractions.
virtual double pressure() const
Return the thermodynamic pressure (Pa).
string name() const
Return the name of the phase.
A container class holding arrays of state information.
void setLoc(int loc, bool restore=true)
Update the buffered location used to access SolutionArray entries.
AnyValue getComponent(const string &name) const
Retrieve a component of the SolutionArray by name.
bool hasComponent(const string &name) const
Check whether SolutionArray contains a component.
AnyMap & meta()
SolutionArray meta data.
shared_ptr< ThermoPhase > thermo()
Retrieve associated ThermoPhase object.
static shared_ptr< SolutionArray > create(const shared_ptr< Solution > &sol, int size=0, const AnyMap &meta={})
Instantiate a new SolutionArray reference.
static shared_ptr< Solution > create()
Create an empty Solution object.
This class represents 1D flow domains that satisfy the one-dimensional similarity solution for chemic...
virtual void evalResidual(double *x, double *rsd, int *diag, double rdt, size_t jmin, size_t jmax)
Evaluate the residual function.
virtual void evalRightBoundary(double *x, double *res, int *diag, double rdt)
Evaluate all residual components at the right boundary.
virtual void evalContinuity(size_t j, double *x, double *r, int *diag, double rdt)
Evaluate the residual corresponding to the continuity equation at all interior grid points.
size_t m_kExcessLeft
Index of species with a large mass fraction at each boundary, for which the mass fraction may be calc...
void setMeta(const AnyMap &state) override
Retrieve meta data.
void setTransportModel(const string &trans)
Set the transport model.
void setTransport(shared_ptr< Transport > trans) override
Set transport model to existing instance.
void setKinetics(shared_ptr< Kinetics > kin) override
Set the kinetics manager.
void resetBadValues(double *xg) override
When called, this function should reset "bad" values in the state vector such as negative species con...
virtual string flowType() const
Return the type of flow domain being represented, either "Free Flame" or "Axisymmetric Stagnation".
size_t rightExcessSpecies() const
Index of the species on the right boundary with the largest mass fraction.
vector< double > m_qdotRadiation
radiative heat loss vector
void updateThermo(const double *x, size_t j0, size_t j1)
Update the thermodynamic properties from point j0 to point j1 (inclusive), based on solution x.
void resize(size_t components, size_t points) override
Change the grid size. Called after grid refinement.
StFlow(ThermoPhase *ph=0, size_t nsp=1, size_t points=1)
Create a new flow domain.
void setBoundaryEmissivities(double e_left, double e_right)
Set the emissivities for the boundary values.
string type() const override
String indicating the domain implemented.
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
size_t componentIndex(const string &name) const override
index of component with name name.
void setGas(const double *x, size_t j)
Set the gas object state to be consistent with the solution at point j.
double m_tfixed
Temperature at the point used to fix the flame location.
virtual bool componentActive(size_t n) const
Returns true if the specified component is an active part of the solver state.
Array2D m_hk
Array of size m_nsp by m_points for saving molar enthalpies.
virtual bool doElectricField(size_t j) const
Retrieve flag indicating whether electric field is solved or not (used by IonFlow specialization)
void eval(size_t j, double *x, double *r, integer *mask, double rdt) override
Evaluate the residual function for axisymmetric stagnation flow.
void setupGrid(size_t n, const double *z) override
called to set up initial grid, and after grid refinement
size_t leftExcessSpecies() const
Index of the species on the left boundary with the largest mass fraction.
Array2D m_dhk_dz
Array of size m_nsp by m_points-1 for saving enthalpy fluxes.
double m_zfixed
Location of the point where temperature is fixed.
void _finalize(const double *x) override
In some cases, a domain may need to set parameters that depend on the initial solution estimate.
virtual size_t getSolvingStage() const
Get the solving stage (used by IonFlow specialization)
size_t m_nsp
Number of species in the mechanism.
void getWdot(double *x, size_t j)
Write the net production rates at point j into array m_wdot
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
virtual bool fixed_mdot()
AnyMap getMeta() const override
Retrieve meta data.
virtual void updateDiffFluxes(const double *x, size_t j0, size_t j1)
Update the diffusive mass fluxes.
string componentName(size_t n) const override
Name of the nth component. May be overloaded.
void setGasAtMidpoint(const double *x, size_t j)
Set the gas state to be consistent with the solution at the midpoint between j and j + 1.
virtual void grad_hk(const double *x, size_t j)
Get the gradient of species specific molar enthalpies.
string transportModel() const
Retrieve transport model.
virtual void updateProperties(size_t jg, double *x, size_t jmin, size_t jmax)
Update the properties (thermo, transport, and diffusion flux).
void setThermo(ThermoPhase &th)
Set the thermo manager.
void show(const double *x) override
Print the solution.
virtual void setSolvingStage(const size_t stage)
Solving stage mode for handling ionized species (used by IonFlow specialization)
void setPressure(double p)
Set the pressure.
virtual void fixElectricField(size_t j=npos)
Set to fix voltage in a point (used by IonFlow specialization)
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.
virtual void solveElectricField(size_t j=npos)
Set to solve electric field in a point (used by IonFlow specialization)
void _getInitialSoln(double *x) override
Write the initial solution estimate into array x.
vector< size_t > m_kRadiating
Indices within the ThermoPhase of the radiating species.
double T_fixed(size_t j) const
The fixed temperature value at point j.
bool m_do_radiation
flag for the radiative heat loss
Base class for a phase with thermodynamic properties.
virtual double maxTemp(size_t k=npos) const
Maximum temperature for which the thermodynamic data for the species are valid.
const AnyMap & input() const
Access input data associated with the phase description.
Base class for transport property managers.
virtual void getThermalDiffCoeffs(double *const dt)
Return a vector of Thermal diffusion coefficients [kg/m/sec].
virtual string transportModel() const
Identifies the model represented by this Transport object.
virtual void getMixDiffCoeffs(double *const d)
Returns a vector of mixture averaged diffusion coefficients.
virtual double thermalConductivity()
Returns the mixture thermal conductivity in W/m/K.
virtual double viscosity()
The viscosity in Pa-s.
virtual void getMultiDiffCoeffs(const size_t ld, double *const d)
Return the Multicomponent diffusion coefficients. Units: [m^2/s].
Header for a file containing miscellaneous numerical functions.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
void writelog(const string &fmt, const Args &... args)
Write a formatted message to the screen.
double linearInterp(double x, const vector< double > &xpts, const vector< double > &fpts)
Linearly interpolate a function defined on a discrete grid.
const double OneAtm
One atmosphere [Pa].
const double StefanBoltz
Stefan-Boltzmann constant [W/m2/K4].
void warn_user(const string &method, const string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
const double Undef
Fairly random number to be used to initialize variables against to see if they are subsequently defin...
@ c_offset_U
axial velocity
@ c_offset_E
electric poisson's equation
@ c_offset_Y
mass fractions
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.