Error ngspice tutorial example 3

Hi Holger and all,

I have not found a solution for this problem in other posts.

I’m new to ngspice. Trying to perform the simulation of the example 3 in the ngspice-eeschema tutorial (2 resistors and 1 opamp, 3 Vsources).
The first and second examples worked alright.

I have download and imported the LF356.mod model into the opamp symbol, type subcircuit, alternate node sequence “1 2 4 5 3” and box checked.

.spiceinit file created in /home/myuser directory

This is the error message after Run simulation:
Circuit: KiCad schematic
Error on line 0 :
a$poly$e.xu101.eos %vd [ xu101.16 xu101.49 ] %vd ( xu101.7 0 ) a$poly$e.xu101.eos
MIF-ERROR - unable to find definition of model a$poly$e.xu101.eos
Warning: Model issue on line 0 :
.model a$poly$e.xu101.eos spice2poly coef = [ 3e-3 1 ] …
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$f.xu101.f1 %vnam [ v.xu101.va3 ] %id ( xu101.9 xu101.98 ) a$poly$f.xu101.f1
MIF-ERROR - unable to find definition of model a$poly$f.xu101.f1
Warning: Model issue on line 0 :
.model a$poly$f.xu101.f1 spice2poly coef = [ 0 0 0 1.5944e7 ] …
Unknown model type spice2poly - ignored
Reducing trtol to 1 for xspice ‘A’ devices
Doing analysis at TEMP = 27,000000 and TNOM = 27,000000
Reference value : 1,00000e+02
No. of Data Rows : 31

Application: Eeschema
Version: 5.1.4-br-unknown-78af1da~84~ubuntu18.04.1, release build

Ngspice version-30

I have searched for a line containing spice2poly in the kicad project files but I have found none.

Could someone guide me to find a solution? Thanks.

This is an installation problem. eeschema/ngspice is not installed properly, the code model in is not recognized. is a shared library that has to be in its proper place (though I do not know where that is in an Ubuntu setup).

1 Like

The library is provided by the package ngspice.


As Ubuntu is pulling the Debian packages the situation is here the same.

1 Like

Thanks @holger, @tijuca.

I’ll take a look at it. Now I have libngspice-kicad installed. There are other packages not installed, ngspice and tclspice, but the version available is 27-1 so I don’t know if it is a good idea to mix them with ngspice-30.

libngspice-kicad isn’t included in the official Ubuntu archives, so you need to ask the author of this package. The control setup within the packages need to ensure they can’t get installed in parallel as they provide the same files. if this is possible than this is a bug.

Thanks. The libngspice-kicad package version is 20190227 while the kicad version is more recent.