00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef INDUCTANCE_H
00012 #define INDUCTANCE_H
00013
00014 #include "reactive.h"
00015
00020 class Inductance : public Reactive
00021 {
00022 public:
00023 enum Method
00024 {
00025 m_none,
00026 m_euler,
00027 m_trap
00028 };
00029 Inductance( double capacitance, double delta );
00030 virtual ~Inductance();
00031
00032 virtual Type type() const { return Element_Inductance; }
00037 void setMethod( Method m );
00038 virtual void time_step();
00039 virtual void add_initial_dc();
00040 void setInductance( double i );
00041 virtual void add_map();
00042
00043 protected:
00044 virtual void updateCurrents();
00045 virtual bool updateStatus();
00046
00047 private:
00048 double m_inductance;
00049 Method m_method;
00050
00051 double r_eq_old;
00052 double v_eq_old;
00053 };
00054
00055 #endif