Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

equivalent to Hspice syntax .print tran power=par(`p(r1)`)

31 views
Skip to first unread message

zhengqi gao

unread,
Sep 10, 2024, 3:06:33 PM9/10/24
to xyce-users
Hi, 

I wonder in Xyce if there is any syntax that can print instantaneous power of a component, i.e.,  a syntax similar to .print tran power=par(`p(r1)`) of Hspice. 

Thanks,
Zhengqi

xyce-users

unread,
Sep 10, 2024, 3:16:50 PM9/10/24
to xyce-users
Yes, you can have Xyce output component power.   See the regression tests found in Xyce_Regression/Netlists/POWER for examples.

Here is one example, for a BJT.    The .PRINT line include "p(q1)".

thanks,
Eric


power test for BJT Level 1
*
*
vie1 0 1 0
vic1 0 3 5
vib1 2 0 pulse(0 1 1ns 1ns 1ns 1us 5us)
q1 3 2 1 qjunk1

.model qjunk1 npn
+bf=130 br=1 is=3e-14
+tf=1e-8 vjs=0.68 ne=1.6 nc=2.0 rb=450
+cje=1uf cjc=1uf cjs=1uf ikf=0.002 ikr=0.002 vaf=50 var=50
+nf=1.0 ise=0 nr=1 isc=0 irb=0 rbm=450 re=0 rc=0 vje=0.75
+mje=0.33 xtf=0 vtf=100 itf=0 ptf=0 vjc=0.75 mjs=0 xtb=0
+eg=1.11 xti=3 kf=0 af=1 fc=0.5 tnom=27

.options timeint method=gear
.options nonlin-tran rhstol=1.0e-8
.tran 1ns 15us

.PRINT TRAN  v(3) v(2) v(1) i(vic1) i(vib1)
+ {abs(i(vic1)*(v(3)-v(1)))+abs(i(vib1)*(v(2)-v(1)))} p(q1) w(q1)
+ {-1.0*(P(vic1)+P(vib1))}

.END

Tom Russo

unread,
Sep 10, 2024, 3:18:49 PM9/10/24
to zhengqi gao, xyce-users
As Eric posted as I was writing this, in Xyce, the power dissipation of a component is printed as "P(devicename)" or "W(devicename)" on the print line.  Only a subset of device types support the power accessor, and they aren't legal in AC analysis.   The table 2-36 on pages 177-180 of the Xyce Reference Guide  (available on https://xyce.sandia.gov/documentation-tutorials/) shows which devices support printing of power.

I am not sure if there is any difference between 'P(devicename)' and 'W(devicename)'.   I searched the documentation and see no statement  that there's a difference, so it appears that they are synonyms provided for cross-simulator netlist compatibility.

--
You received this message because you are subscribed to the Google Groups "xyce-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xyce-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xyce-users/b052d18e-f53a-418b-a3f9-fd9037233c04n%40googlegroups.com.


--
Tom Russo    KM5VY 
Tijeras, NM 

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

Reply all
Reply to author
Forward
0 new messages