temperature and simulation

Felix Salfelder <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
Hi Al.

there are some issues with temperature which i'm not sure how to fix.
the results i get when running the attached files seem wrong.

there is a temperature dependent resistor
rtemp 2 0 t1 (w=1 l=1)
.model t1 r tnom=0 rsh=1 tc2=0 tc1=1

and a command like
.dc temp=2

as it seems, the temperature within rtemp is computed during
_sim->init(), which is called from s__init.cc _before_ setup().
that said, a workaround might be to call setup first, and also change
DC::setup to set _sim->_temp_c after the options() call.

appearently something different is intended within s_dc.cc, when it
comes to sweeps over temperture ranges or to fixing the set__value
pointer hack.

i doubt it is appropriate to call init() before each invocation of
solve_with_homotopy. but what about (ab?)using precalc_last for
parameter placements like this? better ideas?

thanks for your help
felix

PS: yes i've found that old thread from 2011 about the missing
precalc_first call. that seems fix a different issue.

_______________________________________________
Gnucap-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnucap-devel
dc_temp.gc (text/plain, 197 B)
spice
.options temp=1
rtemp 2 0 t1 (w=1 l=1)
.model t1 r tnom=0 rsh=1 tc2=0 tc1=1

.print dc r(rtemp) temp(0)

.dc temp=2
.dc
.dc temp=3
.dc
.dc dtemp=10

.options temperature=20
.dc dtemp=0

.end
tran_temp.gc (text/plain, 201 B)
spice
.options temp=1
rtemp 2 0 t1 (w=1 l=1)
.model t1 r tnom=0 rsh=1 tc2=0 tc1=1

.print tran r(rtemp) temp(0)

.tran 0 1 1 temp=2
.tran 0 1 1
.tran 0 1 1 temp=3
.tran 0 1 1
.tran 0 1 1 dtemp=10
.end
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.