[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] workarounds for the lack of nodeset
From: |
Felix Salfelder |
Subject: |
Re: [Gnucap-devel] workarounds for the lack of nodeset |
Date: |
Sun, 28 Jul 2019 14:30:55 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Fri, Jul 26, 2019 at 08:57:40PM -0400, al davis via Gnucap-devel wrote:
> I never had a need for nodeset, but it looks fairly easy to do.
>
> In Spice, it works by jamming non-ideal sources into the matrix, 1 ohm
> in parallel with a current source is close enough to a voltage source.
>
> On DC or starting tran ..
> First converge with sources in.
> Then take them out and converge again.
this mechanism helps if there are multiple OPs to select from. for
other uses, like starting a tran with charged caps, ngspice has an "ic"
command. the implementation for nodeset and ic for nodes should be
pretty much the same.
there is one (known) bug in s_tr_swp.cc +83. perhaps it should do the
sequence above.
> The bm_ .. would fiddle the value according to status, effectively
> removing itself ... f1=1 to start, then 0. f0=voltage to start, then
> 0. and sense something to change state.
another bug in in d_vs.cc +87. the bm is not queried during tr_begin, so
it has to do another pass.
I have a proof of concept [1]. it kind of works conceptionally. I ran
out of time. Please feel free to add the rest or port it to C++.
cheers
felix
[1]
https://codeberg.org/gnucap/gnucap-python/src/branch/nodeset-1/examples/c_nodeset.py