Forums

Spice speed

Started by John Larkin February 9, 2018
"John Larkin"  wrote in message
news:iees7dl11eb6comefdk8fqtet634rt9qa4@4ax.com...

On Fri, 9 Feb 2018 18:54:43 -0000, "Kevin Aylward"
<kevinRemovAT@kevinaylward.co.uk> wrote:

>"John Larkin" wrote in message >news:ijnr7dlp1veo5n8p76drndnqcr85enrjn8@4ax.com... > >On Fri, 9 Feb 2018 11:03:47 -0600, John S <Sophi.2@invalid.org> wrote: > >>On 2/9/2018 10:56 AM, John Larkin wrote: >>> >>> >>> >>> I added a *comment* to my LT Spice simulation and it slowed it down >>> about 20:1. >> >>>I have put comments all over my simulations and never run into that >>>problem. Are you sure it was tagged as a comment and not a directive? >> >>>Are you willing to share your file? >> > >>Sorry, can't do that. > >>>I bailed out of the sim and ran a saved file, and it's better. Still >>>slow, but better. The circuit has a wide range of time constants, down >>>to picoseconds, and has to run for tens of us, so it's slow and >>>exquisitly sensitive to any changes. > >>Note: to optimise the speed, you should twiddle with TRTOL and RELTOL. > >>LTSpice has a default of TRTOL=1, which is a departure from the Spice3 >>default of TRTOL=7 > >>This is used as a safe bet for things like SMPS and Delta-Sima converters. >>However, it can slow the simulation by a factor of 3. >> >>Ken Kundert (Cadence/Spectre) is a proponent of not messing with TRTOL >>from >>it's Spice3 value and using RELTOL instead. I usually piss about with >>both.
>Setting reltol=0.002 and trtol=5 speeds things up a lot. I have no >idea what that does to my sim accuracy, but I do like the waveforms >that I see.
>Setting abstol to 1 nA helps some too. I'm mostly dealing with amps.
The overall motto here, is try not to go too blind into it when running Spice. There is no realistic way to automate the optimum settings for speed and accuracy. -- Kevin Aylward http://www.anasoft.co.uk - SuperSpice http://www.kevinaylward.co.uk/ee/index.html
On Sun, 11 Feb 2018 10:07:00 -0000, "Kevin Aylward"
<kevinRemovAT@kevinaylward.co.uk> wrote:

>"John Larkin" wrote in message >news:iees7dl11eb6comefdk8fqtet634rt9qa4@4ax.com... > >On Fri, 9 Feb 2018 18:54:43 -0000, "Kevin Aylward" ><kevinRemovAT@kevinaylward.co.uk> wrote: > >>"John Larkin" wrote in message >>news:ijnr7dlp1veo5n8p76drndnqcr85enrjn8@4ax.com... >> >>On Fri, 9 Feb 2018 11:03:47 -0600, John S <Sophi.2@invalid.org> wrote: >> >>>On 2/9/2018 10:56 AM, John Larkin wrote: >>>> >>>> >>>> >>>> I added a *comment* to my LT Spice simulation and it slowed it down >>>> about 20:1. >>> >>>>I have put comments all over my simulations and never run into that >>>>problem. Are you sure it was tagged as a comment and not a directive? >>> >>>>Are you willing to share your file? >>> >> >>>Sorry, can't do that. >> >>>>I bailed out of the sim and ran a saved file, and it's better. Still >>>>slow, but better. The circuit has a wide range of time constants, down >>>>to picoseconds, and has to run for tens of us, so it's slow and >>>>exquisitly sensitive to any changes. >> >>>Note: to optimise the speed, you should twiddle with TRTOL and RELTOL. >> >>>LTSpice has a default of TRTOL=1, which is a departure from the Spice3 >>>default of TRTOL=7 >> >>>This is used as a safe bet for things like SMPS and Delta-Sima converters. >>>However, it can slow the simulation by a factor of 3. >>> >>>Ken Kundert (Cadence/Spectre) is a proponent of not messing with TRTOL >>>from >>>it's Spice3 value and using RELTOL instead. I usually piss about with >>>both. > >>Setting reltol=0.002 and trtol=5 speeds things up a lot. I have no >>idea what that does to my sim accuracy, but I do like the waveforms >>that I see. > >>Setting abstol to 1 nA helps some too. I'm mostly dealing with amps. > > >The overall motto here, is try not to go too blind into it when running >Spice. There is no realistic way to automate the optimum settings for speed >and accuracy. > >-- Kevin Aylward >http://www.anasoft.co.uk - SuperSpice >http://www.kevinaylward.co.uk/ee/index.html
Sometimes I believe Spice, in simple linear cases with ideal components. Sometimes I don't, but Spice still helps me think. Sometimes my instincts don't even get the direction of a current right; playing with a sim for a while helps sort things out. Spice is a great toy too, especially considering how bad TV is. -- John Larkin Highland Technology, Inc lunatic fringe electronics