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())
 Construct a radial LTE arc-column domain with tabulated property closures.
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
 Return the index of the named solution component.
bool hasComponent (const std::string &name, bool checkAlias=true) const override
 Test whether a component name exists in this domain.
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:

\[ \frac{1}{r}\frac{d}{dr}\!\left(r \kappa(T) \frac{dT}{dr}\right) + \sigma(T) E^2 - P_\text{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_\text{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_\text{rad} = 4\pi\,\mathrm{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 48 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() )

Construct a radial LTE arc-column domain with tabulated property closures.

Parameters
ROuter (wall) radius [m]
npointsInitial uniform grid point count [-]
electric_fieldAxial electric field E [V/m]
T_wallWall (r=R) Dirichlet temperature [K]
sigmaElectrical conductivity table sigma(T) [S/m] vs. T [K]
kappaThermal conductivity table kappa(T) [W/m/K] vs. T [K]
p_radVolumetric radiative loss table P_rad(T) [W/m^3] vs. T [K]; empty -> no radiation term
T_center_guessParabolic-seed centerline temperature [K], used when init_profile is empty
rho_cprho*cp [J/m^3/K], scales the pseudo-transient Newton-fallback term
init_profileOptional seed T(r) profile [K] vs. r [m]; empty -> default parabola

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

Return the index of the named solution component.

Parameters
nameComponent name; only "T" is valid for this domain
checkAliasUnused (this domain has no aliases)

Definition at line 44 of file ThermalPlasmaColumn1D.cpp.

◆ componentName()

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

Definition at line 95 of file ThermalPlasmaColumn1D.h.

◆ domainType()

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

Reimplemented from Cantera::Domain1D.

Definition at line 74 of file ThermalPlasmaColumn1D.h.

◆ electricField()

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

Definition at line 134 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
jgGrid point to (re)evaluate (0..npts-1), or Cantera::npos for a full residual pass [-]
xgFull global state vector (all domains); this domain's slice at loc() is T(r) [K]
[out]rgFull global residual vector to write into (dT/dt at each grid point, 0 at steady state), same layout as xg
[out]maskgFull global transient/algebraic mask (1 = has dT/dt, 0 = algebraic row) [-]
rdtPseudo-transient reciprocal time step 1/dt [1/s] (0 for a pure steady solve)

Definition at line 100 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.

Parameters
componentComponent name; only "T" is valid for this domain
[out]valuesT [K] at each radial grid point

Definition at line 60 of file ThermalPlasmaColumn1D.cpp.

◆ hasComponent()

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

Test whether a component name exists in this domain.

Parameters
nameComponent name to test
checkAliasUnused (this domain has no aliases)

Definition at line 54 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_\text{wall} + (T_\text{center} - T_\text{wall}) (1 - (r/R)^2) \).

Parameters
nComponent index [-]; always 0 ("T") for this domain
jRadial grid point index [-]

Definition at line 77 of file ThermalPlasmaColumn1D.cpp.

◆ kappaAt()

double rizer::ThermalPlasmaColumn1D::kappaAt ( double T) const
inline
Parameters
TTemperature [K]; returns kappa(T) [W/m/K]

Definition at line 141 of file ThermalPlasmaColumn1D.h.

◆ pRadAt()

double rizer::ThermalPlasmaColumn1D::pRadAt ( double T) const
inline
Parameters
TTemperature [K]; returns P_rad(T) [W/m^3]

Definition at line 143 of file ThermalPlasmaColumn1D.h.

◆ radius()

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

Definition at line 135 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).

Parameters
[out]xgFull global state vector (all domains); this domain's slice at loc() is clamped in place, T [K]

Reimplemented from Cantera::Domain1D.

Definition at line 89 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).

Parameters
EAxial electric field E [V/m]

Definition at line 133 of file ThermalPlasmaColumn1D.h.

◆ sigmaAt()

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

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

Parameters
TTemperature [K]; returns sigma(T) [S/m]

Definition at line 139 of file ThermalPlasmaColumn1D.h.


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