Add a warning when Lundin's correction factor is not

calculated because the geometries are too small (< 1um).
This commit is contained in:
Holger Vogt 2022-06-22 15:31:17 +02:00
parent 8d2a6c2405
commit 7d2ea36fdf
1 changed files with 4 additions and 1 deletions

View File

@ -145,8 +145,11 @@ 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)
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");
return 1;
}
x = sqrt(csec / PI) * 2. / l;