void VoltageSignal::add_initial_dc() { if (!b_status) return; A_b( 0, 0 ) = -1; A_c( 0, 0 ) = -1; A_b( 1, 0 ) = 1; A_c( 0, 1 ) = 1; }
void Inductance::add_initial_dc() { A_c( 0, 0 ) = 1; A_b( 0, 0 ) = 1; A_c( 0, 1 ) = -1; A_b( 1, 0 ) = -1; // The adding of r_eg and v_eq will be done for us by time_step. // So for now, just reset the constants used. scaled_inductance = v_eq_old = 0.0; }
/* FIXME: Often times, you want to use one of these to set a voltage in a circuit but not pass current. This creates a singular matrix. Depending on how Matrix is set up, it might either cause the circuit to glitch out or will create a virtual one ohm resistor either into a component that shouldn't be conducting and draw/source that current from wherever it is avaliable. =P VoltageSignal also exhibits this problem. */ void VoltageSource::add_initial_dc() { if (!b_status) return; A_b(0, 0) = -1; A_c(0, 0) = -1; A_b(1, 0) = 1; A_c(0, 1) = 1; b_v(0) = m_v; }
void VCVS::add_initial_dc() { if (!b_status) return; A_c( 0, 0 ) = -m_g; A_c( 0, 1 ) = m_g; A_b( 2, 0 ) = 1; A_c( 0, 2 ) = 1; A_b( 3, 0 ) = -1; A_c( 0, 3 ) = -1; }
void CCVS::add_initial_dc() { if (!b_status) return; A_b(0, 0) = 1; A_b(1, 0) = -1; A_b(2, 1) = -1; A_b(3, 1) = 1; A_c(1, 0) = 1; A_c(1, 1) = -1; A_c(0, 2) = 1; A_c(0, 3) = -1; A_d(0, 0) = -m_g; }
void VoltagePoint::add_initial_dc() { if (!b_status) return; A_b(0, 0) = -1; A_c(0, 0) = 1; b_v(0) = m_voltage; }
void Inductance::add_initial_dc() { // The adding of r_eg and v_eq will be done for us by time_step. // So for now, just reset the constants used. scaled_inductance = 0.0; // bail if the element is not "ready" if(!b_status) return; A_c(0, 0) = 1; A_c(0, 1) = -1; A_b(0, 0) = 1; A_b(1, 0) = -1; A_d(0, 0) = 0.0; }
void VCCS::add_initial_dc() { if (!b_status) return; A_c( 0, 0 ) = 1.0; A_c( 0, 1 ) = -1.0; A_b( 3, 0 ) = 1.0; A_b( 2, 0 ) = -1.0; A_d( 0, 0 ) = -1.0 / m_g; #if 0 A_g( 2, 0 ) += m_g; A_g( 3, 0 ) -= m_g; A_g( 2, 1 ) -= m_g; A_g( 3, 1 ) += m_g; #endif }