correct the temperature replacement in ps

TEMPER is in degrees °C
This commit is contained in:
Holger Vogt 2019-04-13 12:41:15 +02:00
parent 5b28b4a8a8
commit 263ea850ad
1 changed files with 4 additions and 4 deletions

View File

@ -7178,9 +7178,9 @@ pspice_compat(struct card *oldcard)
replace_table(oldcard);
/* add predefined params TEMP, VT, GMIN to beginning of deck */
char *new_str = copy(".param temp = 'temper - 273.15'");
char *new_str = copy(".param temp = 'temper'");
newcard = insert_new_line(NULL, new_str, 1, 0);
new_str = copy(".param vt = 'temper * 8.6173303e-5'"); /*VT=kT/q, T * 1.380 648 52e-23/ 1.602 176 6208e-19*/
new_str = copy(".param vt = '(temper + 273.15) * 8.6173303e-5'");
nextcard = insert_new_line(newcard, new_str, 2, 0);
new_str = copy(".param gmin = 1e-12");
nextcard = insert_new_line(nextcard, new_str, 3, 0);
@ -7205,9 +7205,9 @@ pspice_compat(struct card *oldcard)
for (card = newcard; card; card = card->nextcard) {
char *cut_line = card->line;
if (ciprefix(".subckt", cut_line)) {
new_str = copy(".param temp = 'temper - 273.15'");
new_str = copy(".param temp = 'temper'");
nextcard = insert_new_line(card, new_str, 0, 0);
new_str = copy(".param vt = 'temper * 8.6173303e-5'");
new_str = copy(".param vt = '(temper + 273.15) * 8.6173303e-5'");
nextcard = insert_new_line(nextcard, new_str, 1, 0);
}
}