www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2019/06/11/00:55:03

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:reply-to:from:date:message-id
:subject:to:content-transfer-encoding;
bh=qXqlo2j0o6jZ13jI5TCqF3TDConqAcoudtt7yH9m9pA=;
b=aLAQQ1HKa4E+Rvo2jC3jSdALz98WAkED0ZBVkzi8CN+VVVhWHGL9GjM+1E5++g+DLQ
jCLL6AHRqljIcQ9Rj5gbdAsRl+zL3GdbPW62P/Ie+dL9at+4LbfrF9RnJBoGs8zMzKyX
x8NE5szfBh6rHySwRcHAbn2DvzNTvheYtoGyjTI63hCfcJwDgNxk0renZqNpIbo/C5Vw
X38Ye3/rp9WHxYHCk13v57kQj+Dktw1y7Tu1PINSsYT/q6I94eEua/XVL4HcyHFZtU6a
0qRafMogPtVJ7cMWi9GrsF4hSnwADfUcvfcSCPDXVLp2z92a+ZEy4cb2RQJ25eKNySAR
LsyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:reply-to
:from:date:message-id:subject:to:content-transfer-encoding;
bh=qXqlo2j0o6jZ13jI5TCqF3TDConqAcoudtt7yH9m9pA=;
b=YvKx0vcC5mRgIBNTWiu5dSx4OQh+9WPzB1Ep71zNiAcsvBY/sXq7YqlwfpFi60yXEF
8L+a4H6AHIhgsqLlgEhOOf7exrc3uCLuFgBWe4FmFU0Ac2PM8yf8dH8zJbOu+8A9wdad
HC0X8PRk3CT1qAx5u0uqGt8yJfM5wgbphYZPpW9N6lGN6OwIVYy7wd0k5rHz843lirEl
s5f+WD1k4bIz2S+SzPGl0iCGEdW/Mph0hrqVLMPiB04xUctjzgpPbd9/crDRRpTKFUGK
UuKiaUWO/67JAXfPknv8nO0Vu9JAta1VcxdN/8amhhH8H4RIl1XNuSaYI1LqRxJLfLAv
kUmg==
X-Gm-Message-State: APjAAAWbmrlNJD5DDeOT1F7NcqI5BGecJvmGnGcFqCIZ7IIPDBMK4JHM
1ScpdPwoBmOWAgfL3cRUd5YgP3zoKrmmJ9pDHHfea7+k
X-Google-Smtp-Source: APXvYqz3P/jzCorwqavOxgQoMnzx4bisCB6mK7DouEEMR+YtPRVL/cHaqM8lmAj9gFaq3smEnH5XZTF0axMCATAWVaw=
X-Received: by 2002:a17:902:f01:: with SMTP id 1mr73452804ply.170.1560228076340;
Mon, 10 Jun 2019 21:41:16 -0700 (PDT)
MIME-Version: 1.0
References: <CAONhAouTSuT5hc4PcZXnPtsUndWY18H01KRPAyeVYUAVz3qq2w AT mail DOT gmail DOT com>
<0C25F9A4-F468-4A51-A4E2-F925CCA1EF44 AT noqsi DOT com>
In-Reply-To: <0C25F9A4-F468-4A51-A4E2-F925CCA1EF44@noqsi.com>
From: "=?UTF-8?B?Q3PDoW55aSBQw6Fs?= (csanyipal AT gmail DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
Date: Tue, 11 Jun 2019 06:41:05 +0200
Message-ID: <CAONhAouC-aVBQf=8hPnPECVaq=B5RHh=6xbgFS8YED8G+7Q96A@mail.gmail.com>
Subject: Re: [geda-help] ngspice - to simulate the simplest circuit
To: gEDA Help <geda-help AT delorie DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x5B4fm1S014647
Reply-To: geda-help AT delorie DOT com

