rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
rizer::ThermalPlasmaColumn1D Class Reference

Steady radial LTE Elenbaas-Heller arc column (custom Cantera Domain1D). More...

#include <ThermalPlasmaColumn1D.h>

Inheritance diagram for rizer::ThermalPlasmaColumn1D:
Cantera::Domain1D

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 OneDimcontainer () 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)
 
Refinerrefiner ()
 
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< SolutionArraytoArray (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< Solutionphase () 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)
 
Domain1Dleft () const
 
Domain1Dright () 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
 
OneDimm_container
 
size_t m_index
 
size_t m_iloc
 
size_t m_jstart
 
Domain1Dm_left
 
Domain1Dm_right
 
string m_id
 
unique_ptr< Refinerm_refiner
 
vector< stringm_name
 
int m_bw
 
bool m_force_full_update
 
shared_ptr< Solutionm_solution
 

Detailed Description

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():

  • r = 0 : symmetry (natural zero-flux finite-volume face)
  • r = R : Dirichlet T = T_wall The domain is bracketed by Empty1D terminators in PlasmaColumnSolver.

ASSUMPTIONS AND DOMAIN OF VALIDITY (mirrored in the Python wrapper ThermalPlasmaColumn, which is what Sphinx renders – keep the two in sync):

  • Steady state (no d/dt): the equilibrium arc column, not a transient. For transient/non-equilibrium plasmas use PlasmaChannel1D.
  • Local Thermodynamic Equilibrium (LTE): a SINGLE temperature T (Te=T_heavy); sigma(T), kappa(T), composition from tabulated LTE data. Valid at high pressure / high collisionality; NOT valid for non-equilibrium plasmas.
  • 1D radial, cylindrical, axisymmetric, infinitely long: no axial gradients, NO convection – a pure radial conduction balance.
  • Energy: radial conduction + ohmic sigma*E^2 - optional radiation P_rad = 4*pi*NEC(T) (off by default), treated OPTICALLY THIN (no reabsorption).
  • Numerics: nonlinear FV solved with Cantera damped-Newton + adaptive grid refinement; current control = secant iteration on E; hot branch is stiff, so it is seeded with the analytical EH profile (seed affects only convergence).

Definition at line 43 of file ThermalPlasmaColumn1D.h.

Constructor & Destructor Documentation

◆ ThermalPlasmaColumn1D()

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.

Member Function Documentation

◆ componentIndex()

std::size_t rizer::ThermalPlasmaColumn1D::componentIndex ( const std::string & name,
bool checkAlias = true ) const
override

Definition at line 41 of file ThermalPlasmaColumn1D.cpp.

◆ componentName()

std::string rizer::ThermalPlasmaColumn1D::componentName ( std::size_t n) const
inlineoverride

Definition at line 75 of file ThermalPlasmaColumn1D.h.

◆ domainType()

std::string rizer::ThermalPlasmaColumn1D::domainType ( ) const
inlineoverridevirtual

Reimplemented from Cantera::Domain1D.

Definition at line 53 of file ThermalPlasmaColumn1D.h.

◆ electricField()

double rizer::ThermalPlasmaColumn1D::electricField ( ) const
inline

Definition at line 98 of file ThermalPlasmaColumn1D.h.

◆ eval()

void rizer::ThermalPlasmaColumn1D::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.

If jg == npos(=-1), evaluate the residual function at all points.

Parameters
[in]jgGrid point at which to update the residual (0..npts-1), or npos for all points.
[in]xgState vector. Here, T at each grid point.
[out]rgResidual vector. Here, dT/dt at each grid point (0 for steady-state).
[out]maskgBoolean mask indicating whether each solution component has a time derivative (1) or not (0).
[in]rdtReciprocal of the timestep (rdt=0 implies steady-state.)

Definition at line 97 of file ThermalPlasmaColumn1D.cpp.

◆ getValues()

void rizer::ThermalPlasmaColumn1D::getValues ( const std::string & component,
Cantera::span< double > values ) const
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.

◆ hasComponent()

bool rizer::ThermalPlasmaColumn1D::hasComponent ( const std::string & name,
bool checkAlias = true ) const
override

Definition at line 51 of file ThermalPlasmaColumn1D.cpp.

◆ initialValue()

double rizer::ThermalPlasmaColumn1D::initialValue ( std::size_t n,
std::size_t j )
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.

◆ kappaAt()

double rizer::ThermalPlasmaColumn1D::kappaAt ( double T) const
inline

Definition at line 103 of file ThermalPlasmaColumn1D.h.

◆ pRadAt()

double rizer::ThermalPlasmaColumn1D::pRadAt ( double T) const
inline

Definition at line 104 of file ThermalPlasmaColumn1D.h.

◆ radius()

double rizer::ThermalPlasmaColumn1D::radius ( ) const
inline

Definition at line 99 of file ThermalPlasmaColumn1D.h.

◆ resetBadValues()

void rizer::ThermalPlasmaColumn1D::resetBadValues ( Cantera::span< double > xg)
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.

◆ setElectricField()

void rizer::ThermalPlasmaColumn1D::setElectricField ( double E)
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.

◆ sigmaAt()

double rizer::ThermalPlasmaColumn1D::sigmaAt ( double T) const
inline

Property look-ups at a given temperature, for post-processing.

Definition at line 102 of file ThermalPlasmaColumn1D.h.


The documentation for this class was generated from the following files: