rizer.electrical_model.circuit.rc_rp_circuit#

Classes#

RC_Rp_Circuit

Solve the following RC circuit, with the plasma resistance in parallel with C.

Module Contents#

class rizer.electrical_model.circuit.rc_rp_circuit.RC_Rp_Circuit(R_par: float, C: float, u_mes: Callable[[float], float], u_c_0: float = 0.0)#

Bases: rizer.electrical_model.circuit.base_circuit.BaseCircuit

Solve the following RC circuit, with the plasma resistance in parallel with C.

                    ┌───────┬───────┐
                    │       │       │
u_mes ──[R_par]──── A      [C]    [R_p(t)]
                    │       │       │
                    └───────┴───────┘
i_para                  i_C    i_{R_p}      (i_para = i_C + i_{R_p})

The generator drives node A through a fixed series resistance \(R_{par}\); the capacitor \(C\) and the plasma resistance \(R_p(t)\) are in parallel with each other, both connected between node A and ground. The voltage \(u_c\) across that parallel pair is therefore the plasma voltage \(u_p\) directly, and Kirchhoff’s current law at node A (\(i_{para} = i_C + i_{R_p}\)) gives the single governing ODE:

\[\frac{du_c}{dt} = \frac{u_{mes}(t) - u_c \left(1 + \dfrac{R_{par}}{R_p(t)}\right)} {R_{par} C}\]

This circuit only supports externally-driven mode (R_p supplied by the caller, e.g. via DrivenCircuitAdapter) – it has no self-contained solve. Its plasma current \(i_{R_p}(t) = u_c(t)/R_p(t)\) also depends on the externally-supplied R_p, not on its own state alone, so current() (only needed by StackedReactorCircuit) is not overridden.

Parameters:
  • R_par (float) – Series resistance between the generator and node A [Ohm].

  • C (float) – Capacitance in parallel with the plasma resistance [F].

  • u_mes (Callable) – Voltage of the source as a function of time [Volts].

  • u_c_0 (float, optional) – Initial voltage across the capacitor (and across the plasma) at time t=0 [V]. Default is 0 V.

R_par#

Series resistance between the generator and the parallel C/R_p pair.

C#

Capacitance in parallel with the plasma resistance.

u_mes#

Voltage of the source as a function of time.

u_c_0 = 0.0#

Initial voltage across the capacitor (and across the plasma) at time t=0.

initial_state() → numpy.ndarray#

Return the initial circuit state [u_c_0], for externally-driven mode.

compute_derivatives_driven(t: float, y: numpy.ndarray, R_p: float) → numpy.ndarray#

Time-derivative of the circuit state [u_c], with R_p supplied externally.

Parameters:
  • t (float) – Time at which the circuit is solved.

  • y (numpy.ndarray of float) – Array containing the present value of the system: y[0]=u_c, the voltage across the parallel C/R_p pair.

  • R_p (float) – Plasma resistance at time t [Ohm].

Returns:

Array containing the derivative dy[0]=du_c/dt.

Return type:

numpy.ndarray of float

compute_current(t: float, u_c: float, R_p: float) → float#

Return the plasma current \(i_{R_p} = u_c / R_p\).

Parameters:
  • t (float) – Time at which the circuit is solved. Not used (the current is a pure function of u_c and R_p), but included for a signature consistent with compute_plasma_voltage().

  • u_c (float) – Voltage across the parallel C/R_p pair [V].

  • R_p (float) – Plasma resistance at time t [Ohm].

Returns:

Plasma current, in Amperes.

Return type:

float

compute_plasma_voltage(t: float, u_c: float, R_p: float) → float#

Return the plasma voltage \(u_p = u_c\) (C and R_p are in parallel).

Parameters:
  • t (float) – Time at which the circuit is solved. Not used, but included for a signature consistent with compute_current().

  • u_c (float) – Voltage across the parallel C/R_p pair [V].

  • R_p (float) – Plasma resistance at time t [Ohm]. Not used (the plasma voltage equals u_c directly for this topology), but included for a signature consistent with compute_current().

Returns:

Plasma voltage, in Volts.

Return type:

float