Struct TriodeThreePort
pub struct TriodeThreePort {
pub model: TriodeModel,
/* private fields */
}Expand description
3-port Koren triode for use with the grouped multi-port NR solver.
Presents 2 WDF ports to the R-type adaptor:
- Port 0: grid-to-cathode (grid conduction diode)
- Port 1: plate-to-cathode (Koren plate current, depends on Vgk)
Unlike TriodeRoot where the grid voltage is an external parameter set
via set_vgk(), here the grid voltage comes from the grid port of the
R-type adaptor. This allows the scattering matrix to couple the input
signal to the grid, and the NR solver handles the grid-plate interaction
through the transconductance cross-derivative ∂Ia/∂Vgk.
This is necessary for MNA fallback triode stages where the grid-side
passive network (bias resistors, threshold pots) is disconnected from
the plate-side network in the MNA. Without a grid NL port, the adapted
port (input) has s_nl_adapted = 0 for the plate port, and the triode
produces zero output.
Grid current model: i_g = I_gs × (exp(Vgk / Vt_g) - 1)
Plate current: Koren equation Ip = (Vpk/Kp × ln(1 + exp(E1)))^Ex / KG1
Transconductance: ∂Ia/∂Vgk = Ex × base^(Ex-1) / KG1 × Vpk × σ(E1) / √(Kvb + Vpk²)
Fields§
§model: TriodeModelImplementations§
§impl TriodeThreePort
impl TriodeThreePort
pub fn new(model: TriodeModel) -> TriodeThreePort
pub fn new_with_v_max(model: TriodeModel, v_max: f64) -> TriodeThreePort
pub fn new_gnd_referenced(
model: TriodeModel,
supply_voltage: f64,
) -> TriodeThreePort
pub fn new_gnd_referenced( model: TriodeModel, supply_voltage: f64, ) -> TriodeThreePort
Create a TriodeThreePort for use in a GND-referenced MNA context.
In the general MNA path, VCC is an explicit voltage source rather than the MNA reference node. Port-1 waves represent actual plate voltage above GND (positive, 0..supply_voltage). No offset is needed; the clamp is adjusted accordingly.
pub fn with_parallel_count(self, count: usize) -> TriodeThreePort
pub fn set_v_max(&mut self, v_max: f64)
pub fn v_max(&self) -> f64
pub fn parallel_count(&self) -> usize
Trait Implementations§
§impl Clone for TriodeThreePort
impl Clone for TriodeThreePort
§fn clone(&self) -> TriodeThreePort
fn clone(&self) -> TriodeThreePort
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more