|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Steady radial LTE Elenbaas-Heller arc column (custom Cantera Domain1D). More...
#include <ThermalPlasmaColumn1D.h>
Public Member Functions | |
| ThermalPlasmaColumn1D (double R, std::size_t npoints, double electric_field, double T_wall, PropertyTable sigma, PropertyTable kappa, PropertyTable p_rad, double T_center_guess, double rho_cp, PropertyTable init_profile=PropertyTable()) | |
| std::string | domainType () const override |
| void | eval (std::size_t jg, Cantera::span< const double > xg, Cantera::span< double > rg, Cantera::span< int > maskg, double rdt) override |
| Evaluate the residual function at point jg. | |
| std::string | componentName (std::size_t n) const override |
| std::size_t | componentIndex (const std::string &name, bool checkAlias=true) const override |
| bool | hasComponent (const std::string &name, bool checkAlias=true) const override |
| void | getValues (const std::string &component, Cantera::span< double > values) const override |
| Copy converged temperatures from the shared global solution vector. | |
| double | initialValue (std::size_t n, std::size_t j) override |
| Initial guess for component n at grid point j. | |
| void | resetBadValues (Cantera::span< double > xg) override |
| Clamp any out-of-bound temperatures after a failed Newton step to keep the solve from wandering into unphysical territory (T < 0 or T > 1e5 K). | |
| void | setElectricField (double E) |
| Change the electric field without rebuilding the domain (used by the Python-side secant iteration for current control). | |
| double | electricField () const |
| double | radius () const |
| double | sigmaAt (double T) const |
| Property look-ups at a given temperature, for post-processing. | |
| double | kappaAt (double T) const |
| double | pRadAt (double T) const |
Public Member Functions inherited from Cantera::Domain1D | |
| size_t | domainIndex () |
| virtual bool | isConnector () |
| virtual void | setTransportModel (const string &model) |
| const OneDim & | container () const |
| void | setContainer (OneDim *c, size_t index) |
| void | setBandwidth (int bw=-1) |
| size_t | bandwidth () |
| virtual void | init () |
| virtual void | resize (size_t nv, size_t np) |
| Refiner & | refiner () |
| size_t | nComponents () const |
| size_t | nPoints () const |
| virtual string | componentName (size_t n) const |
| void | setComponentName (size_t n, const string &name) |
| virtual size_t | componentIndex (const string &name, bool checkAlias=true) const |
| virtual bool | hasComponent (const string &name, bool checkAlias=true) const |
| virtual void | updateState (size_t loc) |
| void | setBounds (size_t n, double lower, double upper) |
| void | setTransientTolerances (double rtol, double atol, size_t n=npos) |
| void | setSteadyTolerances (double rtol, double atol, size_t n=npos) |
| double | rtol (size_t n) |
| double | atol (size_t n) |
| double | steady_rtol (size_t n) |
| double | steady_atol (size_t n) |
| double | transient_rtol (size_t n) |
| double | transient_atol (size_t n) |
| double | upperBound (size_t n) const |
| double | lowerBound (size_t n) const |
| void | setRefineCriteria (double ratio=10.0, double slope=0.8, double curve=0.8, double prune=-0.1) |
| vector< double > | getRefineCriteria () |
| void | initTimeInteg (double dt, span< const double > x0) |
| void | setSteadyMode () |
| bool | steady () |
| bool | transient () |
| void | needJacUpdate () |
| virtual void | eval (size_t j, span< const double > x, span< double > r, span< int > mask, double rdt=0.0) |
| size_t | index (size_t n, size_t j) const |
| virtual double | value (const string &component) const |
| virtual void | setValue (const string &component, double value) |
| vector< double > | values (const string &component) const |
| virtual void | getValues (const string &component, span< double > values) const |
| virtual void | setValues (const string &component, span< const double > values) |
| vector< double > | residuals (const string &component) const |
| virtual void | getResiduals (const string &component, span< double > values) const |
| virtual void | setProfile (const string &component, span< const double > pos, span< const double > values) |
| virtual void | setFlatProfile (const string &component, double value) |
| virtual shared_ptr< SolutionArray > | toArray (bool normalize=false) |
| virtual void | fromArray (const shared_ptr< SolutionArray > &arr) |
| string | info (const vector< string > &keys, int rows=10, int width=80) |
| string | _info (int rows=10, int width=80) |
| shared_ptr< Solution > | phase () const |
| size_t | size () const |
| void | locate () |
| virtual size_t | loc (size_t j=0) const |
| size_t | firstPoint () const |
| size_t | lastPoint () const |
| void | linkLeft (Domain1D *left) |
| void | linkRight (Domain1D *right) |
| void | append (Domain1D *right) |
| Domain1D * | left () const |
| Domain1D * | right () const |
| double | prevSoln (size_t n, size_t j) const |
| void | setID (const string &s) |
| string | id () const |
| virtual void | show (span< const double > x) |
| double | z (size_t jlocal) const |
| double | zmin () const |
| double | zmax () const |
| span< double > | grid () |
| span< const double > | grid () const |
| virtual void | setupGrid (span< const double > z) |
| void | setupUniformGrid (size_t points, double length, double start=0.) |
| virtual void | _getInitialSoln (span< double > x) |
| virtual double | initialValue (size_t n, size_t j) |
| virtual void | _finalize (span< const double > x) |
| void | forceFullUpdate (bool update) |
| void | setData (shared_ptr< vector< double > > &data) |
Additional Inherited Members | |
Protected Member Functions inherited from Cantera::Domain1D | |
| Domain1D (size_t nv=1, size_t points=1, double time=0.0) | |
| virtual void | _setKinetics (shared_ptr< Kinetics > kin) |
| virtual void | _setTransport (shared_ptr< Transport > trans) |
| virtual AnyMap | getMeta () const |
| virtual void | setMeta (const AnyMap &meta) |
Protected Attributes inherited from Cantera::Domain1D | |
| double | m_press |
| shared_ptr< vector< double > > | m_state |
| double | m_rdt |
| size_t | m_nv |
| size_t | m_points |
| vector< double > | m_slast |
| vector< double > | m_max |
| vector< double > | m_min |
| vector< double > | m_rtol_ss |
| vector< double > | m_rtol_ts |
| vector< double > | m_atol_ss |
| vector< double > | m_atol_ts |
| vector< double > | m_z |
| OneDim * | m_container |
| size_t | m_index |
| size_t | m_iloc |
| size_t | m_jstart |
| Domain1D * | m_left |
| Domain1D * | m_right |
| string | m_id |
| unique_ptr< Refiner > | m_refiner |
| vector< string > | m_name |
| int | m_bw |
| bool | m_force_full_update |
| shared_ptr< Solution > | m_solution |
Steady radial LTE Elenbaas-Heller arc column (custom Cantera Domain1D).
ThermalPlasmaColumn1D: a custom Cantera Domain1D solving the steady radial Elenbaas-Heller arc equation in cylindrical coordinates:
(1/r) d/dr( r * kappa(T) * dT/dr ) + sigma(T) * E^2 - P_rad(T) = 0
State: one component (temperature T) per grid point; the grid coordinate is the radius r in [0, R]. Boundary conditions are handled inside eval():
ASSUMPTIONS AND DOMAIN OF VALIDITY (mirrored in the Python wrapper ThermalPlasmaColumn, which is what Sphinx renders – keep the two in sync):
Definition at line 43 of file ThermalPlasmaColumn1D.h.
| rizer::ThermalPlasmaColumn1D::ThermalPlasmaColumn1D | ( | double | R, |
| std::size_t | npoints, | ||
| double | electric_field, | ||
| double | T_wall, | ||
| PropertyTable | sigma, | ||
| PropertyTable | kappa, | ||
| PropertyTable | p_rad, | ||
| double | T_center_guess, | ||
| double | rho_cp, | ||
| PropertyTable | init_profile = PropertyTable() ) |
Definition at line 10 of file ThermalPlasmaColumn1D.cpp.
|
override |
Definition at line 41 of file ThermalPlasmaColumn1D.cpp.
|
inlineoverride |
Definition at line 75 of file ThermalPlasmaColumn1D.h.
|
inlineoverridevirtual |
Reimplemented from Cantera::Domain1D.
Definition at line 53 of file ThermalPlasmaColumn1D.h.
|
inline |
Definition at line 98 of file ThermalPlasmaColumn1D.h.
|
override |
Evaluate the residual function at point jg.
If jg == npos(=-1), evaluate the residual function at all points.
| [in] | jg | Grid point at which to update the residual (0..npts-1), or npos for all points. |
| [in] | xg | State vector. Here, T at each grid point. |
| [out] | rg | Residual vector. Here, dT/dt at each grid point (0 for steady-state). |
| [out] | maskg | Boolean mask indicating whether each solution component has a time derivative (1) or not (0). |
| [in] | rdt | Reciprocal of the timestep (rdt=0 implies steady-state.) |
Definition at line 97 of file ThermalPlasmaColumn1D.cpp.
|
override |
Copy converged temperatures from the shared global solution vector.
Only "T" is a valid component name; throws otherwise.
Definition at line 57 of file ThermalPlasmaColumn1D.cpp.
|
override |
Definition at line 51 of file ThermalPlasmaColumn1D.cpp.
|
override |
Initial guess for component n at grid point j.
Uses the seeded profile (interpolated) if one was provided, otherwise falls back to a parabola: T(r) = T_wall + (T_center - T_wall)*(1 - (r/R)^2).
Definition at line 74 of file ThermalPlasmaColumn1D.cpp.
|
inline |
Definition at line 103 of file ThermalPlasmaColumn1D.h.
|
inline |
Definition at line 104 of file ThermalPlasmaColumn1D.h.
|
inline |
Definition at line 99 of file ThermalPlasmaColumn1D.h.
|
overridevirtual |
Clamp any out-of-bound temperatures after a failed Newton step to keep the solve from wandering into unphysical territory (T < 0 or T > 1e5 K).
Reimplemented from Cantera::Domain1D.
Definition at line 86 of file ThermalPlasmaColumn1D.cpp.
|
inline |
Change the electric field without rebuilding the domain (used by the Python-side secant iteration for current control).
Definition at line 97 of file ThermalPlasmaColumn1D.h.
|
inline |
Property look-ups at a given temperature, for post-processing.
Definition at line 102 of file ThermalPlasmaColumn1D.h.