Re: user input to a running simulation

Felix Salfelder <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
On Tue, Apr 17, 2012 at 05:22:40PM +0200, Pawel Ludwikow wrote:
> and it seems that something happens I don't know about - the voltages at
> node 2 aren't equal after the change (node 1 is different, I explicitly
> asked it to be changed).

what you can do as a workaround is this:

.param b=5
.param a=0
.param d=0

V1 1 0 PULSE iv=a pv=b rise=1e-1 delay=d
R1 1 2 40k
C1 2 0 10u

.print tran v(1) v(2)
.tran 0 1 1e-1

.param a=5
.param b=1
.param d=1
.tran

> I think that the best solution would be: let the initial conditions of
> all elements for next simulation run be the final values for these
> elements from previous run, even after change.

the initial conditions i.e. the charge on the cap should be unchanged
(relative to the last step of the previous tran) and not be your problem.

> Can you help me with this? I'd like to see this feature in gnuspice and
> I will try to do it, but can somebody knowledgeable point me in a right
> direction or perhaps invent a better way to accomplish this?

calling tran with
.tran trace=v
might give some insight on whats going wrong for you. the problem seems
to be the initial step, which starts with the correct voltage, then does
something unexpected. if you manage to skip the first step somehow, it
might do what you want...

regards
felix
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.