17 using std::make_shared;
33 auto column = make_shared<ThermalPlasmaColumn1D>(
34 R, opts.
n_points, electric_field, T_wall,
39 auto left = make_shared<Cantera::Empty1D>();
40 auto right = make_shared<Cantera::Empty1D>();
45 std::vector<std::shared_ptr<Cantera::Domain1D>> domains{left, column, right};
68 const std::size_t np = column->nPoints();
74 res.
sigma.reserve(np);
75 res.
kappa.reserve(np);
80 std::vector<double> Tvals = column->values(
"T");
81 for (std::size_t j = 0; j < np; j++) {
82 double r = column->z(j);
86 res.
sigma.push_back(column->sigmaAt(T));
87 res.
kappa.push_back(column->kappaAt(T));
93 for (std::size_t j = 0; j + 1 < np; j++) {
96 double f0 = res.
sigma[j] * res.
r[j];
97 double f1 = res.
sigma[j + 1] * res.
r[j + 1];
98 double dr = res.
r[j + 1] - res.
r[j];
99 I += 0.5 * (f0 + f1) * dr;
void solve(int loglevel=0, bool refine_grid=true)
void setRefineCriteria(int dom=-1, double ratio=10.0, double slope=0.8, double curve=0.8, double prune=-0.1)
constexpr double pi
pi (matches numpy's np.pi used in units.py).
ColumnResult solveColumn(double R, double electric_field, double T_wall, const PropertyTable &sigma, const PropertyTable &kappa, const PropertyTable &p_rad, const ColumnOptions &opts)
Build, solve, and extract the radial Elenbaas-Heller column.
Solver configuration. All fields have defaults matching a typical H2 arc.
std::vector< double > init_r
Optional seed profile for the initial guess.
int loglevel
Sim1D solver verbosity [-] (0 = silent, 1 = progress, higher = more detail).
double refine_ratio
Refiner: max allowed ratio of adjacent cell widths [-].
double refine_curve
Refiner: max allowed fractional curvature of T per cell [-].
double rho_cp
Volumetric heat capacity [J/m^3/K] — scales the pseudo-transient term used as a Newton fallback.
double refine_slope
Refiner: max allowed fractional change in T slope between adjacent cells [-].
double T_center_guess
Parabolic-seed centerline temperature [K], used to build the default initial guess.
double refine_prune
Refiner: remove grid points whose contribution falls below this threshold [-].
std::vector< double > init_T
Optional seed temperatures [K] at each init_r location.
std::size_t n_points
Initial uniform grid point count [-] (refined during solve if refine_grid).
bool refine_grid
Enable Cantera adaptive grid refinement [-] (true/false) during the solve.
Output of a completed column solve.
double electric_field
Axial E field [V/m] used for this solve (echo of the input).
std::size_t n_points
Number of grid points after adaptive refinement.
std::vector< double > T
Converged temperature [K] at each grid point.
double current
Total arc current [A], trapezoidal quadrature.
std::vector< double > sigma
Electrical conductivity [S/m] evaluated at T.
std::vector< double > kappa
Thermal conductivity [W/m/K] evaluated at T.
std::vector< double > r
Radial grid [m] after refinement, r[0]=0, r[N-1]=R.
Physical constants and unit conversions, in SI by default.