Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Installing and using ngspice - an opensource simulator
Installing and using ngspice - an opensource simulator
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 9th March 2019, 03:25 PM   #151
orjan is offline orjan  Sweden
diyAudio Member
 
Join Date: Mar 2005
Location: Stockholm
That was fast...

Leach also has spice files on howto simulate loudspeakers, including boxes. I guess one could make symbols with attributes, for loudspeakers ts and for boxes volumes and vents.

/örjan
  Reply With Quote
Old 14th March 2019, 06:09 PM   #152
orjan is offline orjan  Sweden
diyAudio Member
 
Join Date: Mar 2005
Location: Stockholm
Is there, for ngspice, any standard folder to install .model and .lib in? Searched in /usr/share/ngspice and did a fast read of manual, might have missed..

/örjan
  Reply With Quote
Old 14th March 2019, 06:50 PM   #153
astx is offline astx  Austria
diyAudio Member
 
Join Date: Jan 2011
Location: Tyrol / Austria
Installing and using ngspice - an opensource simulator
Have a look on this environment variables ("man ngspice")
SPICE_LIB_DIR
SPICE_EDITOR
SPICE_SCRIPTS default $SPICE_LIB_DIR/scripts
SPICE_PATH default $SPICE_EXEC_DIR/ngspice


There exists no file "standard.bjt" like in LTSpice but of course many of this and other spice libraries are useable in ngspice too.


BR, Toni
__________________
Hint: have a look at first post of my threads for an updated index!
  Reply With Quote
Old 16th March 2019, 01:59 PM   #154
hvogt is offline hvogt
diyAudio Member
 
Join Date: Jan 2019
Use the folder where your circuit.cir resides.


The search path for circuit.cir (aka filename) is:


Infile_Path/<path/filename>

(Infile_Path is the path of the input file *.sp containing the netlist)


NGSPICE_INPUT_DIR/<path/filename>

(where an additional path is set by the environmental variable)


<path/filename> (where the search is relative to the current directory (OS dependent))


Maybe that this will require a bit of clean-up (at least some more flexibility with .inc and .lib may be beneficial).
  Reply With Quote
Old 20th March 2019, 08:52 AM   #155
knutn is offline knutn  Norway
diyAudio Member
 
Join Date: Mar 2006
Location: Oslo
How can we in ngSpice get Semiconductor Device Operating Points (as found in LTSpice Error Log when running OP)?
  Reply With Quote
Old 20th March 2019, 09:34 AM   #156
astx is offline astx  Austria
diyAudio Member
 
Join Date: Jan 2011
Location: Tyrol / Austria
Installing and using ngspice - an opensource simulator
op
__________________
Hint: have a look at first post of my threads for an updated index!
  Reply With Quote
Old 20th March 2019, 10:29 AM   #157
knutn is offline knutn  Norway
diyAudio Member
 
Join Date: Mar 2006
Location: Oslo
I only get node voltages, not something like this in LTSpice:

Name: q18 q17 q6 q5 q23
Model: ksc2690 ksa1220 bc560c bc550c q2sa1943
Ib: 1.55e-04 -5.45e-05 -2.59e-06 2.27e-06 -1.41e-02
Ic: 1.97e-02 -1.72e-02 -1.34e-03 1.21e-03 -1.25e+00
Vbe: 6.64e-01 -6.34e-01 -6.17e-01 6.21e-01 -5.99e-01
Vbc: -2.21e+01 2.21e+01 2.27e+01 -2.27e+01 2.28e+01
Vce: 2.28e+01 -2.27e+01 -2.33e+01 2.33e+01 -2.34e+01
BetaDC: 1.27e+02 3.15e+02 5.17e+02 5.32e+02 8.92e+01
Gm: 7.61e-01 6.63e-01 5.15e-02 4.67e-02 4.11e+01
  Reply With Quote
Old 20th March 2019, 10:50 AM   #158
astx is offline astx  Austria
diyAudio Member
 
Join Date: Jan 2011
Location: Tyrol / Austria
Installing and using ngspice - an opensource simulator
Example after "op" command (netlist must be loaded)

Code:
ngspice 8894 -> show r68
  Resistor: Simple linear resistor
     device                   r68
      model                     R
 resistance                   0.1
         ac                   0.1
      dtemp                     0
     bv_max                 1e+99
      noisy                     1
          i            -0.0119918
          p           1.43803e-05
"show" shows all devices.
Note: if you want current values you need to set

Code:
.options savecurrents
BR, Toni
__________________
Hint: have a look at first post of my threads for an updated index!
  Reply With Quote
Old 20th March 2019, 05:42 PM   #159
knutn is offline knutn  Norway
diyAudio Member
 
Join Date: Mar 2006
Location: Oslo
Default What with KiCad?

Quote:
Originally Posted by astx View Post
Example after "op" command (netlist must be loaded)

Code:
ngspice 8894 -> show r68
  Resistor: Simple linear resistor
     device                   r68
      model                     R
 resistance                   0.1
         ac                   0.1
      dtemp                     0
     bv_max                 1e+99
      noisy                     1
          i            -0.0119918
          p           1.43803e-05
"show" shows all devices.
Note: if you want current values you need to set

Code:
.options savecurrents
BR, Toni
But when running spice from KiCad, I cannot do that?
  Reply With Quote
Old 20th March 2019, 06:04 PM   #160
bea is offline bea  Germany
diyAudio Member
 
Join Date: Jan 2011
Dear Toni,

after shutting down part of my business the last days, i think i can continue with this topic.

Quote:
Originally Posted by astx View Post
[*]ngspice works using netlists so you can use every schematic editor which is able to export ng-spice compatible netlists. Even ltspice generates a temporary ".net" file which you could try to import and run with ngspice.[*]The ltspice ".asc" files cannot be directly used. AFAIK there is no converter available.
I just found that: simulation - Is there a way to open/import gschem .sch file in qucs? - Electrical Engineering Stack Exchange

Otherwise that would mean we have to redraw the schematics? Or is there any tool to set up some kind of schematics from a netlist?

Quote:
I personally prefer gschem (from gEDA) as schematic editor but KiCAD has a good integration with ngspice.
It is probably mostly a matter of getting used to a software interface. Do You or someone else have any idea which of the schematics editors is "closest" to that of LTSpice - in terms of operations, keyboard shortcuts and so - it is just about ease of migration.
  Reply With Quote

Reply


Installing and using ngspice - an opensource simulatorHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NGSPICE UltimateX86 Software Tools 4 1st December 2014 06:03 PM
Help with esl simulator pforeman Planars & Exotics 6 13th July 2014 03:56 AM
Cab/Mic simulator Mishung Analog Line Level 0 14th November 2010 02:13 PM
DAT Simulator jman 31 Instruments and Amps 4 1st February 2009 01:44 PM
who got the best simulator prorms Solid State 5 26th December 2006 05:39 AM


New To Site? Need Help?

All times are GMT. The time now is 06:20 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki