Re: [Qucs-devel] Adams methods From: Soeren D. Schulze - 2013-07-23 17:00:44 ```Am 21.07.2013 16:55, schrieb al davis: > On Sunday 21 July 2013, Soeren D. Schulze wrote: >> Adding a series resistance to a voltage source seems both >> more effective and more harmless to me -- really, who is >> going to notice 10u Ohm? > > It's a toss-up. > > One way to model (I should say approximate) a voltage source is > with a small series resistance, which is converted into a > current source with shunt. Gnucap does it this way. It messes > up the conditioning of the matrix somewhat. Yes, it often does. But when driving a capacitive load, it's also often better than modeling a voltage source with zero series resistance (such as in the circuit I posted last time). > Another way is to add another equation, the equivalent of an > extra node, representing the current. (Nullor model) Gnucap > could do it this way, but doesn't. Another voltage-source > plugin would give you a choice. It messes up the pattern of > the matrix. Is it only a performance issue or are there other reasons why this is bad? If I interpret the source code correctly, gnucap makes use of the matrix being positive definite by doing LU decomposition without pivoting. (If so, have you considered using Cholesky decomposition, by the way?) > Yet another way is to eliminate a node and solve the missing > node by adding the voltage source voltage to the nearby node > that you keep. I read about that. The method is interesting because it prevents some "accidental differentiations" that lead to a bad condition number and typically occur when driving a capacitor by a voltage source. > Similar reasoning applies to the inductor. Spice uses the > internal node model of an inductor. Gnucap may use either. It > adds the internal node only if there is mutual inductance. The > spice method is a disaster in run time for a circuit with lots > of inductors, like you get with parasitic extraction, the RLGC > model of a system of coupled transmission lines. What does gnucap do if you put two inductors in series, with something else connected to the node in-between? Does it merge all three nodes into a super-node? That's also interesting because doing so could eliminate another source of accidental differentiations. The only thing that makes me a bit skeptical is the fact that leaving out the node makes the resulting equation even more non-linear. Such equations aren't that well-researched for their theoretical and numerical properties, and the algorithm that I'd like to implement later requires linearity in the derivatives. Sören ```