pingspice.lib.passive.Lss(Subcircuit)
class documentation
Part of pingspice.lib.passive
(View In Hierarchy)
Simulation-friendly Inductor, as a subcircuit.
Note: This is included for explanatory purposes, but you can just
specify a ts keyword in a f.L
call to do the same thing
much more easily.
I have a small amount of parallel capacitance added, just enough to limit unit voltage rise time to simulation step time ts if there is a discontinuous change in current. I also have just enough parallel resistance added to keep LC at critical damping, so there isn't any ringing.
You'll appreciate how significant this is if you've struggled for hours with mysterious "time step too small" errors.
The inductance is a parameter L because it will likely be different each time you call an instance of me with a new node pair. So you use me something like this:
... L = Lss(f, ts=10E-9) L(1, 2, L=1E-6) f.R(2, 0, 1E3) L(2, 3, L=1.5E-6) f.R(3, 0, 2E3) ...
If you want to define L as an attribute, fixed for all calls to an instance of me, you can do that instead. Like so:
Lss(f, ts=10E-9, L=1E-6)(1, 2) f.R(2, 0, 1E3) Lss(f, ts=10E-9, L=1.5E-6)(2, 3) f.R(3, 0, 2E3)
See Also | Lsi for a version
that includes the circuitry instead of putting it in a subcircuit. |
Method | setup | Subcircuit definition. |
Inherited from NodeStuff (via Subcircuit):
Instance Variable | shunts | A dict of current sensing V elements with the pairs of nodes they connect. |
Class Variable | debug | A Bag that gets set
True for all instances to log info about each setup
call. |
Class Method | autoName | Undocumented |
Method | setupResults | Undocumented |
Method | fill | Undocumented |
Method | nodeCheck | Call with the circuit building tool f and a sequence of
nodes provided to this Include or
Subcircuit . |
Method | rawNetlist | Get lines of a raw netlist from a search hierarchy of possible sources. |
Method | shunt | Call to insert a current-measuring shunt and add an entry to my Elements
baton's dict of shunts. |
Method | raw | See Elements.raw . |
Method | iNode | See Elements.iNode . |
Method | ground | See Elements.ground . |
Method | sca | See Elements.sca . |
Method | sca6 | See Elements.sca6 . |
Class Method | _libDir | Undocumented |
Method | _strippedLines | Undocumented |
Method | _call_setup | Calls my setup
method (almost always your override of that method, actually) and processes
any return value. |
Inherited from NodeStuff (via Subcircuit):
Instance Variable | shunts | A dict of current sensing V elements with the pairs of nodes they connect. |
Class Variable | debug | A Bag that gets set
True for all instances to log info about each setup
call. |
Class Method | autoName | Undocumented |
Method | setupResults | Undocumented |
Method | fill | Undocumented |
Method | nodeCheck | Call with the circuit building tool f and a sequence of
nodes provided to this Include or
Subcircuit . |
Method | rawNetlist | Get lines of a raw netlist from a search hierarchy of possible sources. |
Method | shunt | Call to insert a current-measuring shunt and add an entry to my Elements
baton's dict of shunts. |
Method | raw | See Elements.raw . |
Method | iNode | See Elements.iNode . |
Method | ground | See Elements.ground . |
Method | sca | See Elements.sca . |
Method | sca6 | See Elements.sca6 . |
Class Method | _libDir | Undocumented |
Method | _strippedLines | Undocumented |
Method | _call_setup | Calls my setup
method (almost always your override of that method, actually) and processes
any return value. |
Subcircuit definition.
Why use f? Because it's short and a conveniently typed letter on the keyboard.
Override this if your subclass does not reference a param.ParameterFinder
subclass via the Finder class attribute. As with Include.setup
,
your override method can return a dict of attribute names and values to set
in my instance.