#include <bjt.h>
Inheritance diagram for BJT:


Public Member Functions | |
| BJT (bool isNPN) | |
| virtual | ~BJT () |
| virtual Type | type () const |
| virtual void | update_dc () |
| virtual void | add_initial_dc () |
| virtual void | add_map () |
| BJTSettings | settings () const |
| void | setBJTSettings (const BJTSettings &settings) |
Protected Member Functions | |
| virtual void | updateCurrents () |
| void | calc_eq () |
| void | calcIg (double V_BE, double V_BC, double *I_BE, double *I_BC, double *I_T, double *g_BE, double *g_BC, double *g_IF, double *g_IR) |
Protected Attributes | |
| BJTState | m_os |
| BJTState | m_ns |
| int | m_pol |
| double | V_BE_prev |
| double | V_BC_prev |
| BJTSettings | m_bjtSettings |
Definition at line 46 of file bjt.h.
| virtual Type BJT::type | ( | ) | const [inline, virtual] |
| void BJT::update_dc | ( | ) | [virtual] |
Newton-Raphson iteration: Update equation system.
Implements NonLinear.
Definition at line 125 of file bjt.cpp.
References BJTState::A, Element::A_g(), Element::b_i(), Element::b_status, calc_eq(), BJTState::I, m_ns, and m_os.
Referenced by add_initial_dc().
| void BJT::add_initial_dc | ( | ) | [virtual] |
Does the required MNA stuff. This should be called from ElementSet when necessary.
Implements Element.
Definition at line 97 of file bjt.cpp.
References m_os, BJTState::reset(), update_dc(), V_BC_prev, and V_BE_prev.
| void BJT::add_map | ( | ) | [virtual] |
Call this function to tell the element to add its map to the matrix in use
Reimplemented from Element.
Definition at line 70 of file bjt.cpp.
References Element::b_status, Element::p_A, Element::p_cnode, and Matrix::setUse().
| void BJT::updateCurrents | ( | ) | [protected, virtual] |
Call this function to tell the element to calculate the current flowing *into* it's cnodes *from* the element. You can get the currents with m_cnodeI. Child class must implement this function.
Implements Element.
Definition at line 105 of file bjt.cpp.
References Element::b_status, calcIg(), Element::m_cnodeI, m_pol, Element::p_cnode, and CNode::v.
| void BJT::calc_eq | ( | ) | [protected] |
Calculates the new BJTState from the voltages on the nodes.
Definition at line 142 of file bjt.cpp.
References BJTState::A, calcIg(), NonLinear::diodeCriticalVoltage(), NonLinear::diodeVoltage(), BJTState::I, BJTSettings::I_S, m_bjtSettings, m_ns, m_pol, BJTSettings::N_F, BJTSettings::N_R, Element::p_cnode, CNode::v, V_BC_prev, and V_BE_prev.
Referenced by update_dc().
1.5.1