Struct TriodeRoot
pub struct TriodeRoot {
pub model: TriodeModel,
/* private fields */
}Expand description
Triode nonlinear root for WDF trees.
Models the plate-cathode path as a nonlinear element controlled by an external grid-cathode voltage Vgk. Uses Newton-Raphson to solve the implicit WDF constraint equation.
The plate current follows the Koren model, which accurately captures the tube’s behavior in cutoff, active, and saturation regions.
Fields§
§model: TriodeModelImplementations§
§impl TriodeRoot
impl TriodeRoot
pub fn new(model: TriodeModel) -> TriodeRoot
pub fn new_with_v_max(model: TriodeModel, v_max: f64) -> TriodeRoot
pub fn new_with_v_max(model: TriodeModel, v_max: f64) -> TriodeRoot
Create a triode root with a specific supply voltage (B+).
pub fn with_parallel_count(self, count: usize) -> TriodeRoot
pub fn with_parallel_count(self, count: usize) -> TriodeRoot
Set the number of parallel tubes for current scaling.
pub fn set_v_max(&mut self, v_max: f64)
pub fn set_v_max(&mut self, v_max: f64)
Set the maximum plate voltage (B+ supply rail).
For tube circuits, the plate voltage can swing from 0V (tube saturated) to B+ (tube in cutoff). This sets the upper bound for Newton-Raphson.
Examples:
- Pultec EQP-1A: 250V
- Fender Deluxe: 350V
- Starved plate design: 9-48V
pub fn parallel_count(&self) -> usize
pub fn set_vgk(&mut self, vgk: f64)
pub fn set_vgk(&mut self, vgk: f64)
Set the grid-cathode voltage (external control from bias, signal, LFO).
pub fn plate_current(&self, vpk: f64) -> f64
pub fn plate_current(&self, vpk: f64) -> f64
Compute plate current for given Vpk at current Vgk using Koren model.
The Koren equation:
Ip = (Vpk/Kp * ln(1 + exp(Kp * (1/mu + Vgk/sqrt(Kvb + Vpk^2)))))^Ex / KG1
Trait Implementations§
§impl Clone for TriodeRoot
impl Clone for TriodeRoot
§fn clone(&self) -> TriodeRoot
fn clone(&self) -> TriodeRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more