@@ -353,7 +353,7 @@ int apply_impedance_loading(nec_context_t *ctx, int *ldtyp, int *ldtag, int *ldt
353353
354354 /* ldtyp is validated (0–6) by control.c before storage; this should
355355 * never fire. If it does, it is a programming error, not a user error. */
356- assert (ldtyp [istepx ] <= 6 && "INTERNAL: IMPROPER LOAD TYPE stored in zload.load_types" );
356+ assert (ldtyp [istepx ] <= 7 && "INTERNAL: IMPROPER LOAD TYPE stored in zload.load_types" );
357357
358358 /* search segments for proper itags */
359359 ldtags = ldtag [istepx ];
@@ -454,6 +454,23 @@ int apply_impedance_loading(nec_context_t *ctx, int *ldtyp, int *ldtag, int *ldt
454454 break ;
455455 }
456456
457+ case 8 : {
458+ /* LD type 7: insulated wire coating (Cebik method).
459+ * F1 = dielectric constant (epsilon), F2 = outer radius R (m).
460+ * r = bare wire radius (m) = geometry.radius[i] * wavelength.
461+ * Converts to distributed series inductance (H/m) per the 4nec2 formula:
462+ * L = 2e-7 * (eps*R/r)^(1/12) * (1 - 1/eps) * ln(R/r)
463+ * then applies as a series per-unit-length load (same as LD type 2, case 3). */
464+ double eps = zlr [istepx ]; /* dielectric constant */
465+ double R = zli [istepx ]; /* outer (insulation) radius, metres */
466+ double r = ctx -> geometry .radius [i ] * ctx -> geometry .wavelength ; /* wire radius, metres */
467+ double ratio = R / r ;
468+ double L_pm = 2.0e-7 * pow (eps * ratio , 1.0 /12.0 ) * (1.0 - 1.0 /eps ) * log (ratio );
469+ /* series distributed impedance per half-length: jω·L_pm·(2·half_len) / (2·half_len) = jω·L_pm */
470+ zt = tpcj * ctx -> geometry .half_len [i ] * L_pm / ctx -> geometry .wavelength ;
471+ break ;
472+ }
473+
457474 } /* switch( jump ) */
458475
459476 if (( fabs ( creal ( ctx -> zload .seg_impedance [i ]))+ fabs ( cimag ( ctx -> zload .seg_impedance [i ]))) > 1.0e-20 ) {
@@ -526,6 +543,10 @@ int apply_impedance_loading(nec_context_t *ctx, int *ldtyp, int *ldtag, int *ldt
526543
527544 case 7 :
528545 add_loading_output (ctx , ldtags , ldtagf [istepx ], ldtagt [istepx ], 0.0 , zli [istepx ], zlc [istepx ], "LC-TRAP" );
546+ break ;
547+
548+ case 8 :
549+ add_loading_output (ctx , ldtags , ldtagf [istepx ], ldtagt [istepx ], zlr [istepx ], zli [istepx ], 0.0 , "INSULATED WIRE" );
529550
530551 } /* switch( jump ) */
531552 } /* while( true ) */
0 commit comments