gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnucap-devel] method and error (was: transient -- "trace" default)


From: Felix Salfelder
Subject: [Gnucap-devel] method and error (was: transient -- "trace" default)
Date: Tue, 7 Jan 2014 20:27:19 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Al.

> The reason for using Euler is that sometimes you do want to 
> ignore the error, otherwise strays will take control and it will 
> run very slow.

this makes sense, as long as specifying euler is the only way to make
gnucap ignore the error (and if ignoring the error is desirable
somehow). i was assuming that "choice of integration method" and
"truncation error handling" are different topics. i think they should
be, see below.

> v1 (1 0) pulse .....
> r1 (1 2) 1meg
> c1 (2 0) 1p
> 
> a simple low pass filter?  maybe.
> 
> but it's part of a power supply running at 60 Hz.  I want to 
> ignore the 1pf capacitor, as if it didn't exist.  With Euler, 
> that's what happens.  With trap, ignoring step control here 
> would lead to a severe case of trap ringing.

i think i see your point

v1 (1 0) pulse iv=0 pv=100 width=0 rise=10m fall=10m period=20m
r1 (1 2) 1e6
c1 (2 0) 1p
.tran 0 1 1

gives

Gnucap   System status
iterations: op=0, dc=0, tran=4053, fourier=0, total=5405
transient timesteps: accepted=1169, rejected=183, total=1352.

with .options method=euler (per device method selection does not seem to
be implemented) i get

Gnucap   System status
iterations: op=0, dc=0, tran=854, fourier=0, total=1139
transient timesteps: accepted=256, rejected=29, total=285,

which is effectively due to ignoring the error in c1.

now, what i have tried to work out is an adaptive method selection. in
the pulse & lowpass example, the pulse source introduces discontinuities
in the node voltages that break trap in an obvious way. it totally makes
sense to switch back to euler in c1 (only) for those steps succeeding
the discontinuities -- *without* turning off step control...

for the example above, i currently get

Gnucap (-uf 0.0.0-rc12)  System status
iterations: op=0, dc=0, tran=2708, fourier=0, total=3611
transient timesteps: accepted=786, rejected=117, total=903.

this is due to reduced ringing and consequently smaller truncation
errors. nevertheless it's using trap whereever appropriate.

(for the record, just euler with step control enabled gives
Gnucap (-uf 0.0.0-rc12)  System status
iterations: op=0, dc=0, tran=1919, fourier=0, total=5118
transient timesteps: accepted=986, rejected=294, total=1280)

thanks
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]