⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onefreez.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
字号:
/**********Copyright 1992 Regents of the University of California.  All rights reserved.Author:	1987 Kartikeya Mayaram, U. C. Berkeley CAD Group**********/#include "ngspice.h"#include "numglobs.h"#include "numconst.h"#include "onemesh.h"#include "../../maths/misc/accuracy.h"#include "onedext.h"#include "oneddefs.h"voidONEQfreezeOut(ONEnode *pNode, double *ndFac, double *naFac, double *dNdFac,              double *dNaFac){  double temp1, temp2;  double eLev;  ONEmaterial *info;  if (pNode->pRightElem && pNode->pRightElem->evalNodes[0]) {    info = pNode->pRightElem->matlInfo;  } else {    info = pNode->pLeftElem->matlInfo;  }  eLev = info->eDon;  if (info->material != GAAS) {    eLev -= LEVEL_ALPHA_SI * pow(pNode->nd * NNorm, 1.0 / 3.0);    if (eLev < 0.0)      eLev = 0.0;  }  if (eLev >= ExpLim) {    *ndFac = 0.0;    *dNdFac = 0.0;  } else if (eLev <= -ExpLim) {    *ndFac = 1.0;    *dNdFac = 0.0;  } else {    temp1 = info->gDon * pNode->nConc * NNorm * exp(eLev) / info->nc0;    temp2 = 1.0 / (1.0 + temp1);    *ndFac = temp2;    *dNdFac = -temp2 * temp2 * temp1;  }  eLev = info->eAcc;  if (info->material != GAAS) {    eLev -= LEVEL_ALPHA_SI * pow(pNode->na * NNorm, 1.0 / 3.0);    if (eLev < 0.0)      eLev = 0.0;  }  if (eLev >= ExpLim) {    *naFac = 0.0;    *dNaFac = 0.0;  } else if (eLev <= -ExpLim) {    *naFac = 1.0;    *dNaFac = 0.0;  } else {    temp1 = info->gAcc * pNode->pConc * NNorm * exp(eLev) / info->nv0;    temp2 = 1.0 / (1.0 + temp1);    *naFac = temp2;    *dNaFac = temp2 * temp2 * temp1;  }}voidONE_freezeOut(ONEnode *pNode, double nConc, double pConc, double *ndFac,               double *naFac, double *dNdFac, double *dNaFac){  double temp1, temp2;  double eLev;  ONEmaterial *info;  if (pNode->pRightElem && pNode->pRightElem->evalNodes[0]) {    info = pNode->pRightElem->matlInfo;  } else {    info = pNode->pLeftElem->matlInfo;  }  eLev = info->eDon;  if (info->material != GAAS) {    eLev -= LEVEL_ALPHA_SI * pow(pNode->nd * NNorm, 1.0 / 3.0);    if (eLev < 0.0)      eLev = 0.0;  }  if (eLev >= ExpLim) {    *ndFac = 0.0;    *dNdFac = 0.0;  } else if (eLev <= -ExpLim) {    *ndFac = 1.0;    *dNdFac = 0.0;  } else {    temp1 = info->gDon * exp(eLev) * NNorm / info->nc0;    temp2 = 1.0 / (1.0 + nConc * temp1);    *ndFac = temp2;    *dNdFac = -temp2 * temp2 * temp1;  }  eLev = info->eAcc;  if (info->material != GAAS) {    eLev -= LEVEL_ALPHA_SI * pow(pNode->na * NNorm, 1.0 / 3.0);    if (eLev < 0.0)      eLev = 0.0;  }  if (eLev >= ExpLim) {    *naFac = 0.0;    *dNaFac = 0.0;  } else if (eLev <= -ExpLim) {    *naFac = 1.0;    *dNaFac = 0.0;  } else {    temp1 = info->gAcc * exp(eLev) * NNorm / info->nv0;    temp2 = 1.0 / (1.0 + pConc * temp1);    *naFac = temp2;    *dNaFac = -temp2 * temp2 * temp1;  }}

⌨️ 快捷键说明

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