Asl Lundin's correction only when suitable modelparameters are given.

This commit is contained in:
Holger Vogt 2022-06-26 11:39:43 +02:00
parent 360b7dc7ed
commit b4a2c85b54
1 changed files with 4 additions and 1 deletions

View File

@ -71,7 +71,8 @@ INDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
/* Lundin's geometry correction factor */
model->INDspecInd *= Lundin(model->INDlength, model->INDcsect);
if(model->INDlengthGiven && (model->INDdiaGiven || model->INDcsectGiven))
model->INDspecInd *= Lundin(model->INDlength, model->INDcsect);
/*
double kl = Lundin(model->INDlength, model->INDcsect);
@ -145,6 +146,8 @@ static double Lundin(double l, double csec)
/* x = solenoid diam. / length */
double num, den, kk, x, xx, xxxx;
if (csec < 1e-12 || l < 1e-6) {
fprintf(stderr, "Warning: coil geometries too small (< 1um length dimensions),\n");
fprintf(stderr, " Lundin's correction factor will not be calculated\n");