John Doty <jpd AT noqsi DOT com> ezt írta (időpont: 2019. jún. 10., H, 21:36):
>
> Change
>
> .print v(Vin,0)
>
> to
>
> .print dc v(Vin)
>
> You need to tell .print which analysis, “dc” in this case. to take the output vector from.

Thanks!
Can one do the so called DC Solver in ngspice like in the
https://www.circuitlab.com/ out there?

> There is no output vector for node 0, so just use the absolute form v(Vin) rather than the relative form.
>
> On Jun 10, 2019, at 1:59 PM, Csányi Pál (csanyipal AT gmail DOT com) [via geda-help AT delorie DOT com] <geda-help AT delorie DOT com> wrote:
>
> Hi,
>
> I am trying to learn how to use ngspice.
>
> I have the simplest circuit in the DC_R.sch schematic file:
> v 20130925 2
> C 40000 40000 0 0 0 title-B.sym
> C 43300 47300 1 0 0 resistor-2.sym
> {
> T 43700 47650 5 10 0 0 0 0 1
> device=RESISTOR
> T 43500 47600 5 10 1 1 0 0 1
> refdes=R1
> T 43600 47100 5 10 1 1 0 0 1
> value=220
> }
> C 43700 45900 1 0 0 gnd-1.sym
> N 43000 46200 44200 46200 4
> N 44200 46200 44200 47400 4
> C 42700 46200 1 0 0 vdc-1.sym
> {
> T 43400 46850 5 10 1 1 0 0 1
> refdes=V1
> T 43400 47050 5 10 0 0 0 0 1
> device=VOLTAGE_SOURCE
> T 43400 47250 5 10 0 0 0 0 1
> footprint=none
> T 43400 46650 5 10 1 1 0 0 1
> value=DC 6V
> }
> C 40800 48100 1 0 0 spice-directive-1.sym
> {
> T 40900 48400 5 10 0 1 0 0 1
> device=directive
> T 40900 48500 5 10 1 1 0 0 1
> refdes=A1
> T 40900 48200 5 10 0 1 0 0 1
> file=unknown
> T 40900 48200 5 10 1 1 0 0 1
> value=.dc V1 6 6 1
> }
> N 43000 47400 43300 47400 4
> {
> T 43000 47500 5 10 1 1 0 0 1
> netname=Vin
> }
> C 40800 47400 1 0 0 spice-directive-1.sym
> {
> T 40900 47700 5 10 0 1 0 0 1
> device=directive
> T 40900 47800 5 10 1 1 0 0 1
> refdes=A2
> T 40900 47500 5 10 0 1 0 0 1
> file=unknown
> T 40900 47500 5 10 1 1 0 0 1
> value=.print v(Vin,0)
> }
>
> What I want is to get the voltage after R1, that is, to see how much
> R1 changes the input voltage of 5V in the circuit by using ngspice.
>
> I did run this command:
> gnetlist -g spice-sdb -o spice.net DC_R.sch
>
> In the spice.net I have these lines:
> * gnetlist -g spice-sdb -o spice.net DC_R.sch
> *********************************************************
> * Spice file generated by gnetlist                      *
> * spice-sdb version 4.28.2007 by SDB --                 *
> * provides advanced spice netlisting capability.        *
> * Documentation at http://www.brorson.com/gEDA/SPICE/   *
> *********************************************************
> *==============  Begin SPICE netlist of main design ============
> .print v(Vin,0)
> .dc V1 6 6 1
> V1 Vin 0 DC 6V
> R1 Vin 0 220
> .end
>
> then did run this command:
> ngspice -b spice.net
>
> but get this output:
> Circuit: * gnetlist -g spice-sdb -o spice.net dc_r.sch
>
> Warning: no nodes given: .print v(vin,0)
> Note: No ".plot", ".print", or ".fourier" lines; no simulations run
>
> What am I doing wrong?
>
> --
> Best, Pali
>
>
> John Doty              Noqsi Aerospace, Ltd.
>
> jpd AT noqsi DOT com



-- 
Best, Pali

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019