General > General Technical Chat

LTSpice: Low CPU utilization?

<< < (3/3)

tooki:
A much more important tip, which I only learned about just recently, is that in LTspice, some generic components (semiconductors, not passives, IIRC) consume vastly more CPU power to simulate than the “specific” ones. So choose an actual component model rather than a generic one.

iMo:
..and with the LTspice (or better to say with Spice) there is still the fundamental issue with Temperature (for a half of century already)..

You cannot simulate the circuits with the real temperatures of the components used.
What you can do is to "step" through the temperature of entire schematics, or, through an individual component.
During a "simulation run" (== the step) the temperature(s) is kept constant today (what is a nonsense in reality).
So the results we get today might be unrealistic (and they are "imprecise" always). What we need is to be able to feed the temperature back into the intrinsic models (the temperature of any intrinsic component used "on the fly"), based on the actual power loss (or any arbitrary temperature) of any particular component, thus we may simulate the "thermals affecting" the component (that is easy in LTspice today as we get actual power loss and we may simulate the thermal flows outside the intrinsic models).
You can/may today easily simulate a complete nonsense, and many will be happy with the results.

.. and when the issue will be "fixed" (hopefully ADI will think about seriously), the computational performance of the LTspice starts to be challenged even more..  :D

Siwastaja:

--- Quote from: tooki on March 19, 2024, 11:21:55 pm ---A much more important tip, which I only learned about just recently, is that in LTspice, some generic components (semiconductors, not passives, IIRC) consume vastly more CPU power to simulate than the “specific” ones. So choose an actual component model rather than a generic one.

--- End quote ---

Yes and this was highly unintuitive for a beginner who would expect that the generic models are "simpler" and thus faster to simulate...

Another point is, I have no idea if it's true in $current_year because I always choose specific, real part numbers since... 2006 or so... but those generic components might not work at all, or have really weird characteristics. I remember trying to simulate some voltage doubler circuit thinking that surely default diodes would be "ideal" but in fact they simulated breakdown at some (surprisingly small) voltage, so one had to choose an actual HV diode part number!

Ian.M:
The problem is due to maintaining Berkeley SPICE 3 compatibility.  The SPICE 3 diode default parameters are somewhat unhelpful.  See https://ltwiki.org/files/SPICEdiodeModel.pdf

For an ideal diode, (or at least as near to one as LTspice is happy with) use:

--- Code: ---.model Dideal D(Ron=1n Roff=1G Vfwd=0) ;Ideal diode
--- End code ---
which you can paste straight onto your schematic then invoke by name.
It uses a piecewise linear model with a breakpoint at 0V, which can still be problematic solving the transition if there is no or very little capacitance across the diode.
N.B older LTspice versions were unhappy with more than about 12 orders of magnitude between Ron and Roff.

RoGeorge:
From LTspice menus, go to Tools -> Control Panel -> SPICE, and in the 'Engine' group you can change '"Max threads: (how many cores are allowed to LTspice), and/or "Thread Priority:" (how intense usage is allowed for each core).

Regarding some simulations that can take very long, that is usually because of convergence problem, not because of the complexity of a circuit.  For convergence issues there are a few workarounds if you search online, though the solution depends from one case to another.  Most often it is enough to change "Default Integration Method:" from the same panel as the number of cores.  Other times changing one of those numerical limits on the right hand column might help speeding up all from minutes to seconds.

The Integration Method can also be change from inside the schematic drawing (and for that schematic only), if you place a spice directive near the circuit.  For example, to change from the default (modified trapezoidal) to "gear" you add in the schematic this spice directive:  .option method=gear, or .option method=trap.

Similar (a .options line) can be done for the values of "Reltol:", "Gmin:", etc. in case they have to be changed for a specific schematic only,  see the LTspice wiki for more details:  https://ltwiki.org/LTspiceHelp/LTspiceHelp/_OPTIONS_Set_simulator_options.htm

Random search result for LTspice speed up simulation:
https://ltwiki.org/?title=Pure_Inductor_and_Voltage_Source_Modelling_(and_how_to_speed_up_simulations_with_them)_using_LTspice
https://electronics.stackexchange.com/questions/262663/how-to-trace-down-why-ltspice-simulation-is-slow
https://www.analog.com/en/resources/technical-articles/ltspice-speed-up-your-simulations.html

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod