KiCad Simulator can't find init file

Hello everyone,

I’m a new user to KiCad, and I’m trying to simulate a collegue’s KiCad spice model.

When I try to simulate, I get this error message.

No compatibility mode selected!
Circuit: KiCad schematic
oopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsoopsError on line 0 :
b.xm1.be1 xm1.e1_int1 0 v= ( 1.2970000000e-01 * ( i(v.xm1.v1) ) * exp ( ( temp - ( 2.500000000000000e+01 ) ) / 1.8320000000e+02 ) + 4.6470000000e-05 * ( i(v.xm1.v1) ) * abs ( ( i(v.xm1.v1) ) ) ** 2.0560000000e+00 * exp ( ( temp - ( 2.500000000000000e+01 ) ) / 2.6670000000e+02 ) )
parameter value out of range or the wrong type
Note: can’t find init file.

** ngspice-34 shared library
** Creation Date: Tue Feb 2 12:29:13 UTC 2021

Error: there aren’t any circuits loaded.

Right now, I believe the problem is the that the simulator can’t find the init file. I’ve tried adding .spiceinit and spice.rc files to my user profile directory with “set ngbehavior=ps”, but I still get the same error message.

Let me know if there’s anything else I can try. Any help would be appreciated!

I don’t know much about spice, but I’ve heard of this before:

Maybe this helps:

The init file (named spinit, the init file typically installed when installing ngspice) is not really used by the Eeschema/ngspice implementation. So no problem if not found.

More important is the .spiceinit file (the user defined initialization file).

If ‘set ngbehavior=ps’ is set correctly, then
No compatibility mode selected
should have been replaced by
Compatibility modes selected: ps
Did you obtain this message?

I have never managed to get so many ‘oops’ in a series. What is the model you are trying to simulate?

You did not tell us if you are using KiCad 5.1.10 or 5.99. With 5.99 also .spiceinit is no longer needed, you select the compatibility flag in the Eeschema window.

Hello holger,

I never obtained the Compatibility modes selected:ps message when I ran the simulator. I created a text file in C:\Users\Grant Karber named .spiceinit and added set dgbehavior=ps to it. It turns out when you only save it as a text file, KiCad doesn’t recognize it. Once I saved it as a .spiceinit file, the simulation ran smoothly.

Thanks for your help everyone!

FYI I was simulating a 6 stage boost converter in KiCad 5.1.10 :slight_smile: