rizer.electrical_model.circuit.rc_source_circuit#
Classes#
Capacitor C_s driven by two independent current branches through R_g and Z_c. |
Module Contents#
- class rizer.electrical_model.circuit.rc_source_circuit.RC_Source_Circuit(R_g: float, Z_c: float, C_s: float, drive: Callable[[float], float], u_s_0: float = 0.0)#
Bases:
rizer.electrical_model.circuit.base_circuit.BaseCircuitCapacitor C_s driven by two independent current branches through R_g and Z_c.
Unlike
RC_Rp_Circuit(one drive branch through R_par, one load branch R_p(t)), this node has two independent drive branches – one through R_g, one through Z_c – and no third (load) resistor at all: the plasma resistance does not sit at this node. drive is the caller-supplied combined current injection into the node, so Kirchhoff’s current law gives:\[\frac{du_s}{dt} = \frac{\text{drive}(t) - u_s\left(\dfrac{1}{R_g}+\dfrac{1}{Z_c}\right)}{C_s}\]where u_s is the voltage across C_s. What R_g, Z_c, and drive represent physically – and whether u_s is a node-to-ground voltage or a voltage across some other element as well – depends on the topology the caller derived drive from: see
TransmissionLineCapacitiveSourceResistiveLoadCircuit(C_s shunting the node to ground, u_s a node voltage) andTransmissionLineParallelCapacitiveSourceResistiveLoadCircuit(C_s bridging R_g, u_s the voltage across the R_g/C_s pair) for the two derivations that instantiate this same ODE.This circuit only supports externally-driven mode – it has no self-contained
solve. R_p is accepted (to matchcompute_derivatives_driven()’s signature) but unused: the plasma resistance does not appear in this node’s own KCL at all.- Parameters:
R_g (
float) – Source resistance, one drive branch [Ohm].Z_c (
float) – Cable characteristic impedance, the other drive branch [Ohm].C_s (
float) – Capacitance whose voltage is this circuit’s own state [F].drive (
Callable) – Combined current injection into the node, as a function of time [A].u_s_0 (
float, optional) – Initial voltage across C_s at t=0 [V]. Default 0 V.
- R_g#
Source resistance, generator branch.
- Z_c#
Cable characteristic impedance, returning-wave branch.
- C_s#
Capacitance at the source’s own output node.
- drive#
Combined current injection at node A, as a function of time.
- u_s_0 = 0.0#
Initial voltage across C_s at time t=0.
- initial_state() numpy.ndarray#
Return the initial circuit state
[u_s_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_s].- Parameters:
t (
float) – Time at which the circuit is solved.y (
numpy.ndarrayoffloat) – Array containing the present value of the system:y[0]=u_s, the voltage across C_s (see class docstring for what that voltage represents in the caller’s own topology).R_p (
float) – Unused – the plasma resistance does not appear in this node’s own KCL (see class docstring). Accepted only to matchcompute_derivatives_driven()’s signature.
- Returns:
Array containing the derivative
dy[0]=du_s/dt.- Return type: