0
\$\begingroup\$

I'm learning ngspice , read almost it's whole documentation but still confused about libraries and models , here are my questions :

  1. where are the default models and libraries that comes built-in with ngspice? (to view and use them)
  2. what exactly are libraries for ? is adding a model the same as adding library ? if I added a new model should I make a library for it?
  3. if I want to edit a model would it add a modified copy of it or will it replace it?
  4. can I add a folder to ngspice in which all my own libraries , models and sub-circuits are located for the simulator to automatically use in my future projects ? or should I always include them to my new design ?

thanks a lot

\$\endgroup\$
4
  • \$\begingroup\$ Have you tried any examples so far? What do you mean by default models: (R,C, L, D ... ?). Those are present by default. You can change model parameters and assign names to your own models. .SUBCKT are just shorthands or "netlist subroutines" that can be plugged in with parameters (see page 95 v35 of manual). .LIB are provided by vendors to include relevant models for their own products and are no different than include files. Study the folder ...\ngspice-35_64\Spice64\examples\digital to see how libraries are used in *.cir files. \$\endgroup\$
    – Syed
    Commented Sep 26, 2021 at 8:08
  • \$\begingroup\$ "Have you tried any examples so far? " yes , I tried an RC high-pass filter with some plots. "hat do you mean by default models" I mean BJTs , MOSFETs and so , there are a lot of them , and I want to know what models are excited by default , so I can download the other models. I still don't understand the purpose of .LIB files , does it contain names of models of a component or is it the description of it or what ! still don't know when to use .subckt , I'm a bit confused on those topics. \$\endgroup\$ Commented Sep 26, 2021 at 12:36
  • \$\begingroup\$ Your confusion will be removed only when you try examples and increase their complexity step by step making sure to have one new item per iteration. Perhaps this page (unrelated to ngspice) has some of the information you are looking for: docs.easyeda.com/en/Simulation/Chapter14-Device-models/… \$\endgroup\$
    – Syed
    Commented Sep 26, 2021 at 14:08
  • \$\begingroup\$ hmmm , well, I found some answers , though new question arise , I will try to do more examples and consult the manual . thanks for your replies , I'm open for any suggestions . \$\endgroup\$ Commented Sep 27, 2021 at 5:07

1 Answer 1

0
\$\begingroup\$

I found good answers to my question nad I want to share it here to anyone that may ask the same question , follow those links for it's irrespectable of me to copy paste others ansewrs/articles:

an article I found on the web:
https://resources.pcb.cadence.com/blog/2019-being-prepared-for-circuit-simulation-with-spice-model-libraries

a discussion on ngspice page on sourceforge:
https://sourceforge.net/p/ngspice/discussion/120973/thread/3743fd00cd/#5c21/29b5

best wishes.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.