muttemp.c

来自「ngspice又一个电子CAD仿真软件代码.功能更全」· C语言 代码 · 共 47 行

C
47
字号
/**********Copyright 2003 Paolo NenziAuthor: 2003 Paolo Nenzi**********//* */#include "ngspice.h"#include "cktdefs.h"#include "inddefs.h"#include "sperror.h"#include "suffix.h"/*ARGSUSED*/intMUTtemp(GENmodel *inModel, CKTcircuit *ckt){    MUTmodel *model = (MUTmodel*)inModel;    MUTinstance *here;    double ind1, ind2;    /*  loop through all the inductor models */    for( ; model != NULL; model = model->MUTnextModel ) {        /* loop through all the instances of the model */        for (here = model->MUTinstances; here != NULL ;                here=here->MUTnextInstance) {	    if (here->MUTowner != ARCHme) continue;            /* Value Processing for mutual inductors */	   	    ind1 = here->MUTind1->INDinduct;	    ind2 = here->MUTind2->INDinduct;	    	    /*           _______	 * M = k * \/l1 * l2 	 */            here->MUTfactor = here->MUTcoupling * sqrt(ind1 * ind2); 		     	}    }    return(OK);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?