rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Toggle main menu visibility
Loading...
Searching...
No Matches
CircuitCoupling.h
Go to the documentation of this file.
1
15
16
#ifndef RIZER_CIRCUIT_COUPLING_H
17
#define RIZER_CIRCUIT_COUPLING_H
18
19
#include "
PlasmaChannel1D.h
"
20
21
#include <cstddef>
22
#include <functional>
23
#include <vector>
24
25
namespace
rizer
26
{
27
33
struct
CircuitSample
34
{
37
double
Rp
= 0.0;
41
double
Rp_state
= 0.0;
43
double
Vp
= 0.0;
45
double
current
= 0.0;
47
double
electric_field
= 0.0;
48
};
49
51
class
ChannelCircuit
52
{
53
public
:
78
ChannelCircuit
(
const
PlasmaChannel1D
&channel,
double
gap,
79
const
std::function<
double
(
double
,
double
)> &plasma_voltage,
80
std::size_t channel_offset, std::size_t n_vars);
81
83
bool
active
()
const
{
return
static_cast<
bool
>
(*m_plasma_voltage); }
84
92
void
seedResistance
(
const
std::vector<double> &x);
93
104
void
closeOver
(
double
t0,
double
t1,
const
std::vector<double> &x);
105
113
double
electricField
(
double
t)
const
;
114
117
CircuitSample
sample
(
const
std::vector<double> &x)
const
;
118
119
private
:
127
double
conductance(
const
std::vector<double> &x)
const
;
128
131
double
resistanceFrom(
double
conductance_value)
const
;
132
133
const
PlasmaChannel1D
*m_channel;
// Non-owning
134
double
m_gap;
// Inter-electrode gap [m]
135
const
std::function<double(
double
,
double
)> *m_plasma_voltage;
// Non-owning
136
std::size_t m_channel_offset;
// Offset into the global state [-]
137
std::size_t m_n_vars;
// Components per node, 2+K [-]
138
std::size_t m_n_points;
// Radial grid points [-]
139
std::vector<double> m_cell_area;
// Per-node cross-section [m^2]
140
141
// The circuit's state over the step currently being advanced.
142
double
m_t0 = 0.0;
// Start of that step [s]
143
double
m_dt = 1.0;
// Its length [s]
144
double
m_Vp0 = 0.0;
// Terminal voltage at m_t0 [V]
145
double
m_Vp1 = 0.0;
// Terminal voltage at m_t0 + m_dt [V]
146
double
m_Rp;
// Resistance the step is driven with [Ohm]
147
};
148
149
}
// namespace rizer
150
151
#endif
// RIZER_CIRCUIT_COUPLING_H
PlasmaChannel1D.h
The transient two-temperature radial channel as a Cantera Domain1D: per-node source terms from Plasma...
rizer::ChannelCircuit::seedResistance
void seedResistance(const std::vector< double > &x)
Set the resistance from the current state without asking the circuit for a voltage.
Definition
CircuitCoupling.cpp:69
rizer::ChannelCircuit::electricField
double electricField(double t) const
Applied field over the step closeOver() last covered [V/m].
Definition
CircuitCoupling.cpp:92
rizer::ChannelCircuit::ChannelCircuit
ChannelCircuit(const PlasmaChannel1D &channel, double gap, const std::function< double(double, double)> &plasma_voltage, std::size_t channel_offset, std::size_t n_vars)
Build the coupling, or an inactive one when no callback is given.
Definition
CircuitCoupling.cpp:18
rizer::ChannelCircuit::sample
CircuitSample sample(const std::vector< double > &x) const
Definition
CircuitCoupling.cpp:102
rizer::ChannelCircuit::closeOver
void closeOver(double t0, double t1, const std::vector< double > &x)
Close the circuit over one step: freeze at the state the step starts from and ask the callback for ...
Definition
CircuitCoupling.cpp:78
rizer::ChannelCircuit::active
bool active() const
Definition
CircuitCoupling.h:83
rizer::PlasmaChannel1D
Transient, two-temperature (Te != Tg), finite-rate reacting 1-D radial plasma channel (custom Cantera...
Definition
PlasmaChannel1D.h:278
rizer
Definition
ElectronReactions.cpp:11
rizer::CircuitSample
The circuit columns of one recorded frame.
Definition
CircuitCoupling.h:34
rizer::CircuitSample::current
double current
Total current [A].
Definition
CircuitCoupling.h:45
rizer::CircuitSample::Vp
double Vp
Plasma terminal voltage at the end of the step [V].
Definition
CircuitCoupling.h:43
rizer::CircuitSample::electric_field
double electric_field
Applied field [V/m].
Definition
CircuitCoupling.h:47
rizer::CircuitSample::Rp_state
double Rp_state
Resistance OF this frame's own recorded fields, which is what a reader recomputing it from Tg,...
Definition
CircuitCoupling.h:41
rizer::CircuitSample::Rp
double Rp
Resistance the circuit was DRIVEN with over the step ending at this frame, which is what current was ...
Definition
CircuitCoupling.h:37
rizer
cantera_ext
models
nrp
CircuitCoupling.h
Generated by
1.18.0