help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] What is a good way to get joules integrated in a .dat


From: John Griessen
Subject: Re: [Help-gnucap] What is a good way to get joules integrated in a .dat output?
Date: Tue, 23 Aug 2016 13:31:21 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0

On 08/22/2016 09:48 AM, Felix Salfelder wrote:
On Mon, Aug 22, 2016 at 09:32:09AM -0500, John Griessen wrote:
> .print tran v(vin) i(C2) v(v2) v(vout) i(R3) i(R2) p(R3) p(R2)
> .tran 0 0.000090 .0000005 >voltagedoubler.dat
>
> How would I print the integral of pd(R2) to my waveform file?
try

.store tran p(R2)
.tran 0 1 .1
.measure x=integral(probe="p(R2)")

I read some docs and tried this below:

* DO NOT MODIFY THIS FILE DIRECTLY, IT IS GENERATED FROM  the .hdr and .sim 
files!

* Contents of voltagedoubler.hdr follow:
.model custom1 D(IS=16.7p RS=4.166 N=3.98 )
*Vcc is defined by a pulse starting at -1500, that rises to +1500, falls 
abruptly, repeats.
Vcc (vin 0) pulse(iv=-1500, pv=1500, period=0.000010, width=0.000005)


* voltagedoubler.net COMES FROM RUNNING gnetlist -g spice on voltagedoubler.sch:
R2 xfmr-ideal xfmr 500
R3 vout 0 30k
R1 xfmr-ideal vin 2
C1 xfmr v2 10nF
C2 vout 0 10nF
D2 0 v2 custom1
D1 v2 vout custom1

* Contents of voltagedoubler.sim follow:
.print tran v(vin) i(C2) v(v2) v(vout) i(R3) i(R2) pd(R3) pd(R2) x
.store tran pd(R2)
.measure x=integral(probe="pd(R2)")
.tran 0 0.000090 .0000005 >voltagedoubler.dat



gnucap -b voltagedoubler.ckt
.
.
main version: master 2016-02-02a
core-lib version: master 2016-02-02a
default plugins: master 2016-02-02a
* DO NOT MODIFY THIS FILE DIRECTLY, IT IS GENERATED FROM  the .hdr and .sim 
files!
.print tran v(v ... R2) pd(R3) pd(R2) x
                                        ^ ? need device or node
no match: pd(R2)

How do you print x if it is not a function of time?  If it is just a single 
number,
it would need a time to start and stop.  I was hoping for a way to get a 
waveform with
the same step sizes as the usual .print tran v(vin) i(C2) v(v2) v(vout) i(R3) 
i(R2) pd(R3) pd(R2)
gives.

John Griessen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]