Sei sulla pagina 1di 443

NUfiERICAL ELECTROMAGNETICS CODE (NEC) METHOD OF MOMENTS PART 11: PROGRAM DESCRIPTION

CODE

6 . J. Burke A. J. P o g g i o

Januarv 1981

opinions and eondusions stated are those of the author and may or may not he those or the I.ahnrutory.

Work perfurmd under thc surpirrs of the I1.S. 1)epnrtment sf b:ncrgy by the 1.arrencr 1.ivermerc 1.shoratory under ( o n t r a d W-7405-I~:ng-48.

DISCLAIMER (From the original NEC document)


This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any informatiom, apparatus, product, or process disclosed, or represents that its use would not infrige privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the Unived States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes.

===================================================================== The NEC2 documentation is composed of three sections Part I: Program Description - Theory Part II: Program Listing Part III: User's guide And may be obtained from the National Technical Information Service (U.S. Department of Commerce) 5285 Port Royal Road Springfield, VA 22161 Fax: +1 (703) 321 8547 Tel: +1 (703) 487 4679
http://www.ntis.gov

Ordering codes: AD-A075 209, AD-A075 289 and AD-A075 460 (not sure which is which) ===================================================================== April 1998 This document (Part II) was scanned at a resolution of 196x204DPI and placed into a CCITT/G4 encoded PDF. Only minor cosmetic changes were made. The original page US Letter page size was preserved, use the Acrobat "shrink to fit" print menu option for output to the DIN A4 format. Also remember to select double sided printing, if your can - there are 441 pages! I make no representation whasoever as to the usefulness or exactitude of this file. (Imagine here whatever lawyerese you think is appropriate.) Please let me know your impressions on this file. Have fun! Alexandre Kampouris, Montral E-Mail: ak@Radio-BIP.qc.ca

T h e N u m e r i c a l . E l c c t r o m n g n e t i c s Code (NEC) h a s b e e n d e v e l o p e d a t t h e L a w r e n c e ~ i v e r m o r eL a b o r a t o r y , L i v e r m o r e , C a l i f o r n i a , u n d e r t h e s p o n s o r s h i p o f C~ en s t e r a n d t l ~ eA i r F o r c e Weapons L a b o r a t o r y . t h e Naval Ocean S y s t e ~ ~

It is an

a d v a n c e d v e r s i o n o f t h e A n t e n n a t i o d e l i n g P r o g r a m (AMP) d e v e l o p e d i n t h e e a r l y 1 9 7 0 ' s by

associates f o r t h e N a v a l R e s e a r c h L a b o r a t o r y , N a v a l S h i p
Army ECOM/Communications S y s t e m s , U.S. Army S t r a t e g i c

E n g i n e e r i n g C e n t e r , U.S.

C o m m u n i c a t i o n s Command, a n d Rome A i r D e v e l o p m e n t C e n t e r u n d e r O f f i c e o f N a v a l R e s e a r c h C o n t r a c t N00014-71-C-0187. T h e p r e s e n t v e r s i o n o f NEC i s t h e r e s u l t

o f e f f o r t s by G. J . B u r k e a n d A . J . P o g g i o o f L a w r e n c e L i v e r m o r e L a b o r a t o r y . T h e d o c u m e n t a t o n f o r NEC c o n s i s t s o f t h r e e p a r t s : P a r t I: P a r t 11: P a r t 11:: dEC P r o g r a m D e s c r i l ~ t i o n- r i l e o r y NiiC P r o g r a m D e s c r i p t i o n - Code


NEC U s e r ' s Guide

T h e d o c u m e n t a t i o n h a s b e e n p r e p a r e d by u s i n g t h e AMP d o c u m e n t s a s f o u n d a t i o n s a n d by m o d i f y i n g t h o s e a s n e e d e d . I n some c a s e s t h i s l e d t o m i n o r

c h a n g e s i n t h e o r i g i n a l d o c u m e n t s w h i l e i n many c a s e s m a j o r m o d i f i c a t i o n s w e r e required. O v e r t h e y e a r s Inany i n d i v i d u a l s h a v e b e e n c o n t r i b u t o r s t o AMP a n d NEC a n d a r e a c k n o w l e d g e d h e r e as f o l l o w s :

K. W . Adams
J. N .
G.
F. Brittingham

K.

J. L y t l e

E. K .

Miller
Pjerrou

J. S u r k e
J. D e a d r i c k

J . B. M o r t o n
G.

M.

K. K.
U.

Hazard

A.

J. P o g g i o

L. Knepp L. L a g e r

E. S . S e l d e n

D.

T h e s u p p o r t f o r t h e d e v e l o p ~ n e n to f NEC-? a t t h e L a w r e n c e L i v e r m o r e L a b o r a t o r y h a s b e e n p r o v i d e d by t h e N a v a l O c e a n S y s t e m s C e n t e r u n d e r XIPR-N0095376MP. C o g n i z a n t i n d i v i d u a l s u n d e r whom t h i s p r o j e c t was c a r r i e d o u t i n c l u d e :


J. Kockway a n d J .

Logan.

P r e v i o u s d e v e l o p m e n t o f NEC a l s o i n c l u d e d t h e a n d was

s u p p o r t o i t i l e A i r F o r c e Weapons L a b o r a t o r y ( p r o j e c t O r d e r 7 6 - 0 9 0 ) m o n i t o r e d by J . C a s t i l l o a n d T S g t . ti. Goodwin. Work was p e r f o r m e d u n d e r the! a u s p i c e s o f t h e U.S. u n d e r c o n l r a c t No. W-7405-Eng-48.

D e p a r t m e n t of E n e r g y

R e f e r e n c e t o a company o r p r o d u c t name

d o e s n o t imply a p p r o v a l o r recommendation o f t h e p r o d u c t by t h e U n i v e r s i t y o f California or the U . S . may b e s u i t a b l e . Department o f Energy t o t h e e x c l u s i o n o f o t h i r s t h a t

Contents
Sect ion

I1

..................... Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . CODE D E S C R I P T I O N . . . . . . . . . . . . . . . . . . . . . . . . MAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ARC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


L i s t o f Illustrations ATGN2 BLCKOT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . a

vii

viii

............................. CABC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CANG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CMNGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


CMSET CMSS CMSW CMWS CMWW

.............................. .............................. .............................. .............................. ............................. .............................. ..............................


............................. .............................

.............................

CONECT COUPLE DATAGN DBlO EFLD EKSC EKSCX

..............................

............................. ENF . . . . . . . . . . . . . . . . . . . . . . . . . . . . ETMNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


FACGF FACIO FACTR FACTUS

............................. ............................. ............................. .............................

S e c t iori

.............................. HFK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HINTG . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


GXX

............................. FFLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FFLDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GFIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GFLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GFOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gtl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GWAVE ............................. GX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


FUNGF

139 142 151 153 155 159 169 172 174 183 184 186 189 194 198 202 209
216

HSFLD HSFLX INTRP INTX

.............................. ISEGNO ............................ LFACTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


LOAD

............................. ............................. .............................

217 222 227 231 234 239 244 258 261

.............................. LTSOLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LUNSCR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


MOVE
NETWK

..............................

NEFLD

NFPAT
NHFLII

PATCH PCINT
PKNT
QDSKC
. .

............................. ............................. ............................. ............................. .............................


. . . . . . . . . . . . . . . . . . . . . . . . . . a .

.............................

265
271 278 282

.............................

S e c t ion

RDPAT REBLK REFLC ROMZ SBF

.............................
............................. .............................. ..............................

.............................

SECOND SFLDS SOLGF SOLVE

.............................. TRIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UNERE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WIRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ZINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111. COMMON BLOCKS . . . . . . . . . . . . . . . . . . . . . . . . . IV. SYSTEM LIHRARY FUNCTIONS USED BY NEC . . . . . . . . . . . . . . V. ARRAY DIMENSION L I M I T A T I O N S . . . . . . . . . . . . . . . . . . VI . OVEKVIEW OF NUMERICAL GREEN'S FUNCTION OPERATION . . . . . . . . VII. OVERVIEW OF MATRIX OPERATIONS USING F I L E STORAGE . . . . . . . . V I I I . NEC SUBROUTINE LINKAGE . . . . . . . . . . . . . . . . . . . . .
TEST

............................. SOLVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TBF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

............................. ............................. .............................

IX

SOMNEC

.............................

SOMNEC C o d e D e s c r i p ~ i o n SOMNEC BESSEL EVLUA GS}lANK HANKEL LAMHDA

.................. ........................... ...........................


........................... ...........................
...........................

...........................

Sect ion

............................ SAOA . . . . . . . . . . . . . . . . . . . . . . . . SECOND . . . . . . . . . . . . . . . . . . . . . . . . . . . TEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 . Common B l o c k s i n SOMNEC . . . . . . . . . . . . . . . . . . 3 . Array D i m e n s i o n L i m i t a t i o n s . . . . . . . . . . . . . . . 4 . SOMNEC S u b r o u t i n e Linkage . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROMl

420 423 427 427 428 430 431 433

List o f Illustrations

........... Flow Diagram o f Main Program Computation S e c t i o n . . . . . . . . S t r u c t u r e f o r I l l u s t r a t i n g Segment C o n n e c t i o n Data . . . . . . .


Flow Diagram o f Main Program I n p u t S e c t i o n C o o r d i n a t e P a r a m e t e r s f o r t h e I n c i d e n t P l a n e Wave C o o r d i n a t e P a r a m e t e r s f o r C u r r e n t Element

4 5 72 108 110

........ ............

C o o r d i n a t e Systems Used t o E v a l u a t e N o r t o n ' s E x p r e s s i o n s f o r t h e Ground Wave F i e l d s i n t h e NEC Program Coordinates f o r Evaluating H Field of a Options f o r Transmission L i n e Connection

............ S o r t i n g P r o c e d u r e f o r Segments Having Network C o n n e c t i o n . . . . P a t c h e s a t a Wire C o n n e c t i o n P o i n t . . . . . . . . . . . . . . . C o o r d i n a t e s o f Segment i . . . . . . . . . . . . . . . . . . . . M a t r i x S t r u c t u r e Eor t h e NGF S o l u t i o n . . . . . . . . . . . . . . 2 . . . . . . . . . . . . . . . . . . . NCF F i l e Usage f o r ICASX NGF F i l e Usage f o r ICASX = 3 o r 4 . . . . . . . . . . . . . . . . 15 NEC S u b r o u t i n e ~ i n k a ~ Ch eart . . . . . . . . . . . . . . . . . . 16 Block D e f i n i t i o n s f o r NEC S u b r o u t i n e L i n k a g e C h a r t . . . . . . . 17 SOMNEC S u b r o u t i n e Linkage C h a r t . . . . . . . . . . . . . . . . .
=

.......... Segment . . . . . . . . .

160 199 247 248 272 356 379 383 384 386 388 432

Abstract
The N u m e r i c a l E l e c t r o m a ~ n e t i c sC o d e (NEC-2) is a computer c o d e f o r

a n a l y z i n g t h e e l e c t r o m a g n e t i c response of a n a r b i t r a r y s t r u c t u r e c o n s i s t i n g of w i r e s and s u r f a c e s i n f r e e s p a c e o r o v e r a ground plane. The a n a l y s i s i s

a c c o m p l i s h e d by t h e n u m e r i c a l s o l u t i o n o f i n t e g r a l e q u a t i o n s f o r i n d u c e d currents. The e x c i t a t i o n may b e a n i n c i d e n t p l a n e wave o r a v o l t a g e s o u r c e o n

a w i r e , w h i l e t h e o u t p u t may i n c l u d e c u r r e n t a n d c h a r g e d e n s i t y , e l e c t r i c o r magnetic f i e l d i n t h e v i c i n i t y o f t h e structure, and r a d i a t e d f i e l d s . Hence,

t h e c o d e may b e u s e d f o r a n t e n n a a n a l y s i s o r s c a t t e r i n g a n d EMP s t u d i e s . T h i s d o c u m e n t i s P a r t I1 o f a t h r e e - p a r t report.

It c o n t a i n s a d e t a i l e d

d e s c r i p t i o n o f t h e F o r t r a n c o d i n g , i n c l u d i n g t h e d e f i n i t i o n s o f v a r i a b l e s and c o n s t a n t s , and a l i s t i n g o f t h e code. The o t h e r t w o d o c u m e n t s c o v e r t h e

e q u a t i o n s and numerical methods ( P a r t I ) and i n s t r u c t i o n s f o r u s e o f t h e code (Part 111).

KEY WORDS FOR D D FORM 1 4 7 3 : E M scattering EMP W i r e Model Method o f moments

viii

Section I Introduction
The N u m e r i c a l E l e c t r o r n a g n e t i c s Code (NEC-2)* is a user-oriented comouter

c o d e f o r t h e a n a l y s i s of t h e e l e c t r o m a g n e t i c r e s p o n s e o f a n t e n n a s and o t h e r metal s t r u c t u r e s .
I t is b u i l t a r o u n d t h e n u m e r i c a l s o l u t i o n o f i n t e g r a l

e q u a t i o n s f o r t h e c u r r e n t s i n d u c e d on t h e s t r u c t u r e by s o u r c e s o r i n c i d e n t fields. T h i s a p p r o a c h a v o i d s many o f t h e s i m p l i f y i n g a s s u m p t i o n s r e q u i r e d by

o t h e r s o l u t i o n m e t h o d s a n d p r o v i d e s a h i g h l y a c c u r a t e and v e r s a t i l e t o o l f o r electromagnetic analysis. The c o d e c o m b i n e s a n i n t e g r a l e q u a t i o n f o r smooth s u r f a c e s w i t h o n e s p e c i a l i z e d t o w i r e s t o p r o v i d e f o r c o n v e n i e n t and a c c u r a t e m o d e l i n g o f a w i d e r a n g e oE s t r u c t u r e s .


A model may i n c l u d e n o n r a d i a t i n g n e t w o r k s a n d t r a n s m i s -

s i o n l i n e s connecting p a r t s of t h e s t r u c t u r e , p e r f e c t o r i m p e r f e c t conductors, and lumped-element loading.


A s t r u c t u r e may a l s o b e modeled o v e r a g r o u n d

p l a n e t h a t may b e e i t h e r n p e r f e c t o r i m p e r f e c t c o n d u c t o r . The e x c i t a t i o n may b e e i t h e r v o l t a g e s o u r c e s on t h e s t r u c t u r e o r a n i n c i d e n t p l a n e wave o f l i n e a r o r e l l i p t i c p o l a r i z a t i o n . The o u t p u t may i n c l u d e

i n d u c e d c u r r e n t s and c h a r g e s , n e a r e l e c t r i c o r m a g n e t i c f i e l d s , and r a d i a t e d fields. Hence, t h e program i s s u i t e d t o e i t h e r a n t e n n a a n a l y s i s o r s c a t t e r i n g +

and E M P studies. T h i s document i s V o l .

I1 of a t h r e e - p a r t

r e p o r t on NEC.

It contains

a d e t a i l e d d e s c r i p t i o n of t h e F o r t r a n coding. routine: ( 1 ) a s t a t e m e n t of purpose,

S e c t i o n I1 c o n t a i n s f o r e a c h

(2) a n a r r a t i v e d e s c r i p t i o n of t h e

methodology, t h e code.

( 3 ) d e f i n i t i o n s of v a r i a b l e s and c o n s t a n t s , a n d ( 4 ) a l i s t i n g of

The r e m a i n i n g s e c t i o n s c o v e r t h e common b l o c k s , s y s t e m l i b r a r y

f u n c t i o n s , a r r a y d i m e n s i o n l i m i t a t i o n s , and s u b r o u t i n e l i n k a g e . The i n f o r m a t i o n i n Vol.


I1 w i l l b e 6 f u s e m a i n l y t o p e r s o n s a t t e m p t i n g t o

modify t h e c o d e o r t o u s e i t on a computer s y s t e m w i t h which t h e d e l i v e r e d d e c k is n o t c o m p a t i b l e . V o l . 1 d e s c r i b e s t h e e q u a t i o n s and n u m e r i c a l methods u s e d i n NEC a n d V o l . I11 c o n t a i n s i n s t r u c t i o n s f o r u s i n g t h e c o d e , i n c l u d i n g p r e p a r a t i o n o f i n p u t d a t a and i n t e r p r e t a t i o n of o u t p u t . P e r s o n s a t t e m p t i n g t o u s e NEC f o r

t h e f i r s t time s h o u l d s t a r t by r e a d i n g V O ~ . 1x1.

V 0 l . I w i l l h e l p t h e new

u s e r t o u n d e r s t a n d t h e c a p a b i l i t i e s and l i m i t a t i o n s o f NEC.
"NEC-2

w i l l b e a b b r e v i a t e d t o NEC e l s e w h e r e i n t h i s volume.

Section I1 Code Description


I n t h i s s e c t i o n , e a c h r o u t i n e i n NEC

is d e s c r i b e d i n d e t a i l .

The main

program i s d e s c r i b e d f i r s t a n d i s f o l l o w e d b y t h e s u b r o u t i n e s i n a l p h a b e t i c a l order. For e a c h r o u t i n e , t h e r e i s a b r i e f s t a t e m e n t o f i t s p u r p o s e , a

d e s c r i p t i o n o f t h e c o d e , a n a l p h a b e t i z e d l i s t i n g and d e f i n i t i o n o f i m p o r t a n t v a r i a b l e s and c o n s t a n t s , and a l i s t i n g o f t h e code. Variables t h a t a r e


jn

common b l o c k s , and h e n c e o c c u r i n s e v e r a l r o u t i n e s , a r e u s u a l l y o m i t t e d f r o m the lists f o r individual routines. common b l o c k l a b e l s . F o l l o w i n g l i n e MA 495 i n t h e main program, a l l q u a n t i t i e s o f l e n g t h h a v e been n o r m a l i z e d t o w a v e l e n g t h . the solution. Current is normalized t o wavelength throughout In They are d e f i n e d i n S e c t i o n 111 u n d e r t h e i r

T h i s c h a n g e s t h e a p p e a r a n c e of many of t h e e q u a t i o n s . u s u a l l y a p p e a r s as 2Tr.

p a r t i c u l a r t h e wave number, k = 2IT/X,

MAIN

PURPOSE

,yo h a n d l e i n p u t and o u t p u t and t o c a l l t h e a p p r o p r i a t e s u o r o u t i n e s .

METHOD The s t r u c t u r e o f M A I N i s shown i n t h e f l o w c h a r t s o f F i g u r e s 1 and 2 where F i g u r e 1 r e p r e s e n t s t h e f i r s t h a l f of t h e c o d e t o a b o u t l i n e M A 459. Comment c a r d s a r e r e a d and p r i n t e d a f t e r l i n e MA 72 and s u b r o u t i n e DATAGN i s c a l l e d a t MA 90 t o r e a d and p r o c e s s s t r u c t u r e d a t a . I f a Numerical G r e e n ' s

F u n c t i o n (NGF) f i l e was r e a d i n DATAGN t h e n s u b r o u t i n e FBNFG i s c a l l e d t o d e t e r m i n e w h e t h e r f i l e s t o r a g e i s needed f o r t h e m a t r i x and t o a l l o c a t e c o r e storage. When a NGF h a s n o t b e e n r e a d t h e mode o f m a t r i x s t o r a g e c a n n o t b e

d e t e r m i n e d u n t i l l i n e MA 464 s i n c e i t d e p e n d s o n w h e t h e r a NFG f i l e i s t o b e written. T h e box l a b e l e d "Read d a t a c a r d " i n F i g u r e 1 r e f e r s t o t h e READ s t a t e m e n t a t MA 139. Any o f t h e t y p e s of d a t a c a r d s i n T a b l e I may b e r e a d a t

t h i s p o i n t t o s e t parameters o r t o request e x e c u t i o n of t h e s o l u t i o n p a r t o f t h e code. The i n t e g e r v a r i a b l e s I G 0 and IFLOW a r e k e y s t o t h e o p e r a t i o n o f t h e code.

LG0 i n d i c a t e s t h e s t a g e o f c o m p l e t i o n o f t h e s o l u t i o n a s l i s t e d i n
When a c a r d r e q u e s t i n g e x e c u t i o n i s r e a d (NE, N H , RP, WG, o r xQ) t h e

T a b l e 2.

s o l u t i o n p a r t o f t n e c o d e ( F i g u r e 2 ) i s e n t e r e d a t t h e p o i n t d e t e r m i n e d by

I G 0 ( s e e MA 385, IYA 4 2 0 , MA 4 2 9 , and HA 4 5 7 ) .


computed IGlb i s g i v e n t h e v a l u e f i v e .

A f t e r t h e c u r r e n t h a s been

I f subsequent d a t a c a r d s change

p a r a m e t e r s , t h e v a l u e of I G 0 i s reduced t o t h e v a l u e i n T a b l e 1 t o i n d i c a t e t h e p o i n t beyond which t h e s o l u t i o n must be r e p e a t e d . F o r e x a m p l e , when a n E X

c a r d i s r e a d I G @ i s s e t e q u a l t o t h r e e i f i t was g r e a t e r t h a n t h r e e b u t i s n o r c h a n g e d i f i t was l e s s t h a n t h r e e . i s shown i n T a b l e 1. IFLOW i s u s e d t o i n d i c a t e t h e t y p e o f t h e p r e v i o u s d a t a c a r d . When For c a r d s t h a t r e q u e s t e x e c u t i o n "ex."

s e v e r a l c a r d s o f t h e same t y p e c a n b e u s e d t o g e t h e r (CP, LD, NT, TL, and E X f o r v o l t a g e s o u r c e s ) a c o u n t e r i s i n c r e m e n t e d and d a t a i s a d d e d t o a r r a y s i f t h e c a r d i s t h e same a s t h e p r e v i o u s c a r d a s i n d i c a t e d by IFLOW. If the p r e v i o u s c a r d was d i f f e r e n t t h e c o u n t e r i s i n i t i a l i z e d a n d p r e v i o u s d a t a i n the a r r a y s i s destroyed. IFLOW i s a l s o u s e d t o i n d i c a t e what t y p e o f c a r d

MAIN

S t a r t o f new c a s e Read and p r i n t comments Numerical Green's Function d a t a

C a l l DATAGN t o r e a d structure data

I
I

Allocate matrix storage when NGF i s u s e d

f
Read d a t a c a r d

yes

STOP

Branch t o s e c t i o n f o r p a r t i c u l a r card. Store parameters, adjust I G 0

Calculation

Go t o B Figure 2

F i g u r e 1.

Flow Diagram o f Main Program I n p u t S e c t i o n

-4-

MAIN

Allocate matrix s t o r a g e w h e n NGF is not used

' =
Compute interaction m a t r i x a n d decompose into LU o r perform NGF manipulations Set excitation array S o l v e for current
1

r
Compute near field, radiated field i f requested

G o to A Figure 1

F i g u r e 2.

F l o w Diagram o f M a i n Program Computation Section

Line -

ex. 3 ex. ex.

10

6
12

7 o r 11

N E and NLI d o n o t c a u s e e x e c u t i o n when m u l t i p l e f r e q u e n c i e s h a v e b e e n r e q u e s t e d o n t h e FK c a r d . T h i s a l l o w s c o m p u t a t i o n o f botll n e a r f i e l d s and radiated f i e l d s i n a frequency loop.

MAIN

Tahla 2

IGO
Start

Completion Point

Frequency has been set and geometry scaled to wavelength Interaction matrix filled and factored Current computed and printed

MAIN r e q u e s t e d t h e s o l u t i o n (NE, R P , e t c . ). C a r d s s u c h a s KP may b e s t a c k e d

t o g e t h e r b u t a r e n o t s t o r e d s i n c e t h e y a r e a c t e d upon a s t h e y a r e e n c o u n t e r e d . The s o l u t i o n p a r t o f t h e c o d e c o n t a i n s a l o o p o v e r f r e q u e n c y s t a r t i n g a t
MA 4 6 3 a n d a l o o p o v e r i n c i d e n t f i e l d d i r e c t i o n s t a r t i n g a t MA 5 6 2 .

FBLOCK. i s

called a t M A 465 t o determine whether f i l e s t o r a g e i s required f o r t n e matrix. From M A 466 t o M A 493 t h e s t r u c t u r e d a t a a r e s c a l e d from u n i t s o f

m e t e r s t o W a v e l e n g t h o r f r o m o n e w a v e l e n g t h t o t h e n e x t wnen f r e q u e n c y i s changed. S u b r o u t i n e LOAD i s c a l l e d a t M A 4 9 7 t o f i l l a r r a y ZARRAY F o r t h e At M A 5 2 0 t h e S o m m e r f e l d i n t e r p o l a t i o n t a b l e s ace r e a d f r o m NXA(1) i s s e t t o z e r o a t MA 6 7 s o t h e

g i v e n frequency.

f i l e TAPE21 i f t h i s o p t i o n i s u s e d .

test e n s u r e s t h a t t h e t a p e is r e a d o n l y once.

When t h e NGF o p t i o n i s n o t i n u s e t h e m a t r i x i s f i l l e d by s u b r o u t i n e CMSE'L' a t M A 5 3 7 a n d f a c t o r e d by s u b r o u t i n e FACTRS a t MA 540. u s e d t h e e q u i v a l e n t s t e p s a r e p e r f o r m e d by CMNGF a n d FACGF. When t h e NGF i s I f a NGF f i l e i s

t o b e w r i t t e n , s u b r o u t i n e GFOUT i s c a l l e d a t M A 5 5 7 t o w r i t e TAPEZO. S u b r o u t i n e ETMNS, c a l l e d a t MA 5 8 2 , f i l l s t h e e x c i t a t i o n a r r a y a n d t h e c u r r e n t i s c o m p u t e d i n s u b r o u t i n e NE'WK c a l l e d a t MA 611. I f transmission

l i n e s o r t w o p o r t n e t w o r k s a r e u s e d NETWK c o m b i n e s t h e n e t w o r k e q u a t i o n s w i t h driving-point matrix. i n t e r a c t i o n e q u a t i o n s d e r i v e d from t h e p r i m a r y i n t e r a c t i o n

O t h e r w i s e t h e c u r r e n t i s computed d i r e c t l y from t h e p r i m a r y m a t r i x .

T h e r e m a i n d e r o f MAIN p r i n t s t h e c u r r e n t s a n d c a l l s s u b r o u t i n e s f o r n e a r f i e l d s , radiated f i e l d s o r coupling.

SYMBOL DIC'CIONAKY; AIN A'L'ST CWG C O M CUKI


= mnemonic

from d a t a c a r d

= a r r a y o f p o s s i b l e d a t a c a r d mnemonics = magnitude o f t h e c u r r e n t i n amperes = array t o store text = c u r r e n t o n segment = (velocity of

f r o m comment c a r d s

L i n amperes
i n meters/second

C VEL
DELFLlQ
D PH

Light)

= frequency increment ( a d d i t i v e o r m u l t i p l i c a t i v e )
= far-Field
iq

angle increment i n degrees ( i n p u t

quantity) DTH
= far-field

0 angle increment i n degrees ( i n p u t

quantity)

MAIN
=

near-field observation point increments (input quantities with multiple meanings

--

see NE card)

UZNK EPH EPHA E PHM EPSC


=

current component in direction t

on patch

= phase angle of EPH = magnitude of EPH


=

complex dielectric constant of ground ~O/WE~ ).

= E

EPSCF EPSK EPSKZ ETH ETHA E'PHM EX EXTIM EY E7 . FJ FMHL FlYHZS FNOKM

= E

- Er
= E ,

read from file TAPE21

for outer ground region

= current component in direction tl on patch


= = =

phase angle of ETH magnitude of ETH

x component oE current on a patch


;component
of current on a patch

= time at start of run (seconds) = y component of current on a patch =

= , C f
=

frequency in MHz

= frequency in MHz
=

multiply used array; stores impedances Eor printing ot the normalized impedance or stores currents in the receiving pattern case for printing normalized receiving pattern

FK
FK2 GNOK

= = =

(next frequency)/(present

frequency)

(FR)(FK)
if non-zero, equals gain normalization Eactor (dB) from RP card

HPOL

= = = =

array containing polarization types (Hollerith) input integer flag used in average gain logic (RP card) ~ h p u t integer flag specifying gain type (RP card) location in array CM for start of storage of submatrix
B when NGF is used

IAVP IAx
Id11

location in array CM for start of storage of submatrix


C
when

NCF is used

MAIN ID11
1EXK

l o c a t i o n i n CM f o r s u b m a t r i x D f l a g t o select t h e extended t h i n - w i r e kernel

IFAR

input i n t e g e r f l a g specifying type o f f i e l d c a l c u l a t i o n and t y p e o f ground s y s t e m i n Far f i e l d (RP c a r d ) i n t e g e r Elag used t o d i s t i n g u i s h v a r i o u s input sections

I FKQ

input i n t e g e r f l a g specifying type of frequency s t e p p i n g (FK c a r d ) i n t e g e r t o i n d i c a t e s t a g e o f c o m p l e t i o n oE t h e solution

INC
IN O H

incident f i e l d loop index i n p u t i n t e g e r f l a g used f o r normalized g a i n r e q u e s t (UP c a r d ) i n p u t i n t e g e r Elag s e l e c t s g a i n t y p e f o r r ~ o r ~ n a l i z a t i o(n RP c a r d )

I PED

i n p u t i n t e g e r f l a g used f o r impedance n o r m a l i z a t i o n request (EX card)

I PTAG

i n p u t i n t e g e r f o r p r i n t c o n t r o l e q u a l t o segment t a g n u m b e r ( PT c a r d )

I PTAGF

i n p u t i n t e g e r f o r p r i n t c o n t r o l s p e c i E y i n g segment placement i n a s e t o f e q u a l t a g s (PT c a r d )

I PTAGT IPTFLG

same f u n c t i o n a s IPTAGF ( i n p u t , PT c a r d ) input integer f l a g specifying type of p r i n t control

(PT c a r d ) L P'TAQ
I PTAQF

same a s a b o v e f o u r v a r i a b l e s b u t f o r PQ c a r d

1 PTAQT
IP'TFLQ I KESKV IKNGF

l e n g t h o f a r r a y CM i n c o m p l e x n u m b e r s s t o r a g e i n a r r a y CM t h a t i s r e s e r v e d f o r l a t e r u s e when a NGF f i l e i s w r i t t e n

ISANT

= =

a r r a y o f segment numbers f o r v o l t a g e s o u r c e s segment number f o r n o r m a l i z e d r e c e i v i n g p a t t e r n calculation

I SAVE

MAIN

segment numbers of end 1 and end 2 of the i network connection temporary storage array for matrix pivot element information

th

location in CM of the start of an array in the N C F solution


IXTYP KCOM LDTAG LDTAGF
=

excitation type from EX card number of comment cards read tag number of loaded segment number of first loaded segment in set of segments having given tag last loaded segment loading type maximum number of loading cards flag to request matrix asymmetry calculation frequency loop index counter for data cards number o f excitation points for coupling calculation excitation segment for coupling calculation increment option for near field points order of the primary interaction matrix number of new unknowns in NGF mode maximum number of network data cards
0 for near E field, 1 for near

LDTACT LDTY P LOADMX MASYM MHZ MPCNT NCOUP NCSEG NC'TAG NEAR NEQ NEQZ NETMX NFEH NFRQ NONE'T NOKMF NPllI NPHIC

I::

NPRINT

number of frequency steps number of network data cards dimension of FNORM number of phi steps in incident field loop index for phi in incident field print control flag for subroutine NETWK number of steps in near field evaluation loops number of voltage sources maximum number of voltage source-

NKZ NSANT NSMAX

MAIN NTH1 NTHIC


PH

P HISS PIN

n u m b e r oE t h e t a s t e p s i n i n c i d e n t f i e l d loop index f o r theta i n incident Eield phase a n g l e o f c u r r e n t o r charge ( d e g r e e s ) initial

4 v a l u e Eor i n c i d e n t f i e l d

PLOSS

P . = t o t a l p o w e r s u p p l i e d t o a s t r u c t u r e by a l l in For a Hertzian v o l t a g e s o u r c e s ( X Re(VI*)/2). 2 d i p o l e s o u r c e P. = q ( n / 3 ) l I L / X I Ln power l o s t i n d i s t r i b u t e d and p o i n t s t r u c t u r e l o a d s

i n watts PNET KFLD array contains Hollerith transmission l i n e type

i E non-zero,

equal t o input Ear-field

observation

d i s t a n c e i n meters minimum s e p a r a t i o n f o r u s e o f a p p r o x i m a t e interaction equations i n p u t l e n g t h o f r a d i a l s i n r a d i a l wire s c r e e n ( G N c a r d ) i n meters SCRWRT


-

r a d i u s of w i r e s i n r a d i a l w i r e ground s c r e e n i n meters

S IG SIGZ

c o n d u c t i v i t y o f ground (0 i n mhos/meter o n G N card) c o n d u c t i v i t y o f s e c o n d medium i n m h o s / m e t e r (GN a n d


GD c a r d )

TA THETIS T HETS 'TIM TMPl t o TMP6 XPKL t o XPK6

n/180 i n i t i a l @ Eor i n c i d e n t f i e l d i n i t i a l 0 for radiated field m a t r i x computation time (seconds) temporary i n p u t v a r i a b l e s i n p u t q u a n t i t i e s Eor i n c i d e n t E i e l d o r ~ e r t z i a n dipole illumination

zLC
=

i n p u t q u a n t i t i e s Eor l o a d i n g

ZLK Z PNOKM

impedance n o r m a l i z a t i o n q u a n t i t y

CONSTANTS
1. E-20

used a s small value t e s t

MAIN

MAIN

PROGRAM NEC(INPUT.TAPES=INPUT.OUTPUT,TAPEl1.TAPE12.TAPE13.TAPE14. ITAPE15.TAPEI6.TAPE2OOTAPE21) N U M E R I C A L ELECTROMAGNETICS CODE ( N E C 2 ) DEVELOPED AT LAWRENCE LIVERMORE L A B . LIVERMORE. C A . (CONTACT G . BURKE. 4 1 5 - 4 2 2 - 8 4 1 4') F I L E CREATED 4 / 1 1 / 8 0 . . N O T I C E . T H I S COMPUTER CODE M A T E R I A L WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY THE U N I T E D S T A T E S GOVERNMENT. N E I T H E R THE U N I T E D S T A T E S NOR THE U N I T E D S T A T E S DEPARTMENT OF ENERGY. NOR ANY OF T H E I R EMPLOYEES. NOR ANY OF T H E I R CONTRACTORS. SUBCONTRACTORS. OR T H E I R EMPLOYEES. MAKES ANY WARRANTY. EXPRESS OR I M P L I E D . OR ASSUMES ANY L E G A L L I A B I L I T Y OR R E S P O N S I B I L I T Y FOR i H E ACCURACY, COMPLETENESS OR USEFULNESS OF ANY I N F O R M A T I O N . A P P A R A I I J S . PRODUCT OR PROCESS D I S C L O S E D . OR REPRESENTS THAT I T S USE WOULD NOT I N F R I N G E PRIVATELY-OWNED R I G H T S . AIN.ATST.PNET.HPOL INTEGER COMPLEX CM.FJ.VSANT.ETH.EPH,ZRATI.CUR,CURI,ZARRAY.ZRATI2 COMPLEX EX.EY.EZ.ZPED.VQD,VQDS,T1.YIlA.Y12A.EPSC.U.U2,XX1,XX2 COMPLEX ARl.ARZ.AR3.EPSCF.FRATI COMMON /DATA/ LD.N1.N2.N.NP.M1,M2.M.MP.X(300).Y(300).Z(300), l S I ( 3 0 0 ) . B I ( 3 0 0 ) .ALP(300) ,RET(300) ,ICON1 ( 3 0 0 ) , I C O N 2 ( 3 0 0 ) ,

21TAG(3OO),ICONX(300).WLAM.IPfYM
COMMON / C M B / C M ( 4 0 0 0 ) COMMON / M A T P A R / ICASF.NBLOKS.NPBLK.NLAST.NBLSYM,NPSYM.NLSYM,IMAT, 1ICASX.NBBX.NPBX.NLBX.NBBL.NLBL

COMMON/SAVE/IP(6OO~.KCOM.COM(I3.5~.EPSR,SIG,SCRWLT,SCRWRT,FMHZ
COMMON /CRNT/ AIR(~OO) 1 CII(300).CUR(900)
COMMON

.AII(300) .BIR(300) .811(300) .CIA(300)

/GND/ZRATI~ZRATI~.FRATI.CL,CH,SCRWL,SCRWR,NRA~L,K~YMP,IFAR
ZARRAY(300].NLOAD,NLODF

1IPERF.Tl.TZ COMMON /ZLOAD/

COMMON/YPARM/NCOUP.ICOUP.NCTAG(~)~NCSEG(~),Y~~A(~),Y~~A(~O) COMMON /SEGJ/ AX(30).BX(30).CX(30),JCO(3O),JSNO.ISCON(5O),NSCON,


IIPCON(IO).NPCON COMMON/VSORC/VQO(30) ,VSANT(30) ,VOOS(30), IVQD(30) , I S A N T ( 3 0 ) .

lIODS(3O).NVQD.NSANT,NODS COMMON/NEICX/ZPED.PIN.PNLS.NEO~NPEQ,NCQ~,NONET,NTSOL,NPRINT,
1MASYM.ISEG1(3O).ISEC2(30).XllR(30).XllI(3O),X12R(3O),X12T(~o), lX22R(30).X221(3O).NTYP(30) COMMON/FPAT/NTH.NPH.IP~,IA~P,INOR,IAX,THET~,PHI~,DTH,DPH, 1RFLD.GNOR.CLT.CHT.EPSR2,SIG2,IXTYPPXPR6,PINR,PNLR,PLOSS,
INEAR.NFEH.NRX.NRY.NRZ.XNR,YNR~DYNR,DZNR COMMON /GGRID/ ARl(1l.10.4).AR2(17.5.4).AR3(9,8,4).EPSCFFDXA(3), IOYA(3).XSA(3).YSA(3).NXA(3).NYA(3)

COMMON/GWAV/U.U2.XXl.XX2.R1.R2.ZMH.ZPH OIMEN~ION CAR(I).SAB(I).XZ(~).Y~(I).ZZ(I)


DIMENSION L D T Y P ( 3 O ) . L D T A G ( 3 O ) , l . O T A G ~ ( 3 0 ) , L O T A G T ( 3 O ) , Z L R ( 3 0 ) , IzLI(3o).zLC(3O) DIMENSION A T S r ( 2 1 ) . P N E r ( 6 ) . H P O L ( 3 ) . I X ( 6 0 0 ) D I M E N S I O N FNORM(2OO)
DIMENSION

TIX(I).TIY(I).TIZ(I).T~X(I).T~Y(I),T~Z(I)

EOUIVALLNCE ( C A B . A L P ) . ( S A B , B E T ) . ( X 2 , S I ) ,(Y2,ALP) ,(Z2,BET) E Q U I V A L E N C E (TIX.SI).(TIY.ALP).(T1Z,BET).(T2X,ICON1),(T2Y,ICON2), 1 (T2Z.ITAG) DATA A T S T / 7 H C L . Z H f R . 2 H L O . 2 H W . 2 H E X . 2 H N T . Z H X Q , 2 H N E . 2 H G D . 2 H R P . 2 H C M , 1 2HNX.ZHEN.ZWTl..ZHPl.2HKH,2HNH,2HPO,2HEK.2HWG,2HCP/ DATA ilPOLj6HLlNEAR,SHRIGHT,4HLEFT/ DATA PNET/6W .2H ,6HSTRAIG.ZHHT.6HCROSSE,lHDj DATA T A / l . ' ? 4 5 3 2 9 2 5 2 E - O 2 / , C V C L / 2 ~ g . 8 / DATA L0A0MX,NSMAX,NETMX/30,30,30/.NQRMf/200,'

PRINT 1 2 6 PRINT 127 P R I N T 128 P R I N T 1 2 9 . (COM(I.KCOM) . I = t . l 3 ) I F (AIN.EQ.ATST(11)) GO TO 2 F I (AIN.EQ.ATST(I)) GO TO 4 PRINT 1 3 0 STOP CONTINUE LD DO 5 I=I ZARRAY(I)=(O..O.) MPCNT=O IMAT=O

SET UP GEOMETRY DATA I N SUBROUTINE DATAGN C A L L DATAGN IFLoW=I IF(IMAT.EO.O)GO

TO 3 2 6 SOLUTION

CORE A L L O C A T I O N FOR ARRAYS 8 . C. AND D FOR N . G . F .

CALL ~ E ~ N G F ( N E O . N E ~ ~ . I R E S R V , I B ~ GO TO 6 NEO=N+2*M NEO2=O 1 6 1 1=1 IC11=1 I 0 1 1=1 1 x 1 1=1 ICASX-0 NPEQ=NP+Z*MP PRINT 1 3 5

1 ,IC11 ,ID1 1 ,IX11)

DEFAULT VALUES FOR I N P U T PARAMETERS AN0 FLAGS IGO=l FMHZS=CVEL NFRO=I RKH=1. IEXK=O IXTYP=O NLOAD=O NONET=O NEAR=-I IPTFLG=-2 IPTFLO=-I IFAR=-I ZRATI=(I . -0.) IPEO=O IRNGF=O NCOUP=O

MAIN

M A I N INPUT SECTION STANDARD READ STATEMENT P R I A T E S E C T I O N FOR S P E C I F I C PARAMETER SET UP

JUMPS TO APPRO-

PRINT 137. lTMPS.TMP6

MPCNT.AIN.ITMPl.ITMP2.1TMP3.ITMP4.TMP1,TMP2,TMP3,TMP4

I F (AIN.EQ.ATST(ZO)) I F (AIN.EQ.ATST(21)) I F (AIN.NE.ATST(l3)) C A L L SECOND(TMP1)

GO TO 3 2 2 GO TO 3 0 4 GO TO 1 5

TMPI=TMPI-EXTIM
P R I N T 2 0 1 TMPl STOP PRINT 1 3 8 STOP FREQUENCY PARAMETERS

IF(ICASX.E~.O)GO PRINT 3 0 3 . A I N STOP NFRQ=ITMP2 I F (NFRQ.EQ.0) FMHZ=TMPI OELFRQ=TMP2

TO

NFRO=1

MATRIX INTEGRATION L I M I l

MAIN EXTENDED T H I N W I R E KERNEL O P T I O N IEXK=l IF(ITMPl.EO.-I)IEXK=O IF(IGO.GT.Z)IGO=Z IFLOW=I GO TO 1 4 MAXIMUM COUPLING BETWEEN ANTENNAS IF(IFLWI.NE.2)NCOUP=O ICOUP=O IFLWI=2 ~F(ITMPZ.EQ.O)GO TO 1 4 NCOUP=NCOUP+I I F ( N C O U P . G T . 5 ) G O TO 3 1 2 NCTAG(NCOUP)=ITMPI NCSEG(NCOuP)=ITMP2 I F ( I T M P 4 . E Q . O ) G O TO 1 4 NCOUP=NCOUP+I I F ( N C O U P . G T . 5 ) G O TO 3 1 2

GO TO 1 4 PRINT 3 1 3 STOP L O A D I N G PARAMETERS I F (IFLWI.EO.3) GO TO 18 NLOAO=O IFLOW=3 I F (IG0.GT.2) IGO=2 I F (ITMPI.EO.(-I)) GO TO 1 4 NLOAD=NLOAO+l I F (NLOAD.LE.LOAOMX) GO TO 1 9 PRINT 1 3 9 STOP LDTYP(NLOAO)=ITMPl LOTAG(NLOAO)=ITMPZ I F (ITMP4.EQ.O) ITMP4=ITMP3 LDTAGF(NLOAO)=ITMPJ LDTAGT(NLOAO)=ITMP4 I F ( I T M P 4 . C E . I T M P S ) GO TO 2 0 PRINT 1 4 0 . NLOAO. I ~ M P J . I T M P ~ STOP

GROUND PARAMETERS UNDER THE ANTENNA IFLOW=4 IF(ICASX.EO.O)GO TO 1 0 PRINT 3 0 3 . A I N STOP I F (IGO.GT.2) IGO=2

MAIN
NRAOL=ITMPZ KSYMP=2 EPSR=TMPI SIG=TMPZ I F ( N R A O L . E Q . O ) GO TO 2 3 I F ( I P E R F . N E . 2 ) G O TO 3 1 4 PRINT 3 9 0 STOP SCRWLT=TMP3 SCRWRT=TMP4 GO TO 1 4 EPSRZ=TMP3 SIG2=TMP4 CLT=TMP5 CHT=TMP6 GO TO 1 4 E X C I T A T I O N PARAMETERS

NSANT=NSANT+l I F (NSANT.LE.NSMAX) PRINT 141 STOP

GO TO 2 6

I~ANT(NSANT)=I~EGNO(ITMP~.ITMPJ)
VSANT(NSANT)=CMPLX(TMPl.TMPZ) I F (CABS(VSANT(NSANT)).LT.I.E-20) VSANT(NSANT)=(l.,O.) IPED=ITMP4-MASYM.10 ZPNORM=TMP3 I F (IPEO.EQ.l.AND.ZPNORM.GT.0) IPE0=2 GO TO 1 4 I F (IXTYP.EQ.O.OR.IXTYP.EO.5) NTSOL=O IXTYP=ITMPl NTHI=ITMPZ NPHI=ITMP3 X P R l =TMP 1 XPRZ=TMPZ XPR3=TMP3 XPR4=TMP4 XPR5=TMP5 XPR6=TMP6 NSANT=O NVQD=O THETIS=XPRI

NETWORK PARAMETERS

MAIN
MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA
MA

I F (NONET.LE.NETMX) PRINT 1 4 2 STOP NTYP(NONET)=2 I F (AIN.EO.ATST(6))

GO TO 3 0

NTYP(NONET)=I

ISEG1(NONET)=ISEGNO(ITMP1,ITMP2) ISEG2(NONET)=ISEGNO(ITMP3,ITMP4)
XIlR(NONET)=TMPl XllI(NONET)=TMPZ

X~ZR(NONET ~=TMPS XPZI(NONET)=TMP6 I F (NTYP(NONET).EO.I.OR.TMP1.GT.O.) NTYP(NONET)=3 XIIR(NONET)=-TMPI GO TO 1 4 P R I N T CONTROL FOR CURRENT IPTFLG=ITMPI IPTAG=ITMPZ IPTAGF=ITMP3 IPTAGT=ITMP4

GO TO 1 4

IF(ITMP3.EO.O.AND.IPTFLG.NE.-I)IPTFLG=-2
I F (ITMP4.EO.O) GO TO 1 4 IPTAGT=IPTAGF

P R I N T CONTROL FOR CHARGE

NEAR F I E L D C A L C U L A T I O N PARAMETERS NFEH=l GO TO 2 0 9 NFEH=O I F (.NOT.(IFLOW.EO.8.AND.NFRO.NE.l)) PRINT 1 4 3 NEAR=ITMPI NRX=ITMP2 NRY=ITMP3 NRZ=ITMP4 XNR=TMPI YNR=TMPP ZNR=TMP3 DXNR=TMP4
DYNRsTMP5

GO TO 3 3

320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
301

DZNR=TMP6 IFLOW=8

MA 3 8 2 MA 3 8 3

MAIN
384 385 386 387 388 389 390 39 1 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 41 1 412 413 414 415 416 417 418 419 420 421 422 I F ( N F R O . N E . 1 ) GO TO 1 4 GO TO ( 4 1 . 4 6 . 5 3 . 7 1 . 7 2 ) . IGO C C C 34 GROUND R E P R E S E N T A T I O N EPSRZ=TMPl SIG2=IMP2 CLT=TMP3 CHT=TMP4 IFLOW=I) GO TO 1 4 STANDARD O B S E R V A T I O N ANGLE PARAMETERS IFAR=ITMPI NTH=ITMPZ NPH=ITMP3 I F (NTH.EO.0) NTH=l I F ( N P H . E O . 0 ) NPH=I IPO=ITMP4/10 IAVP=ITMP4-IPD.10 INOR=IPD/lO IPD=IPO-INOR.10 IAX=INOR/IO INOR=INOR-IAX'IO I F (IAX.NE.0) IAX=I I F (IPD.NE.0) IPD=I I F (NTH.LT.Z.OR.NPH.LT.2)

C C C 36

IAVP=O

PHIS=TMP2 DTH=TMP3 OPH=TMP4 RFLD=TMPS GNOR=TMP6 IFLOW=IO GO TO ( 4 1 . 4 6 . 5 3 . 7 1 . 7 8 ) . C C W R I T E NUMERICAL GREEN'S

IGO F U N C T I O N TAPE

I F ( I C A S X . E O . O ) G O TO 3 0 1 PRINT 3 0 2 STOP IRNGF=IRESRV/2 GO TO ( 4 1 . 4 6 . 5 2 . 5 2 . 5 2 ) , I G O EXECUTE CARD

CALC.

I N C L U D I N G RADIATED F I E L D S

MAIN
NPH=l THETS=O. PHIS=O . DTH=l . O DPH=O . I F (ITMPI.EO.Z) PHIS=~O. I F ( I T M P I . N E . 3 ) GO TO 4 0 NPH=2 DPH=90. GO TO ( 4 1 . 4 6 . 5 3 . 7 1 . 7 8 ) . IGO END OF THE M A I N I N P U T S E C T I O N B E G I N N I N G OF THE FREOUENCY DO LOOP MHZ=I CORE A L L O C A T I O N FOR PRIMARY INTERACTON M A T R I X . MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507

IF(IMAT.EQ.O)CALL

FBLOCK(NPE~.NE~.IRESRV.IRNGF,IPSYM)

(A)

I F ( M H Z . E O . 1 ) GO TO 4 4 I F ( I F R O . E O . 1 ) GO TO 4 3

FMHZ=FMHZoDELFRO FR=FMHZ/FMHZS WLAM=CVEL/FMHZ P R I N T 1 4 5 . FMHZ.WLAM PRINT 196.RKH IF(IEXK.EQ.1)PRINT 321 FREOUENCY S C A L I N G OF GEOMETRIC PARAMETERS FMHZS=FMHZ I F ( N . E O . O ) G O TO 3 0 6 DO 4 5 I = 1 . N

X(I)=X(I)*FR
Y ( I ) = Y ( I ) . F R Z(I)=Z(I).FR

SI(I)=SI(I)-FR BI(I)=BI(I)*FR
I F ( M . E O . O ) G O TO 3 0 7 FR2=FR.FR J=LO+l DO 2 4 5 1 = 1 .M J=J-1

X(J)=X(J)*FR
Y(J)=Y(J)*FR Z(J)=Z(J)*FR

STRUCTURE SEGMENT L O A D I N G PRINT 146 IF(NLOAD.NE.O) C A L L LOAD(LDTYP.LDTAG.LDTAGF~LDTAGT,ZLR,ZLI,ZLC) IF(NLOAO.EO.O.AND.NLODF.EO.O)PRINT 1 4 7 IF(NLOAO.EO.O.ANO.NLODF.NE.0)PRINT 327 GROUND PARAMETER PRINT 148 I F ( K S Y M P . E O . 1 ) GO TO 4 9 FRATI=(l..O.) I F ( I P E R F . E O . 1 ) GO TO 4 8

IF(SIG.LT.O.)SIG=-SIG/(59,96*WLAM) EPSC=CMPLX(EPSR.-SIG.WLAM'59.96)
ZRATI=l./CSORT(EPSC) U=ZRATI UZ=U.U I F ( N R A D L . C O . 0 ) GO TO 4 7 SCRWL=SCRWLT/WLAM

508 509 510 MA 5 1 1

MAIN SCRWR=SCRWRT/WLAM
Tl=FJ*2367,067/FLOAT(NRAOC) T2=SCRWR*FLOAT(NRADL) P R I N T 1 7 0 . NRADL,SCRWLT.SCRWRT PRINT 149 I F ( I P E R F . E Q . 2 ) G O TO 3 2 8 PRINT 3 9 1 GO TO 3 2 9 IF(NXA(1).EQ.O)READ(21)AR1.AR2.AR3.EPSCF.DXA.DYA.XSA,YSAANXAANYA

520 328 521 522 523 524

FRATI=(EPsc-I.)/(EPsc+I.)
IF(CABS((EPSCF-EPSC)/EPSC).LT.I.E-3)G0
PRINT 393.EPSCF.EPSC STOP PRINT 3 9 2 PRINT 1 5 0 . EPSR.SIG.EPSC GO TO 5 0 PRINT 151 GO TO 5 0 PRINT 1 5 2 CONTINUE F I L L AND FACTOR PRIMARY I N T E R A C T I O N M A T R I X C A L L SECOND ( T I M l ) I F ( I C A S X . N E . O ) G O TO 3 2 4 CALL CMSET(NE0.CM.RKH.IEXK) C A L L SECOND ( T I M 2 ) TIM=TIM2-TIM1 TO 3 3 0

..

CMNGF(CM(IB~~).CM(IC~~) , c M ( I 0 1 1 ) , N P B X X ~ E ~ , N E Q 2 , R K H , ~ ~ ~ ~ ) C A L L SECOND ( T I M 2 ) TIM=TIMZ-TIM1

C A L L SECOND ( T I M I ) TIML=TIMl-TIM2 PRINT 153. TIM.TIM2 IGO=3 NTSOL=O IF(IFLOW.NE.12)GO TO 5 3 WRITE N . G . F . F I L E C A L L GFOUT GO TO 1 4 E X C I T A T I O N SET UP ( R I G H T HAND S I D E .

-E

INC.)

NTHIC=I NPHIC=I INC=l NPRINT=O I F (IXTYP.EO.O.OR.IXTYP.EO.5) GO TO 5 6 I F ( I P T F L G . L E . O . O R . I X T Y P . E Q . 4 ) PRINT 1 5 4 TMP5=TAWXPR5 TMP4=TA*XPR4 F I ( I X T Y P . N E . ~ ) GO TO 5 5 TMP 1=XPR I / W L A M TMPZ=XPRZmLAM TMP3=XPR3/WLAM TMP6=XPR6/(WLAM'WLAM) PRINT 1 5 6 . XPRl4XPR2.XPR3,XPR4.XPR5.XPR6

MAIN
MA MA MA MA MA MA MA MA MATRIX SOLVING (NETWK C A L L S SOLVES) MA MA I F ( N O N E T . E Q . O . O R . I N C . G T . 1 ) GO TO 6 0 MA PRINT 1 5 8 MA ITMP3=O MA ITMPI=NTYP(I) MA DO 5 9 I = 1 . 2 MA I F ( I T M P I . E O . 3 ) ITMP1=2 MA I F ( I T M P I . E Q . 2 ) PRINT 1 5 9 MA I F ( 1 T M P l . E Q . l ) PRINT 1 6 0 MA DO 5 8 J = I .NONET MA ITMPZ=NTYP(J) MA MA MA GO TO 5 8 MA T IM P = I S IE G J ( I ) MA ITMPS=ISEGZ(J) MA F I ( I T M P ~ . G E . Z . A N D . Y I I I ( J ) . L E . O . ) XIII(J)=WLAM*SQRT((X(ITMPS)MA 1 X(ITMP4))'*2+(Y(ITMP5)-Y(ITMP4))"2+(Z(ITMP5)-Z(ITMP4))**2) MA P R I N T 1 5 7 . ITAG(ITMP4).ITMP4.ITAG(ITMP5),ITMP5,X11R(J),Xl1I(J), MA ~X~~R(J).X~~I(J),X~~R(J).X~~I(J).PNET(~*ITMP~-I),PNET(~~ITMP~ ) MA CONTINUE MA I F ( I T M P 3 . E Q . O ) GO TO 6 0 MA ITMPI=ITMP3 MA CONTINUE MA CONTINUE MA I F (INC.GT.I.ANO.IPTFLG.GT.0) N P R I N T = l MA C A L L NETWK(CM.CM(IBI1).CM(ICl1).CM(IO11).IP.CUR) MA NTSOL=I MA I F (IPED.EQ.0) GO TO 6 1 MA ITMPl=MHZ+4*(MHZ-I) MA I F (ITMPI.GT.(NORMF-3)) GO TO 6 1 MA FNORM(ITMPI)=REAL(ZPED) MA FNORM(ITMPI+I)=AIMAG(ZPED) MA FNORM(ITMPI+~)=CAES(ZPED) MA FNORM(ITMPI+~)=CANG(ZPED) MA I F (IPE0.EQ.2) GO TO 6 1 MA I F ( F N O R M ( I T M P I + ~ ) . G T . Z P N O R M ) ZPNORM=FNORM(ITMP1+2) MA CONTINUE MA MA P R I N T I N G STRUCTURE CURRENTS MA MA I F ( N . E O . O ) G O TO 3 0 8 MA I F (IPTFLG.EQ.(-I)) GO TO 6 3 MA I F ( I P T F L G . G T . 0 ) GO TO 6 2 MA PRINT 161 MA PRINT 162 MA MA GO TO 6 3 I F (IPTFLG.EQ.3.0R.INC.GT.I) GO TO 6 3 MA MA PRINT 163. XPR3,HPOL(IXTYP),XPR6 PLoSS=o. MA MA ITMPl=O MA JUMP=IPTFLG+I MA 00 69 k 1 . N MA CURI=CUR(I).WLAM MA cMAG=cAes(cuRI) GO TO 5 6 TMP1=TAoXPR1 TMP2=TA0XPR2 TMP3=TAmXPR3 TMP6=XPR6 I F (IPTFLG.LE.O) PRINT 155. XPRl.XPRZ.XPR3.HPOL(IXTYP).XPR6 C A L L ETMNS ( T M P 1 . T M P 2 . T M P 3 . T M P 4 . T M P 5 , T M P 6 , 1 X T Y P P C U R ) 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639

MAIN
PH=CANG(CURI) I F (NLOAO.EQ.O.AN0.NLODF.EO.O) GO TO 6 4 I F (ABS(REAL(ZARRAY(I))).LT.I.E-20) GO TO 6 4

PLOSS=PLOSS+.5~CMAC~CMAG'REAL(ZARRAY(I))*SI(I)
I F (JUMP) 6 8 . 6 9 . 6 5 I F ( 1 P T A G . E O . O ) GO TO 6 6

I F (IPTFLG.NE.3) P R I N T 1 6 4 . XPRl.XPRZ.CMAG.PH.1 GO TO 6 9 P R I N T 1 6 5 . I.ITAG(I).x(I),Y(I),Z(I),SI(I).CURI,CMAG,PH CONTINUE IF(IPTFLQ.EO.(--))GO TO 3 0 8 PRINT 3 1 5 I TMP 1=O F R = l .E-6/FMHZ 00 3 1 6 1 = 1 . N IF(IPTFLQ.EO.(-Z))GO TO 3 1 8 I F ( I P T A O . E O . O ) G O TO 3 1 7 IF(ITAG(I).NE.IPTAQ)GO TO 3 1 6 ITMPl=ITMPl+l IF(ITMP1.LT.IPTAOF.OR.ITMPl.GT.IPTAOT)GO TO 3 1 6 CURI=FR'CMPLX(-BII(I).BIR(I)) CMAG=CABs(CURI) PH=CANG(CURI) P R I N T ~~~.I.ITAc(I).x(I) .Y(I).z(I).SI(I).CURI.O~~AG.PH CONTINUE I F ( M . E O . O ) G O TO 3 1 0 PRINT 1 9 7 J=N-2 ITMPl=LD+l 00 3 0 9 1 = 1 .M J=J+3 ITMPl=ITMPl-1 EX=CUR(J) EY=CUR(J+I )

ETHA=CANG(ETH) EPHM=CABS(EPH) EPHA=CANG(EPH) PRINT ~~~.I.X(ITMP~).Y(ITMP~),Z(ITMP~),ETHM.ETHA,EPHM.EPHA. 1 EZ I F (IXTYP.NE.O.AND.IXTYP.NE.5) GO TO 7 0 TMPl=PIN-PNLS-PLOSS TMPZ=IOO.*TMPl/PIN PRINT 1 6 6 . PIN.TMPl.PLOSS.PNLS.TMP2 CONTINUE IGO=4

I F (IXTYP.GT.O.AND.IXTYP.LT.4) F I (NFRQ.NE.~~ GO TO 1 2 0 PRINT 1 3 5 GO TO 1 4 IGO=5

GO TO 1 1 3

MAIN
NEAR F I E L D C A L C U L A T I O N I F (NEAR.EQ.(-1)) GO TO 7 8 C A L L NFPAT I F ( M H Z . E Q . N F R O ) NEAR=-i I F ( N F R Q . N E . 1 ) GO TO 7 8 PRINT 1 3 5 GO TO 1'4 STANDARD FAR F I E L D CALCULATION IF(IFAR.EQ.-1)GO TO 1 1 3 PINR=PIN PNLR=PNLS C A L L RDPAT I F (IXTYP.EQ.O.OR.IXTYP.GE.4) GO TO 1 1 9 NTHIC=NTHIC+l INC=INC+l XPRl=XPRl+XPR4 I F ( N T H I C . L E . N T H 1 ) GO TO 5 4 NTHIC=l XPRl=THETIS XPRZ=XPRZ+XPRS NPHIC=NPHIC+l I F ( N P H I C . L E . N P H 1 ) GO TO 5 4 NPHIC=I XPRZ=PHISS I f ( I P T F L G . L T . 2 ) GO TO 1 1 9 NORMALIZED R E C E I V I N G PATTERN PRINTED ITMP1=NTHIoNPHI I F ( 1 T M P l . L E . N O R M F ) GO TO 1 1 4 ITMPl=NORMF PRINT 181 TMPI=FNORM(l) DO 1 1 5 J = Z . I T M P l I F ( F N O R M ( J ) . G T . T M P ~ ) TMPI=FNORM(J) CONTINUE PRINT 182. TMPl.XPR3.HPOL(IXTYP).XPR6,ISAVE DO 1 1 8 J = l . N P H I ITMPZ=NTHI*(J-1 ) DO 1 1 6 1=1 . N T H 1 ITMP3=I+ITMPZ I F (ITMP3.GT.ITMPl) GO TO 1 1 7 TMP2=FNORM(ITMP3)/TMPl TMP3=DB20(TMP2) P R I N T 1 8 3 . XPRl.XPRZ.TMP3.TMP2 X P R l = X P R l +XPR4 CONTINUE XPRl=THETIS XPRZ=XPRZ+XPR5 CONTINUE XPRP=PHISS I F (MHZ.EQ.NFRQ) IFAR=-1 I F ( N F R Q . N E . l ) GO TO 1 2 0 PRINT 1 3 5 GO TO 1 4 MHZ=MHZ+l MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767

I F ( N V Q D . L T . ~ ) G O TO 1 9 9 PRINT 184,IVQO(NVQO).ZPNORM

MAIN
I F (ITMPl.LE.(NORMF/4)) GO TO 1 2 1 ITMPI=NORMF/4 PRINT 1 8 5 I F (IFRO.EQ.O) TMPI=FMHZ-(NFRQ-I)*DELFRO I F (IFRO.EO.I) TMPI=FMHZ/(OELFRQ**(NFRP-( DO 1 2 2 1=1 . I T M P l ITMP2=1+4*(1-1) TMPZ=FNORM(ITMP2)/ZPNORM TMP3=FNORM(ITMP2+1)/ZPNORM TMP4=FNORM(ITMP2+2)/ZPNORM TMPS=FNORM(ITMPZ+J) PRINT 186. TMP~.FNORM(ITMP~).FNORM(ITMP~+~).FNORM(ITMP~+~), IFNORM(ITMP2+3).TMP2,TMP3,TMP4,TMP5 I F (IFRQ.EO.0) TMPI=TMPl+DELFRQ I F ( I F R Q . E Q . 1 ) TMPl=TMPI*OELFRO CONTINUE PRINT 1 3 5 CONTINUE NFRQ=l MHZ=I GO TO 1 4 FORMAT ( A 2 . 1 3 A 6 ) FORMAT (1Hl) FORMAT ( / / / , 3 3 X , 3 6 H . . . . . * . * . . . * . . . * ~ * * . ~ . . . ~ . * * , / / , 1 3 l H N U M E R I C A L ELECTROMAGNETICS COOE.//.3SX. 2 36H..................................*.

MA MA MA MA MA MA MA MA MA MA MA MA MA

779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819

MA MA FORMAT ( / / / / . 3 7 X t 2 4 H - - - COMMENTS -.//) MA FORMAT ( 2 5 X . 1 3 A 6 ) MA FORMAT ( / / / , l O X , 3 4 H I N C O R R E C T L A B E L FOR A COMMENT CARD) MA MA FORMAT (/////) FORMAT ( A 2 . 1 3 . 3 1 5 . 6 E 1 0 . 3 ) MA DATA CARD NO..I3.3X,A2.1X.I3.3(1X.I5). MA FORMAT ( 1 X . 1 9 H ' * * ' * I 6(1X.EI2.5)) MA FORMAT ( / / / . I O X , 4 5 H F A U L T Y DATA CARD L A B E L AFTER GEOMETRY S E C T I O N ) MA FORMAT ( / / / . l O X , 4 8 H N U M B E R OF L O A D I N G CARDS EXCEEDS STORAGE A L L O T T E MA

---

1 D) FORMAT ( / / / . l O X , 3 1 H D A T A F A U L T ON L O A D I N G CARO N O . = . I 5 . 5 X . l l H I T A G S ITEP1=.15,29H I S GREATER THAN I T A G S T E P Z = . I S ) FORMAT ( / / / . l O X . 5 1 H N U M B E R OF E X C I T A T I O N CAROS EXCEEDS STORAGE A L L 0 1 TTED) OF NETWORK CAROS EXCEEDS STORAGE A L L O T T E FORMAT ( / / / . l O X . 4 8 H N U M B E R 1D ) FORMAT(///,lOX,79HWHEN M U L T I P L E FREQUENCIES ARE REQUESTED. ONLY ON 1E NEAR F I E L D CARO CAN BE USED - . / , l O X , Z Z H L A S T CARD READ I S USED) FORMAT ( / / / / . 3 3 X , 3 3 H - - - FREQUENCY -,//.36X,lOHFR lEQUENCY=.EI1.4.4H MHZ./.36X.llHWAVELENGTH=.Ell.4.7H METERS) FORMAT ( / / / . 3 0 X . 4 0 H - - - STRUCTURE IMPEDANCE L O A D I N G -) FORMAT ( / , 3 5 X , 2 8 H T H I S STRUCTURE I S NOT LOADED) ANTENNA ENVIRONMENT -./) FORMAT ( / / / . 3 4 X , 3 1 H FORMAT ( 4 0 X . 2 1 H M E D I U M UNDER SCREEN -) FORMAT ( 4 0 X . 2 7 H R E L A T I V E D I E L E C T R I C CONST.=.F7.3./.4OX.I3HCONOUCTIV l I T Y = . E l O . 3 . l l H MHOS/METER./.4OX.28HCOMPLEX D I E L E C T R I C CONSTANT=. 12E12.5) 4 2 X . 1 4 H P E R F E C T GROUND) FORMAT ( FORMAT ( 4 4 X . I O H F R E E SPACE) . FORMAT ( / / / . 3 2 X 8 2 5 H MATRIX TIMING -.//.24X.SHFILL=.F9.3. 115H SEC.. FACTOR=.F9.3.5H SEC.) EXCITATION -) FORMAT ( / / / . 4 0 X t 2 2 H FORMAT ( / , 4 X , l O H P L A N E W A V E . 4 X . 6 H T H E T A = . F 7 . 2 , 1 l H DEG. PHI=.F7.2. 1 1 1 H OEG. E T A = . F 7 . 2 . 1 3 H DEG. TYPE - . A 6 , 1 5 H = AXIAL RATIO=.F6.3) FORMAT 1 / . 3 1 X . l 7 H P O S I T I O N IMETERS).l4X.lBHORIENTATION ( D E G ) = / . 2 8 X . II H X . I ~ X : ' I H Y . 1 2 ~I. H Z . I O X . ~ H A L P H A . ~ X . ~ H B E T A .I~HOIPOLE'MOMEN'T ~X. .// . 2 . 4 X . l 4 H C U R R E N T SOURCE.lX.3(3X,F10.5),lXX2(3X.F7.2),4X,F8.3) FORMAT (4X.4(15.1X).6(3X.Ell.4),3X.A6,A2)

MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA

-----

--

--

- --

---

MAIN
FORMAT ( / / / . 4 4 X . 2 4 ~ - - NETWORK DATA -) FORMAT ( / . 6 ~ . 1 8 ~ - FROM TO - . I I X . 1 7 H T R A N S M I S S I O N LINE.15X.36 1HSHUNT ADMITTANCES (MHOS) - -.14X,4HLINE./.6X,2lHTAG SEG. 2 TAG S E G . . 6 X , 9 H I M P E D A N C E . 6 X . 6 H L E N G T H , 1 2 X X 1 1 H - END ONE - , 1 7 X , l l H 3 - END TWO - . I Z X , 4 H T Y P E . / .6X,21HNO. NO. NO. NO..9X..4HOHMS 4 . 8 X . 6 H M E T E R S . 9 X 8 4HREAL.1OX.5HIMAG..9X.4HREAL.10X.5HIMAG.) FORMAT ( / . G X . B H FROM - . 4 X . 6 H TO - . 2 6 X . 4 5 H - ADMITTANCE MATRIX .SX.LIHTAG SEG. TAG SEG..13X,9H(ON 1 ELEMENTS (MHOS) ~E.ONE).I~X. 9H(ONE.TWO).19X.9H(TWO.TWO)./ .6X,21HNO. NO. NO 3. NO..8X.4HREAL.10X.5HIMAG.,9XX4HREAL.1OXX5HIMAG..9X.4HREAL. 4 IOX.5HIMAG.) FORMAT ( / / / . 2 9 X 9 3 3 H CURRENTS AND L O C A T I O N - -.//.33X,24HDIS I T A N C E S I N WAVELENGTHS) FORMAT ( //.2X.4HSEG..2X.3HTAG,4XX21HC00RD. OF SEG. C E N T E R . 5 X . 1 4HSEG..12X,Z6H- - CURRENT (AMPS) -./.2X.3HNO..3X.3HNO.. 2 5X.lHX.8X.1HY.8X.1HZZ6XX6HLENGTH.SX,4HREAL,8X,5HIMAG..7X.4HMAG.. 3 8X.SHPHASE) FORMAT ( / / / . 3 3 X . 4 0 H - - R E C E I V I N G PATTERN PARAMETERS - -./ - 4 3 l X . 4 H E T A = . F 7 . 2 . 8 H DEGREES./.43X,6HTYPE -.A6./.43Xq12HAXIAL RATIO=. 2 F6.3.// .11X.5HTHETA.6X.3HPHI,10XX13HCURRENT -,9X.3HSEGn/ 3.11X.5H(DEC).5X.5H(DEG),~7XX9HMAGNITUOE,4X,5HPHASE,6X,3HNO.,/) FORMAT (lOX.2(F7.2.3X).1X.EII.4.3X.F7.2.4X.I5) FORMAT ( 1 X . Z I 5 . 3 F 9 . 4 . F 9 . 5 , 1 X , 3 E 1 2 . 4 , F 9 . 3 ) - - POWER BUDGET - - -.// . 4 3 X , I S H I N P U T PO FORMAT ( / / / . 4 0 X , 2 4 H lWER = . E 1 1 . 4 , 6 H WATTS./ . 4 3 X , 1 5 H R A D I A T E D POWER=.E11.4.6H WATTS./ WATTS./ . 4 3 X , l S H N E T W O R K LOSS =. 2 ,43X.I5HSTRUCTURE LOSS=.E11.4.6H 3 E 1 1 . 4 . 6 H WATTS./.43X,15HEFFICIENCY =. F 7 . 2 . 8 H PERCENT) FORMAT ( 4 0 X . 2 5 H R A D I A L W I R E GROUND S C R E E N . / . 4 O X . 15.6H WIRES./.IO 1X.IPHWIRE LENGTH=.F8.2.7H METERS,/.40X,lZHWIRE R A D I U S = . E 1 0 . 3 . 7 H ME 2TERS) FORMAT ( / / / . ~ X , ~ I H R E C E I V I N G PATTERN STORAGE TOO S M A L L , A R R A Y TRUNCA 1 TED) - - N O R M A L I Z E D R E C E I V I N G PATTERN - -./.4lX. FORMAT ( / / / . 3 2 X , 4 0 H 1 LlHNORMALIZATION FACTOR=.El1.4./.41X.4HETA=.F7.2,8H OEGREES./.41X 2.6HTIPE -.A6./.41X,IZHAXIAL RATIO=.F6.3./.41X.l2HSEGMENT NO.=.I5./ 3/.21X.5HTHETA.6X.3HPH1.9X.IUPATTERN - . / . 2 l X , 5 H ( D E G ) . 5 X , S H ( O E G

--

--

- - .45X,18HSO l U R C E SEGMENT N 0 . . 1 4 . / ,45X,21HNORMALIZATION FACTOR=.E12.5.// 2,7X,5HFREO..13X,34H- UNNORMALIZEO IMPEDANCE - - . 2 1 X . 32H3 - N O R M A L I Z E D IMPEDANCE -./ .19X.lDHRESISTANCE.4X.9HREACTA 4NCE.6X.9HMAGNITUDE.4X,5HPHASE.7X.10HRESISTANCE,4X,9HREACTANCE,6X, 5 9HMAGNITUDE.4X85HPHASE./ .8X.3HMHZ.11X.4HOHMS,10X.4HOHMS,11XX 6 4HOHMS.SX,7HDEGREES.47X.7HDEGREES./) FORMAT ( / / / . 4 X , 6 2 H S T O R A G E FOR IMPEDANCE N O R M A L I Z A T I O N TOO S M A L L . A l R R A Y TRUNCATED) FORMAT ( 3 X . F 9 . 3 . 2 X . 2 ( 2 X . E 1 2 . 5 ) . 3 X , E 1 2 . 5 . 2 X , F 7 . 2 , 2 X , 2 ( 2 X , E 1 2 . 5 ) , 3 X , 1 E12.5.2X.F7.2) ////.~~X.~~HAPPROXIMATE I N T E G R A T I O N EMPLOYED FOR SEGMENT FORMAT( I S MORE T H A N S F 8 . 3 . 1 8 H WAVELENGTHS APART) FORMAT( ////,41X,38H- SURFACE PATCH CURRENTS -.//. I N AMPS/METER. 1 5 0 X . 2 3 H D I S T A N C E I N WAVELENGTHS./.5OX,21HCURRENT - SURFACE COMPONENTS - , 1 9 X , 3 4 H - - - RECTANGULAR COM 1 //.28X.Z6H-

4).8X.2HDB.8X.9HMACNITUOE,/) FORMAT (20X.2(F7.2.3X).1X.F7.2,4XXEll.4) - - I N P U T IMPEDANCE DATA FORMAT ( / / / , 3 6 X , 3 2 H -

- -

MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA MA

832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 8 5 5 '. 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892

lPONENTS - - - . / . 6 X , l Z H P A T C H CENTER.6X.16HTANGENT VECTOR 1 . 3 X . 116HTANGENT VECTOR Z , 1 1 X . 1 H X . 1 9 X . 1 H Y . 1 9 X Y I H Z , / , 5 X X 1 H X . 6 X . I H Y . 6 X , 11HZ.5X.4HMAG..7X.5HPHASE.3X.4HMAG..7X,5HPHASE.3(4X.4HREAL,GX. 1 6HIMAG. ) )

FORMAT(lX.I4./.1X.3F7.3.2(E11.4.F8.2).6E10.2)
F O R M A T ( / , ~ I H RUN T I M E = . F l O . 3 ) FORMAT(///.34X928H- - CHARGE D E N S I T I E S

- -.//.36X.

1 24HDISTANCES I N WAVELENGTHS.///.2X,4HSEG.,2X,3HTAG,4X. MA 8 9 3 MA 8 9 4 2 21HCOORD. OF SEG. C E N T E R , 5 X , 4 H S E G . . l O X . ~ X .8 9 5 3 31HCHARGE D E N S I T Y ( C O U L O M B S / M E T E R ) . / . ~ X , ~ H N O . . ~ X . ~ H N O . . ~ X . ~ H X . MA

MAIN
4 321 303 327 302 313 390 391 392 393 MA MA MA MA MA MA MA MA MA MA MA 1) F O R M A T ( 4 0 X . 3 5 H F I N I T E GROUND. SOMMERFELD S O L U T I O N ) MA FORMAT(/.29H ERROR I N GROUND PARAMETERS - . / . 4 1 H COMPLEX D I E L E C T R I C MA MA 1 CONSTANT FROM F I L E IS.2E12.5./.32X,9HREOUESTED.2El2.5) END MA

lHY.8X.lHZ.6X.6HLENGTH.5XX4HREAL.BX.5HIMAG.,7X,4HMAG..8X.5HPHASE)

FORMAT( / . 2 0 X 8 4 2 H T H C EXTENDED T H I N W I R E KERNEL W I L L BC U S E D ) F O R M A T ( / . 9 H ERROR - . A 2 , 3 2 H CARD I S NOT ALLOWED W I T H N . G . F . ) FORMAT(/.35X,31H L O A D I N G ONLY I N N . G . F . S E C T I O N ) F O R M A T ( 4 8 H ERROR - N . G . F . I N U S E . CANNOT W R I T E NEW N . G . F . ) , FORMAT(/.62H NUMBER OF SEGMENTS I N COUPLING C A L C U L A T I O N ( C P ) EXCEE lDS LIMIT) F O R M A T ( 7 0 H R A D I A L W I R E G. S . A P P R O X I M A T I O N MAY NOT BE USED W I T H SO 1MMERFELD GROUND O P T I O N ) F O R M A T ( 4 0 X . 5 2 H F I N I T E GROUND. REFLECTION C O E F F I C I E N T APPROXIMATION

896 897 898 899 900 901 902 903 904 905 906 907 908 909 910-

ARC
AKC --

PUKPOSE To f i l l COMMON/DATA/ w i t h segment c o o r d i n a t e s f o r a c i r c u l a r a r c o f segments.

METHOD The f o r m a l p a r a m e t e r s s p e c i f y t h e number o f s e g m e n t s , r a d i u s of t h e a r c , s t a r t i n g a n g l e , f i n a l a n g l e and w i r e r a d i u s . Segment c o o r d i n a t e s a r e computed

f o r t h e a r c i n t h e x , z p l a n e w i t h a L e f t hand r o t a t i o n a b o u t t h e y a x i s .

SYMBOL DICTIONAKY A N G
ANGl ANGZ
DANG
=

a n g l e of ~ o i n o t n the arc (radians, zero on x a x i s )

= a n g l e a t f i r s t end = a n g l e a t second end


=

a n g l e c o v e r e d by e a c h segment

I ST
ITG NS
KAD

= number o f i n i t i a l segment = t a g number a s s i g n e d t o e a c h segment = number o f segments = wire radius = a r c radius = nlldo
=

RA D A

'CA
XSl X S2 ZSl
%S2

x c o o r d i n a t e o f f i r s t end o f segment

= x c o o r d i n a t e o f second end o f segment = z c o o r d i n a t e o f f i r s t end o f segment


=

z c o o r d i n a t e o f second end o f segment

CONSTANTS .01745329252 360.U0001


= 111180
=

t e s t f o r a o g l e g r e a t e r t h a n 360 d e g r e e s

ARC
SUBROUTINE ARC ( I T G . N S . R A D A . A N G I . A N G 2 . R A D ) ARC GENERATES SEGMENT GEOMETRY DATA FOR AN ARC OF NS SEGMENTS COMMON / D A T A / LO.N1.N2.N.NP.M1.M2,M.MP.X(300),Y(30O),Z(300).SI(300 I ) .B1(300).Al ~ ( 3 0 0 , ) B E T ( 3 0 0 ) . I C O N 1 ( 3 0 0 ) , I C O N 2 ( 3 0 0 ) , I T A G ( 3 0 0 ) .ICONX(' 23OO),WLAM,IPSYM DIMENSION X 2 ( 1 ) . Y Z ( 1 ) . Z 2 ( 1 ) EOUIVALENCE ( X 2 . 5 1 ) . (Y2,ALP). (Z2.BET) DATA T A / . 0 1 7 4 5 3 2 9 2 5 2 / IST=N+l N=N+NS NP=N MP=M IPSYM=O I F ( N S . L T . 1 ) RETURN . ~ ~ . 3 6 0 . 0 0 0 0 1 )GO TO 1 I F (ABS(ANGZ-ANCI) PRINT 3 STOP ANG=ANGl0TA DANG=(ANGZ-ANGI)*TA/NS XSI=RADA.COS(ANG) ZS1=RADAoSIN(ANG) DO 2 I = I S T . N AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR AR 1 2 3

25 26 27

X(I)=XSl Y(I)=O. z(I)=ZS1 X2(I)=XS2 Y2(1)=0. Z2(I)=zS2 xs1=xs2 zs1=zs2 BI(I)=RAD ITAG(I)=ITG RETURN FORMAT ( 4 0 H ERROR END ARC ANGLE EXCEEDS 3 6 0 . DEGREES)

28
29 30 31 32

33
34

35
36 37

38 39
40 41-

ATGNZ

To return zero when both arguments of a two-argument arctangent function are zero. (Most standard arctangent functions give an error return when both arguments are zero.) METHOD System function ATANZ is used except when both arguments are zero, in which case the value zero is returned. The value returned is the angle (in

radians) whose sine is X and cosine is Y. SYMBOL DICTIONARY

X
Y

= =

first argument second argument

CODE LISTING

FUNCTION ATGNZ (X.Y)


ATGN2 IS ARCTANGENT FUNCTION MODIFIED TO RETURN 0. WHEN X=Y=O.

AT AT

3
4

IF ( X ) 3.1.3 IF (.Y ). 3.2.3 ATGNZ=O.


RETURN ATGNL=ATANZ(X.Y)

RETURN

ULCKOT PURPOSE To c o n t r o l t h e w r i t i n g a n d r e a d i n g o f m a t r i x b l o c k s on f i l e s f o r t h e o u t of-core matrix s o l u t i o n . tion during reading. METHOD The r o u t i n e u s e s a b i n a r y r e a d and w r i t e w i t h i m p l i e d DO l o o p s f o r r e a d i n g a n d w r i t i n g v a r i a b l e l e n g t h s t r i n g s i n t o and o u t o f v a r i o u s c o r e locations. The e n d - o f - f i l e c o n d i t i o n is c h e c k e d by a c a l l t o f u n c t i o n ENF. The r o u t i n e a l s o c h e c k s f o r t h e e n d - o f - f i l e condi-

I f a n u n e x p e c t e d end o f f i l e i s d e t e c t e d ( g o v e r n e d by NEOF) t h e p r o g r a m s t o p s .
CODING

UL14 BL21 RL9

BL12 W r i t e a r e c o r d on F i l e NUNIT. BL20 Read NBLKS r e c o r d s from NUNIT, and c h e c k f o r end o f f i l e . BL24 Code i f e n d o f F i l e d e t e c t e d .

SYMBOL DICTIONARY A R ENF


= matrix array = e x t e r n a l f u n c t i o n (checks end-of-file = DO l o o p i n d e x

condition)

= i m p l i e d DO l o o p l i m i t s ,

i n c l u s i v e m a t r i x l o c a t i o n s w r i t t e n from

I2 I ll
J

o r read i n t o
= i m p l i e d DO i n d e x

NBLKS = number of r e c o r d s t o b e r e a d NEOF


=

EOF c h e c k f l a g , a l s o u s e d t o t r a c e t h e c a l l t o BLCKOT

NUNIT = f i l e number CONSTANT

7 7 7 = NEOF w l ~ e nEOF i s e x p e c t e d by c a l l i n g program

P.:.CKCT
SUBROUTINE BLCKOT ( A R . N U N I T . I X l . I X 2 . N B L K S . N E O F ) BLCKOT CONTROLS THE R E A D I N G AND W R I T I N G OF M A T R I X BLOCKS ON F I L E S FOR TllE OUT-OF CORE M A T R I X S O L U T I O N . L O G I C A L ENF COMnLEX AR DIMENSION A R ( 1 ) II=(IXI+I)/Z IZ=(IX2+1)/2 WRITE ( N U N I T ) ( A R ( J ) . J = I I . I Z ) RETURN ENTRY B L C K I N Il=(IX1+1)/2 12=( I X 2 + 1 ) / 2 DO 2 I = I . N B L K S READ ( N U N I T ) ( A R ( J ) . J = I l . I 2 ) I F ( E N F ( N U N 1 T ) ) GO TO 3 CONTINUE RETURN PRINT 4 . NUNIT.NBLCS.NEOF I F (NEOF NE 7 7 7 ) STOP NEOF-0 RETURN FORMAl ( I 3 H END EOF ON U N I T . 1 3 . 9 H NBLKS= .I3.8H NEOF= .I5) BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL 1 2

3 4
5 6 7 8 9 10 11 12 13 14 15 16 17 18

19 20
21

BL EL
BL BL BL BL

22
23 24 25 26 27-

CABC

CA BC PURPOSE To compute the coefficients in the current function on each segment, given the basis function amplitudes. computed. METHOD The total current on segment i is 1. ( s )
1
I

Surface current components are also

Ai

Bi sin [k(s - s ) 1 + Ci cos [k(s i


=

si) 1

where s is distance along the wire, and s The coefficients Ai, Bi,

si at the center of segment i .

and C. are the sums of the corresponding coefficients 1

in the portion of each basis function that extends onto segment i. CODING Call to TBF computes components of basis function I. CB36 - C ~ 4 3 The basis function components are multiplied by the basis
CB35

function amplitude from array CURX and summed for each segment.
CB45

- CB63 For a current slope discontinuity source, the special basis


Lunction with discontinuous slope, from which the exciting electric field was computed, is recomputed and added to the current coefficients. The call to TBF, with the second temporarily zero, computes a argument zero and ICONl(1) end one of segment I.

basis function going to zero with non-zero derivative at C 6 4 - ~ ~ Total 6 5 current at the center of each segment is computed and stored in place of the basis function amplitudes.
C%H

C B ' ( 9

The

2, and f a components of surface current for each patch

are expanded to x, y, and z components. SYMBOL DICTIONARY All, A1 = real and imaginary parts of the basis function amplitude CCX

-j/6O

t1

and

components of surface current on a patch

CS2 1

CURI)

amplitude of t h e s p e c i a l b a s i s f u n c t i o n f o r a c u r r e n t s l o p e discontinuity source

CUIa

i n p u t a r r a y o f b a s i s f u n c t i o n a m p l i t u d e s t h a t a r e r e p l a c e d by v a l u e s o f c u r r e n t a t segment c e n t e r s

number o f a segment o n t o which a b a s i s f u n c t i o n e x t e n d s a r r a y l o c a t i o n s of t h e

JC02 JcO1 JX
K

E 1 and t? 2

s u r f a c e c u r r e n t components

f o r a patch = DO l o o p i n d e x ; t e m p o r a r y s t o r a g e o f c o n n e c t i o n number
= a r r a y l o c a t i o n f o r p a t c h geometry d a t a = ( h a l f segment 1 e n g t h ) l A
=

SH
TP

2n

CABC
S U B R O U T I N E CABC (CURX) CABC COMPUTES C O E F F I C I E N T S OF THE CONSTANT ( A ) . S I N E ( B ) . AND C O S I N E ( C ) TERMS I N THE CURRENT I N T E R P O L A T I O N F U N C T I O N S FOR THE CURRENT VECTOR CUR. COMPLEX C U R . C U R X . V O O S . C U R O . C C J . Y S * N T . V O D . C S I . C S 2 COMMON / D A T A / L D . N l .N2.N,NP,M1.M2,M,MP,X(300),Y(300).Z(300),S1(300 2300).WLAM.IPSYM C m M o N /CRNT/ l).CURf900) /SEGJ/ ICON(IO).NPCON CB CB CB CB CB CB CB CB CB 1

2
3
4

~ ) ~ ~ ~ ( ~ O ~ ) ~ ~ L P ( ~ ~ ~ ) . ~ E ~ ( ~ ~ ~ ) ~ I C O N ~ ( ~ ~ ~ ) . I C O N ~ ( CB ~OO),ITAG(~OO),IC

A I R ( ~ ~ ~ ) . ~ I I ( ~ ~ ~ ) . B I R ( ~ ~ ~ ) . B I I ( ~ ~ ~ ) . C I RCB (~~~).CII(~OO
PO LD

COMMON

AX(30) .BX(30) .CX(30). JCO(30). JSNO.ISCON(0)

N C O N I P CB
,-m

uu

COMMON /ANGL/ SALP(~OO) DIMENSION TIX(I). T I Y ( ~ ) . TIZ(I). TZX(I). TZY(I). TZZ(I) DIMENSION CURX(1). CCJX(2) EQUIVALENCE ( T 1 X . S I ) . (T1Y.ALP). (T1Z.BET). (T2X.ICONl). 12). (T2Z.ITAG) EQUIVALENCE (CCJ.CCJX) DATA ~ ~ / 6 . 2 8 3 1 8 5 3 0 8 / , ~ ~ ~ . -~ 0. /0 01 .6 6 6 6 6 6 6 6 7 / If (N.EO.0) GO TO 6

CB

CB
CR .-

(T2Y.ICON

CB CB
?R

CII(I~=O. DO 2 1 = 1 . N AR=REAL(CURX(I)) AI=AIMAG(CURX(I)) C A L L TBF ( 1 . 1 ) DO 2 J X = I . JSNO

J=JCO(JX)
AIR(J)=AIR(J)+AX(JX)*AR

BII(J)=BII(J)+BX(JX).AI CIR(J)=CIR(J)+CX(JX).AR CII(J)=CII(J)+CX(JX)*AI I F ( N O D S . E O . 0 ) GO TO 4 DO 3 1 5 - 1 .NODS

I=Ioos(Is)
JX=ICONI(I) ICONl(I)=O CALL T B f (1.0) ICONl(I)=JX SH=SI(I)..S

~~RD=~~J~~~D~(I~)/((AL~G~~.*~H/~I(I))-~.)*(BX(JSNO)*COS(TP'SH)+CX(

~JSNO)*SIN(TP*SH))-WLAM)
AR=REAL(CURD) AI=AIMAG(CURD) DO 3 J X = l . J S N O J=JCO(JX) AIR(J)=AIR(J)+AX(JX)*AR AII(J)=AII(J)+AX(JX).AI BIR(J)=BIR(J)+BX(JX).AR BII(J)=BII(J)+BX(JX).AI CIR(J)=CIR(J)+CX(JX)*AR

CABC
CURX(I)=CMPLX(AIR(I)+CIR(I).AII(I)+CII(I))
RETURN CONVERT SURFACE CURRENTS FROM 1 1 . 1 2 COMPONENTS TO X . Y . Z K=LO-M JCOI=N+2.M+I JCOZ=JCOI+M DO 7 I = I . M K=K+I JCOI=JCOI-2 JCO2=JCO2-3 CSl=CURX(JCOl) CS2=CURX(JCOl+l)

I F (M.EQ.0)

CURX(JC02)=CSl'TlX(K)+CS2*T2X(K) CURX(JCO2+1)=CSl'TlY(K)+CS2~T2Y(K) CURX(JCO2+2)=CSl'TlZ(K)+CS2.T2Z(K)


RETURN END

CB CB COMPONENTS CB CB CB CB CB CB CB CB CB CB CB CB CB CB CB

CANG

CANG PURPOSE
To c a l c u l a t e t h e p h a s e a n g l e o f a complex number i n d e g r e e s .

METHOD
z = x + j y

= [arctan (y/x)

1 57.29577951

SYMBOL DICTIONARY AIMAG = e x t e r n a l r o u t i n e ( i m a g i n a r y p a r t of complex number) ATGNZ CANG REAL


Z
= =

external routine (arctan f o r a l l quadrants)

= e x t e r n a l r o u t i n e ( r e a l p a r t o f a complex number) = i n p u t complex q u a n t i t y

CONSTANT
57.29577951 c o n v e r s i o n from r a d i a n s t o d e g r e e s

CODE LISTING

F U N C T I O N CANG ( 2 ) CANG RETURNS THE PHASE ANGLE OF A COMPLEX NUMBER I N DEGREES. COMPLEX Z C A N C = A T G N ~ ( A I M A G ( Z ) . R E A L ( Z ) ) * ~ ~ . ~ ~ ~ ~ ~ ~ ~ ~ RETURN END

2 C 3 C
4 C

6 7 8

CA CA CA CA CA CA CA CA

2 3
4

5
6

7
8-

CMNGF CMNGF PURPOSE To compute and store the matrices B ,


C

and D for the NGF solution.

The structure of matrices B, C and D is described in Section VI. shown in Figure 12 of Section VI. Section VII).

The

coding to fill these matrices is involved due to their complex structure, as The complexity is increased by the need to divide the matrices into blocks of rows when they are stored on files (see Much of the coding in CMNGF has to do with connections between new and NGF segments and patches. When a new segment or patch connects to a NGF

segment the basis function associated with the NGF segment is modified due to the new junction condition. The amplitude of the modified basis function is a The new unknown associated with the B ' and D' sections of the matrix. connect directly to new segments.

modified basis function may extend onto other NGF segments that may or may not Also, the basis function of the new segment Hence fields must be extends onto the NGF segment to which it connects.

computed for the currents on some NGF segments as well as all new segments. Comments in the code should be of some help in understanding the procedure. Figure 12. The notation D(WS) in the comments corresponds to D
SW

in

Some parts of the code are explained below. TKIO computes the components of all basis functions on segment J , where J is a new segment, and stores the coefficients in COMMON/SEGJ/. The array JCO contains the If the basis-function numbers which ordinarily are the matrix columns associated with the basis functions. basis function is for a new segment then JCO is set at CG66 to the column relative to the beginning oE the matrix 8 . If the basis function is for a NGF segment relative to the beginning of B . modified by the connection, then JCO is set at CG68 to the column in B
WW

CG61 - CG70

Thus the calls to CMWW and CMWS may store contributions in a__ and BsW as well as Bww and B s w .

CG90

- CG108

In this section the fields are evaluated for NGF segments that connect to new segments or patches. segment. TRIO finds all basis functions that contribute to the current on the For a component of a new basis function IR is
WW

set to the column in B

at CG95.

For a component of a

modified basis function IR is set to the column in


B relative to the start of B, at CG99. If the ww ' basis function component is for a NGF basis Eunction that

has not been modified the test at CG98 skips to the end o f the loop. The arrays in COMMON/SEGJ/ are adjusted Erom CGLOL to CGLO4 so that CMWW and CMWS will store the matrix element contributions in the correct locations. CG109

- CG119

If a NGF segment connects to a new segment on one end and to a NGF patch on the opposite end the modified basis function extends onto the patch as a singular component oE the patch current. The field due to this component on the patch is added to the matrix elemenc of the modified basis function at CG119.

CG122-CG136

This is similar to CG90 to CC108, but evaluates fields o f NGF segments that get contributions from modified basis functions, but do not connect directly to new segments. TBF is called, rather than TRIO to compute modified basis function J on all segments on which it exists. New segments and NGF segments for which contributions have already been evaluated are skipped at CG133 and CGL34.

CG165

CG263

Filling C and D is similar to that for B but fields must be evaluated for all NGF segments and patches as well as new segments and patches.

SYMBOL DICTIONARY CB CC CD IEXKX MIEQ MEQ


=

array for matrix B

= array for matrix C


= =

array for matrix D flag to select extended thin-wire kernel

= number of patch equations in NGF = total number oE patcl! i2<!tlations

CMNGF
NB
= row dimension of CB.

CB will contain only one block of B when

I C A S X = 3 or 4 NC ND NEQN NEQP NEQS

= row dimension of CC (C transposed) = row dimension of CD ( D transposed) = starting column of D relative to start of C ws' = starting column of zeros after D ww' relative to start of D = starting column of D

ww '

relative to start of D

NEQSP

KKHX

= starting column of D ww ' relative to start of C = minimum range for using the lumped current approximation for

the field of a segment

CMNCF
CG CG CG CG I ) . B I ( ~ O O ) . A L P ( ~ ~ O ) . B E T ( ~ O O ) , I C O N ~ ( ~ O O ) , I C O N ~ ( ~ O O ) , I T A G ( ~ O O ) , I C CG ONX( 2300).WLAM,IPSYM CG COMMON /ZLOAO/ ZARRAY(30O).NLOAD,NLODF CG COMMON /SEGJ/ A X ( 3 0 ) . B X ( 3 0 ) . C X ( 3 0 ) . J C O ( 3 0 ) . J S N O . I S C O N ( 0 ) N S C O N I P CG ~CON(IO).NPCON CG COMMON / O A T A J / S . B . X J . Y J . Z J . C A B J . S A B J . S A L P J , E X K ~ E Y K ~ E ~ K , E X S , E Y S CG ,Z IS.EXC.EYC.EZC.RKH.IEXK.INDl.IND2.IPGND CG COMMON /MATPAR/ I C A S E . N B L O K S . N P B L K . N L A S T . N B L S Y M , N P ~ Y M , N L ~ Y M , I M A TCG I 1CASX.NBBX.NPBX.NLEX.NBBL.NPBL.NLBL CG DIMENSION CB(NB.1). CC(NC.1). CD(ND.1) CG RKH=RKHX CG IEXK=IEXKX CG M I EO=2*MI CG MZEO=MlEQ+I CG MEQ=Z0M CG NEOP=ND-NPCON'2 CG NEOS=NEOP-NSCON CG NEOSP=NEOS+NC CG NEON=NC+N-Nl CG ITX=l CG I F (NSCON.GT.0) ITX=Z CG I F ( 1 C A S X . E Q . I ) GO TO 1 CG REWIND 1 2 CG REWIND 1 4 CG REWIND 1 5 CG I F ( I C A S X . G T . 2 ) GO TO 5 CG CG DO 4 J = l .NO DO 2 I = I .NO CG CD(I.J)=(O. .O.) CG DO 3 1 = 1 . N B CG CB(I.J)=(O.,O.) CG CC(I.J)=(O..O.) CG CONTINUE CG IST=N-NI+I CG IT=NPBX CG ISV=-NPBX CG LOOP THRU 2 4 F I L L S B . FOR I C A S X = I OR 2 ALSO F I L L S D ( W ) . D ( W S ) CG DO 2 4 I E L K = I . N B B X CG ISV=ISV+NPBX CG I F (1ELK.EO.NBBX) IT=NLBX CG F I (ICASX.LT.S) GO T O 7 CG DO 6 J = I .NO CG CG DO 6 I = I . I T CB(I.J)=(O..O.) CG 11=ISV+1 CG IZ=ISV+IT CG INZ=IZ CG CG I F ( I N 2 . G T . N I ) INZ=Nl IMI=Il-N1 CG IM2=12-N1 CG I F (IM1.LT.I) IMI=l CG IMX=I CG I F ( 1 1 . L E . N I ) IMX=NI-Il+2 CC
SUBROUTINE CMNGF (CB.CC.CD.NB.NC.ND.RKHX,IEXKX) CMNGF F I L L S I N T E R A C T I O N M A T R I C I E S 8 . C . AND D FOR N . G . F . S O L U T I O N COMPLEX CB.CC.CD.ZARRAY.EXK,EYK,EZK.EXS,EYS,EZS,EXC,EYC,EZC LD.N1.N2.N.NP.MI.M2.M.MP.X(300).Y(300).2(300).S1(300 COMMON /DATA/

-.
CALL TRIO ( J ) DO 9 I=I JSNO JSS=JCO(I) I F (JSS.LTN2)

GO TO 8

SET JCO WHEN SOURCE I S NEW B A S I S FUNCTION ON NEW SEGMENT JCO(I)=JSS-Nl GO TO 9 SOURCE I S P O R I I O N OF M O D I F I E D B A S I S FUNCTION ON NEW SEGMENT JC~(I)=NE~~+IC~NX(J~~) CONTINUE I F ( 1 1 . L . E . 1 ~ 2 ) C A L L C W (J.II.IN2.CB.NB.CB.NB.O) I F I C A L L CMWS (J.IMI.IM~.CB(IMX.~).NB.CB.NB.O) I F ( I C A S X . G T . 2 ) GO TO 1 1 C A L L C W ( J .N2 . N .CO.NO.CD .ND. 1 ) I F ( M 2 . L E . M ) C A L L CMWS (J.M2EQ.MEQ,CO(I.IST).ND.CO.ND.I) LOADING I N O ( W ) I F ( N L O A D . E O . 0 ) GO TO 1 1 IR=J-NI EXK=ZARRAY(J) DO 1 0 I = l . J S N O JSS=JCO(I)

CG CG CG CG CG CG CG CG CG CG CG CG CG CG CG

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

CD(J~~.IR)=C~(J~~.IR)-(AX(I)+CX(I)).EXK
CONTINUE F I ( N S C O N . E Q . O ) GO TO 2 0 FILL B(W)PRIME DO 1 9 I=I .NSCON J=ISCON(I) SOURCES ARE NEW OR M O D I F I E D B A S I S FUNCTIONS ON OLD SEGMENTS W H I C H CONNECT TO NEW SEGMENTS CALL TRIO ( J ) JSS=O DO 1 5 I X = I . J S N O IR=JCO(IX) I F ( I R . L T N 2 ) GO TO 1 3 IR=IR--NI GO TO 1 4 IR=ICONX(IR) I F ( I R . E Q . 0 ) GO TO 1 5 IR=NEQS+IR JSS=JSS+l JCO(JSS)=IR AX(JSS)=AX(IX)

CG 8 0 CG 8 1 CG 8 2 CG 8 3 CG 8 4 CG 8 5 CG 8 6 CG 8 7 CG 8 8 CC 8 9 CG 9 0 CG 9 1 CG 9 2 CG 9 3 CG 9 4 CG 9 5 CG 9 6 CG 9 7 CG 9 8 CG 9 9 CG 1 0 0 CG 1 0 1 CG 1 0 2

CONTINUE JSNO=JSS I F ( I I . L E . I N 2 ) CALL C W ( J . I I . I N 2 . C B . N B . C B . N B . O ) I F ( I M I . L E . I M 2 ) C A L L CMWS (J.IMI.IM2.CB(IMX.I).NB.CB.NB.O) SOURCE I S S I N G U L A R COMPONENT OF PATCH CURRENT THAT I S PART OF M O D I F I E D B A S I S F U N C T I O N FOR OLD SEGMENT THAT CONNECTS TO A NEW SEGMENT ON END O P P O S I T E PATCH. I F ( I l . L E . I N 2 ) C A L L CMSW (J.I,Il,IN2.CB.CB.O,NB,-1) I F ( N L O O F . E O . 0 ) GO TO 1 7 JX=J-ISV

DO 1 6 I X - I .JSNO JSS=JCO(IX) C~(JX.JSS)=CB(JX,J~S)-(AX(IX)+CX(IX))'EXK SOURCES ARE PORTIONS OF M O D I F I E D B A S I S FUNCTION J ON OLO SEGMENTS E X C L U D I N G OLD SEGMENTS THAT D I R E C T L Y CONNECT TO NEW SEGMENTS. CALL T B F ( J . 1 )

CG CG CG CG CG CG

117 118 119 120 121 122

IR=JCO(I ) JCO(l)=NEOS+I DO 1 9 1x11 JSX

CMNGF
129 130 131 132 133 134 135 136 137 138 1.59 140 141 I42 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 I61 162 163 164 165 166 167 168 I69 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192

18

C A L ~ C W ( I R . 1 1 .IN2.CB.NB.CB.NB.O) I F (11 .LE:INZ) I F ( I M I . L E . I M 2 ) C A L L CMWS (IA.IMI.IM2.CB(IMX.I).NB.CB.NB.O) L O A D I N G FOR B ( W ) P R I M E I F ( N L O D F . E O . O ) GO TO 1 9 JX=IR-ISV I F ( J X . L T . l . O R . JX.GT . I T ) GO TO 1 9 EXK=ZARRAY(IR) JSS=JCO(l)

. .

c~(~x.~ss)=c~(~x.~ss)-(AX(I)+CX(I))-EXK
19 20 C C CONTINUE I F (NPCON.EO.O\ GO TO 22

JSSGNEOP

F I L L B ( S S ) P R I M E TO SET OLD PATCH B A S I S F U N C T I O N S TO ZERO FOR PATCHES THAT CONNECT TO NEW SEGMENTS DO 2 1 1=1 .NPCON

21 22 C

23 24 C

25 26 27

JSS=JSScl I F (1R.GT.O.AND.IR.LE.IT) CB(IH.JSS)=(1..0.) JSS=JSS+l I F (IX.GT.O.ANO.IX.LE.11) CB(IX.JSS)=(I..O.) CONTINUE I F ( M 2 . G T . M ) GO TO 2 3 F I L L B(SW) AND B ( S S ) I F (Il.LE.IN2) C A L L CMSW (M2.M.II.IN2,CB(l.IST).CB.NI.NB.O) I F ( I M l . L E . I h 2 ) C A L L CMSS (M2.M.IMl.IM2.CB(IMX.IST).NB.0) I F ( I C A S X . E O . 1 ) GO TO 2 4 W R I T E ( 1 4 ) ((CB(I.J).I=l,IT).J=l,ND) CONTINUE F I L L I N G B COMPLETE. START ON C AND 0 IT=NPBL ISV=-NPBL DO 4 3 I B L K = t . N B R L ISV=ISv+NPBL ISVV=ISV+NC I F (1BLK.EO.NBBL) IT=NLBL If ( I C A S X . L T . 3 ) GO TO 2 7 DO 2 6 J = l . I T DO 2 5 I=I .NC CC(I.J)=(0..0.) DO 2 6 I = l . N D CD(I.J)=(O..O.) I 1= 1 s v v + 1 12=ISVv+IT INl=II-MlEO IN2=I2-M1EO I F (IN2.GT.N) IN2=N IMl=II-N IM2=12-N I F (IMI.Ll.MZE0) IMI=MZEQ I F (IM2.GT.MEO) IMI=MEO IMX=I I F (INI.LE.IN2) IMX=NEPN-Il+2 I F (ICASX.LT.3) GO TO 3 2 I F ( N 2 . G T . N ) GO TO 3 2 SAME AS DO 2 4 LOOP TO F I L L D ( W ) FOR I C A S X GREATER THAN 2 DO 3 1 J=NZ.N CALL TRIO ( J )

DO 29 1=1 JSNO JSS=JCO(I) IF (JSS.LT.N~) GO TO 28 JCO(I)=JSS-NI GO TO 29 JC~(I)=NE~~+IC~NX(J~~) CONTINUE IF (INl.LE.IN2) CALL C W ( J . I N ~ . I N ~ . C O . N O . C D . N ~ . I ) IF ( 1 ~ . 1L E . I M ~ ) CALL CMWS ( J . 1 ~ .IM2,CD(I 1 .IMX).NO.CD,ND. 1) IF (NLOAO.EQ.0) GO TO 31 IR=J-NI-ISV DO 30 I=I JSS=JCO(I) C~(JS~.IR)=C~(JS~,IR)-(A~(I)+~~(I))*E~K CONTINUE IF (M2.GT.M) GO TO 33 FILL D(SW) AND D(SS) IF (INI.LE.IN2) CALL CMSW ( M ~ . M . I N ~ . I N ~ . C D ( I S T , ~ ) , C O , N ~ , N D , ~ ) IF (IMI.LE.IMZ)CALL CMSS (M2.M.IMI.IM2,CO(IST.IMX).NO.l) IF (N1.LT.I) GO TO 39 FILL c(w).c(WS). O(W)PRIME. AN0 D(WS)PRIME. DO 37 J=I .N1 CALL TRIO (J) IF (NSCON.EQ.0) GO TO 36 0 0 35 IX=I JSNO JSS=JCO( IX) IF (JSS.LT.N2) GO TO 34 JCO(IX)=JSS+MIE~ GO TO 35 IR=ICONX(JSS) IF (IR.NE.0) JCO(IX)=NEOSP+IR CONTINUE IF (INl.LE.IN2) CALL C W (J.INl.IN2.CC.NC.CD.ND.ITX) IF (IMI.LE.IM2) CALL C W S (J.IMl.IM2.CC(l.IMX).NC.CO(1.IMX),ND

CMNGF
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 21 1 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233

.JSNO

CONTINUE IF (NSCON.EQ.0) GO TO 39 FILL C(W)PRIME DO 38 IX=I .NSCON IR=ISCON(IX) JSS=NEQS+IX-ISV IF ( J S S . G T . O . A N 0 . J S S . L E . I T ) CONTINUE IF (NPCON.EQ.0) GO TO 41 JSS=NEQP-ISV FILL C(SS)PRIME 00 40 I=I.NPCON IX=IPCON(1).2+Nl IR-IX-I

CC(IR.JSS)=(l..O.)

JSS=JSS+I IF (JSS.GT.0.AND.JSS.LE.IT) CC(IX.JSS)=(I..O.) CONTINUE IF (MI .LT . I ) 'GO TO 42 FILL C(SW) AND C(SS) IF (1Nl.LE.1~2) CALL CMSW ( ~ . M ~ . I N ~ . I N ~ . c C ( N ~ . ~ ) . C C , O , N C ~ ~ ) IF (IMI .LE.IMz) CALL CMSS (I ,MI .IMI.IM2.CC(N2.1MX),NCCI) CONTINUE IF (1CASX.EQ.I) GO TO 43 WRITE (12) ((CD(J.I).J=I.ND).I=l.IT) WRITE (15) ((CC(J.I).J=l.NC).I=l.IT)

2 5 7 43 258 259 260 261 262 263

CONTINUE IF(ICASX.EO.I)RETURN REWIND 1 2 REWIND 1 4 REWIND 15 RETURN END

CMSET

CMSET

PUKPOSE To c o n t r o l t h e f i l l i n g o f t h e i n t e r a c t i o n m a t r i x .

METHOD The l i n e a r e q u a t i o n s r e s u l t i n g from t h e moment method s o l u t i o n o f e q u a t i o n s 1 3 , 14 and t h e n e g a t i v e o f e q u a t i o n 1 5 i n P a r t I a r e w r i t t e n a s

where N = number o f segments


M = number oE p a t c h e s

A..

13 1J

i . . (E
1

a t r . due t o segment b a s i s f u n c t i o n j)

6.. =

s:

(E a t r i d u e t o c u r r e n t o n p a t c h [(j + 1 ) / 2 ] i n
1

direction
C . = - v

; .)
J

kJ

k '

due t o segment b a s i s E u n c t i o n j) P[(k+1)/2~ S[(k+1)/21

D . = - v
k~

. ("'

'[(k+1)/2]
J

due t o c u r r e n t o n p a t c h [ ( j + 1 ) / 2 ] S

i n d i r e c t i o n ;.)
E. =
1

[(k+1)/2]

+ - a .

-s.
k

. (inkident

electric field at r.)


1

1 2

kj

Hk =
( i n c i d e n t magnetic Field a t p [(k+1)/21) S[(k+1)/2~

r. = p o s i t i o n o f t h e c e n t e r o f segment i L

CMSET

& 1

= position of the center of patch

s. = unit vector in the direction of segment i


1

t2 if i is odd
1

for patch [(i+1)/2]

S. = 1 i f ;
1

x ; x

=
=

n on
-n
odd

patch i

-1 if
U

i1

t2

on patch i

kJ

-1 iE k = j

+ 1 if k = j = even

O i f k f j c. and d. are determined later J J by solving the matrix equation of order N + 2M.
J
3'

The basis Eunction amplitudes a , , b.

The matrix elements are computed by calling subroutines CMWW, CMSW, CMWS, and CMSS for the elements of A,
0,

C and D respectively.

For A and C

the components of all basis functions that extend across segment J are computed by calling TRIO at CM 52. CMWW and CMWS are then called to compute the components of A or C due to these basis function components on segment J .

If segment j , with length A.

J'

is loaded with impedance 2 . the

-l X (value of basis function k elements of A are modified as A . = A . ~k ~k Aj at the center of segment j) for k = the numbers of all basis functions that
extend onto segment j . The summation over values of k ( k = JSS) for loading All on segment J occurs at CM 68. The submatrices are stored in the array CM in transposed form.

z.

references to rows and columns, here, apply to the nontransposed matrices. Thus "row" in this discussion refers to the second index of CM in the code.

CMSET For a structure without symmetry the submatrices are stored in the order

1 f the complete matrix is too large for the array CM then blocks of rows are

A block may then contain rows from A and B , rows from C and D or a combination. The row of CM at which C and D start is computed as IST. For a structure having p symmetric sections the submatrices are stored in the form

filled and written on file 11.

where

I:: [:: ]:I


1

n1

A2

82 *2

...

P
!D BP

C2

CP

represents A. in the first row of submatrices in equation 108 of Part I. Each call to CMWW and CMWS may fill elements of Ai or C. for any value of 1 i. The column indices in array JCO are adjusted at CM 55 to allow for the columns occupied by the B. and D. matrices. Bi and D. are filled for
1 1
1

each value of i in the loop from CM 75 to CM 81. computed From CM 85 to CM 100. SYMBOL DICTIONARY CM 11
I2
IEXXX
= array for the matrix
=

The Fourier transform of the

submatrices, or the transform for planar symmetry (equation 116 of Part I) is

number of first equation in a block (patch equation +N for patches) number of the last equation in a block

= 1 to use extended thin wire kernel on wires, 0 otherwise = number of first patch equation in a block

IM1

CMSET IM2
= number o f

l a s t patch equation i n a block

IN2
IOUT
I PR

= n u m b e r o f t h e Last s e g m e n t e q u a t l o n i n a b l o c k = number o f

r e a l numbers i n a b l o c k f o r o u t p u t f o r seyruent J

= row i n CM ( s e c o n d i n d e x )

IST

= row i n C M of t h e f i r s t patch equation

ISV
IT IXBLK1

=11-1

= number o f rows i n a b l o c k
= b l o c k number = number o f = number o f

JM1
JM 2

f i r s t p a t c h i n a symmetric s e c t i o n t h e last p a t c h i n a symmetric s e c t i o n

JST
MP 2

= c o l u m n i n Ct* o f t h e f i r s t p a t c h e q u a t i o n f o r a s y m m e t r i c b l o c k
= number o f p a t c h e q u a t i o n s

NEQ NOP
N PEQ

= t o t a l number o f e q u a t i o n s
= number o f s y m m e t r i c s e c t i o n s

= number o f e q u a t i o n s i n a s y m m e t r i c s e c t i o n
= row d i m e n s i o n s o f

NROW

the transposed C M array

KKHX

= minimum i n t e r a c t i o n d i s t a n c e a t w h i c h t h e i n f i n i t e s i m a l d i p o l e

a p p r o x i m a t i o n i s u s e d f o r t h e f i e l d o f a segment

CMSET
CM CM CM CM COMPLEX C ~ . ~ A R R A Y . Z A J . E T K . E T S . E T C , E X K , E Y K , E ~ K , E X ~ , E Y , ~ ~CM , , , 1EZC.SSX.O.OETER CM COMMON /DATA/ L D . N l .N2.N.NPsM1 . M 2 . M . M P . X ( 3 0 0 ) . Y ( 3 0 0 ) . ~ ( 3 0 0 ) ( 3 CM I ) ,B1(300) ~ ~ L P ( ~ o ~ ) . ~ ~ ~ ( 3 0 0 ) , 1 ~ ,ICON~(OO) 0 ~ 1 ( 3 0 0 ) I T A G ( ~ O I)C O N X ( CM 2300).WLAM.IPSYM CM CMSET S E T S UP THE COMPLEX STRUCTURE M A T R I X I N THE ARRAY CM S U B R O U T I N E CMSET ( N R W . C M . R K H X . I E X K X ) 1 2 3
4

6 7 8 9

COMMON /MATPAR/ ~ C A S E . N B L ~ K S . N P B L K . N L A S T , N E L S Y M , N P S Y M , N CM L ~ , 10 ~CASX.NBBX.NPBX.NLBX.NBBL.NPBL,NLBL CM 1 1 COMMON /SMAT/ SSX(16.16) D(600) COMMON /SCRATM/ COMMON /ZLOAD/ ZARRAY(3OO).NLOAD,NLODF CM CM CM 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

~ ~ ( 3 .0 BX ) ( 3 0 ) , c X ( S O ) , J C O ( ~ O ), J S N O ~ I S C O N ( ~ ON ) C O N I CM COMMON /SEGJ/ ICON(IO).NPCON CM COMMON / D A T A J / S.B.XJ.YJ.ZJ.CABJ.SABJ.SALPJ,EXK,EYK,EZKEXS.EYS.EZ CM 1S.EXC.EYC.EZC.RKH.IEXK.INDl.INDZ.IPGND CM D I M E N S I O N CM(NROW.1) CM MP2=2*MP CM NPEO=NP+MP2 CM NEO=N+Z9M CM NOP=NEO/NPEO CM I F ( I C A S E . G T . 2 ) REWIND 1 1 CM RKH=RKHX CM IEXK=IEXKX CM IOUT=2*NPBLK*NROW CM IT=NPBLK CM CM CYCLE OVER M A T R I X BLOCKS CM CM DO 1 3 I X B L K 1 = 1 .NBLOKS CM I S V = ( I X B L K l - 1 )*NPBLK CM I F (IXBLKI.EO.NBLOKS) IT=NLAST CM DO 1 1 = 1 .NROW CM 00 1 J = l . I T CM CM(I.J)=(O..O.) CM Il=ISV+l CM 12=ISV+IT CM INZ=I? CM I F (IN2.GT.NP) IN2=NP CM I M I = I l -NP CM IM2=12-NP CM IF (IMI.LT.I) IMI=I CM IST=I CM I F ( 1 1 . L E . N P ) IST=NP-I1+2 CM I F ( N . E O . 0 ) GO TO 5 CM CM W I R E SOURCE LOOP DO 4 J = l . N CALL TRIO ( J ) 00 2 I=l JSNO IJ=JCO(I) CM CM CM CM CM CM
CM

52
53 54 55 56

JCO(I)=((IJ-I)/NP)*MPz+IJ
I F (I~.L CALL E C W. (J.Il.IN2.CM.NROW.CM.NROW.l) IN~~
C A L L CMWS GO TO 4 I F (IMl.LE.IM2) I F (NLOAD.EO.O)

(J.IMl.IM2.CM(l.IST).NROW.CM.NROW.1)

CM CM CM CM

57
58 59

M A T R I X ELEMENTS M O D I F I E D BY LOADING

CMSET
ZAJ=ZARRAY(J) DO 3 1 = 1 . JSNO

~. I F (M.EQ.0) GO TO 7 M A T R I X ELEMENTS FOR PATCH CURRENT SOURCES JMl=1-MP JM2=0 JST=l-MP2 DO 6 I = l . N O P J M I = J M I +MP JM2=JM2+MP JST=JST+NPEQ I F ( I I . L E . I N 2 ) C A L L CMSW (JMl.JM2.Il.IN2.CM(JST.l).CM.O.NROW.I) I F ( I M ~ . L E . I M ~ )C A L L CMSS (JMI.JM2.IMI.IM2.CM(JST.IST),NROW,i) CONTINUE I F ( I C A S E . E O . 1 ) GO TO 1 3 I F ( I C A S E . E O . 3 ) GO TO 1 2 COMBINE ELEMENTS FOR SYMMETRY MODES DO 1 1 I = 1 . I T DO 1 1 J = l . N P E O DO 8 K = l . N O P KA=J+(K-I)*NPEQ O(K)=CM(KA.I)

00 1 1 K = 2 . NOP KA=J+(K-1)-NPEO OETER=D(l) DO 1 0 KK=Z.NOP

CONTINUE I F (ICASE.LT.3) GO TO 1 3 W R I T E BLOCK FOR OUT-OF-CORE CASES C A L L BLCKOT ( C M . l l . l . I O U T . 1 . 3 1 ) CONTINUE I F (ICASE.GT.2) REWIND 1 1 RETURN EN0

mss
CHS S -PUllPOSE To compute and s t o r e m a t r i x e l e m e n t s r e p r e s e n t i n g t h e H f i e l d a t p a t c h centers due t o t h e current on patches.

METHOL) CMSS c o m p u t e s t h e m a t r i x e l e m e n t s D s u b r o u t i n e CMSET.

. defined i n t h e description of "3 S u b r o u t i n e HINTG i s c a l l e d t o c o m p u t e t h e m a g n e t i c f i e l d a t


H due t o t h e current

t h e c e n t e r o f p a t c h I d u e t o c u r r e n t o n p a t c h J.

on

p a t c h J i s s t o r e d i n EXK, EYK a n d EZK, w h i l e H d u e t o c u r r e n t i n EXS, EYS a n d EZS.

i2is

stored

M 61 and C M T h e term 0.5 0 . i n D . i s a d d e d a t C kJ k~ 62 f o r odd a n d e v e n e q u a t i o n s . The m a t r i x e l e m e n t s a r e s t o r e d i n a r r a y C M from 5 5 6 3 t o SS78 i n e i t h e r normal o r t r a n s p o s e d o r d e r . Elements f o r both t h e

e v e n and odd e q u a t i o n s a r e s t o r e d i f b o t h e q u a t i o n s a r e w i t h i n t h e b l o c k .

SYMBOL DICTIONARY
CIY
= array f o r matrix storage = D

Gll G12 G21 G22

kJ kJ kJ

. f o r k o d d , j odd

= 0
= D

f o r k odd, j even

. f o r k e v e n , j odd

= D

I1
I2 LCOMP

. f o r k even, j even kJ = p a t c h number f o r f i r s t e q u a t i o n


= p a t c h number f o r l a s t e q u a t i o n = e q u a t i o n number f o r t h e o d d n u m b e r e d e q u a t i o n f o r

observation patch I
= location of = location of

t h e o d d numbered e q u a t i o n i n C M t h e e v e n numbered e q u a t i o n i n CM

= array location for coordinates of patch I


= p a t c h e q u a t i o n number f o r f i r s t e q u a t i o n i n b l o c k = p a t c h e q u a t i o n number o r l a s t e q u a t i o n i n b l o c k

= O o r 1 t o s e l e c t n o r m a l o r t r a n s p o s e d f i l l i n g o f CM
= number o f

f i r s t source patch

= number oE l a s t s o u r c e p a t c h

CMSS

JJ1

= column i n n o n - t r a n s p o s e d

matrix, of the f i r s t

equation f o r patch J 552


JL = column o f second e q u a t i o n f o r p a t c h J = array location f o r coordinates of patch'J = row d i m e n s i o n o f GM

NROW
TIXI, TlYI, TlZI T2X1, TZYI, TZZI TlXJ, TIYJ, TlZJ T Z X J , TZYJ, TZZJ XI, Y I , ZI

= x , y and z components of

o r t 2 f o r patch I

. .

or J

= c o o r d i n a t e s of c e n t e r of p a t c h I

CMSS
SUBROUTINE CMSS (Jl.J2.IMl.IM2.CM.NROW.ITRP) CMSS COMPUTES M A T R I X ELEMENTS FOR SURFACE-SURFACE I N T E R A C T I O N S . COMPLEX G l l . G 1 2 . G 2 1 . G 2 2 . C M . E X K . E Y K , E Z K K E X S , E Y S , E Z S , E X C , E Y C , E Z C COMMON /DATA/ L D . N l .N2.N.NP.MI.M2.M.MP.X(300),Y(300).2(300),SI(300 1 ) . B I ( 3 0 0 ) .ALP(300) ,BET(300) ,ICON1 ( 3 0 0 ) .ICON2(300) I T A G ( O 0 ) I C O N X ( 23OO).WLAM.IPSYM , COMMON /ANGL/ SALP(~OO) SS SS SS SS SS SS SS

DIMENSION c ~ ( ~ ~ o w . 1 ) DIMENSION ~ l X ( 1 ) . T l Y ( 1 ) T l Z ( 1 ) TZX(1). T 2 Y ( l ) , T2Z(1) EQUIVALENCE ( T 1 X . S I ) . (TIY~ALP). (TlZ.0ET). (T2X.ICONl). (T2Y,ICON 12). (T2Z.ITAG) EQUIVALENCE ( T I X J . C A B J ) . (T1YJ.SABJ). (T1ZJ.SALPJ). (TZXJ.O). (T2Y l J . I N D l ) , (T2ZJ.INO2)

5s SS SS SS SS SS

IL=LDP-I ICOMP=ICOMP+2 111=111+2 II2=111+1 TlXI=TlX(IL)'sALP(IL) TlYI=TlY(IL)'sALP(IL) TIZI=TIZ(IL)*~ALP(IL) T2XI=T2X(IL)'SALP(IL) T2YI=T2Y(IL)*SALP(IL) T2ZI=T2Z(IL)'sALP(IL) XI=X(IL) YI=Y(IL) ZI=Z(IL) JJl=-1 LOOP OVER SOURCE PATCHES DO 5 J = J l . J 2 JL=LDP-J JJl=JJl+2 JJ2=JJ1+1 S=BI(JL) XJ=X(JL) YJ=Y(JL) ZJ=Z( J L )

CALL H N IT G (XI.YI.ZI) GII=-(T~xI*ExK+T~YI'EYK+T~ZI*CZK)

c~~=-(T~xI*Ex~+T~YI'EYS+T~ZI~EZS) ~21=-(T~xI*ExK+TIYI.EYK+T~ZI~EZK) ~22=-(T~xI*EXS+TIYI*EYS+T~ZI*EZS)


I F ( 1 . N E . J ) GO TO 1 Gll=G11-.5 G22=G22+.5 I F ( I T R P . N E . 0 ) GO TO 3 NORMAL F I L L IF (~COMP.LT.IMI) GO TO 2 C M ( I I 1 . J J l )=GI1

CMSS

GO TO 5 TRANSPOSED FILL IF ( I C O M P . L T . I M I ) GO TO 4 CM(JJl.IIl)=Gll CM(JJ2,IIl)=GlZ IF (ICOMP.GE.IM2) GO TO 5 CM(JJI.I12)=G21 CM(JJ2,112)=G22 CONTINUE RETURN END

C M S W C M W -S PUKPOSE To compute and s t o r e m a t r i x e l e m e n t s r e p r e s e n t i n g t h e e l e c t r i c f i e l d a t segment c e n t e r s d u e t o t h e c u r r e n t o n p a t c h e s .

METHOD SW30 SN36

SW35 SW42

C o o r d i n a t e s o f o b s e r v a t i o n segment a r e s t o r e d . I f e i t h e r end o f t h e o b s e r v a t i o n segment c o n n e c t s t o a s u r E a c e IPCH i s s e t t o t h e number o f t h e f i r s t o f t h e four patches a t t h e connection point.

SW48

SW57

C o o r d i n a t e s oE t h e s o u r c e p a t c h a r e s t o r e d i n
COMMON/DATAJ/

SW6l

SN86

I F IPCH = J t h e n p a t c h J i s t h e f i r s t p a t c h a t t h e p o i n t

where segment I c o n n e c t s t o t h e s u r f a c e .

Subroutine

PCIN'r i s c a l l e d t o i n t e g r a t e t h e c u r r e n t o v e r t h e f o u r

patches a t t h e connection point.

The c u r r e n t o n t h e

patches includes the eight basis functions of the four p a t c h e s and a p o r t i o n of t h e b a s i s f u n c t i o n from t h e segment. Hence c o n t r i b u t i o n s t o n i n e m a t r i x e l e m e n t s a r e The f i e l d d u e t o t h e

g e n e r a t e d and s t o r e d i n a r r a y EMEL.

segment b a s i s f u n c t i o n e x t e n d i n g o n t o t h e p a t c h e s i s s t o r e d i n a r r a y CW a t SW76 o r SW78. The f i e l d s d u e t o

t h e f i r a t p a t c h b a s i s f u n c t i o n , EM EL(^) and EM EL(^), a r e t h e n s t o r e d i n a r r a y CM a t SW80 and SW81 o r a t SW83 and SW84. ICGO i s t h e n i n c r e m e n t e d . For t h e next t h r e e

t i m e s t h r o u g h t h e l o o p o v e r J t h e c a l l t o PCINT i s s k i p p e d a t SW63 and t h e r e m a i n i n g v a l u e s i n EMEL a r e stored. SW88

SW96

I f segment I and p a t c h J a r e n o t c o n n e c t e d , s u b r o u t i n e UNERE i s c a l l e d t o compute t h e e l e c t r i c f i e l d d u e t o t h e c u r r e n t on t h e patch with t h e c u r r e n t t r e a t e d a s ~ e r t z i a n d i p o l e s i n t h e d i r e c t i o n s i and ; The m a t r i x 1 2' e l e m e n t s a r e s t o r e d i n CM.

C M S W SW102

SW138

T h i s i s a s p e c i a l s e c t i o n o f c o d e t o compute t h e e l e c t r i c f i e l d d u e t o t h e component o f a segment b a s i s f u n c t i o n t h a t e x t e n d s o n t o connected patches.


I t i s used a t Line

CG112 o f s u b r o u t i n e CMNGF f o r t h e c a s e where t h e c o n n e c t e d segment and p a t c h e s a r e i n t h e NGF f i l e and a new segment i s c o n n e c t e d t o t h e o u t e r end o f t h e NGF segment m o d i f y i n g i t s b a s i s f u n c t i o n . s u b r o u t i n e PCINT Only

i s c a l l e d t o evaluate the nine matrix elements.


been m o d i f i e d . SYMBOL DICTIONARY
CAB I CM
=

EMEL(9) i s u s e d s i n c e t h e p a t c h b a s i s f u n c t i o n s h a v e n o t

x component o f

i n d i r e c t i o n o f segment I

= a r r a y f o r E due t o p a t c h b a s i s f u n c t i o n s = a r r a y f o r E d u e t o segment b a s i s f u n c t i o n e x t e n d i n g o n t o

C W

s u r f a c e a t connection point EMEL FSIGN


11
= a r r a y o f m a t r i x e l e m e n t s from i n t e g r a t i n g o v e r s u r f a c e = +1 d e p e n d i n g o n which end of segment c o n n e c t s t o s u r f a c e = number o f f i r s t o b s e r v a t i o n segment
=

12

number o f l a s t o b s e r v a t i o n segment

ccs

= index f o r matrix elements a t connection p o i n t

IL
IP

= i n d e x f o r segment b a s i s f u n c t i o n i n CW
= 1

f o r d i r e c t f i e l d , 2 f o r image i n ground

IPCH
ITRP

= number o f f i r s t p a t c h c o n n e c t i n g t o a segment = 0 f o r normal m a t r i x f i l l

1 f o r transposed f i l l

-1 f o r s p e c i a l NGF c a s e
J J1 J2 = source patch = f i r s t source patch = l a s t source patch = i n d e x f o r s o u r c e p a t c h i n CM
=

JL
JS
K

index f o r patch coordinates

= i n d e x i n CM o r CW f o r o b s e r v a t i o n segment = index o f f s e t f o r C W

NCW

N EQS

= number o f e q u a t i o n s e x c l u d i n g NGF = row d i m e n s i o n s of CM and C W = pi

NKOd
PI PX PY

= s i n k(s
= cos k(s

s ) o r s a t t h e end o f t h e segment
so) connected t o t h e s u r f a c e

SAB I
SALPI

= y component o f
= z component o f

i n d i r e c t i o n o f segment I i n d i r e c t i o n o f segment I

X I , Y I , ZI

= c e n t e r O F o b s e r v a t i o n segment

CMSW
S U B R O U T I N E CMSW ( J 1 . J 2 . 1 1 . 1 2 . C M . C W . N C W . N R O W . I T R P ) COMPUTES M A T R I X ELEMENTS FOR E ALONG W I R E S DUE TO PATCH CURRENT COMPLEX CM.ZRATI.ZRATI2.Tl.EXK.EYK.EZK.EXS.EYS.EZS,EXC,EYCCEZCCEME 1L.CW.FRATI SW SW SW

9w

COMMON /ANGL/ SALP(300) SW COMMON /GND/ZRATI.ZRATI~.FRATI,CL.CH.SCRWL.SCRWR.NRAOL.KSYMP.IFAR. sw 1IPERF.Tl.TZ SW COMMON /DATAJ/ S . B . X J . Y J . Z J . C A B J . S A B J . S A L P J , E X K ~ E Y K ~ E ~ K , E ~ ~ , E Ysw ~,E~ lS.EXC.EYC.EZC.RKH.IEXK.INDl,IND2,IPCNO SW A X ( 3 0 ) , 8 ~ ( 3 0 ). C X ( 3 0 ) , J C 0 ( 3 0 ) , J S N O O I S C O N ( 5 0 ) N C O N I P SW COMMON /SEGJ/ lCON(lO).NPCON SW DIMENSION CAB(I). S A B ( 1 ) . CM(NROW.~), c w ( ~ ~ w . 1 ) sw DIMENSION TIX(I), ~ l Y ( 1 ) . TlZ(1). TZX(1). TZY(1). T22(1). EMEL(9) SW EOUIVALENCE ( T 1 X . S I ) . (T1Y.ALP). (T1Z.BET). (T2X.ICONl). ( T 2 Y . I C O N SW 1 2 ) . (T2Z.TTAG). (CAO.AL?). (SAB.BET) SW (T1YJ.SABJ). (T1ZJ.SALPJ). (T2XJ.B). ( T Z Y SW EQUIVALENCE ( T 1 X J . C A B J ) . lJ.IND1). (TZZJ.IND2) SW DATA ~ 1 / 3 . 1 4 1 5 9 2 6 5 4 / SW LoP=LD+l SW NEOS=N-N1+Z0(M-MI) SW I F (ITRP.LT.O) GO TO 1 3 sw K=O SW ICGO=l SW O B S E R V A T I O N LOOP DO 1 2 1 = 1 1 . 1 2 K=K+I XI=X(I) YI=Y(I) ZI=Z(I)

-,.

cner=cas(I) snar=sas(I)
SALPI=SALP(I) IPCH=O I F (ICONl(I).LT.lOOOO) GO TO 1 IPCH=ICONl(I)-10000 fSIGN=-1 . F I (ICON~(I).LT.~OOOO) GO TO 2 IPCH=ICON2(1)-10000 fSIGN=l . JL=O SOURCE LOOP 00 1 2 J = J l . J Z JS=LDP-J JL=JL+2 TlXJ=TlX(JS) TlYJ=TlY(JS) TlZJ=TlZ(JS) TZXJ=TZX(JS) T2YJ=T2Y(JS) TZZJ=TZZ(JS) XJ=X(JS) YJ=Y(JS) ZJ=Z(JS) S=BI(JS) GROUND LOOP 00 1 2 I P = l . K S Y M P IPGNO=IP I F (IPCH.NE.J.AND.ICGO.EO.1) GO TO 9 I F ( I P . E 0 . 2 ) GO TO 9 I F (ICGO.GT.l) GO TO 6 C A L L P C I N T (XI.YI.ZI.CABI.SABI,SALPI,

CMSW
PY=PI.SI(I).FSIGN PX=SIN(PY) PY=Cos(PY) EXC=EMEL(9).FSIGN CALL TRIO ( I ) I F ( 1 . G T . N ) ) GO TO 3 IL=NEOS+ICONX(I) GO TO 4 IL=I-NCW I F (1.LC.NP) IL=((IL-l)/NP)*2*MP+IL I F (ITRP.NE.0) GO TO 5

CW(K.IL)=CW(K.IL)+EXC*(AX(JSNO)+BX(JSNO)~PX+CX(JSNO)*PY)
GO TO 6 CW(IL.K)=CW(IL.K)+EXC*(AX(JSNO)+EX(JSNO)*PX+CX(JSNO)*PY) I F ( I T R P . N E . 0 ) GO TO 7 CM(K.JL-I)=EMEL(ICGO) CM(K.JL)=EMEL(ICGO+4) GO TO 8 CM(JL-I,K)=EMEL(ICGO) CM(JL,K)=EMEL(ICG0+4) ICGO=ICGO+l

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

C A L L UNERE ( X I . Y I . Z I ) I F f I T R P . N E . 0 ) GO TO 1 0 NORMAL F I L L

CMfK.JL-lI=CM~K.JL-I)+EXKKCABI+EYK~SAEI+EZK*SALPI

TRANSPOSED F I L L

CM~JL-~.K~=CM(JL-I.K)+EXK~CAEI+EYK*SAEI+EZK~SALPI
C M ( J L . K ) = c M ( J ~ . K)+EXS~CABI+EYS.SABI+EZS*SALPI CONTINUE CONTINUE RETURN FOR OLD SEG. CONNECTING TO OLD PATCH ON ONE E N 0 A N 0 NEW SEG. ON OTHER END I N T E G R A T E S I N G U L A R COMPONENT ( 9 ) OF SURFACE CURRENT ONLY I F (Jl.LT.Il.OR.Jl.GT.I2) GO TO 1 6 IPCH=ICONl(Jl) I F (IPCH.LT.10000) GO TO 1 4 IPCH=IPCH-10000 FSIGN=-1 . GO TO 1 5 IPCH=ICONZ( J I ) I F (IPCH.LT.10000) GO TO 1 6 IPCH=IPCH-10000 FSIGN=l . I F ( 1 P C H . G T . M l ) GO TO 1 6 JS=LDP-IPCH IPGND=I TIXJ=TIX(JS) TIYJ=T~Y(JS) TlZJ=TIZ(JS) TZXJ=TZX(JS) TZYJ=TZY(JS) TZZJ=TLZ(JS) XJ=X(JS) YJ=Y(JS) ZJ=Z(JS)

SABI=SAB(Jl ) SALPI=SALP(JI) CALL PCINT (XI.YI.ZI.CABI.SABI,SALPI.EMEL) PY=PI.SI(JI)*FSIGN PX=SIN(PY) PY=Cos(PY) EXC=fMEL(9)*FSIGN IL=JCO(JSNO) K=Jl-Il+1
CW(K.IL)=CW(K.IL)+EXC~(AX(JSNO)+BX(JSNO)~PX+CX(JSNO)*PY)

RETURN END

CMWS

CMWS -PUKPOSE To compute and s t o r e m a t r i x e l e m e n t s r e p r e s e n t i n g t h e m a g n e t i c f i e l d a t p a t c h c e n t e r s d u e t o t h e c u r r e n t o n w i r e segments.

METHOD M a t r i x e l e m e n t s a r e c o m p u t e d f o r p a t c h e q u a t i o n s n u m b e r e d I1 t h r o u g h I 2 w i t h t h e s o u r c e segment J. F o r o d d numbered e q u a t i o n s t h e m a t r i x e l e m e n t For

r e p r e s e n t s t h e f i r s t t e r m o n t h e r i g h t s i d e o f e q u a t i o n 1 4 o f P a r t I.

e v e n numbered e q u a t i o n s i t i s t h e n e g a t i v e o f t h e f i r s t t e r m o n t h e r i g h t s i d e

of e q u a t i o n 15.

F o r e q u a t i o n I1 a n d f o r a l l o d d n u m b e r e d e q u a t i o n s s u b r o u t i n e

HSFLD i s c a l l e d t o c o m p u t e t h e H f i e l d a t t h e c e n t e r o f t h e p a t c h d u e t o

constant, s i n k(s

s o ) and c o s k ( s

r e q u i r e d component of t h e f i e l d , -t

s o ) c u r r e n t s o n s e g m e n t J.
' H or

The

-i 1

'

f o r odd o r e v e n P l u l t i p l i c a t i o n by orientation on Storage

e q u a t i o n s r e s p e c t i v e l y , i s c o m p u t e d f r o m WS49 t o WS51. S A L P ( J S ) r e v e r s e s t h e s i g n when ( E l , a p a t c h f o r m e d by r e f l e c t i o n .

i 2 , fiJ has

a left-hand

The f i e l d component f o r e a c h b a s i s f u n c t i o n

component o n s e g m e n t J i s c o m p u t e d a n d s t o r e d f o r WS56 t h r o u g h WS75.

M W W . of t h e matrix elements is similar t o that i n subroutine C

SYMBOL DICTIONARY C M CW
ET K
= a r r a y f o r matrix elements = a r r a y f o r m a t r i x e l e m e n t s (NCF o n l y ) = -t ^

'

or

-i 1

' H due t o c u r r e n t o t c o n s t a n t ,

sin k(s ETC


I

so), o r cos k(s

so) respectively

= e q u a t i o n number = number o f

11
12
IK

f i r s t equation

= number o f second e q u a t i o n
= 0 if

I i s even,

1 i f I is odd

[PATCH IP K

= p a t c h number f o r e q u a t i o n I = r e l a t i v e matrix Location f o r equation

I.

P o s i t i o n i n complete

m a t r i x depends o n t h e address of C M in the c a l l t o C M W S

ITRP

= 0 for non-transposed fill

1 for transposed fill


2 for transposed fill for NGF

J
JS

= source segment number

= location in COMMON/DATA/ of parameters for patch J


=

JX
LDP
NK

matrix index for a particular basis function

= L D + l
= row dimension of

CM

::I NW TZ

= row dimension of CW

x, y , and z components of t l or t 2

"'I
Y1 I

X,

y and

z coordinates of the center of the patch at

ZI

which the field is computed

S U B R O U T I N E C W S (J.11.12.CM.NR.CW.NW.ITRP) C W S COMPUTES M A T R I X ELEMENTS FOR WIRE-SURFACE INTERACTIONS

ws ws

WS WS COMPLEX CM.CW.ETK.ETS.ETC.EXK,EYK,EZK,EXS,EYS,EZS,EXC,EYC,EZC, WS COMMON / D A T A / L 0 . N I .NZ.N.NP.Ml . M 2 . M . M P . X ( 3 0 0 ) , Y ( 3 0 0 ) , Z ( 3 0 0 ) I ( O 0 WS 1 ) . B 1 ( 3 0 0 ) . ~ L P ( 3 0 0 ). s E T ( 3 0 0 ) . I C O N 1 ( 3 0 0 ) . 3 0 ) I T A G O O ) I C O N X ( WS 23OO).WLAM,IPSYM WS SALP(3OO) W+ COMMON /ANGL/

COMMON./DATAJ/

1S.EXC.EYC.EZC.RKH,IEXKKIND1.1ND2.1PGND

S , B . X J . Y J . Z J . C A B J . S A B J . S A L P J ~ E X K , E Y K , E ~ K , ~ ~ ws .~E~ WS DIMENSION CM(NR.1). CW(NW.1). C A B ( 1 ) . S A B ( 1 ) WS DIMENSION T I X ( I ) . T I Y ( 1 ) . T l Z ( 1 ) . TZX(1). TZY(1). T 2 Z ( I ) WS EOUIVALENCE ( C A B . A L P ) . (S*B.BET). (TIX.51). (TIY.ALP). (TlZ,BET) WS EOUIVALENCE ( T Z X . I C O N 1 ) . (T2Y.ICON2). (T2Z.ITAG) WS LDP=LD+I WS S=SI(J) WS B=BI(J) WS XJ=X(J) WS YJ=Y(J) WS ZJ=Z(J) WS CABJ=CAB(J) WS SABJ=SAB(J) WS SALPJ=SALP(J) WS
WS WS WS WS WS WS WS WS GO TO 1

O B S E R V A T I O N LOOP IPR=O DO 9 I = I 1 , I 2 IPR=IPR+I IPATCH=(I+I )/2 IK=I-(I/2)*2 I F (IK.EO.O.AND.IPR.NE.~) JS=LDP-IPATCH XI=X(JS) YI=Y( JS)

ws
WS WS WS

z~=zi~sj
CALL HSFLD ( X I . Y I . Z I . 0 . ) I F ( I K . E O . 0 ) GO TO 1 TX=TZx(JS)

F I L L M A T R I X ELEMENTS. DATA I F (1TRP.NE.O) NORMAL F I L L DO 3 I J = l . J S N O JX=JCO(IJ) GO TO 4

ELEMENT LOCATIONS DETERMINED BY CONNECTION

WS WS WS WS WS WS

.53 54 55 56 57 58

ws
ws
WS

CM(IPR.JX)=CM(IPR,JX)+ETK~AX(IJ)+ETS~BX(IJ)+ETC~CX(IJ)
GO TO 9 I F ( I T R P . E 0 . 2 ) GO TO 6 TRANSPOSED F I L L 00 5 I J = I JSNO

59 60 61

TRANSPOSED F I L L C(WS) DO 8 I J = l . J S N O JX=JCO(IJ) I F ( J X . G T . N R ) GO TO 7 GO TO 8 JX=JX-NR

AND D(WS)PRIME

(=CW)

CM(JX.IPR)=CM(JX.IPR)tETK.AX(IJ)+ETS5BX(IJ)+ETC*CX(IJ)

CW(JX.IPR)=CW(JX.IPR)+ETK*AX(~J)+ETS~BX(IJ)+ETC'CX(IJ)
CONTINUE CONTINUE RETURN END

C ? m

CHW b4 . PURPOSE To call subroutines to compute the electric field at segment centers due to current on other segments and to store matrix elements in array locations.

Parameters of source segment (J) are stored in COMMONIDATAJI. First end of segment J is tested to determine whether the extended thin wire approximation can be used. It cannot

be used at a junction of more than two wires (wW~O), at a bend (WW37), at a change in radius (WW38), or at the base oE a non-vertical segment connected to the ground (WW33). Second end of segment J is tested. Loop over observation segments ranges from I1 to 12. index IPR starts at 1 so the matrix element for I1 is stored in the first row or column of the array CM. location in the complete matrix is determined by the address given for CM when CMWW is called. EFLD computes the electric fields at (XI, YI, 21) due to segment J and stores them in COMMONIBATAJI. Electric field tangent to segment I is computed. Matrix elements are formed by combining the field components. Matrix elements are stored in non-transposed order. Matrix elements are stored in transposed order. When the source segment is from a NGF file the matrix elements will normally be stored in submatrix C of the NGF matrix structure. When the segment connects to a new segment, however, contributions to submatrix D result. The C and D contributions are stored in CM and CW, respectively, in transposed order. The The

am
SYHBOL DICTIONARY A1
CAB I
CM

= radius of observation segment

x component of unit vector in direction of segment


= array for matrix elements

CW

array for matrix elements (NGF only)


= E field tangent to segment I due to current of

ET K
ETC

I1
12

s ) and cos k ( s - so) 0 distribution, respectively, on segment J. constant, sin k ( s first observation segment final observation segment

IJ
IPK
I'CRP

= 0 for special treatment when I = J = relative matrix location for observation point = 0 for non-transposed fill

1 for transposed fill


2 for transposed fill for NGF J
= source segment number

JX
NR
NW SAB I SALPI

= matrix index for a particular basis function = row dimension of CM

row dimension of CW

= y component of unit vector in direction of segment

= z component of unit vector in direction of segment

XI, Y I , 2 1 = coordinates of center of segment

I .

CONSTANTS 0.999999
1

test for collinear segments

CMWw
SUBROUTINE C C W

(J.11.12.CM.NR.CW.NW.ITRP)
INTERACTIONS

1 2 3

W COMPUTES M A T R I X ELEMENTS FOR WIRE-WIRE

w W

w 4 W 5 COMPLEX C M . C W . E T K . E T S . E T C . E X K . E Y K , E Z K , E X S , E Y S , E Z S , E X C , E Y C , E Z C COMMON /DATA/ L O . N ~ . N ~ . N . N P . M ~ . M ~ . M . M P . X ( ~ O O ) . Y ( ~ ~ ~ ) . W Z ( ~ ~6 ~ ) . S ~ ( ~ ~ ~


1 ) . B I ( 3 0 0 ) . ~ L P ( 3 0 0 ). B E T ( 3 0 0 ) . I C O N 1 ( 3 0 0 ) . I C O N 2 ( 3 0 0 ) 23OO).WLAM,IPSYM COMMON /ANGL/ SALP(300) .ITAG(~OO).ICONX( W

W V W

7 8
9 10 11 12 13 14 15

CX~.NJN / s E G J / A X ( 3 0 ) .BX(~~).CX(~~).JCO(~O).JSNO.ISCON(~~).NSCON.IP w ICON(IO).NPCON w COMMON / O A T A J / S . B . X J . Y J . Z J . C A B J . S A B J , S A L P J . E X K . E Y K . E Z K . E X S . E Y S . E Z VEN 1S.EXC.EYC.EZC.RKH.IEXK,INO1.INDZ.IPGND W DIMENSION CM(NR.1). CW(NW.1). C A B ( I ) , SAB(1) W WU EQUIVALENCE ( C A B S A L P ) . (SAB.BET) S E T SOURCE SEGMENT PARAMETERS S=SI(J) W V . B=BI(J) w XJ=X(J) W YJ=Y(J) YEN ZJ=Z(J) HW CABJ=CAB(J) W SABJ=SAB(J) W SALPJ=SALP(J) W I F (IEXK.EQ.0) GO TO 1 6 W D E C I D E WETHER E X T . T . W . APPROX. CAN B E U S E 0 W IPR=ICONI(J) W I F (IPR) 1 .6.2 VM IPR=-IPR W GO TO 7 W I F (-ICONI(IPR).NE.J) GO TO 4 W I F ( 1 P R . N E . J ) GO TO 3 W GO TO 7 W I F (CABJ*CABJ+SABJ"SABJ.GT.l.E-8) GO TO 5 W GO TO 7 I M I F (ICONZ(IPR).NE.J)

' 6
17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

XI=ABS(CABJ'CAB(IPR)+SA8JoSAB(IPR)+SALPJ*SALP(IPR)) I F (XI.LT.0.999999) GO TO 7 I F (ABS(BI(IPR)/B-I.).GT.I.E-6) GO TO 7 I N D 1 =O GO TO 8 INOl=l GO TO 8 I N 0 1 =2 IPR=ICONP(J) I F (IPR) 9.14.10 IPR=-IPR J ) GO TO 1 5 I F (-ICONZ(IPR).NE GO TO 1 2 I F ( 1 P R . N E . J ) GO TO 1 1 I F (CABJ'CABJ+SABJoSABJ.GT.I.E-8) GO TO 1 5 GO TO 1 3

W W
W V W

W W
WU

W W
W W W WU W W

INDZ=l GO TO 1 6 IN02=2 CONTINUE O B S E R V A T I O N LOOP

IPR=O DO 23 I = I 1 . I 2 IPR=IPR+l IJ=l-J xI=x(I) YI=Y(I) zI=z(I)

nI=aI(I)
cABI=cAB(I) SABI=SAB(I) SALPI=SALP(I) CALL EFLD ( X 1 , Y I . Z I . A I . I J ) ETK=EXK*CABI+EYK.SABI+EZK0SALPI

F I L L M A T R I X ELEMENTS. DATA. I F (ITRP.NE.0) NORMAL F I L L

ELEMENT LOCATIONS DETERMINED BY CONNECTION

GO TO 18

TRANSPOSED FI~L
DO 19 I J = l

.JSNO
. .
.

CO'TOZS ' TRANS. F I L L FOR C ( W ) DO 22 I J = l .JSNO JX=JCO(IJ)

.
-

. .
(=CW)

TEST FOR ELEMENTS FOR O ( W ) P R I M E .

JX=JX-NR

CW(JX.IPR)=CW(JX.IPR)+ETK*AX(IJ)+ETS*BX(IJ)+ETC*CX(IJ)
CONTINUE CONTINUE RETURN END

CONECT CCNKLX PURPOSE To locate segment ends that contact each other or contact the center of a surface patch. METHOD The ends of each segment are identified as end 1 and end 2, defined during geometry input. The connection data for segment 1 is stored in array variables ICONl (I) for end 1 and ICON2 (I) for end 2. Four conditions are possible at each segment end: free end),

(1) no connection (a
These

(2) connection to one or more other segments, (3) connection to a

ground plane, or (4) connection to a surface modeled with patches.

conditions are indicated in the Eollowing way for end 1 of segment I : (1) (2) (3) no connection connection to

. . . . . . . . . . . . . . ICON1 segment J . . . . . . . . . ICON1

(I) = 0

(I)

+J

connection to a ground plane

. . . . . . ICON1

(4) connection to patch K

..........

(I). = I ICON1 (I) = 10000

In case 2, if segment . I has the same reference direction as segment I (end 2 of segment J connected to end 1 of segment I), the sign is positive. opposed reference directions (end 1 to end 1) the sign is negative. connected segment in sequence. I segment I connects to patch K, the segment end must coincide with the patch center. Patch K is then divided into four patches numbered K through For If several

segments connect to end 1 of segment I, then J is the number of the next

3 by a call to subroutine SUBPH. The connection daLa is illustrated in the following listing for the six

segments in the structure in figure 3. ICON1 (I)


1

ICON2 (I)
2

10000 + K 1
4
0
0

1
2
'I

3 0
-5

4
5
6

6 0

CONECT

Figure 3. Structure for I l l u s t r a t i n g Segment C o n n e c t i o n Data.

C o n n e c t i o n s b e t w e e n p a t c h e s a r e n o t checked, s i n c e , e x c e p t w h e r e a w i r e connects t o a s u r f a c e , t h e c u r r e n t expansion f u n c t i o n on a p a t c h does n o t e x t e n d beyond t h a t p a t c h . CODING

cN16
CN~O

CN27

I n i t i a l i z e and a d j u s t symmetry c o n d i t i o n s i f n e c e s s a r y when ground i s p r e s e n t .

CN46 Check w h e t h e r end 1 o f segment I i s below g r o u n d p l a n e


( e r r o r ) o r c o n t a c t i n g ground p l a n e . I f t h e s e p a r a t i o n of t h e segment end and t h e ground i s l e s s t h a n SMIN m u l t i p l i e d by t h e segment l e n g t h , I C O N 1 i s s e t t o I and t h e z c o o r d i n a t e o f t h e segment end i s set t o e x a c t l y z e r o .

~ 4 ~ 9 ~ Check 6 0 o t h e r s e g m e n t s from I
through I

1 t h r o u g h N and t h e n 1
The

1, u n t i l a c o n n e c t e d end i s f o u n d .

s e p a r a t i o n o f segment e n d s i s d e t e r m i n e d b y t h e sum o f t h e s e p a r a t i o n s i n x , y , and z t o s a v e t i m e .

CONECT Search for segments connected to patches. patches (not NGF) are checked. Only new If a connection is found

the patch is divided into four patches at itsepresent location in the data arrays and patches following it are shifted up by three locations. This is done by calling If a
$
' '

SUBPH, an entry point of subroutine PATCH. Search for new segments connected to NGF patches. connection is found four patches, covering the area o f the original patch, are added to the end of the data arrays by calling SUBPH. 10000. The loop through 44 locates segments connected to junctions. Parameters are initialized to find all segments connected to first end of segment J. Connected segments are located. CN200. If the number of any connected segment is less than J the loop is exited at Thus each junction is processed only once. The connected ends are set to the average o f their previous values to ensure that they have identical values. If the junction includes new segments (NSFLG = 1) and IX is a NGF segment an equation number, NSCON, is assigned for the modified basis function of segment IX. number is stored in ISCON. Segment numbers are printed for junctions of three or more segments. The loop is initialized for the second end of segment J and the steps from CN191 on are repeated. Equation numbers for modified basis functions are assigned for old segments that connect to new patches. SYMBOL DICTIONARY IGND
=

The original patch retains its

location but the z coordinate at its center is changed to

The

equation number is stored in array ICONX and the segment

1 to adjust symmetry for ground and set ICON (I) =

I ; -1 to adjust symmetry only; 0 for no ground

CONECT JHAX N PMAX


= =

maximum number o f s e g m e n t s c o n n e c t e d t o a j u n c t i o n
maximuo~numberofNGFpatchesconnectingtonew

segments NSFLG
=

I i f t h e j u n c t i o n i n c l u d e s any new s e g m e n t s when NGF


i s i n use

N SMAX

maximum number o f N G F s e g m e n t s c o n n e c t i n g t o new segments

SEP SLEN SMIN

= = =

a p p r o x i m a t e s e p a r a t i o n o f segment e n d s maximum s e p a r a t i o n a l l o w e d f o r c o n n e c t i o n maximum s e p a r a t i o n a s a f r a c t i o n o f segment l e n g t h

c o o r d i n a t e s o f end 1 o f segment

c o o r d i n a t e s o f e n d 2 o f segment

c o o r d i n a t e s of patch c e n t e r

CONSTANT

1.E-3

maximum s e p a r a t i o n t o l e r a n c e Eor c o n n e c t e d s e g m e n t s a s f r a c t i o n o f segment l e n g t h .

CONECT
CN CN CN CN 1 2 3
4

CONNECT SETS UP SEGMENT CONNECTION OATA I N ARRAYS I C O N 1 A N 0 I C O N 2 BY SEARCHING FOR SEGMENT ENDS THAT ARE I N CONTACT.

DIMENSION x 2 ( 1 ) YZ( 1 ) z 2 ( 1) EOUIVALENCE ( X 2 . S I ) . (Y2.ALP). (Z2,BET) OATA JMAX/3O/,SMIN/I.E-3/.NSMAX/SO/.NPMAX/10/ NSCON=O NPCON=O I F ( I G N D . E Q . 0 ) GO TO 3 PRINT 5 4 I F (IGNO.GT.0) PRINT 55 I F (IPSYM.NE.2) GO TO 1 NP=2*NP MP=2*MP I F ( I A B S ( I P S Y M ) . L E . ~ ) GO TO 2 NP=N MP=M I F ( N P . G T . N ) STOP IPSYM=O I F (NP.EQ.N.AND.MP.EO.M)

212-zzi~j

SLEN=SQRT((XI2-XI1)*~2+(YI2-YI1)**2+(ZI2-Z11)*~2)*SMIN
OETERMINE CONNECTION DATA FOR E N 0 1 OF SEGMENT. I F ( I G N O . L T . 1 ) GO TO 5 I F (ZII.GT.-SLEN) GO TO 4 PRINT 5 6 . I STOP I F ( Z I 1 . G T . S L E N ) GO TO 5

DO 7 J = 2 . N Ic=IC+I I F (1C.GT.N)

IC=I GO TO 6

SEP=ABS(XI~-X(IC))+ABS(YIl-Y(IC))+ABS(ZIl-Z(1C))
I F (SEP.CT.SLEN) ICONI(I)=-IC GO TO 8

SEP=ABS(XI~-X~(IC))+ABS(YI~-Y~(IC))+ABS(ZI~-Z~(IC))
I F (SEP.GT.SLEN) GO TO 7 ICONl(I)=IC GO TO 8 CONTINUE I F (I.LT.N2.AND.ICONI(I).GT.10000) GO TO 8 ICONl(I)=O OETERMINE CONNCCTION DATA FOR END 2 OF SEGMENT

(IGNO.LT.I) GO TO 1 2 (ZIZ.GT.-SLEN) GO TO 1 0 PRINT 5 6 . I STOP I F (ZI2.GT.SLEN) GO TO 1 2 F I (ICONI(I).NE'.I) GO TO 1 1 PRINT 5 7 . I STOP ICON2(1)=1 Z2(1)=0. GO TO 1 5 IC=I DO 1 4 J = 2 . N IC=IC+1

I F I F

GO ~ 0 ' 1 s

SEP=ABS(XI2-X2(IC))+ABS(YI2-Y2(IC))+ABS(ZI2-Z2(Ic))
I F ( S E P . G T . S L E N ) GO TO 1 4 ICON2(I)=-IC GO TO 1 5 CONTINUE I F (I.LT.N2.AND.ICON2(I).GT.10000) GO TO 1 5 ICONZ(I)=O CONTINUE GO TO 2 6 I F (M.EQ.0) F I N O WIRE-SURFACE CONNECTIONS FOR NEW PATCHES IX=LO+l-MI I=M2 I F (1.GT.M) GO TO 2 0 IX=IX-1

xs=x(Ix)
Ys=Y(Ix)

zs=z(Ix)
00 1 8 I S E G = l . N
XIl=X(ISEG) YIl=Y(ISEG) ZIl=Z(ISEG) XI2=X2( ISEG) YI~=Y~(ISEG~ ZI2=Z2(ISEG)

SLEN=(ABS(XI~-XI~)+ABS(YI~-YI~)+ABS(ZI~-ZI~))~SMIN
FOR F I R S T END OF SEGMENT

SEP=ABS(XIl-XS)+ABS(YIl-YS)+ABS(ZIl-ZS)
I F (SEP.GT.SLEN) GO TO 1 7 CONNECTION D I V I D E P A T C H I N T O 4 PATCHES AT PRESENT ARRAY L O C . ICON1(ISEG)~10000+I

1c=o
C A L L SUBPH GO.TO 1 9

(I.IC.X11.Y11.Z11.X12.Y12.Z12.XA.YA.ZA,XS5YS,ZS)

C A L L SUBPH (I.IC.XIl.YIl.ZIl.X12.Y12.Z12.XA.YA.ZA,XS,YSSZS) GO TO 1 9 CONTINUE 1=1+1 GO TO 1 6 REPEAT SEARCH FOR NEW SEGMENTS CONNECTED TO NGF PATCHES. GO TO 26 I F (M1.EQ.O.OR.NP.GT.N)

IX=LD+I I=1 IF (1.GT.Ml) GO TO 25 IX=IX-1 xs=x(Ix) Ys=Y(Ix) zs=z(Ix) DO 23 ISEG=N2.N XII=X(ISEG) YIl=Y(ISEG) ZIl=Z(ISEG) XIZ=XZ(ISEG) YIL=YZ(ISEG) ZI2=Z2(ISEG)
SLEN=(ABS(XI2-XIl)+ABS(YI2-YIl)+ABS(ZI2ZIl))~SMIN

SEP=ABS(XII-XS)+ABS(YII-YS)+ABS(ZII-zs)
IF (SEP.GT.SLEN) GO TO 22 ICONI(ISEG)=lOOOl+M IC=l NPCON=NPCON+I IPCON(NPCON)=I CALL SUBPH (I.IC.X11.YIl.Z11.X12.Y12.Z12.XA.YA.ZA,XS,YSSZS) GO TO 24 SEP=ABS(XIZ-xS)+ABS(YIZ-YS)+ABS(ZI2-2s) IF (SEP.GT.SLEN) GO TO 23 ICON2(ISEG)=IOOOl+M IC=l NPCON=NPCON+l IPCON(NPCON)=I CALL SUBPH (I.IC.XII.YII.ZI1.XIZ.YI2.ZI2.XA.YA.ZA.XS,YS,ZS) GO TO 24 CONTINUE I=I+1 GO TO 21 IF (NPCON.LE.NPMAX) GO TO 26 PRINT 62. NPMAX STOP PRINT 58. N.NP.IPSYM IF (M.GT.0) PRINT 61. M.MP ISEG=(N+M)/(NP+MP) IF (1SEG.EO.I) GO TO 30 IF (IPSYM) 28.27.29 STOP PRINT 59. ISEG GO TO 30 IC=ISEG/Z IF (ISEG.EO.8) IC=3 PRINT 60. IC IF (N.EO.0) GO TO 48 PRINT 50 ISEG=O ADJUST CONNECTED SEG. ENDS TO EXACTLY COINCIDE. PRINT JUNCTIONS OF 3 OR MORE SEG. ALSO FIND OLD SEG. CONNECTING TO NEW SEG. 0 0 44 J = 1 .N IEND=-1 ,!END=-I IX=ICONl(J) IC=l JCO( 1 l=-J

T I ( 1 K ) 3.3.44.34 IX=-LX GO TO 3 5 JCNU:~JEND I F ( 1 X . E O . J ) GO ro 3: If( 1 X . L T . J ) GO TO 4 3 I CI C ~tl I F (1C.GT.JMAX) GO TO 4 9 J C O ( I C ) = T x - JENO I F ( 1 X . G T . N I ) NSFLG=l I F (JEND.EQ.1) GO TO 3 6 XA=XA+X(IX) YA=YA+Y(IX) zA=zA+z(Ix) IX=ICONI ( I X ) GO TO 3 2 XA=XA+XZ(IX) YA=YA+YZ(IX) zA=zA+z2(Ix) IX=ICONZ(IX) GO TO 3 2 SEP=IC

XA:YA/SEP
'YA=YA/SEP

rn=zn/srP 00 39 1 = 1 . I C IX=JCO(I) IF ( I X . G T . 0 ) GO TO 3 8 IX=-IX 'K(IX)=XA Y(Ix)=YA

r(rx)=za
CO 10 39 Xz(rx)=xA Y2(IX)=YA ZZ(IX)=ZA CONTINUE it^ ( N I . E U . O ) GO TO 4 2 I F ( N S F L G . L O . 0 ) GO 10 4 2 00 4 1 I = I . I C IX-IA@S(JCO(I)) I r (IX.GT.NI) GO TO 4 1 Tr ( i C O F l X ( T X ) . N E . O ) GO TO 4 1 NSCON=NSLON t l I F ( N S C O N L t . N S M A X ) GO 1 0 4 0 P R I N T 6 2 . N5MAK STOP ISCON(NSCON;,- I X ICONX(:X)=NSCON CONTINUE

PRINT 5 1 . TiEG.(JCO(I),I:I.IC) I F ( I E N I I . L O . I ) GO TO 4 4 ICND=I JENU-1

CEI CN CN CN CN CN CN CN CN CN CN CN Ci.1 CII CN ZN CN CN

239 240 241 242 243 244 245 246 247 748 249 ?SLI 251 252 25.5

254 255
256

CONECT
GO 10 3 1 CONTINUt IF :lsrc.co.o) PRTNT 52 [ i I N ~ . C U . O . O ~ . M I . L ~ . M ) GO T O 4 8 r l N I 1 01 D SEGMENTS THAT CONNECT TO NEW P A T C H i S 00 4 7 J 7 I . N l IX=ICONI(J) I F (IX.LT.10000) GO TO 4 5 IX=IX-10000 I F ( 1 X . G T . M I ) GO TO 4 6 IX=ICONZ(J) I F (IX.LT.10000) GO TO 4 7 IX=IX-10000 I F (IX.LT.M2) GO TO 4 7 I F (ICONX(J).NE.O) GO TO 4 7 NSCON=NSCON+l ISCON(NSCON)=J ICONX(J)=NSCON CONTINUE CONTINUE RETURN PRINT 5 3 . I X STOP

CN 2 5 7 CN 2 5 8 CN 259 CN 2 6 0 CN 7.51 CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN CN 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300

FORMAT ( / / . 9 X . 2 7 H M U L T I P L E W I R E JUNCTIONS - . / . l X . 8 H J U N C T I O N . 4 X . 3 6 1HSEGMENTS ( - FOR E N 0 1 . + FOR EN0 2 ) ) FORMAT (1X.15.5X.2015./.(11XX2015)) FORMAT ( 2 X . 4 H N O N E ) FORMAT ( 4 7 H CONNECT - SEGMENT CONNECTION ERROR FOR SECMENT.15) FORMAT (/.3X,23HGROUNO PLANE S P E C I F I E D . ) FORMAT (/.3X.46HWHERE W I R E ENDS TOUCH GROUND. CURRENT W I L L B E , 3 8 H I I N T E R P O L A T E D TO I M A G E I N GROUND P L A N E . . / ) FORMAT ( 3 0 H GEOMETRY OATA ERROR-S E G M E N T . I S . 2 l H EXTENDS BELOW GRO IUND) FORMAT ( 2 9 H GEOMETRY OATA ERROR--SEGMENT.I5,16H L I E S I N GROUND . 6 H 1P L A N E . ) FORMAT ( / . 3 X , 2 0 H T O T A L SEGMENTS U S E O = . I 5 . 5 X . l 2 H N O . SEG. I N . 1 7 H A SY IMMETRIC CELL=,I5.5X.l4HSYMMETRY FLAG=.13) FORMAT ( 1 4 H STRUCTURE H A S . 1 4 . 2 5 H FOLD R O T A T I O N A L SYMMETRY./) FORMAT ( 1 4 H STRUCTURE H A S . 1 2 . 1 9 H PLANES OF SYMMETRY./) PATCHES I N A SYMMET FORMAT ( 3 X . 1 9 H T O T A L PATCHES U S E D = , I 5 , 6 X , 3 2 H N O . I R I C CELL=.I5) FORMAT ( 8 2 H ERROR NO. NEW SEGMENTS CONNECTED TO N . G . F . SEGMENTS0 1R PATCHES EXCEEDS L I M I T O F . 1 5 )

COUPLE COUPLE PURPOSE To compute the maximum coupling between pairs of segments.

Zf a coupling calculation has been requested (CP card) subroutine COUPLE


is called each time that the current is computed for a new excitation. voltage source on the segment specified in NCTAG and NCSEG. The code from CPLO to CP12 checks that the excitation is a single applied-field If the excitation is correct the input admittance and mutual admittances to all other segments specified in NCTAG and NCSEG are stored in YllA and Y12A from CP13 to CP22. When all segments have been excited (ICOUP = NCOUP) the second part of the code, from CP24 to CP58 is executed to evaluate the equations in Section
V . 6 of Part

I .

SYMBOL DIC'PIONARY
C
= =

L (see Part I, Section V.6) array of values of current at the centers of segments

CUR DBC GHAX ISG1 ISG2

= 10 log(CmX) = GHAX
= = =

segment number segment number index of Y 12 in array Y12A

JI
32

= index of Y
=

K
WLAM Y11 Y12 Y22 YIN YL ZLN

in array Y12A 21 segment number wavelength Yll

= =

= (Y12 + YZ1)/2

=Yz2
= =

YIN Y

L = l/YIN
=

zI ,

l/YL

COUPLE
S U B R O U T I N E COUPLE ( C U R - W L A M ) COUPLE COMPUTES THE MAXIMUM C O U P L I N G BETWEEN P A I R S OF SEGMENTS. COMPLEX Yl1A.Y12A.CUR.Yll.YI2.Y22,YL,YINYZL,ZIN.RHO.VQD,VSANT.VODS CP CP CP CP Cp 1

COMMON / Y P A R M / NCOUP.ICOUP.NCTAG(~) .NCSEG(5) , Y I I A ( 5 ) . Y 1 2 A ( 2 0 ) CP COMMON /VSORC/ V Q ~ ( ~ ~ ) . ~ S A N T ( ~ ~ ) . V Q D S ( ~ ~ ) . I V Q D ( ~ O ) . I S A N T ( ~ O CP )IODS( 13O).NVOO.NSANT.NQOS CP CP DIMENSION CUR(1) I F (NSANT.NE.I.OR.NVOD.NE.O) RETURN CP J=I~EGN~(NCTAG(IC~~P+~),NCSEG(ICOVP+I)) CP I F (J.NE.ISANT(1)) RETURN CP ICoUP=ICoUP+1 CP ZIN=VSANT(l) CP YIIA(ICOUP)=CUR(J)*WLAM/ZIN CP LI=(ICOUP-I).(NCOUP-I) CP DO 1 I = I . N C O U P CP I F ( 1 . E Q . I C O U P ) GO TO 1 CP K=ISEGNO(NCTAG(I).NCSEC(I)) CP LI=LI+I CP YlZA(LI)=CUR(K)'WLAM/ZIN CP CONTINUE CP CP I F ( 1 C O U P . L T . N C O U P ) RETURN PRINT 6 CP N P M I =NCOUP-1 CP CP DO 5 1=1 . N P M l ITTl=NCTAG(I) CP ITSl=NCSEG(I) CP ISGl=ISEGNO(ITTI.ITSI) CP Ll=I+l CP CP DO 5 J = L I . N C O U P ITTZ=NCTAG(J) CP

PRINT 7 . GO TO 5 PRINT 8. CONTINUE RETURN

ITTI.ITS1.ISG1.ITTZ.ITSZ.ISG2.DBC,ZL,ZIN
~TT1.ITSl.ISG1.ITT2.ITS2.ISG2.C

COUPLIN FORMAT (///.36X,26H- - - I S O L A T I O N DATA - - - , / / . 6 X , 2 4 H 1G BETWEEN - - . 8 X . 7 H M A X I M U M . l S X . 3 2 H - - FOR MAXIMUM C O U P L I N G 2./.12X.4HSEG..14X.4HSEG..3X.8HCOUPLING.4X.25HLOAD IMPEDANCE ( 2 N D S 3EG.).7X.l5HINPUT IMPEOANCE./.2X.8HTAG/SEGGG3XX3HNO..4X.8HTAG/SEG..

---

43X.3HNO..6X.4H(OB).8X.4HREAL.9X.5HIMAG..9X.4HREAL.9X,5HIMAG.)

65 7 b6 8
67 68

FORMAl (2(1Y.14.1X.I4.1X.I5,2X),F9.3,2XX2(2XXE12.5,1X.El2.5)) FORMAT ( 2 ~ 1 X . I 4 . 1 X . I 4 . 1 X , I 5 , 2 X ) 4 5 H ~ * E R A O RC ~O *U P L I N G I S NOT BETWEE I N 0 AND 1 (=.E17,5,1H)) END

CP CP CP CP

65 66 67 68-

DATAGN

PUKWSE To r e a d s t r u c t u r e i n p u t d a t a and s e t segment and p a t c h d a t a .

ME'r110D
The rnain KEAD s t a t e m e n t i s a t DA35. The KEAD s t a t e m e n t a t DA65 i s f o r

t h e c o ~ l t i n u a t i o no f w i r e d a t a (GC c a r d f o l l o w i n g GW), and t h e READ a t DA133 i s f o r t h e c o n t i n u a t i o n o f s u r f a c e p a t c h d a t a (SC f o l l o w i n g S P o r SM). The f i r s t i n p u t p a r a m e t e r GM d e t e r m i n e s t h e f u n c t i o n o f t h e c a r d a s indicated i n t h e following table:
GM -

G@ T 0

d e f i n e wire a r c

FUNCTION

c o n t i n u a t i o n of w i r e d a t a end o f geometry d a t a r e a d NGF f i l e rotate or translate structure r o t a t e about Z a x i s (symmetry) scale structure define straight wire r e f l e c t i n c o o r d i n a t e p l a n e s (symmetry) c o n t i n u a t i o n of p a t c h d a t a define multiple surface patches define surface patch

The f u n c t i o n s o f t h e o t h e r i n p u t parameters depend o n t h e t y p e o f d a t a c a r d a n d c a n b e d e t e r m i n e d f r o m t h e d a t a c a r d d e s c r i p t i o n s i n P a r t I11 o f t h i s manual. S u b r o u t i n e s a r e c a l l e d t o p e r f o r m many o f t h e o p e r a t i o n ' s r e q u e s t e d by the data cards. Coding i n DATAGN p e r f o r m s o t h e r o p e r a t i o n s , p r i n t s A f t e r a GE c a r d i s r e a d s u b r o u t i n e Segment

i n f o r m a t i o n and c h e c k s f o r i n p u t e r r o r s .

CONECT i s c a l l e d a t DA211 t o f i n d e l e c t r i c a l c o n n e c t i o n s o f s e g m e n t s .

a n d p a t c h d a t a i s p r i n t e d f r o m DA217 t o DA256. o f z e r o l e n g t h (<LO-")

L i n e DA241 t e s t s f o r s e g m e n t s

o r z e r o r a d i u s (<lo-LO1).

DATAGN
SYHUOL DICTIONARY

V a r i a b l e s have m u l t i p l e u s e s which depend o n t h e t y p e of inpuc c a r d being processed.

DATAGN
S U B R O U T I N E OATAGN OATACN I S THE M A I N ROUTINE FOR I N P U T OF GEOMETRY D A T A . INTEGER GM-ATST OA OA DA 0A 0A

COMMON /OAT*/ L D . N l . N Z . N . N P . M I . M ~ . M . M P . X ( ~ O O ) . Y ( ~ O O ) . Z ( ~ O O ) , S J ( ~ OO OA 1) .8I(300).*LP(300) . s E T ( 3 0 0 ) . I C O N 1 ( 3 0 0 ) . I C O N 2 ( 3 0 0 ) , I T A G ( 3 0 0 ) I C O N X ( DA 230O).WLAM,IPSYM 0A COMMON /ANGL/ SALP(JOO) OA DIMENSION ~ 2 ( 1 ) . Y 2 ( 1 ) . Z 2 ( 1 ) . T l ~ ( 1 ) . T l Y ( 1 ) . T l Z ( 1 ) . T Z X ( 1 ) . T 2 Y OA 1 T 2 ~ A1 T S T I ~ ) . I F x ( 2 ) . IFY(~). I F Z ( 2 ) . C A B ( I ) . S A B ( 1 ) . I P T DA

2(4) 0A EOUIVALENCE ( T l X . S I ) . ( T 1 Y . A L P ) . (TlZ.BET). (T2X.ICONl). ( T 2 Y . I C O N DA 1 2 ) . (T~z~ITAG). (X2.SI). (YZ.ALP). (Z2,BET). (CAB,ALP), (SAB,BET) OA OATA A T S T / ~ H C W . ~ H G X . ~ H G R . ~ H C S . ~ H G E . ~ H G M . ~ H S P . ~ H S M . ~ H G F . ~ H OA GA.~HSC.~ 1 HGC/ 0A DATA 1 ~ x 1 1 ~ .~HX/.IFY/IH .IHY/.IFZ/IH .IHZ/ 0A OATA TA/O.O1745329252/,TO/57.29577951/.IPT/lHP,l~R,lHT.lHO/ 0A IPSYM=O DA NWIRE=O OA N=O OA NP=O 0A M=O 0A MP=O 0A N1=0 0A N2=1 0A M1=0 0A M2=1 0A ISCT=O 0A IPHO=O 0A OA 31 DA 3 2 READ GEOMETRY DATA CARD A N 0 BRANCH TO S E C T I O N FOR O P E R A T I O N REOUESTEO OA 33 OA READ ( 5 . 4 2 ) GM.ITG.NS.XWl.YWl.ZWl.XW2.YW2.ZWZ.RAD 0A I F (N+M.GT.LD) GO TO 3 7 OA I F (CM.EO.ATST(9)) GO TO 2 7 DA I F ( I P H O . E O . l ) GO TO 2 0A PRINT 4 0 DA PRINT 4 1 DA IPHo=l OA I F (GM.EO.ATST(II)) GO T O 1 0 DA ISCT=0 DA I F (GM.EO.ATST(1)) GO TO 3 0A I F (GM.EQ.ATST(2)) GO TO 1 8 0A I F (GM.EO.ATST(3)) GO TO 1 9 0A 0A I F (GM.EO.ATST(4)) GO TO 2 1 OA I F (GM.EQ.ATST(7)) GO TO 9 0A GO TO 1 3 I F (GM.EO.ATST(8)) 0A I F (CM.EQ.ATST(5)) GO TO 2 9 OA I F (GM.EO.ATST(6)) GO TO 2 6 OA I F (GM.EO.ATST(IO)) GO TO 8 OA GO TO 3 6 0A 0A GENERATE SEGMENT OATA FOR STRAIGHT W I R E . DA 0A NWIRE=NWIRE+l 0A Il=N+l 0A I2=N+NS PRINT 4 3 . NW1RE.XW1.YW1.ZW1.XW2.YV~2.ZW2.RA0.NS.11 . I ? , I T G DA OA I F ( R A D . E L 2 . 0 ) GO TO 4 OA OA DA

READ ( 5 . 4 2 ) G M . I X . I Y . X S I . Y S ~ . Z S T I F (GM.EO.ATST(12)) GO TO 6 PRINT 4 8 STOP PRINT 6 1 . X S 1 . Y S l . z s i

YSl=(ZSl/YSl)"(l./(NS-1.))
CALL WIRE GO TO 1

(XW~.YWI.ZW~.XW~,YW~.ZW~.RAD.XS~.YS~.NS,ITG)

GENERATE SEGMENT DATA FOR W I R E ARC NWIRE=NWIRE+l Il=N+l I2=N+NS PRINT 3 8 . NWIRE.XWl.YW1 . Z W l . X W 2 . N S . I l . I 2 . I T G C A L L ARC (ITG.NS.XWl.YWl.ZWl.XW2) GO TO 1 GENERATE S I N G L E NEW PATCH II=M+l NS=NS+l I F (ITG.NL.O) GO TO 1 7 P R I N T 5 1 . Il.IPT(NS).XWl.YWI.ZWl.XW2.YW2.ZW2

x3=xw1 y3=YW1 Z3=ZW1 F I (NS.NE.I) GO TO 1 1 x4=xw2 y4=YW2 Z4=ZW2 XWl =XS 1 YWl=YSl ZWl=zSI xw2=xs2 YW2=ys2 zw2=zs2 I F (NS.E0.4) GO TO 1 2 x4=XWl+X3-XW2 Y4=YWl +Y3-YW2 Z4=ZWl+Z3-ZW2 P R I N T 5 1 . II.IPT(NS).XWl.YWI.ZWl,XW2,YW2.ZW2 PRINT 3 9 . X3.Y3.Z3.X4.Y4.74 GO TO 1 6 GENERATE M U L T I P L E - P A T C H jURFACE

DATAGN
OA 129 DA 1 3 0 OA 131 DA 132 DA 133 DA 134 DA 135 Y4=YWl+Y3-YW2 DA 136 Z4=ZWl+Z3-ZW2 DA 137 PRINT 39. X3.Y3.Z3.X4.Y4.Z4 OA 138 IF (GM.NE.ATST(l1)) GO TO 17 139 DA CALL PATCH ( I T G . N S . X W I . Y W I . Z W I . X W ~ . Y W ~ . Z W ~ . X ~ , Y ~ , Z ~ . X ~ , Y ~ ,Z~) DA 140 GO TO 1 DA 141 PRINT 6 0 DA 142 STOP OA 143 DA 144 REFLECT STRUCTURE ALONG X.Y. OR Z AXES OR ROTATE TO FORM CYLINDER. OA 145 DA 146 IY=NS/IO DA 147 IZ=NS-IY.10 DA 148 IX=IY/lo OA 149 IY=IY-IX'IO DA 150 IF (IX.NE.0) IX-I DA 151 IF (IY.NE.0) IY=I DA 152 IF ~ I Z . N E . O IZ=l ~ DA 153 PRINT 44. I F X ( I X + I ) . I ~ Y ( I Y + ~ ) . I ~ Z ( I Z + ~ ) , I T G DA 154 GO TO 20 DA 155 PRINT 45. NS.ITG OA 156 1x=-I OA 157 CALL REFLC (1X.IY.IZ.ITG.NS) OA 158 GO TO I DA 159 OA 160 SCALE STRUCTURE DIMENSIONS BY FACTOR XWI OA 161 DA 162 OA 163 DA 164 OA 165 DA 166 DA 167 DA 168 DA 169 PRINT 59. I~.IPT(2).XW1.YWl.LWI.XWZ.YW2.ZW2.ITG.NS IF (ITG.LT I.OR.NS.LT.1) GO ' 0 I/ REAO (5.42) GM.IX.IY,X3.Y3 2 3 x4 ~1 7 4

YWI=XWl*XWI IX=LO+I-M 1 Y : L D M I DO 24 I=IX.IY X(I)=X(I)'XWl Y(I)=Y(I)-xwc z(I)=z(I).xwl BI(I)=BI(I).YWI PRINT 46. XWI GO TO 1 MOVE STRUCTURE OR REPRODUCE ORIGINAL STRUCTURE IN NEW POSITIONS. PRINT 47. ITG.NS.XWI.YWI.ZW1.XW2.YW2.ZW2,RAO XWl=XWI.TA YWl=YWI .TA ZWl=ZWI.TA CALL MOVE (XWI.YW1.ZW1.XW2.YW2.ZW2.INT(RAD+.5).NS.ITG) GO TO 1

DATACN
R E A D N U M E R I C A L G R E E N ' S F U N C T I O N TAPE I F (N+M.EO.O) GO TO 2 8 PRINT 5 2 STOP CALL G F l L ( I T G ) NPSAV=NP MPSAV=MP IPSAV-IPSYM GO TO I T E R M I N A T E STRUCTURE GEOMETRY I N P U T . IX=Nl+M1 I F ( I X . E O . 0 ) GO TO 3 0 NP=N MP=M IPSYM=O C A L L CONECT ( I T G ) I F (IX.EQ.0) GO TO 3 1 NP=NPSAV MP=MPSAV IPSYM=IPSAV I F (N+M.GT.LD) GO TO 3 7 I F ( N . E O . O ) GO TO 3 3 PRINT 5 3 PRINT 5 4 00 3 2 I = 1 ,N XWl=X2(1)-X(1) YW1=Y2(1)-Y(1) ZWl=Z2(1)-Z(I) X(I)=(X(I)+x2(1))..5 Y(I)=(Y(I)+Y2(1))*.5 Z(I)=(Z(1)+Z2(1))..5 DA 1 9 3

XW2=XWl~XWl+YWI~YWI+ZW1.ZW1
YW2=SORT(XW2) YW2=(XW2/YW2+YW2)..5 SI(I)=YW2 cAs(I)=xwl/YW2 sAs(I)=Ywl/Yw2 x w 2 = z w 1 /YW2 I F (XW2.GT.l.) XW2=1. I F (XW2.LT.-I.) XW2=-1. SALP(I)=XWZ XW2=ASIN(XW2)*TO YWZ=ATGN2(YWl .XW1 ) * T O P R I N T 5 5 . I.X(I).Y(I).Z(I).SI(I).XW~.YW~.BI(I).ICON~(I).I.ICON~(I) 1.ITAG(I) I f (SI(I).GT.I.E-2O.ANO.BI(I).GT.l.E-101) GO TO 3 2 PRINT 56 STOP CONTINUE I F ( M . E O . 0 ) GO TO 3 5 PRINT 57 J=LD+l DO 3 4 I = 1 . M J=J-1 XW~=(T~Y(J)*T~Z(J)-TIZ(J)*T~Y(J)).SALP(J) ~I=(TIZ(J)~T~~(J)-T~X(J)*T~Z(J))~~ALP(J) ZWl=(TlX(J)'T2Y(J)-T~Y(J).T~X(J)).SALP(J) PRINT 5 8 . I . X ( J ) . Y ( J ) . Z ( J ) . X W I .YWI . Z W l . B I ( J ) . T ~ X ( J ) . T ~ Y ( J ) . T ~ Z ( J ) , IT~X(J),T~Y(J).T~Z(J) CONTINUE RETURN

DATAGN
PRINT 4 8 PRINT 4 9 . STOP PRINT 5 0 STOP

GM.ITG.NS.XWI.YWl.ZW1.XW2.YW2.ZW2.RAD

DA DA 1 DEGREES.IlX.F11.5.2X.15.4X.15.1X.15,3XX15) DA FORMAT ( 6 X . 3 F I I . 5 . 1 X . 3 F 1 1 . 5 ) DA FORMAT ( / / / / . 3 3 ~ . 3 5 H - - STRUCTURE S P E C I F I C A T I O N -.//.37X,28H DA \ C O O R D I N A T E S MUST a E I N P U T I N . / . 3 7 X n 2 9 H M E T E R S OR B E SCALED TO METER DA 2S./.37X,31HBEFORE STRUCTURE I N P U T I S ENDED,//) DA FORMAT ( 2 X . 4 H W I R E . 7 9 X . 6 H N O . OF.4X.5HFIRST.ZX.4HLAST.5X.3HTAG./.2X. DA 1 3 H N 0 . . 8 X . 2 H X I . 9 X . 2 H Y 1 . 9 X . 2 H Z 1 . 1 O X , 2 H X 2 2 9 X X 2 H Y 2 , 9 X X 2 H Z 2 . 6 x . 6 H R ~ D 1 u s DA 2.3X.4HSEG.,SX.4HSEG..3X.4HSEG..5X.3HNO.) DA FORMAT ( A 2 . 1 3 . 1 5 . 7 F 1 0 . 5 ) DA FORMAT (IX.I5.3FI1.5.1X.4F(1.5,2X.I5.4X.I5.1X.I5,3X,I5) DA FORMAT ( I X . 1 5 . 2 X . 1 2 H A R C RADIUS = . F 9 . 5 . 2 X . 4 H F R O M , F 8 , 3 . 3 H TO.FB.3.8H

--

262 263 264 265 266 267 268 269 270 271
777

273

TA FORMAT ( 6 X . 3 4 H S T R U C T U R E REFLECTED ALONG THE A X E S . 3 ( 1 X . A 1 ) . 2 2 H . 1GS INCREMENTED B Y . 1 5 ) TIMES. LABLES FORMAT ( 6 X . 3 0 H S T R U C T U R E ROTATED ABOUT Z - A X I S . 1 3 . 3 O H 1 INCREMENTED B Y . 1 5 ) FORMAT ( 6 X . 2 6 H S T R U C T U R E SCALED BY F A C T O R . F l O . 5 ) FORMAT ( 6 X . 4 9 H T H E STRUCTURE HAS BEEN MOVED. MOVE DATA CARD I S -/6X 1.13.15.7F10.5) FORMAT ( 2 5 ~ GEOMETRY D A T A CARD ERROR) FORMAT ( 1 X . A 2 . 1 3 , 1 5 , 7 F 1 0 . 5 ) FORMAT ( 6 9 H NUMBER O f W I R E SEGMENTS AND SURFACE PATCHES EXCEEDS D I ~MENSION M L IT ) I . FORMAT (1X.I5,Al,F10.5.2F11.5.1X.3F1I.5) FORMAT ( 4 4 H ERROR GF MUST BE F I R S T GEOMETRY DATA CARD) - SEGMENTATION DATA - -.//.40X.21HC00 FORMAT ( / / / / 3 3 X , 3 3 H l R D I N A T E S I N M E T E R S .. / /.. 2 5 X , 5 0 H I + AND I I N D I C A T E THE SEGMENTS BEFOR 2 E AND AFTER I.//) FORMAT (2X.4HSEG..3X.26HCOORDINATES OF SEG. C E N T E R . S X . 4 H S E G . , 5 X . l 8 IHORIENTATION ANGLES.4X . 4 W I R E , 4 X . I 5 H C O N N E C T I O N DATA.3X.3HTAG./.2X. 23HNO..7X.1HX.9X.1HY.9X.1HZ.7X.6HLENGTHH5XX5HALPHA,5X,4HBETA,6X,6HR

DA 2 7 4 DA 2 7 5 DA 2 7 6 DA 2 7 7 DA 2 7 8 OA 2 7 9 DA 2 8 0 DA 2 8 1 DA 2 8 2 DA 2 8 3 DA 2 8 4 DA 2 8 5 DA 2 8 6 DA 2 8 7 DA 2 8 8 DA 2 8 9 DA 2 9 0 DA 2 9 1 DA 2 9 2 3ADIUS.4X.ZHI-.3X.IHI,4XX2HI+,4XX3HNOO) OA 2 9 3 FORMAT (lX.I5.4F10.5:lX.3F10.5.1X.315.2X.15) DA 2 9 6 FORMAT ( 1 9 H SEGMENT DATA ERROR) DA 2 9 5 FORMAT ( / / / / . 4 4 X . 3 0 H SURFACE PATCH DATA -.//,49X,21HCOORD DA 2 9 6 I I N A T E S I N METERS.//.lX.SHPATCH.5X.22HCOORD. OF PATCH C E N T E R . 7 X . 1 8 H OA 2 9 7 P U N I T NORMAL VECTOR.6X.5HPATCH.12XX34HCOMPONENTS OF U N I T TANGENT VE DA 29.8 3CTORS./.2X.3HN0..6X,1HXX9XX1HYY9XX1HZZ9X,lHX,7X,1HY,7X,lHZ,7X,4HAR DA 2 9 9 4EA.7X.2HXl.6X.2HY1.6X.2HZ1.7X.2HX2.6X.2HY2,6X.ZHZ2) DA 3 0 0 DA 3 0 1 FORMAT (1X.14.3F10.5.1X.3F8.4,F10.5,1XX3F8.4.1X,3F8.4) FORMAT (lX.15.Al.F10.5.2F11.5.1X.3F11.5,5XX9HSURFACE - . I 4 . 3 H B Y . 1 3 DA 3 0 2 1 . 8 ~PATCHES) DA 3 0 3 FORMAl ( 1 7 H PATCH DATA ERROR) DA 3 0 4 FORMAT ( 9 X . 4 3 H A B O V E W I R E I S TAPERED. SEG. LENGTH R A T I O = . F 9 . 5 . / , 3 DA 3 0 5 1 3 X . I I H R A D I U S fROM.F9.5.3H TD.Fg.5) DA 3 0 6 EN0 DA 3 0 7 -

--

- -

DBlO -

PURPOSI:.
l'o c o n v e r t a n i n p u t m a g n i t u d e q u a n t i t y ( f i e l d ) o r m a g n i t u d e squar-ed

q u a n t i t y (power) i n t o d e c i b e l s .

M E T H O D For a s q u a r e d q u a n t i t y , t h e d e c i b e l c o n v e r s i o n i s

and f o r a n u n s q u a r e d q u a n t i t y ,
= 2 0 loglO Q

Qdb

D B l O i s u s e d Eor t h e s q u a r e d q u a n t i t y w h i l e t h e e n t r y DB20 i s u s e d f o r
t h e q u a n t i t y which i s n o t s q u a r e d . SYMBOL DICTIONARY ALOGlO = e x t e r n a l r o u t i n e ( l o g t o t h e b a s e 10)

DBlO
F

= Qdb
= s c a l i n g term = input quantity

X
CONSTANT

-999.99
CODE LISTING

= returned

-20 f o r a n i n p u t l e s s t h a n 10

FUNCTION 0 8 1 0 ( X ) F U N C T I O N DB-RETURNS DB FOR MAGNITUDE ( F I E L D ) OR

MAG**2 (POWER) I

F=10. GO TO 1 ENTRY 0 8 2 0 F=20. I F (X.LT.1.E-20) DBlo=F.ALoclo(x) RETURN DB10=-999.99 RETURN END

GO TO 2

DB DB OB DB DB DB DB DB DB DB DB DB DB

08

EFLD

PURPOSE

To c o m p u t e t h e n e a r e l e c t r i c f i e l d d u e t o c o n s t a n t , s i n e , a n d c o s i n e c u r r e n t d i s t r i b u t i o n s on a segment i n f r e e s p a c e o r o v e r ground.

M ETHOI)

The e l e c t r i c f i e l d i s computed a t t h e p o i n t X I , Y I , Z I d u e t o t h e s e g m e n t d e f i n e d by p a r a m e t e r s i n COMMON/DATAJ/. e x t e n d e d t h i n w i r e E o r ~ n u l a smay b e u s e d . Either the t h i n wire o r

When a g r o u n d i s p r e s e n t , t h e c o d e

is e x e c u t e d t w i c e i n a loop.

I n t h e s e c o n d p a s s , t h e E i e l d O F t h e image o f

t h e s e g m e n t i s c o m p u t e d , m u l t i p l i e d by t h e r e f l e c t i o n c o e f f i c i e n t s , a n d a d d e d t o the direct field. The r e f l e c t i o n c o e f f i c i e n t s f o r t h e r e f l e c t e d r a y f r o m

t h e c e n t e r o f t h e s o u r c e segment a r e used f o r t h e e n t i r e segment. The f i e l d i s e v a l u a t e d i n a c y l i n d r i c a l c o o r d i n a t e s y s t e m w i t h t h e s o u r c e segrnenc a t t h e o r i g i n , a l o n g t h e z a x i s . The P c o o r d i n a t e o f t h e

f i e l d e v a l u a t i o n p o i n t i s computed f o r t h e s u r f a c e o f t h e o b s e r v a t i o n s e g m e n t as

w h e r e p i s t h e d i s t a n c e f r o m t h e a x i s o f t h e s o u r c e segment t o ( X I , Y I , Z I ) and a i s t h e r a d i u s o f t h e o b s e r v a t i o n segment. and z c o m p o n e n t s a s The f i e l d i s computed i n p

Use o f p ' a v o i d s a s i n g u l a r i t y when ( X I , YI, Z I ) i s t h e c e n t e r o f t h e s o u r c e


segment. I n t h e a d d i t i o n o f f i e l d components, p / p '

i s used r a t h e r t h a n

is t h e E i e l d i n t h e d i r e c t i o n P o b s e r v a t i o ~s~ egment.
since E

P,

0'

t o one s i d e o f t h e

Nhen t h e S o m m e r f e l d / N o r t o n o p t i o n i s u s e d f o r a n a n t e n n a o v e r g r o u n d t h e electric field a t term as

;d u e

t o t h e c u r r e n t o n a segment i s e v a l u a t e d i n t h r e e

E D i s t h e d i r e c t f i e l d oE t h e segment i n t h e a b s e n c e o f g r o u n d , and E x i s t h e E i e l d o f t h e image o f t h e segment r e f l e c t e d i n a p e r f e c t l y c o n d u c t i n g

ground.

T h e s e E i e l d c o m o n e n t s a r e e v a l u a t e d i n EFLD between E F l 9 and EF150.

The f a c t o r ( k

2 k2)/(k:

+ k ) 1s c o n t a i n e d i n t h e v a r i a b l e FRA.rI.

2 2

The f i e l d t o EF227.

ES'

d u e t o t h e SommerEeld i n t e g r a l s i s e v a l u a t e d f r o m EF155 s u b r o u t i n e RON2 i s c a l l e d a t &EL91

I f t h e s e p a r a t i o n o f t h e o b s e r v a t i o n p o i n t and t h e c e n t e r o f t h e

s o u r c e segment i s l e s s t h a n o n e w a v e l e n g t h , t o i n t e g r a t e o v e r t h e segment. terms i n

D M I N i s s e t t o t h e m a g n i t u d e o f t h e f i r s t two

d i v i d e d by 1 0 0 a s a l o w e r l i m i t o n t h e d e n o m i n a t o r o f t h e r e l a t i v e

e r r o r t e s t i n t h e numerical integration. r e q u i r e m e n t when

i s s m a l l compared t o t h e f i r s t two t e r m s . S I f t h e s e p a r a t i o n o f t h e s o u r c e segment and o b s e r v a t i o n p o i n t i s g r e a t e r

This relaxes the r e l a t i v e accuracy

t h a n a w a v e l e n g t h , SFLDS i s c a l l e d a t EEL97 t o e v a l u a t e approximation. To compute

is

by t h e N o r t o n

ES

w i t h t h e t h i n wire a p p r o x i m a t i o n a p p l i e d i n a manner

consistent with that f o r

El,

the f i e l d is evaluated a t a point displaced

normal t o t h e image o f t h e s o u r c e segment and normal t o t h e s e p a r a t i o n R .

If

t h e d i r e c t i o n o f t h e image o f t h e s o u r c e segment i s where

the displacement i s

i=+a8
2
= (:

Eor

.a i

x E ) / l j x El

a = r a d i u s of o b s e r v a t i o n segment

T h i s d i s p l a c e d o b s e r v a t i o n p o i n t (XO, YO, 2 0 ) i s computed f r o m EEL66 t o EFldl. Some o f t h e c o m p l e x i t y i s needed t o make t h e r e s u l t i n d e p e n d e n t o f

o r i e n t a t i o n o f segments r e l a t i v e t o t h e c o o r d i n a t e axes.

EFLD To adjust the P component o f field for the factor Ip/p'l the
f i ~ l d E'

is computed as E' = 112

FE +

(1 -

F)(E. j)j

2 2 where F = [p /(p2 + a ) I

P2 =

1 6 1~ (6 . 9)2

This is done from EF204 to EF218 but is skipped if F (DMIN) is greater than 0.95. CODING EF23 EF29 EF46 Loop over direct and image fields. Components of

- EF31 EF33 - EF40


EF62

5.

Components of pip' computed. Electric field of the segment computed by infinitesimal dipole approximation. Field computed by thin wire approximation. Field computed by extended thin wire approximation. Field converted to x, y, and z components. Reflection coefficients computed. Image fields modified by reflection coefficients. Reflected fields added to direct fields.

SYMBOL DICTIONARY A1
= radius of segment on which field is evaluated = cos

CTH
EGND

0; 0 = angle from axis of infinitesimal dipole or angle between the reflecting ray and vertical components of (see EQUIVALENCE statement)

cS

1'"

x and y components of (E

. p)p

(see PX)

EPY ETA IJ
=

(k/o)1/2

= IJX = flag to indicate field evaluation point is on the

source segment (IJ = 0 )

PI

EFLD
= x and y components o f u n i t v e c t o r normal t o t h e p l a n e o f

i n c i d e n c e o f t h e r e f l e c t e d wave

(p)
the

= d i s t a n c e from f i e l d e v a l u a t i o n p o i n t t o t h e c e n t e r o f

s o u r c e segment

REFPS REFS
RFL

= r e f l e c t i o n coefficient f o r a horizontally polarized f i e l d = r e l l e c t i o n coef f i c i e n t f o r a v e r t i c a l l y polarized Eield


= =

+ I f o r d i r e c t f i e l d , -1 f o r r e f l e c t e d f i e l d

RH
RHOSPC

p'

= d i s t a n c e from c o o r d i n a t e o r i g i n t o t h e ~ o i n t where t h e r a y

f r o m t h e s o u r c e t o ( X I , Y I , ZI) r e f l e c t s from t h e g r o u n d

x , y , and z components o f p o r p/p' o r

= 2nR o r K o r d i p o l e moment f o r s i n k s c u r r e n t = z c o ~ r p o n e n to f u n i c v e c t o r i n t h e d i r e c t i o n oE t h e s o u r c e

segment o r i t s image SKAF


= h a l f o f segment l e n g t h

p component o f f i e l d d u e t o c o s k s , s i n k s ,
and c o n s t a n t c u r r e n t s , r e s p e c t i v e l y

TERK TEZC
TELS

'TEZK

TP

= z component o f f i e l d d u e t o c o s k s , s i n k s , and
constant current, respectively

'CXC TYC TZ C TXS TYS TLS 'CXK TY K T LK


= a, y ,

= x , y , and z components o f f i e l d d u e t o c o s k s ,
s i n k s , and c o n s t a n t c u r r e n t

z c o o r d i n a t e s of f i e l d e v a l u a t i o n p o i n t

I:

EFLD
= c(xn!,unents of distance from source to observation

point

%LJ

XO
=

coordinates of field evaluation point for E

= x,

y coordinates of ground plane reflection point

YSPEC XYMAG
ZP
=

horizontal distance from center of source segment to observation point projection of


the

vector from the source segment (XI, YI, 21)

onto the axis of the source segment


ZRATX ZRSIN ZSCKN
= =

temporary storage for Z R A T I

= (1

2 ZR sin2

for ground

quantity used in computing reflection coefEicient for radial wire ground screen

CONSTANT

3.141592654 376.73 6.283185308

= rl = J<b/< = 2n

EFLD
I
SUBROUTINE

EFLD. ( X Y . IZ . IA . IJ I .)
COSINE. AND

EF
EF EF

EF EF COMPLEX T X K . T Y K . T Z K . T X S . T Y S . T Z S S T X C C T Y C C T Z C C E X K K E Y K , E Z K , E X S , E Y S , E Z EF IS.EXC.EYC.EZC.EPX.EPY,ZRATI.REFS.REFPS,ZRSIN,ZRATX.TI.ZSCRN,ZRATIZ EF 2.TEZS.TERS.TEZC.TERCCTEZKKTERK.EGN0,FR~TI EF COMMON / D A T A J / S . B . X J . Y J . Z J . C A E J . S A B J . S A L P J , E X K , E Y K , E Z K , E X S , E Y S E Z EF lS.EXC.EYC.EZC.RKH.IEXK.INDl.IND2.IPGND EF COMMON /GND/ ZRATI.ZRATI2.FRATI.CL.CH,SCRWL.SCRWRRNRADL,KSYMP.IFAR EF 1 .IPERF.T1 .T2 EF COMMON /INCOM/ X0,YO.ZO.SN.XSN.YSN.ISNOR EF D I M E N S I O N EGND(9) EF EOUIVALENCE (EGND(1) ,TXK). (EGND(2) .TYK). (EGND(3) . T Z K ) . ( E G N D ( 4 ) . EF I T X S ) . (EGND(S).TYS). (EGND(S).TZS). (EGND(7).TXC). (EGND(B).TYC), EF Z(EGND(g).TZC) EF DATA E T ~ / 3 7 6 . 7 3 j . P 1 / 3 . l 4 1 5 9 2 6 5 4 / , T P / 6 . 2 8 5 1 8 5 3 0 8 / EF XIJ=XI-XJ EF YIJ=YI-YJ EF IJX=IJ EF RFL=-I . EF DO 12 I P = 1 .KSYMP EF I F (IP.EO.2) IJX=I EF RFL=-RFL EF SALPR=SALPJ0RFL EF ZIJ=ZI-RFL-ZJ EF ZP=XIJ*CABJ+YIJ.SABJ+ZIJ*SALPR EF RHOX=XIJ-CABJaZP EF RHOY=YIJ-SAEJ-ZP EF RHOZ=ZIJ-SALPR0,ZP EF RH=SQRT(RHOX*RHOX+RHOY*RHOY+RHOZ'RHOZ+AIgAI) EF I F ( R H . G T . I . E - 1 0 ) GO TO 1 EF RHOX=O . EF RHOY=O. EF RHOZ=D . EF GO TO 2 EF RHDX=RHOX/RH EF RHOY=RHOY/RH EF RHOZ=RHOZ/RH EF R=SORT(ZP*ZP+RH*RH) EF I F (R.LT.RKH) GO TO 3 Ef EF Ef LUMPED CURRENT ELEMENT APPROX. FOR LARGE S E P A R A T I O N S EF RMAG=TP0R CTH=ZP/R PX=RH/R Ef EF EF

COMPUTE NEAR E F I E L D S OF A SEGMENT W I T H S I N E . CONSTANT CURRENTS. GROUND EFFECT I N C L U D E D .

.
5 6 7 8 9 10
11 12 13

14
15 16 17 18 19

20 21

22
23 24 25 26 27 28 29 30 31

32
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

TXK=CMPLX(CO~(RMAG).-SIN(RMAG))
PY-TP0R.R

EF
EF EF EF EF EF

TYK=ETA*cTH*TXK'CMPLX(I..-I./RMAG)/PY
TZK=ETA*PX*TXK*CMPLX(I..RMAG-I./RMAG)/(~.*PY) TEZK=TYK0CTH-TZK0PX TERK=TYK.PX+TZK.CTH RMAG=SIN(PI*S)/PI TEZC=TEZK0RMAG TERC=TERK.RMAG TEZK=TEZKWS TERK=TERK.S TxS=(O. . O . ) TYS=(O..O.) TZS=(O..O.) GO TO 6 IF ( I E X K . E O . 1 ) GO TO 4

52
53

54
55 56 57 58 59 60 61

EF
EF EF EF EF EF EF EF EF EF

62
63 64

EKSC FOR T H I N W I R E APPROX. OR EKSCX FOR EXTENDED T.W.

APPROX.

C A L L EKSC ( S . Z P . R H . T P . I J X , T E Z S , T E R S , T E Z C , T E R C , T E Z K , T E R K ) GO TO 5 C A L L EKSCX (B.S.ZP.RH.TP.IJX.INOI.IND~.TEZS.TERS.TEZC,TERC.TEZK.TE IRK) TXS=TEZS*CABJ+TERS*RHOX TYS=TEZS.SABJ+TERS*RHOY

EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF

65 66 68

67

TZS=TEZS*SALPR+TERSWAHOZ TXK=TEZK*CABJ+TERK*RHOX TYK=TEZK*SABJ+TERK*RHOY TZK=TEZK8SALPR+TERK*RHOZ TXC=TEZC*CABJ+TERC*RHOX TYC=TEZC*SABJ+TERC*RHOY TZC=TEZC*SALPR+TERC0RHOZ I F ( I P . N E . 2 ) GO TO 1 1 I F (IPERF.GT.0) GO TO 1 0 ZRATX=ZRATI RMAG=R

XYMAG=~ORT(XIJ*XIJ+YIJ*YIJ)
SET PARAMETERS FOR R A D I A L W I R E GROUND SCREEN. I F (NRAOL.EQ.0) GO TO 7

69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 121 128

X~PEC=(XI*ZJ+ZI*XJ)/(ZI+~J) YSPEC=(YI*ZJ+ZI*YJ)/(ZI+ZJ)
RHOSPC=SQRT(XSPEC'XSPEC+YSPEC*YSPEC+T2*T2) I F (RHOSPC.CT.SCRWL) GO TO 7 ZSCRN=T~-RHO~PC*ALOG(RHOSPC/TZ) ZRATX=(Z~CRN*ZRATI)/(ETA*ZRATI+ZSCRN) I F (XYMAG.GT.1.E-6) GO TO 8
C A L C U L A T I O N OF R E F L E C T I O N C O E F F I C I E N T S WHEN GROUND I S S P E C I F I E D . PX=O. PY=O CTH=I. ZRSIN=(l..O.) GO TO 9 PX=-YIJ/XYMAG PY=XIJ/XYMAG CTH=ZIJ/RMAG

EF EF
EF EF

EF EF
EF

EF
EF EF EF EF EF EF EF EF EF EF

ZRSIN=CSQRT(~.-ZRATX*ZRATX*(~.-CTH-CTH)) REFS=(CTH-ZRATX*ZR~IN)/(CTH+ZRATX*ZRSIN) REFPS=-(ZRATX-CTH-ZRSIN)/(ZRATX*CTH+ZRSIN)


REFPS=REFPS-REFS EPY=PX*TXK+PY.TYK EPX=PX*EPY EPY=PY*EPY TXK=REFS*TXK+REFPS8EPX TYK=REFS*TYK+REFPSWEPY TZK=REFSWTZK EPY=PX0TXS+PY*TYS EPX=PX0EPY EPY=PY*EPY TXS=REFS"TXS+REFPS*EPX TYS=REFS*TYS+REFPSwEPY TZS=REFS0TZS EPY=PX0TXC+PY*TYC EPX=PX0EPY EPY=PY0EPY TXC=REFS.TXC+REFPS"EPX TYC=REFSITYC+REFPS.EPY

EF EF EF
EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF EF

EFLD

EXK=TXK EYK=TYK EZK=TZK EXS=TXS EYS=TYS EZS=TZS EXC=TXC EYC=TYC EZC=TZC CONTINUE I F (IPERF.EO.2) RETURN

GO TO 1 3

F I E L D DUE TO GROUND U S I N G SOMMERFELD/NORTON

D I S P L A C E O B S E R V A T I O N P O I N T FOR T H I N W I R E A P P R O X I M A T I O N ZIJ=ZI+ZJ SALPR=-SALPJ RHOX=SABJ0ZIJ-SALPR0YIJ RHOY=SALPR*XIJ-CABJaZIJ RHOZ=CABJ*YIJ-SABJWXIJ

RW=RHOX*RHOX+RHOY*RHOY+RHOZ*RHOZ I F (RH.CT.1 . - l o ) GO TO 1 6 XO=XI-AI'YSN YO=YI+AI0XSN ZO=ZI GO TO 1 7 RH=AI/SQRT(RH) I F (RHOZ.LT.0.) RH=-RH XO=XI+RH0RHOX YO=YI+RH*RHOY ZO=ZI+RH0RHOZ

R=XIJ*XIJ+YIJ*YIJ+ZIJ*ZIJ
I F (R.GT..95) GO TO 18 F I E L D FROM I N T E R P O L A T I O N I S I N T E G R A T E D OVER SEGMENT ISNOR=l ~MIN=EXK*C~NJG(CXK)+EYK~CONJG(EYK)+EZK~CONJC(EZK) DMIN=.Ol*SQRT(OMIN) SHAF=.5*S C A L L ROt.42 ( - S H A F . S H A F . E G N 0 . D M I N ) GO TO 19

EFLD
NORTON F I E L D EQUATIONS AND LUMPED CURRENT ELEMENT APPROXIMATION ISNOR=2 CALL SFLOS ( O . . E G N D I EF 1 9 3 EF 1 9 4

TZC=OMIN0TZC+TERC.SALPR EXK=EXK+TXK EYK=EYK+TYK EZK=EZK+TZK EXS=EXS+TXS EYS=EYS+TYS EZS=EZS+TZS EXC=EXC+TXC EYC=EYC+TYC EZC=EZC+TZC RETURN EN0

EKSC EKSC PURPOSE To compute t h e e l e c t r i c f i e l d d u e t o c u r r e n t f i l a m e n t s w i t h s i n k z , c o s kz and c o n s t a n t d i s t r i b u t i o n s . METHOD The c u r r e n t f i l a m e n t i s l o c a t e d a t t h e o r i g i n of a c y l i n d r i c a l coordinate system, o r i e n t e d a l o n g t h e z a x i s , and e x t e n d i n g from -A12 t o A/2. components. SYMBOL DICTIONARY CINT
CON
=

Equations

7 1 t h r o u g h 7 4 i n P a r t I a r e used.

The f i e l d i s computed i n p and z

/-A12

cos ( k r ) / r dz 2 j q l ( 8 1 ~ ) ,q =

= CONX =

CS

= c o s (kA/2)

ERS
EZS
= p

and z components o f f i e l d due t o s i n k z , c o s kz, a n d respectively) current distributions

ERC EZC
ERK

c o n s t a n t ( S , C , K,

e x t e n d i n g f r o m z = -A12 t o z = A12

EZK ) GP1

1, GP2 1

= -(1

+ jkr)
for
i =

Go/'

f o r z = -A12 and Al2, r e s p e c t i v e l y , w h e r e

Go = e x p ( - j k r ) / r
= Go

and A12, r e s p e c t i v e l y

GZ2
GZPI) = aGo/az a t EK21, EK22 and a G l a p a t EK28, ~

0 ~ 2 ~ 2 z 1 = -A12 and AI2, r e s p e c t i v e l y


IJ
=

~ f o2 r

I J X = 0 t o i n d i c a t e t h a t t h e f i e l d p o i n t is on t h e s o u r c e
segment p c o o r d i n a t e of f i e l d p o i n t

RH

RHK

= k p ( k = 2IT/X,
= =
=

1)

RKB2
S

(kp)

A
A12 kA/2

SH

SHK

EKSC

SINT SS
XK

A12
s i n (kr)/r dz

= =

s i n (kA/2) k = Zn/X,.where -A12

Z
Z1

= z =

c o o r d i n a t e o f f i e l d point

22

= A12 = kz

ZPK CONSTANT

2 4.771341159 = n/(8k )

CODE LISTING

SUBROUTINE EKSC (S.Z.RH.XK.IJ,EZS.ERS,EZCCERCCEZKKERK) COMPUTE E F I E L D OF S I N E . COSINE. AND CONSTANT CURRENT F I L A M E N T S BY T H I N W I R E APPROXIMATION. COMPLEX CON.GZl.GZ2.GPl,GP2,GZPl.GZP2.EZS.ERS,EZCCERCCEZKKERK COMMON / T M I / ZPK.RKB2.IJX DIMENSION CONX(2) EQUIVALENCE (CONX.CON) DATA C O N X / 0 . . 4 . 7 7 1 3 4 1 1 8 9 / IJX=IJ ZPK=XKaZ RMK=XKaRH RKB2=RHK*RHK, SH=. 5.S SHK=XK0SH SS=SIN(SHK) CS=COS(SHK) ZZ=SH-Z Z1=-(SH+Z) C A L L GX ( Z 1 , R H . X K . G Z l . G P l ) C A L L GX ( Z 2 . R H . X K . G Z 2 . G P Z ) GZPl=GPl.Zl GZP2=GPZ0Z2

EZS=CON*((GZ2-GZ1)*CSoXK-(GZP2+GZPl)*SS) EZC=-CON*((GZ2+GZl)*SS*XK+(GZP2-GZPl)*CS)
ERK=CONo(GP2-GPl)*RH C A L L I N T X (-SHK.SHK.RHK.IJ.CINT.SINT)

GZP2=GZP2.Z2 I F (RH.LT.1.k-10)

GO TO I

ERS=-CON'((GZP2+GZP1+GZ2+GZ1)'SS-(Z22GZ2-Zl*GZl)*CS~XK)/RH ERC=-CON'((GZP2-GZP1+GZ22-GZ1)'CS+(Z2*GZ2+Zl*GZl)~SS*XK)/RH
RE TURN ERS=(O..O.) ERC=(O..O.) RETURN END

E K S C X

PURI'OSE To compute t h e e l e c t r i c f i e l d due t o c u r r e n t d i s t r i b u t i o n s o f s i n kz, cos kz, and c o n s t a n t on t h e s u r f a c e o f a c y l i n d e r by t h e e x t e n d e d t h i n w i r e approximation. M E T H O D E q u a t i o n s 84 through 87 i n P a r t I a r e used. The c u r r e n t t u b e i s

c e n t e r e d o n t h e o r i g i n o f a c y l i n d r i c a l c o o r d i n a t e system, o r i e n t e d a l o n g t h e z a x i s and e x t e n d i n g frbm -A12 t o 012. components. I f I N X l = 2, t h e f i e l d c o n t r i b u t i o n s from end 1 of t h e segment (z = -A/2) a r e e v a l u a t e d by t h e t h i n w i r e approximation f o r a c u r r e n t INX2 has t h e same meaning f o r end 2 o f t h e f i l a m e n t on t h e c y l i n d e r a x i s . segment ( z = A l 2 ) . The f i e l d is computed i n p and z

~ h e ' t h i n - w i r e approximation i s used a t a n end when t h e r e

is a bend o r change i n r a d i u s from t h a t end t o t h e n e x t segment.


When t h e p c o o r d i n a t e of t h e f i e l d p o i n t (RHX) i s l e s s t h a n t h e r a d i u s of t h e c u r r e n t t u b e (BX), t h e n RHX and BX a r e i n t e r c h a n g e d and a f l a g , IRA,
i s s e t t o 1 t o c a u s e a l t e r n a t e forms f o r G

and i t s d e r i v a t i v e s t o b e used

i n r o u t i n e GXX. S Y M B O L DICTIONARY A 2
B
= B
= =

r a d i u s of t h e c u r r e n t t u b e kB, where k = ~ I T / A , A = 1

BK

BK2
BX

= ( B K ) ~ / ~
= r a d i u s of t h e c u r r e n t tube =

CINT
CON

l A I 2c o s ( k r ) / r
-A12

dz

2 = CONX = j n I ( 8 a ) , where Q =
=

v'X 0 0

C S ERS
K 7 . S

c o s (kAl2)

\
=

EKC
EZC

p and

z componen~so r F i e l d due L o s i n k z , cos k z , and

c o n s t a n t (S, C , K , r e s p e c t i v e l y ) c u r r e n t d i s t r i b u t i o n s e x t e n d i n g from z = -A/? tu z = A I 2 .

E M
EZK

IJ

= 1 J X = 0 t o i n d i c a t e t h a t t h e f i e l d p o i n t is on t h e s o u r c e

lNX2 INX1
IRA

segment
= 2 t o u s e t h e t h i n w i r e form a t end 1 o r end 2 ,

respectively
= 1 t o i n d i c a t e RHX < BX
= p

RH RHK RHX RKB2


S

c o o r d i n a t e o f t h e f i e l d p o i n t o r wire r a d i u s c o o r d i n a t e of t h e f i e l d p o i n t

= k(RH)
= p

= (KHK)' = A = A12 = kA12


=

SH

SNK
SINT

sin (tr)/r dz -A12 s i n (kA/2) 2n/X,

SS

XK Z

= k = = z

= 1

coordinate of f i r l d point

z1
22 ZPK

= -A/2
=

A/2

- 2 - z

= kz

EKSCX
1

.INX2.EZS.ERS,EZC.ERC.EZK,E EX SUBROUTINE EKSCX (BX.S.Z.RHX.XK.IJ.INX~ 1RK) rw LA COMPUTE E F I E L D OF S I N E . C O S I N E . AND CONSTANT CURRENT F I L A M E N T S BY EX EXTENDED T H I N W I R E A P P R O X I M A T I O N . C" L A COMPLEX CON.GZ1 , G Z 2 . G Z P I , G Z P Z . G R l . G R 2 . G R P l . G R P 2 . E Z S . E Z C . E R S , E R C , G R EX 1KI.GRK2.EZK.ERK.GZZI.GZZ2 EX COMMON / T M I / ZPK.RKB2.IJX EX cv DIMENSION CONX(2) E Q U I V A L E N C E (CONX .CON) DATA C O N X / 0 . . 4 . 7 7 1 3 4 1 1 8 9 / I F ( R H X . L T . B X ) GO TO I RH=RHX B=BX IRA=O GO TO 2 RH=BX B=RHX

IRA=I
SH=. 5.S IJX=IJ ZPK=XKaZ RHK=XK0RH RKB2=RHK*RHK SHK=XKaSH SS=SIN(SHK) CS=COS(SHK) Z2=SH-Z Z1=-(SH+Z) A2=BaB I F (INXI.EQ.2) GO TO 3 C A L L GXX (Zl.RH.B.A2.XK.IRA.GZ1,GZP1.GRl.GRP1.GRK1.GZZl) GO TO 4 C A L L GX ( Z l . R H X . X K . G Z I . G R K 1 ) GZPl=GRKI.Zl GRl =GZl/RHX ' GRPl=GZPI/RHX G R K I =GRKl 'RHX GZZl=(O. .O.) I F (INX2.EQ.2) GO TO 5 CALL GXX ( Z Z . ~ H . ~ . A ~ . X K , I R A . G Z ~ , G Z P ~ , G R ~ , G R P ~ , G R K ~ , G Z ~ ~ ) EX GO TO 6 EX C A L L GX ( Z Z . R H X . X K . G Z Z . G R K 2 ) EX GZPZ=GRK2.Z2 EX GRP=GZZ/RHX. EX GRP2=GZPZ/RHX EX GRK2=GRKZaRHX EX GZZ2=(0..0.) EX EZS=CON'((GZZ-GZI)'CSWXK-(GZPZ+GZPl)*SS) EX

EX=-CON*((GZZ+GZI)-ss-XK+(GZPZ-GZPI)*CS)
ERS=-CON*((Z2'GRP2+ZI~GRP1+GR2+GR1)*SS-(Z2*GR2-Z1~GR1)oCS*XK)
ERC=-CON*((Z2'GRP2-ZVGRP1+GR2-GR1)*CS+(Z2oGR2+Zl*GR1)*SS*XK) ERK=CON0(GRK2-GRKI) C A L L I N T X (-SHK.SHK.RHK.IJ.CINT,SINT) BK=B0XK BK2=BK*BK..25
11)) RETURN EN0

EX

EX EX EX EX EX EX EZK=-CON*(GZPZ-GZPI+XK~XK*(~.-BK~)*CMPLX(CINT,-SINT)-BK~*(GZZ~-GZZEX EX EX EX

ENF ENF PURPOSE To check for an end of file. METHOD ENF uses the standard Fortran end-of-file test and returns the logical values .TRUE. or .FALSE. This separate function is used for convenience in adapting the code to particular computers, since the Fortran end-of-file test statements often differ between computers. The form of ENF here is for CDC computers. SYMBOL DICTIONARY ENF
= logical value:

.TRUE. if end of file was encountered; .FALSE.

otherwise NUNIT = logical unit number CODE LISTING


1

2 3 1 4 5 2 6 7

LOGICAL FUNCTION ENF(NUNIT) IF (EOF~NUNIT) 1 . 2 ENF=.TRUE. RETURN ENF=.FALSE. RETURN END

ETMNS
PURPOSE

To f i l l t h e a r r a y r e p r e s e n t i n g t h e r i g h t - h a n d

s i d e of t h e m a t r i x

e q u a t i o n w i t h t h e n e g a t i v e o f t h e e l e c t r i c f i e l d t a n g e n t t o t h e s e g m e n t s and w i t h t h e t a n g e n t i a l m a g n e t i c f i e l d on t h e s u r f a c e s . METHOD The a r r a y E r e p r e s e n t s t h e r i g h t - h a n d t h e ith segment, t h e right-hand For s i d e i s t h e n e g a t i v e of t h e a p p l i e d e l e c t r i c s i d e of t h e m a t r i x e q u a t i o n .

f i e l d component t a n g e n t t o t h e segment, and i s s t o r e d i n l o c a t i o n i i n a r r a y

E.

For t h e iths u r f a c e p a t c h , t h e r e are two rows

i n the matrix equation

(from t h e two components o f t h e v e c t o r e q u a t i o n s ) w i t h l o c a t i o n s N and N

21

2 i , w h e r e N i s t h e t o t a l number o f w i r e s e g m e n t s .

The c o n t e n t s o f E

for these locations a r e

where

H. 1

is t h e m a g n e t i c l i e l d a p p l i e d t o p a t c h i.

The f o r m s o n t h e r i g h t a r e

used i n t h e c o d e w i t h t h e p l u s s i g n a p p l y i n g when hand s y s t e m and t h e minus s i g n when l e f t - h a n d . (fl, f2,

(f 1 '

e2,

6 ) forms a r i g h t -

To a v o i d t h e n e e d t o c h e c k

6). the sign

i s s t o r e d i n a r r a y SALP where, f o r p a t c h i , SALP (LD

1 - i) = + L a c c o r d i n g t o

(el,

f 2 , 8 ) ' w i t h LD t h e l e n g t h o f t h e a r r a y s

in

COMMON/DATA/.

I f t h e s t r u c t u r e h a s symmetry, t h e e n t r i e s i n E a r e r e o r d e r e d

by s u b r o u t i n e SOLVES. The p a r a m e t e r IPK s e l e c t s t h e t y p e o f e x c i t a t i o n ; t h e meanings o f o t h e r p a r a m e t e r s depend on t h e o p t i o n s e l e c r e d by IPR and a r e e x p l a i n e d b e l o w . e x c i t a t i o n s a s s o c i a t e d w i t h IPR v a l u e s a r e : IPR


=

The

0 applied f i e l d voltage source


1 i n c i d e n t p l a n e wave, l i n e a r p o l a r i z a t i o n

2 i n c i d e n t p l a n e wave, r i g h t - h a n d

e l l i p t i c polarization

3 i n c i d e n t p l a n e wave, l e f t - h a n d e l l i p t i c p o l a r i z a t i o n

4 i n f i n i t e s i m a l c u r r e n t element source
5 current slope discontinuity voltage source

E m s
CODING

RT29
KT36

- ET34 - E'1'38 -

A p p l i e d f i e l d v o l t a g e s o u r c e (IPR = 0 ) . QDSRC i s c a l l e d f o r e a c h c u r r e n t s l o p e d i s c o n t i n u i t y v q l t a g e s o u r c e (IPR = 5 ) .

ET44

E ~ 1 6 0 I n c i d e n t p l a n e wave.

The d i r e c t i o n o f p r o p a g a t i o n and
A

p o l a r i z a t i o n of t h e wave a r e i l l u s t r a t e d i n f i g u r e 4 i n which $ is t h e u n i t v e c t o r normal t o k i n t h e p l a n e d e f i n e d by position and 2. The p l a n e wave a s a f u n c t i o n o f

F is
exec-jk-r)
-

-I E (t) =

E0
0

-I1 H (r) = - k x
where

E0

exp(-jk-r)

k , . k

= (Z~IX)
A

= u n i t v e c t o r i n d i r e c t i o n of p r o p a g a t i o n = E =
=

Eo

for linear polarization


j k

(k 1 -

) f o r right-hand

e l l i p t i c a l polarization e l l i p t i c a l polarization

) f o r left-hand ( i1 + j ~ 2g A = e l l i p s e axes r a t i o

ET44

ET58

P I '= 8 P 2 -= @ P3 =

5
= =

PX,. PY, P Z

x, y , z components o f E1

, .

wx,
ET6l

WY,

wz

i;

QX, QY, QZ =

k2

= k ? El

ETh8

Ground r e f l e c t i o n c o e f f i c i e n t s computed:

RRH = r e f l e c t i o n c o e f f i c i e n t f o r E n o r m a l t o t h e p l a n e of
incidence
RRV = r e f l e c t i o n c o e f f i c i e n t f o r E i n t h e p l a n e o f

incidence ET70

ET108

L i n e a r l y p o l a r i z e d wave (IPR = 1 )

Figure 4. Coordinate Parameters for the Incident Plane Wave.

ET71

ET73

Direct illumination of segments by E field.

ARG = -k
*

r,,
I

where r. 1
-

exp(-jk ET75
-

center point of segment I. ri), where

E(1) = -(El i) unit vector in the direction of

segment I. ET82 Illumination of segments by the ground reflected field. CX, CY, CZ ET84 - ET93 ET95 - ET108
=

reflected E field

Direct H field illumination of patches. Illumination of patches by the ground reflected field.
CX, CY, CZ
=

retlected H field
=

ET113

ET159 Elliptically polarized wave (IPR Ph


=

2 or 3 ) .

ellipse axes ratio


A

A.

ET116 - ET121 Direct F f i r , l d illumination of segments.

CX, CY, CZ
-

1 For right-hand)

= I:

~ A ^ E (+ ~

for left-hand polarization,

ET123 - ET130 Illumination of segments by the ground reflected E field. ET132


-

BT144 Illumination or patches by the direct H field.


CX, CY, C Z
= k x

E0

ET14h - ET159 Illumination of patches by ground reflected H field.

ET164

ET225 I n f i n i t e s i m a l c u r r e n t e l e m e n t s o u r c e (IPR = 4 ) . e l e m e n t o f moment I L

A current a t t h e o r i g i n o f a s p h e r i c a l coor-

d i n a t e s y s t e m , a s shown i n f i g u r e 5 , p r o d u c e s f i e l d components

Ee (R) = I

- exp(-jkR)

4n

[++(I

-&)$Isin

19.

H$

4 a exp(-jkR)

($ + F)

sin 0

IC t h e l o c a t i o n and o r i e n t a t i o n o f segment i and t h e


c u r r e n t element w i t h r e s p e c t t o t h e x, y , z c o o r d i n a t e system a r e

l o c a t i o n o f segment i

i = o r i e n t a t i o n o f segment i

D = l o c a t i o n of c u r r e n t e l e m e n t

d = o r i e n t a t i o n of c u r r e n t element then
-

R = r , - D
A

c o s e = ~ - d sin 0 = [ l

cos

81

112

T h e . o r i e n t a t i o n o f t h e c u r r e n t e l e m e n t i s d e f i n e d by i t s a n g l e o f e l e v a t i o n above t h e x-y p l a n e , a , a n d t h e a n g l c from t h e x a x i s t o i t s p r o j e c t i o n o n t h e x-y


A A

p l a n e , b.

Thus, d = c o s a c o s b x
A A

+ cos

a sin b y

sin a z.

, .

The' R and 8 f i e l d components a r e c o n v e r t e d t o components E Ed = E

^p

and d

and Ed, where cos 8

sin 8 cos 8

E sin 0 R

+ Ee

and t h e e x c i t a t i o n computed as

F i g u r e 5. Coordinate Parameters f o r C u r r e n t Element.

ET164

ET225 P I , P2, P 3 = x, y , z c o o r d i n a t e s of c u r r e n t e l e m e n t P4 = a

(6)

P5 = b
P6 = IoI1/X
L
A

ET164

ET169 WX, WY, WZ = x , y , and z components o f d DS = ( ~ 1 2 ~ 10!L/A )

2 DSH = (1141~) 10!L/i


ET173 ET176 S t a r t o f l o o p over- a l l segments and p a t c h e s .

ET179 For p a t c h e s , I S = l o c a t i o n o f p a t c h d a t a i n geometry a r r a y s


11, 12 = l o c a t i o n s t o b e f i l l e d i n E

ETLRO

E118J

~ ~ 1 P 8X ,2 P Y , PZ = I 3 1 9 3 I< =

RIA

IKIA~
PY,

rx,

PZ

C'I'H = cos (1

:iTlI = s i n I1

qx, q u , Liz

- (i i)i

L1'196

ET204 QX, Q Y , QZ =
1'1
=

j
R)

exp(-jk

ET206

ET215 E f i e l d on s e g m e n t s 2 2 T2 = ( 1 j/kR)X / R

ER = ER ET = E

ERH = E P EZH = EZ CX, CY, CZ = x, y, z components o f t o t a l E f i e l d ET216

ET224 H f i e l d o n p a t c h e s
PX. PY, PZ =

= $

T2 = fH $

CX, CY, CZ = fH
CONSTANTS

-I

l.E-30 2.654420938E-3 59.958 6.283185308

= tolerance i n t e s t f o r zero
= =

1/rl = n/2n

= 2n

S U B R O U T I N E ETMNS

(P1,P2.P3.P4,P5,PS.IPR.E)

ET

1 2 3
4

E l ETMNS F I L L S THE ARRAY E W I T H THE N E G A T I V E OF THE E L E C T R I C F I E L D ET I N C I D E N T ON THE STRUCTURE. E I S THE R I G H T HAND S I D E OF THE M A T R I X ET EOUATION. ET COMPLEX E . C X . C Y . C Z . V S A N T . T X l . T X 2 . E R . E T . E Z H . E R H . V O D . V Q D S , Z R A T I , Z R A T IIZ.RRV.RRH.TI : T T ~ .TTZ.FRATI COMMON /DATA/ L D . N 1 , N Z . N . N P . M I .M2.M.MP.X(300).Y(300).Z(300),S1(300 23DD).WLAM.IPSYM COMMON /VSORC/ V O D ( ~ O ). V S A N T ( 3 0 ) . V Q D S ( 3 0 ) , I V O D ( 3 0 ) , I S A N T ( 3 0 ) I 130).NVQD.NSANT.NQDS COMMON /GND/ZRATI.ZRATIZ.FRATI.CL.CH.SCRNL.SCRWR.NRADL.KSYMP.IFAR. 1IPERF.TI.TZ D I M E N S I O N C A B ( 1 ) . S A B ( 1 ) . E(6OO) DIMENSION T l X ( 1 ) . T l Y ( 1 ) . T l Z ( 1 ) . TZX(1). TZY(1). TZZ(1) EQUIVALENCE (CAB.ALP). (SAB.BET) E Q U I V A L E N C E ( ~ ~ x , s I ) .( T 1 Y . A L P ) . (TlZ.BET). (TPX.ICON1). (T2Y.ICON 1 2 ) . (TZZ.ITAG) DATA TP/6.283185308/.RETA/2.654420938E-3/ NEQ=N+Z0M NQDS=O ET ET
F T . .

ET
CT

~ ) ~ ~ ~ ( ~ ~ ~ ) ~ A ~ P ~ ~ ~ ~ ) ~ B E T ~ ~ O ~ ) ~ I C O N ~ ( ~ O ~ ) , I ET C ~ N ~ ( ~ O ~ ) , I T A G ( ~ O
;T ET

ET
FT .

ET ET

ET
ET ET ET ET ET ET ET ET ET ET fT ET ET ET

I F

(IPR.GT.O.AND.IPR.NE.~)

GO TO 5

A P P L I E D F I E L D OF VOLTAGE SOURCES FOR T R A N S M I T T I N G CASE DO 1 1 = 1 .NEQ E(I)=(O..O.) F I (NSANT.EO.O) DO 2 1 = 1 .NSANT

GO TO 3

IS=ISANT(I)

'

(IS)=-VSANT(I)/(SI(IS)*WLAM)
I F (NVQD.EO.0) RETURN DO 4 1 = 1 .NVQD IS=IVOD(I) C A L L ODSRC (I$.vQD(I).E) RETURN TO 1 9 I F (IPR.GT.3).GO INCIDENT

ET
ET ET ET

PLANE

WAVE.

LINEARLY POLARIZED

I F ( M . E O . 0 ) RETURN I=LD+I II=N-I DO 11 I S = l .M I=I-I 11=11+2 12=11t1

ARG=-TP'(WX.X(I)+WY.Y(I)+WZ'Z(I)) TTI=CMPLX~CO~~ARG).~IN(ARC))*SALP~I~*RETA

CX=-(RRH'OX-TTI

*SPH) CY=-(RRH*OY+TTI*CPH) CZ=RRH*OZ I=LD+I Il=N-I DO 12 I S = l .M 1-1-1 11=11+2 12=11+1

ARC=-TP*(WX*X(I)+WY'Y(I)-WZaZ(I)) TTI=CMPLX(CO~(ARG).SIN(ARG))*SALP(I)*R~TA E(I2)=E(I2)+(CX*TlX(I)+CY*TlY(I)+CZ~TIZ(I))*TTl

E(II)=E(I~)+(cx*T~x(I)+cY.T~Y(I)+CZ*T~Z(I))*TT~
RETURN I N C I D E N T PLANE WAVE. E L L I P T I C POLARIZATION.

I N C I D E N T F I E L D OF AN ELEMENTARY CURRENT SOURCE.

CZ=EZH*WZ+ERH*OZ

(I)=-(CX*CAB(I)+CY*~AB(I)+C~*~ALP(I))
GO TO 2 4 PX=WY.QZ-WZ'QY PY-WZOQX-WX'QZ PZ=WX*OY-WY *OX

TT2=DSH*TTI*CMPLX(l./R.TP)/R*STH*SALP(II)
CX=TTZWPX CY=TT2*PY CZ=TTZ0PZ

E(I2)=CX'TlX(II)+CY'TlY(II)+CZ*T1Z(II) E(Il)=CX-T2X(II)+CY~TZY(II)+CZ*T2Z(II)
CONTINUE RETURN END

FACGF FACGF PURPOSE To perform t h e s t e p s i n t h e N G F s o l u t i o n t h a t d o n o t depend on t h e e x c i t a t i o n vector.

M E T H O D The N G F s o l u t i o n procedure i s d i s c u s s e d i n S e c t i o n V I . performed i n FACGF a r e t o e v a l u a t e A-'B


D

The m a t r i x i s t h e n f a c t o r e d i n t o t r i a n g u l a r m a t r i c e s L acd U. The procedure i s c o m p l i c a t e d by t h e p o s s i b l e need t o u s e f i l e s t o r a g e f o r t h e m a t r i c e s . The

and D

- CA-'5.

The s t e p s

CA-'8

comments i n t h e code and t h e t a b l e s f o r ICASX = 2, 3 and 4 i n S e c t i o n V I I o f f e r a f a i r l y complete d e s c r i p t i o n of t h e procedure.

SYMbOL DICTIONARY

A
B

a r r a y f o r m a t r i x A (L U f a c t o r s ) o r block o f A i f f i l e s t o r a g e

i s used
The

BX

a r r a y l o r B o r block of B -1 . = a r r a y f o r B when A B 1s being computed w i t h ICASX = 2. a r r a y B s t a r t s a t t h e beginning of CM i n t h i s c a s e . room f o r A F a t t h e beginning of CM = a r r a y f o r C o r block of C ( m a t r i x t r a n s p o s e d )


3

BX leaves

C
D

a r r a y f o r D o r block of D ( m a t r i x t r a n s p o s e d )

IBFL ICASS

= f i l e on which B i s s t o r e d = saved v a l u e o f ICASE = p i v o t index a r r a y = d a t a o n row i n t e r c h a n g e s i n LFACTR = number o f p a t c h e s i n t h e N G F

IP IX

MI
M P

number of p a t c h e s i n a symmetric s e c t i o n i n t h e N G F

N1 N 1C
NlCP
N ZC

= number o f segments i n t h e N G F
3

number of columns i n C (same a s o r d e r of A)


+

' N1C

o r d e r of m a t r i x D

NBLSYS = saved v a l u e of NBLSYM


NIC NLSYS

= index increment saved v a l u e o f N L S Y M

FACGF
= number of segments in

a symmetric section i n the NGF

SYS
JM

= saved value of NPSYM


= sumtnation variable Lor matrix products

FACGF
S U B R O U T I N E FACGF (A.B.C.b.BX.IP.IX.NP,N1,MP.Ml.NlC.N2C) FACGF COMPUTES AND F A C T O R S D-C(INV(A)B). COMPLEX A . B . C . D . B X . S U M COMMON /MATPAR/ ICASE,NBLOKS.NPBLK.NLAST,NBLSYM,NPSYM,NLSYM,IMAT,I ICASX.NBBX.NPBX.NLBX,NBBL.NLBL DIMENSION A ( 1 ) . B ( N I C . 1 ) . C ( N l C . 1 ) . D ( N 2 C . I ) . B X ( N l C . 1 ) . IP(1). I X 1(1) I F ( N 2 C . E 0 . 0 ) RETURN IBFL=14 I F ( I C A S X . L T . 3 ) GO TO 1 CONVERT B FROM BLOCKS OF ROWS ON T I 4 TO BLOCKS OF C O L . ON T I 6 C A L L REBLK ( B . C . N l C . N P B X . N 2 C ) IBFL=l6 NPB=NPBL I F ( I C A S X . E O . 2 ) REWIND 1 4 COMPUTE I N V ( A ) B AND W R I T E ON T A P E 1 4 DO 2 I B = I . N B B L FG
t

FG
FG FG FG FG FG FG FG FG FG FG FG FG FG FG FG

2
3 4 5
6

7
8 9 10 I1 12 13 14 15 16 17

C A L L SOLVES I F ( I C A S X . E Q . 2 ) REWIND 1 4 I F (ICASX.GT. 1 ) WRITE ( 1 4 ) ( ( B X ( 1 . J ) . I = l . N l C ) . J = I CONTINUE I F ( I C A S X . E Q . 1 ) GO TO 3 REWIND 1 1 REWIND 1 2 REWIND 1 5 REWIND I B F L NPC=NPBL COMPUTE 0 - C ( I N V ( A ) B ) AND W R I T E ON TAPE11 DO 8 I C = I . N B B L

(A~IP.BX.NIC.N~B;NP,NI,MP,M~.~~.I~)
.NPB)

READ ( 1 5 ) ((c(I.J).I=~ . N I C ) . J = l .NPC) READ ( 1 2 ) ((D(I.J).I=l.N2C).J=l.NPC) REWIND 1 4 NPB=NPBL NIC=O DO 7 I B = l . N B B L I F ( 1 B . E Q . N B B L ) NPB=NLBL I F ( I C A S X . G T . 1 ) READ ( 1 4 ) ( ( B ( I . J ) . I = l , DO 6 I = l . N P B II=I+NIC DO 6 J = l . N P C SUM=(O..O.) DO 5 K = l . N I C

NIC=NIC+NPBL I F ( I C A S X . G T . 1 ) WRITE ( 1 1 ) ( ( D ( 1 CONTINUE I F ( I C A S X . E O . 1 ) GO TO 9 REWIND I I REWIND 1 2 REWIND 1 4 REWIND 1 5 NlCP=NlC+l FACTOR D - C ( I N V ( A ) B ) I F (ICASX.GT.1) GO TO 1 0 CALL FACTR ( N ~ C . D . I P ( N I C P ) . N 2 C ) GO TO 1 3

FACGF
65 66 67 68
69

IC=IC+NZC0NPB READ ( 1 1 ) ( B ( I . I ) . I = I I . I C ) REWINO 1 1 CALL FACTR ( N Z C . B . I P ( N I C P ) . N Z C ) NIC=N2C0N2C W R I T E ( \ 1 ) ( B ( I . 1 ) ,I=l .NIC) REWIND 1 I

70

71

CALL F A C I O (B.N2C.I.IX(NICP).I1.12.16.I1) CALL LUNSCR (8.N2C.I.IP(NICP).IX(NICP),12,11,16) NBLSYM=NBLSYS NPSYMzNPSYS NLSYM=NLSYS ICASE=ICASS RETURN END

FACIO FACIO PURPOSE To read and write matrix blocks needed for the LU decomposition. METHOD Sequential access is used on all files. The matrix is initially stored The block size is on file IUl in blocks of columns of the transposed matrix. process.

such that two blocks will fit into the array A for the Gauss elimination If the matrix were divided into four blocks, the order for reading Blocks 1, 2 1, 4 2, 3 2, 4 3, 4 the blocks into core would be

31

1 and 2 will be completely factored 3 and 4 partially factored factorization of 3 completed

4 partially factored
factorization complete Partially factored blocks are read from file
=

IU1 is the initial input file.

IFILE3 and written to IFILE4 where IFILE3 blocks are written to file IU2. are ignored in subroutine LFACTR.

IU3 and IFILE4

IU4 when IXBLKl Completed

is odd, and IFILE3 = IU4 and IFILE4 = IU3 when IXBLK1 is even. other blocks the same number of words is read or written.

Although the last block may be shorter than The excess words For a

Subroutine LFACTR is called to perform the Gauss elimination.

symmetric structure the loop from F018 to F043 factors each submatrix. SYMBOL DICTIONARY A I1 I2 I3 I4 IFILE3 IFILE4 IP
= array for matrix storage = location in A of beginning of block = location in A of end of block 1
= =

location in A of beginning of block 2 location in A of end of block 2

= input file = output file

= array for pivot element indices

FACIO
I 'C IUL,
= number o f words i n a m a t r i x b l o c k

I U 2 , IU3, IU4

= f i l e 'numbers = number o f = number of

I XBLKl IXULKZ
KA

f i r s t block s t o r e d i n A second block s t o r e d i n A

= f i r s t L o c a t i o n i n I P f o r s u b m a t r i x KK

NBM NOP

= number o f b l o c k s minus o n e = number o f s u b m a t r i c e s f o r symmetry = number o f rows i n a b l o c k = v a r i a b l e s t o sum t o t a l t i m e s p e n t i n LFACTR

NROW
T1, T2, TIME

S U B R O U T I N E F A C I O (A.NROW.NOP.IP.IUI.IU2.1U3.IU4) F A C I O CONTROLS 1/0 FOR OUT-OF-CORE FACTORIZATION

FO FO FO FO FO

COMPLEX A COMMON / M A T P A R / ICASE.NBLOKS.NPBLK.NLAST,NBLSYM~NPSYM,NLSYM,IMAT,I~FO ICASX.NBBX.NPBX.NLBX,NBBL,NPBL,NLBL FO DIMENSION ~ ( ~ ~ o w . 1IP(NROW) ) . FO IT=2*NPSYM.NROW FO NBM=NBLSYM-1 FO I1=1 FO

14=Z01T TIME=O. REWIND I U I REWIND I U 2 DO 3 KK=1 .NOP KA=(KK-I)*NROW+I IFILE3=IUI IFILE4=IU3 DO 2 I X B L K I = l . N B M REWIND I U 3 REWIND I U 4 CALL BLCKIN ( A . I F I L E 3 . 1 1 . 1 2 . 1 . 1 7 ) IXBP=IXBLKI+I DO 1 I X B L K Z = I X B P . N B L S Y M CALL BLCKIN ( A . I F I L E 3 . I J . 1 4 . 1 . 1 8 ) C A L L SECOND (TI) C A L L LFACTR (A.NROW.IXBLKI.IXBLKZ,IP(KA)) C A L L SECOND ( 7 2 ) TIME=TIME+TZ-TI I F ( 1 X B L K Z . E Q . I X B P ) C A L L BLCKOT ( A . 1 U 2 . 1 1 . 1 2 . 1 . 1 9 ) I F (1XBLKl.EO.NBM.AND.IXBLKZ.EO.NBLSYM) IFILE4=IU2 BLCKOT ( A . I F I L E 4 . 1 3 , 1 4 , 1 , 2 0 ) CONTINUE

CALL

I F ((IXBLK1/2)*2.NE.IXBLKl) IFILE3=IU4 IFILE4=IU3 CONTINUE CONTINUE REWIND I U I REWIND I U 2 REWIND I U 3 REWIND I U 4 PRINT 4 . TIME RETURN

GO TO 2

FORMAT ( 3 5 H CP T I M E TAKLN FOR F A C T O R I Z A T I O N END

.E12.5)

FACTR FACTR PURPOSE To [actor a con~plexmatrix into a lower triangular and an upper triangular matrix using the Gauss-Doolittle technique. is a transposed matrix. determine the solution of the matrix equation Ax METHOD The algorithm used in this routine is presented by A. Ralston (ref. 1). The decomposition of the matrix A is such that A matrix.
=

The matrix in this case

The factored matrix is used by subroutine SOLVE to


=

B.

LU, where L is a lower The computations to

triangular matrix with 1's down the diagonal, and U is an upper triangular The L and U matrices overwrite the matrix A. obtain I. and U are done using one complex scratch vector (D) and one integer vector (IP) that keep track of row interchanges when elements are positioned for size. If positioning Eor size is not taken into account, the general procedure is

which gives the first column of the L and U matrices.

Then

gives the second column. in this way.

The computations for the successive columns continue

The general equations for the rth column are

air

= a . ilulr + . . . + a .

u i ir rr' -1 23-

1,

..., n

FACTR T h e r e a r c o n l y two d i f f e r e n c e s i n t h e c o d i n g u s e d i n FACTR and t h e c o d i n g s u g g e s t e d by R o l s t o n . The t i r s t is t h a t d o u b l e p r e c i s i o n v a r i a b l e s a r e

n o t u s e d Lor t h e d c c u m u l a t i o n o f sums, s i n c e f o r t h e s i z e and c o n d i t i o n i n g o f t h e o i a t r i c e s anticipated i n c o r e , t h e computer word l e n g t h i s s u f f i c i e n t t o insure accuracy.


T h e s e c o n d d i f E e r e n c e i s t h a t t h e row and column i n d i c e s of

t h e A m a t r i x i n t h e r o u t i n e have been interchanged t o handle t h e t r a n s p o s e d matrix.


CODING

The c o d i n g i s d i v i d e d i n t o f i v e s t e p s which c o r r e s p o n d t o t h e s t e p s g i v e n by R a l s t o n . FA14 Loop o v e r columns (rows w i t h t h e i n t e r c h a n g e d i n d i c e s u s e d i n the routine). FA18 FA24

FA20 F i l l D v e c t o r w i t h column (row) of A. FA35 S o l u t i o n f o r u .


Lr

( i = 1,

...,r )
1,

i n t h e above e q u a t i o n s

taking i n t o account positioning. FA40 FA58 FA64

FA54 S e l e c t i n g l a r g e s t v a l u e f o r p o s i t i o n i n g . FA62 S o l u t i o n f o r Lir


(i = r

...,n )

i n t h e above e q u a t i o n s .

FA66 P r i n t i n g o f s m a l l p i v o t elements.

SYMBOL DICTIONARY
A
=

i n p u t t r a n s p o s e d m a t r i x o v e r w r i t t e n w i t h c a l c u l a t e d L~ a n d U

matrices
C O N J G = e x t e r n a l r o u t i n e ( c o n j u g a t e o f a complex number)

= =

scratch vector maximum v a l u e i n D

DMAX

ELMAG = i n t e r m e d i a t e v a r i a b l e

= DO

loop index

IFLG
IP
. i

= small pivot f l a g
=

integer vector s t o r i n g positioning information

= DO l o o p i n d e x
=

JPl
1 :

1
loop index
NDIM > N

= DO = =

N
NDIM
P .I

o r d e r o t matrix being factored d i m e n s i o n s o f t h e a r r a y where t h e m a t r i x i s s t o r e d .


intermediate variable

PK

intermediate variable

R
REAL

= DO l o o p i n d e x = e x t e r n a l r o u t i n e ( r e a l p a r t o f complex number)

RMl
RPl

= K - l
= R + 1

S U B R O U T I N E FACTR ( N . A . I P . N D I M )

FA

FA S U B R O U T I N E TO FACTOR A M A T R I X I N T O A U N I T LOWER T R I A N G U L A R M A T R I X FA AND AN UPPER TRIANGULAR M A T R I X U S I N G THE GAUSS-DOOLITTLE A L G O R I T H M FA PRESENTED ON PAGES 4 1 1 - 4 1 6 OF A . RALSTON--A F I R S T COURSE I N FA NUMERICAL A N A L Y S I S . COMMENTS BELOW REFER TO COMMENTS I N RALSTONS FA TEXT. ( M A T R I X TRANSPOSED. FA FA COMPLEX A . D . A R J FA DIMENSION A(NDIM.NDIM). IP(NDIM) FA COMMON /SCRATM/ D(600) FA INTEGER R.RMI.RP1.PJ.PR FA IFLG=O FA DO 9 R = l . N FA FA STEP 1 FA FA FA DO 1 K = l . N D(K)=A(R.K) FA CONTINUE FA FA S T E P S 2 AND 3 FA FA RMI=R-I FA I F (RMI.LT.I) GO TO 4 FA DO 3 J = I . R M I FA PJ=IP(J) FA ARJ=D(PJ) FA A(R.J)=ARJ FA D(PJ)=D(J) FA JPI=J+I FA DO 2 I = J P I . N FA

D(I)=D(I)-A(J.I)*ARJ
CONTINUE CONTINUE CONTINUE STEP 4

FA
FA FA FA FA FA FA

DMAX=REAL(D(R)~CONJG(D(R))) IP(R)=R RPI=R+1 I F (RP1.GT.N) GO TO 6 DO 5 I = R P I . N ELMAG=REAL(O(I)'CONJG(D(I))) I F (ELMAG.LT.DMAX) GO TO 5 DMAX=ELMAG IP(R)=I CONTINUE CONTINUE I F (DMAX.LT.I.E-10) IFLG=I PR=IP(R) A(R.R)=D(PR) D(PR)=D(R)
STEP 5 I F ( R P 1 . G T . N ) GO TO 8 ARJ=I./A(R.R) DO 7 I = R P I . N A(R.I)=D(I).ARJ CONTINUE CONTINUE GO TO 9 I F (1FLG.EQ.O)

FA
FA

FACTR
65
66 67 9 68 69 C 70 10 71 P R I N T 1 0 . R.DMAX I F LG=O CONTINUE RETURN FORMAT END

(1H .6HPIVOT(.I3.2H)=.E16.8)

FACTRS FACTKS PURPOSE T o c a l l t h e a p p r o p r i a t e s u b r o u t i n e s f o r t h e LU d e c o m p o s i t i o n o f a m a t r i x .

NETHOD T h e o p e r a t i o n o f FACTRS d e p e n d s o n t h e mode o f s t o r a g e o f t h e m a t r i x a s d e t e r m i n e d by t h e v a l u e o f ICASE ( s e e COMMON/MATPAR/ i n S e c t i o n 111). ICASE = 1 s u b r o u t i n e FACTK i s c a l l e d a t F S 1 6 t o f a c t o r t h e m a t r i x . ICASE = 2 FAC'TK i s c a l l e d f o r e a c h o f t h e NOP s u b m a t r i c e s . a n d LUNSCR a r e c a l l e d a t F S 2 3 a n d FS24. a n d w r i t e s t h e r e s u l t o n E i l e IU2. For

For

I f ICASE = 3 FACIO

FACIO r e a d s t h e m a t r i x f r o m f i l e I U l

LUNSCK l e a v e s t h e f i n a l r e s u l t o n f i l e IU3.

F o r ICASE = 4 ( s y m m e t r y , s u b m a t r i c e s f i t i n c o r e ) o r ICASE = 5 (symmetry, s u b m a t r i c e s d o n o t f i t i n c o r e ) t h e m a t r i x elements o n f i l e I U l a r e w r i t t e n i n a new o r d e r o n E i l e IU2 f r o m FS29 t o FS46. f i l e IUL i s The s e q u e n c e o f d a t a o n

c o l u m n 1 oE s u b m a t r i x 1 column 1 o f s u b m a t r i x 2

c o l u m n 1 o f s u b m a t r i x NOP column 2 of submatrix 1

c o l u m n 2 o f s u b m a t r i x NOP column 3 o f s u b m a t r i x 1

c o l u m n NPBLK o f s u b m a t r i x NOP

The m a t r i c e s a r e w r i t t e n o n t o f i l e 102 i n t h e s e q u e n c e

column l o f s u b m a t r i x 1 column 2 of s u b m a t r i x 1

FACTRS c o l u m n NPBLK o f s u b m a t r i x 1 column 1 o I s u b m a t r i x 2

c o l u m n NPBLK o f s u b m a t r i x NOP

F o r ICASE = 4 e a c h s u b m a t r i x i s t h e n r e a d i n t o memory a t F S 5 8 a n d d e c o m p o s e d into L U f a c t o r s by c a l l i n g FACTR a t FS60. t o f i l e I U 3 a t FS61. F o r ICASL = 5 t i r e m a t r i c e s a r e t r a n s f e r r e d f r o l n f i l e I U 2 t o I U 1 a t FS76 t o FS77. S u b r o u t i n e FACIO i s t h e n c a l l e d t o f a c t o r a l l o f t h e NOP T h e r e s u l t i s l e f t o n f i l e IU2. l e a v e s t h e r e s u l t o n IU3. LUNSCR r e o r d e r s t h e r o w s o f The f a c t o r e d m a t r i c e s a r e w r i t t e n

submatrices.

each s l a t r i x and

SYMhOL OICTIONAKY
A
= array for matrix storage = n u m b e r oE w o r d s i n a b l o c k
=

I2
ICOLS

number oE colutiins i n a b l o c k

IP 1111, IK2,
IKI11,

= a r r a y f o r pivot element i n d i c e s

1KK2

= row i n d i c e s f o r r e o r d e r i n g c o l u m n s = f i l e numbers = a r r a y of

I U 1 , I U 2 , I U 3 , IU4 IX K A NOP NP

pivot element d a t a

= s t a r t i n g location of a submatrix i n the array


= nuinber o f

symmetric s e c t i o n s

= number o f e q u a t i o n s f o r e a c h s y m m e t r i c s e c t i o n

(order of submatrix)
NKOW
= t o t a l number o f e q u a t i o n s ( N P x NOP)

FACTRS
S U B R O U T I N E FACTRS (NP.NROW.A.IP.IX.IUI.IU2.IU3.IU4) T A C T R S . FOR SYMMETRIC STRUCTURE. TRANSFORMS S U B M A T R I C I E S TO FORM M A T R I C I E S OF THE SYMMETRIC MODES AND C A L L S R O U T I N E TO FACTOR MATRICIES. I F NO SYMMETRY. THE ROUTINE I S C A L L E D TO FACTOR THE COMPLETE M A T R I X . COMPLEX A COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST,NBLSYM,NPSYM,NLSYM.IMAT,I ICASX.NBBX.NPBX.NLBX,NBBL.NPBL,NLBL DIMENSION A(!). IP(NROW). I X ( N R O W ) NOP=NROW/NP GO TO 2 I F (ICASE.GT.2) DO 1 K K = l .NOP K A = ( K K - I ).NP+I C A L L F A C T R (NP.A(KA).IP(KA).NROW) RETURN I F (ICASE.GT.3) GO TO 3 FACTOR S U B M A T R I C I E S . OR FACTOR COMPLETE M A T R I X I F NO SYMMETRY EXISTS. C A L L F A C I O (A.NROW.NOP.IX.IUI.IUZ.IU3.IU4) C A L L LUNSCR (A.NROW.NOP.IP.IX,IU2,IU3,IU4) RETURN REWRITE THE M A T R I C E S BY COLUMNS ON TAPE 1 3 IZ=ZmNPBLK*NROW REWIND I U 2 DO 5 K = I . N O P REWIND I U I ICOLS=NPBLK IR2=KaNP IRl=IR2-NP+1 00 5 L = l . N B L O K S I F (NBLOKS.EQ.I.AND.K.GT.1) FS FS FS FS FS FS FS FS FS FS FS FS FS FS FS

Fs
FS FS FS FS FS

GO TO 4

IRRl=IRI IRR2=IR2 DO 5 I C O L O X = I . I C O L S WRITE ( I U 2 ) ( A ( I ) . I = I R R I , I R R 2 ) IRRI=IRRl+NROW IRRL=IRR2+NROW CONTINUE REWIND I U I REWIND I U 2 I F ( I C A S E . E O . 5 ) GO TO 8 REWIND I U 3 IRRI=NPaNP DO 7 K K = I . N O P

DO 6 I = 1 .NP I R 1 = I R I +NP IRZ=IRP+NP READ ( I U 2 ) ( A ( J ) . J = I R I . I R Z ) KA=(KK-I)*NP+I C A L L F A C T R (NP.A.IP(KA).NP) WRITE ( I U 3 ) ( A ( I ) . I = l . I R R I ) CONTINUE REWIND I U Z REWINO I U 3

FACTRS
RETURN I2=2.NPSYM0NP 00 1 0 K K = l .NOP JZ=NPSYM DO 1 0 L = I . N B L S Y M IF ( L . E O . N B L S Y M ) JP=NLSYM IRl=l-NP IR2=0 DO 9 J = 1 . J 2 IRI=IRl+NP IR2=IRZ+NP REAO ( I U 2 ) ( A ( I ) , I = I R l . I R 2 ) C A L L BLCKOT ( A . I U 1 . 1 . 1 2 . 1 . 1 9 3 ) REWIND I U l C A L L F A C I O (A.NP.NOP.IX.IUI.IU2,IU3,IU4) C A L L LUNSCR (A.NP.NOP.IP.IX.IUZ,IU3,IU4) RETURN END

FBAR
.FBAR

PURPOSE To compute t h e Somrnerfeld a t t e n u a t i o n f u n c t i o n f o r N o r t o n ' s a s y m p t o t i c f i e l d approximations.

METHOD T h e v a l u e r e t u r n e d f o r FEAR i s

F(P) = 1

JnP e x p

(-P)

I1

e r f ( j m ]

where e r f ( z ) i s t h e e r r o r f u n c t i o n . computed from t h e series

If

I j f i l 5 3 t h e value of e r f ( j&)

is

For ~ j f i> l 3, F ( P ) i s e v a l u a t e d from t h e f i r s t s i x t e r m s o f t h e a s y m p t o t i c expansion

for z

larg(z) I<

3n Ir

SYMBOL DICTIONARY ACCS FJ


MINUS

= r e l a t i v e convergence test value

= j = R
= 1 i f Re(z) < 0
= P = 1 z In! = magnitude squared o f s e r i e s =

P P O W SM S
SP

2n+l

fi

SUM

= series v a l u e

FBAR
TERM
= term in the series
=

TMS TOSP
Z

ITERMI

= 2 1 6 =

j/F
2

zS

' 2

C O M P l CX F U N C I I O N F B A R ( P ) F B A P 1 5 S O M M C R F L I D A T I E N l l A T I O I I F U N C T I O N FOR N U M E R I C A L O I S T A N C F COMPLLX :.LS.SUM.POW.TLRM,P,FJ OIMLNSION F J X ( 2 ) EQUIVALENCE (1 J , r J X ) DATA TOSP/1.128379167/.ACCS/I.E-12/.SP/1.772453851/.FJX/O..1./ P

FR FR FR VR Fii

1
4

rR

rl!
f R

S E R I E S EXPANSION

CON1 I N U E F B A R = l . ( l . -SUM'TOSP)'Z.CEXP(ZS).SP

ASYMPTOTIC

EXPANSION

F I (REAL(Z)GE.O.) MTNUS=I

GO T O 4

z=-7
GO TO 5 MINUSrO ZS=.5/(Z.Z) SUM=(O..O ) TERM=(I..O.) DO 6 1 - 1 .6 TERM=-TERM.(Z:I-I.).ZS S U M = S U M t TERM I F ( M I N U S E Q I ) SUM=SUM-Z:SP.Z*CEXP(Z*Z) FEAR--SUM RETURN EN0

FBLOCK FULOCK

PIJKf'OSE T o set parameters for storage of the interaction matrix.

METHOD FBLOCK sets values of the parameters ICASE through NLSYM in COMMON/MATPAR/. The input parameters NROW and NCOL are the number of rows and IMAX is the number of matrix elements If a NGF file will be written If a NGF

columns in the non-transposed matrix.

that can be stored in the array in COMMON/CMB/. tile has not been requested then IRNGF is zero.

(WG card) then IRNCF complex locations are reserved for future use.

L f (NROW)(NCOL)
COMMON/CMH/.

<

IMAX

- IKNGF the complete matrix can be stored in


I f the

ICASE is then 1 for no symmetry or 2 for symmetry.

structure has symmetry and one submatrix fits in core but not the complete matrix,
> IMAX

(NROW)(NCOL)

IRNGF

then TCASE is 4. I f the matrix cannot fit in core for the LU deco~nposition then it is divided into blocks of rows (columns of the transposed matrix) for transfer hetween core and file storage. that one block fits into IMAX locations. The blocks are made as large as possible so

- IRNGF locations and two blocks fit into IMAX

Since two blocks are needed in core only during the Gauss

elimination process this makes at least IRNGF locations available during the
iNGF

solution.

CODING FH10 - FU17 FR20


FU34

ICASE ICASE

= =

1 or 2

- FB32 - FB40 - FU58

3
4, block parameters for submatrices

ICASE = 4 or 5, block parameters for whole matrix ICASE ICASE


= =

FH42 - FB48

FB49

5, block parameters for submatrices

FU65 FB75

FU71
FB88

5 t n a t r i x o r r o t a t i o n a l s y m m e t r y ( E q u a t i o n 111 o f

Part I)

S m a t r i x t o r p l a n e syrmnetry

SYMBOL DIC'CIONARY

ARC
IblAX

= 2n(I

l)(J

l)/NOP

= n u m b e r o f c o m p l e x c ~ u ~ n b e rt s h a t c a n b e s t o r e d i n COiYMON/CIYB/

IMXl
IPSYM INNGF
KA

= IMAX

IRNGF

= p a r a m e t e r f r o m COi%\ION/UA'CA/ = a r r a y s t o r a g e r e s e r v e d Eor NGF = n u m b e r o f p l a n e s o f symmetry = number o f c o l u m n s i n m a t r i x = number o f s y m m e t r i c s e c t i o n s = number o f rows i n m a t r i x = 2nINOP

NCOL NOP N K O W PHAZ

FBLOCK
SUBROUTINE FBLOCK (NROW.NCOL.IMAX.IRNGF.IPSYM) FB FBLOCK S E T S PARAMETERS FOR OUT-OF-CORE S O L U T I O N FOR THE PRIMARY FB MATRIX ( A ) FB COMPLEX S S X . D E T E R FB COMMON /MATPAR/ I C A S E . N B L O K S . N P B L K , N L A S T T N B L S Y M M N P S Y M M N L S Y M , I M A T IF B ICASX.NBBX.NPBX.NLBX,NBBL,NPBL,NLBL FB COMMON /SMAT/ SSX(16.16) FB IMXI=IMAX-IRNGF FB F I (NROW*NCOL.GT.IMXI) GO TO 2 FB NBLOKS=I FB NPBLK=NROW FB NLAST=NROW FB IMAT=NROW*NCOL FB F I (NROW.NE.NCOL) GO TO 1 FB ICASE=I FB RETURN FB ICASE=2 FB GO TO 5 FB F I (NROW.NE.NCOL) GO TO 3 FB ICASE=3 FB NPBLK=IMAX/(~.NCOL) FB NPSYM=IMXI/NCOL FB I F ( N P S Y M . L T . N P B L K ) NPBLK=NPSYM FB I F ( N P B L K . L T . 1 ) GO TO 1 2 FB NBLOKS=(NROW-I)/NPBLK FB NLAST=NROW-NBLOKSmNPBLK FB NBLOKS=NBLOKS+l FB NBLSYM=NBLOKS FB NPSYM=NPBLK FB NLSYM=NLAST FB IMAT=NPBLK*NCOL FB P R I N T 1 4 . NBLOKS.NPBLK.NLAST FB GO TO 1 I FB NPBLK=IMAX/NCOL FB I F ( N P B L K . L T . 1 ) GO TO 1 2 FB I F (NPBLK.GT.NROW) NPBLK=NROW FB NBLOKS=(NROW-I)/NPBLK FB NLAST=NROW-NBLOKS"NPBLK FB NBLOKS=NBLOKS+I FB PRINT 1 4 . NBLOKS.NPBLK.NLAST FB I F (NROW.NROW.GT.IMX1) GO TO 4 FB ICASE=4 FB NBLSYM=I FB NPSYM=NROW FB NLSYM=NROW FB IMAT=NROW.NROW FB PRINT 15 FB GO TO 5 FB ICASE=5 FB NPSYM=IMAX/(2'NROW) FB NBLSYM=IMXI/NROW FB I F ( N B L S Y M . L T . N P S Y M ) NPSYM=NBLSYM FB I F ( N P S Y M . L T . 1 ) GO TO 1 2 FB NBLSYM=(NROW-I)/NPSYM FB NLSYM=NROW-NBLSYMeNPSYM FB NBLSYM=NBLSYM+I FB P R I N T 1 6 . NBLSYM.NPSYM.NLSYM FB IMAT=NPSYM0NROW FB NOP=NCOL/NROW FB I F (NoP.NROW.NE.NCOL) GO TO 1 3 FB FB I F ( 1 P S Y M . G T . O ) GO TO 7 FB FB S E T u p ssx M A T R I X FOR ROTATIONAL SYMMETRY. FB
1 2 3 4 5 6 7

8 9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

28
29 30 31

32
33 34

35
36 37

38
39 40 41 42 43 44

45
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
63
64

FRLOCK
PHAL=62831853072/NOP D O 6 I = 2 NOP

S E T U P S S X M A T R I X FOR P L A N E SYMMETRY KK=I

ssx(l,l)=(l.,o.)
I F
( ( N O P . E O . Z ) . O R . ( N O P . E O . ~ ) . O R . ( N O P . E O ~ ) ) GO TO 8
STOP

DETER=SSX(I.J) SSX(I.J+KK)=DETER SSX(I+KK.J+KK)=-DETER SSX(I+KK.J)=OLTER KK=KKS2 RETURN P R I N T 1 7 . NROW.NCO1 STOP P R I N T 1 8 . NROW.NCOL STOP M A T R I X F I L E STORAGE - NO. B L O C K S = , I 5 . 1 9 H COLUMNS P E FORMAT ( / / 3 5 H 1R B L O C K = . I 5 , 2 J H COLUMNS I N L A S T B L O C K = . 1 5 ) FORMAT ( 2 5 H S U B M A T R I C I E S F I T I N CORE) FORMAT ( 3 8 H S U B M A T R I X P A R T I T I O N I N G - N O . B L O C K S = . I 5 , 1 9 H COLUMNS P I E R B L O C K = . I 5 . 2 3 H COLUMNS I N L A S T B L O C K = . I S ) F O R M A T ( 4 0 H ERROR - I N S U F F I C I E N T S T O R A G E FOR M A T R I X . 2 1 5 ) F O R M A T ( 2 8 H S Y M M E T R Y ERROR - N R O W , N C O L = . 2 1 5 ) END

FBNGF FBNGF PURPOSE

'Po s e t p a r a m e t e r s f o r s t o r a g e o f t h e m a t r i c e s B , C a n d D f o r t h e N G F solution.

METHOD T h e m o d e s o f m a t r i x s t o r a g e f o r t h e NGF s o l u t i o n a r e d e s c r i b e d i n Section VIII. FBNGF c h o s e s t h e s m a l l e s t ICASX ( 1 t h r o u g h 4 ) p o s s i b l e g i v e n

t h e s i z e o f t h e m a t r i c e s A, B , C a n d D a n d t h e s p a c e a v a i l a b l e i n t h e a r r a y CM i n COMMONfCMBf. I f 8 , C a n d D m u s t b e d i v i d e d i n t o b l o c k s (ICASX = 3 o r 4 )

t h e b l o c k s a r e c h o s e n a r e l a r g e a s p o s s i b l e t o m i n i m i z e t h e number o f i n p u t and o u t p u t r e q u e s t s . P a r a m e t e r s s p e c i f y i n g t h e number a n d s i z e o f b l o c k s a r e

s t o r e d i n COMMON/MATPAK/ ( s e e S e c t i o n 1 1 1 ) . FBNGF a l s o s e t s t h e l o c a t i o n s i n CH a t w h i c h s t o r a g e o f B , C a n d D

start.

F o r e x a m p l e , CM(IC11) i s p a s s e d f r o m t h e m a i n p r o g r a m t o s u b r o u t i n e s

CMNGF a n d FACGF a s t h e s t a r t i n g l o c a t i o n o f a r r a y C.

SYMBOL DIC'T IONARY 1811 ICll 1011 IMAT


1R

= l o c a t i o n i n CM a t w h i c h s t o r a g e o f B s t a r t s
= l o c a t i o n i n CM a t w h i c h s t o r a g e o f C s t a r t s = location in C M a t which s t o r a g e o f D starts = number o f complex numbers i n A

F i n CM when A F i s not being

= s p a c e a v a i l a b l e (complex numbers)

used. IKESKV IKESX


= total

length of C M

= s p a c e a v a i l a b e i n CM when A

LXll

i s being used F = l o c a t i o n i n CM a t w h i c h s t o r a g e o f 8 s t a r t s when A-'B computed

is

(%

o c c u p i e s s p a c e i n CM) i n 8 , C and D combined

N BCD
NRLN
NDLN

= number o f complex numbers

= number o f complex numbers i n B o r C = l e n g t h o f 1) = number o f


=

NEQ NEQ2

rows i n 8 , columns i n C rows i n C o r D

number o f c o l u m n s i n B o r D ,

FBNGF
S U B R O U T I N E FBNGF (NEQ.NEQ2.I~ESRV.IB11.IClI.ID11.IX11) FBNGF S E T S THE B L O C K I N G PARAMETERS FOR THE 8 . C . AND 0 ARRAYS FOR OUT-OF-CORE STORAGE. ICASE.NBLOKS.NPBLK.NLAST.NBLSYM,NPSYM,NLSYM.IMATI COMMON /MATPAR/ 1CASX.NBBX.NPBX.NLBX.NBBL.NPBL.NCBC IRESX=IRESRV-IMAT NBLN=NEQ*NEQ2 NVLN=NEQ2*NEQ2 NBCD=2.NBLN+NOLN I F ( N B C 0 . G T . I R E S X ) GO TO 1 ICASX=I IBlI=IMLT+I GO TO 2 I F ( I C A S E . L T . 3 ) GO TO 3 I F ( N B C O . G T . I R E S R V . O R . N B L N . G T . I R E S X ) GO TO 3 ICASX=2 IB11=l NBBX=I NPBX=NEQ NLBX-NEQ NBBL=I NPBL=NEO2 NLBL=NEOP GO TO 5 IR=IRESRV I F ( I C A S E . L T . 3 ) IR=IRESX ICASX=J I F ( N V L N . G T . I R ) ICASX=4 NBCD=2'NEQ+NEQ2 NPBL=IR/NBCD NLBL=IR/(Z.NEQ2) I F ( N L B L . L T . N P B L ) NPBL=NLBL I F ( I C A S E . L T . 3 ) GO TO 4 NLBL=IRESX/NEQ I F ( N L B L . L T . N P B L ) NPBL=NLBL I F ( N P B L . L T . 1 ) GO TO 6 NBBL=(NEQL-I)/NPBL NLBL=NEQZ-NBBL'NPBL NBBL=NEBL+l NBLN=NEO'NPBL IR=IR-NRLN NPBX=IR/NE02 I F ( N P B X . G T . N E Q ) NPBX=NEQ NBBX=(NEO-I)/NPBX NLBX=NEO-N8BX.NPBX NBBX=NBBX+l 1B11=1 I F (ICASE.LT.3) IBII=IMAT+I ICII=IBII+NBLN I D 1 I = I C I I+NBLN 1x1 I=IMAT+l P R I N T 1 1 . NEQZ F I (ICASX.EQ.I) RETURN PRINT 8 . ICASX P R I N T 9 . NBBX.NPBX.NLBX PRINT 1 0 . NBBL.NPBL.NLBL RETURN PRINT 7 . IRESRV.IMAT.NEQ.NEQ2 STOP FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FN FORMAT ( 5 5 H ERROR - I N S U F F I C I E N T STORAGE FOR I N T E R A C T I O N M A T R I C I E S F N 1.24H IRESRV.IMAT.NEP.NEQ2 = . 4 1 5 ) FN FORMAT ( 4 8 H F I L E STORAGE FOR NEW M A T R I X S E C T I O N S ICASX = . I Z ) FN FORMAT ( 1 9 H B F I L L E D BY ROWS - . 1 5 X , 1 2 H N O . BLOCKS = . I 3 . 3 X . l 6 H R W S P FN

FBNGF
65 6 6 10 67 68 1 1 69 I E R BLOCK = . 1 3 , 3 X , Z O H R O W S I N L A S T BLOCK = . I 3 ) FORMAT ( 3 2 H B BY COLUMNS. C AND D BY ROWS - , 2 X , 1 2 H N O . BLOCKS = , I 3 . 1 4 X . 1 5 H R / C PER BLOCK = . 1 3 , 4 X . l 9 H R / C I N L A S T BLOCK = . I 3 ) FORMAT ( / / . 3 5 H N . G . F . - NUMBER OF NEW UNKNOWNS IS.14) END FN FN FN FN FN

65
66 67 68 69

PURPOSE

To c a l c u l a t e t h e r a d i a t e d e l e c t r i c f i e l d d u e t o t h e c u r r e n t s o n wires and s u r f a c e s i n f r e e s p a c e o r o v e r ground. ( r /A) i s o m i t t e d . 0 METHOD E q u a t i o n ( 1 2 6 ) o f P a r t I is u s e d t o e v a l u a t e t h e r a d i a t e d f i e l d of w i r e s and s u r f a c e s . FFLDS, however. The s u r f a c e p a r t o f t h e e q u a t i o n i s e v a l u a t e d i n s u b r o u t i n e For w i r e s , t h e f i e l d equation is The r a n g e f a c t o r e x p ( - j k r

)/

where

k
-

= =

2nlX
ki;

k
-

I ( s ) = c u r r e n t on t h e w i r e a t s I
= i d e n t i t y dyad = c o n t o u r of = p o s i t i o n of

1.

the wire t h e p o i n t a t s on t h e w i r e

The d o t p r o d u c t w i t 1 1 t h e dyad to

, . k.

i ^ kA

r e s u l t s i n t h e component o f

F transverse

T h i s i s a c c o m p l i s h e d i n t h e c o d e by computing t h e d o t p r o d u c t s w i t h t h e
A A

u n i t v e c t o r s 8 a n d $, n o r m a l t o k .

F o r a w i r e s t r u c t u r e c o n s i s t i n g o f N s t r a i g h t s e g m e n t s , r on segment i
is r e p l a c e d b y

where
-

r1 .
L

l o c a t i u n o r t h c c e n t e r of segment i

(I.

= u n i t v e c t o r i n t h e d i r e c t i o n o f segment i

FFLD
-

'

T;

is evaluated a s

w h e r e Ai

is t h e l e n g t h o f segment i n o r m a l i z e d t o A .

With

I . ( t ) / X = Ai
1

Bi s i n ( 2 n t )

Ci c o s ( 2 n t )

t h e i n t e g r a l c a n b e e v a l u a t e d as
2 s i n (nwiAi)
1 1

sin [n(l

wi)Ai]

wi)

jBi

sin [n(l

+ w1 .)Ai]

(1 sin [r(1 (1

wi)

( 1 + wi)

sin [n(l
+

- w.)Ai1 1
-

Ci

(1

+ Wi)~i]
wi).

where w

-k

The e f f e c t oE a g r o u n d i s i n c l u d e d by c o m p u t i n g t h e f i e l d o f t h e image o f e a c h segment and m o d i f y i n g i t by t h e F r e s n e l r e f l e c t i o n c o e f f i c i e n t s . c o d i n g h e r e d i f f e r s from s e c t i o n 11-4 o f P a r t I i n some r e s p e c t s . r e f l e c t i n g e a c h segment i n t h e ground p l a n e ,


i s r e f l e c t e d f o r t h e image c a l c u l a t i o n .

The
A

Rather than

the d i r e c t i o n of observation, k,

Thus, t h e s i g n o f t h e z component o f The z component o f t h e

i s c h a n g e d a t t h e s t a r t o f t h e image c a l c u l a t i o n .

image f i e l d must a l s o b e changed i n s i g n a t t h e end o f t h e c a l c u l a t i o n . Also, t h e c h a n g e i n s i g n o f t h e image f i e l d d u e t o t h e c h a n g e i n s i g n o f Thus, t h e

c h a r g e o n t h e image is combined w i t h t h e r e f l e c t i o n c o e f f i c i e n t s . r e l l . e c t i o n c o e f r i c i e n t s a r e t h e n e g a t i v e of t h o s e i n P a r t I .

T i ~ c c o d e a l l o w s For a c h a n g e i n ground, h e i g h t a n d e l e c c r i c a l p a r a m e t e r s
HL

a Fixed r a d i a l . d i s t a n c e f r o m c h e o r i g i n ( c i r c u l a r c l i f f ) o r a t a f i x e d I n t h e s e c a s e s , t h e r e f l e c t i o n p o i n t of t h e

disLance i : ~ x (linear c l i f f ) .

r a y from t h c ~e n t e r o f e a c h segment i s computed, and t h e r e f l e c t i o n c o e f f i c i c n L s and p h a s e l a g a r e computed f o r t h e a p p r o p r i a t e g r o u n d .

E f f e c t s From

t h e r e g i o n o r c h a n g e , s u c h a s d i f f r a c t i o n from t h e e d g e , a r e n o t i n c l u d e d ,

FFLD however.
A r a d i a l w i r e ground s c r e e n may a l s o b e i n c l u d e d by t h e r e f l e c t i o n

c o e f f i c i e n t a p p r o x i m a t i o n d e s c r i b e d i n s e c t i o n 11-4 o f P a r t I .
CODINC

FF30 FF34 FF38 FF64 FF65

FF164 FF164 FF63 FF70

C a l c u l a t i o n o f f i e l d due t o s e g m e n t s . Loop o v e r d i r e c t and image f i e l d s . R e f l e c t i o n c o e f f i c i e n t s computed. , . k reflected i n ground f o r image. D i r e c t f i e l d s s a v e d , and CIX, C I Y , CIZ i n i t i a l i z e d b e f o r e image c a l c u l a t i o n .

FF75 FF102 FFllO

FF96

F i e l d o f segment I computed.

FF104 Summation o f f i e l d s f o r d i r e c t f i e l d o r u n i f o r m g r o u n d . FF149 A p p r o p r i a t e r e f l e c t i o n c o e f f i c i e n t d e t e r m i n e d and f i e l d summed f o r r e f l e c t e d f i e l d from two-medium r a d i a l - w i r e ground s c r e e n . ground o r

FF156

FF159 Image f i e l d m u l t i p l i e d by r e f l e c t i o n c o e f f i c i e n t s f o r u n i f o r m ground and added t o d i r e c t f i e l d .

FFl6l

FF163 R e f l e c t e d f i e l d added t o d i r e c t f i e l d f o r two-medium ground o r r a d i a l w i r e ground.

FF166 FF169 FF177 FF179 FF180 FF186

FF167 ~ o p tr o d u c t s

OE

F with e

and

, .
for wires only.

FF208 C a l c u l a t i o n o f f i e l d due t o s u r f a c e p a t c h e s . FF203 Loop o v e r d i r e c t and image f i e l d s .

, . k r e f l e c t e d f o r image.

FFLDS c a l c u l a t e s f i e l d .

FF202 F i e l d m u l t i p l i e d by r e f l e c t i o n c o e f f i c i e n t s f o r u n i f o r m ground o n l y .

SYMBOL DICTIONARY
A
= 2 s i n (wiAi)lwi
-

A R G
I3

= k
=

. -

(a s e r i e s i s used f o r s m a l l w ) i

r.

1
1

c o e f f i c i e n t o f B . i n Qi

BOO

= s i n [n(1

wi)Aill[n(l
I

wi)Ail

BOT
C

= . ~ r ( l wi)Ai
=

c o e f f i c i e n t o f C . i n Qi

= x,

y , z components o f

G. 1

SALP

FFLD

ccx 1
CCY

ccz
CDP

variables for summation oE x, y , and z components of F


. ., @)(\

:::/
CIZ CONST

= (F

f$,)

variables for summation of x, y, and z components of F -jq/4n

= CONSX =

D
DARC

= distance of ray reflection point from origin


= = = =

phase increment due to change in ground level nAi

El, EPH
ETH

component of (r /A)exp(jkr
0
0

) E(r

--

ETA EX EZ
EXA

f3 component of (r /h)exp(jkr ) E(r ) 0 0 0 = ll = / ~ I / E

- -0

I
=

(r /A)exp(jkr
0

--

E(r ) for patches


0

Q,
-/A)exp(jkr 0 ) E ( r 0 ) for direct and reflected fields of patches

GZ I OMEGA
=

segment number

= =

w.

PHI

PHX, PHY = x and y components of

, .

PI
RFL RI

= ll = =

?l for direct or image field of patch imaginary part of Q i

x, y, and

, . components of k

RO z'
ROZS RR RRll
RRHl

= =

saved value of ROZ real part of Q. 1

= -R
=

RRHZ

-5, for -\for


~-

First ground medium

second ground medium

FFLD
IiKV
IWV 1
=

-\
For 1 i r s t ground medium
l o r second ground medium

- -Lf,
=

I< l<V 2 KRL


SlLL

I t $ ,

= z =

component of k

vwiAi

I:,:

THET

= 0 ( a n g l e from v e r t i c a l t o k)

, .

=i

THZ TIX

TIY
TIZ TOO
TOI' TP

= Q.
1

f o r image i n g r o u n d

= =

sin[n(l

wi)Ail/[8(1

wi)Ai1

11(1 + wi)Ai tan 0


[ E

= 2n =

T'SHE?' ZRATI ZRSIN ZSCRN

= =

~ -

j o / ( ~ I~ -112 ~ )
(ZUATI)*

'rr
112

= ground p a r a m e t e r s

[l

sin

81

s u r f a c e impedance o f ground w i t h r a d i a l w i r e g r o u n d s c r e e n

CONSTANTS -29.97922085 = - j q / ( 4 n )

3.141592654
376.73 6.283185308

=
=

n
17

2'rr

FFLD
FF FF F F L D CALCULATES THE FAR ZONE RADIATED ELECTRIC FIELDS, FF THE FACTOR EXP(J.K*R)/(R/LAMDA) NOT INCLUDED FF FF COMPLEX C I X . C I Y . C I Z . E X A . E T H , E P H ~ C ~ N ~ T , ~ C X , C ,C CCZY, ~ D ~ , C " ~ FF COMPLEX Z R A T I . Z R S I N . R R V . R R H . R R V I . R R H I . ~ R V Z . R R H ~ . Z R A T I ~ . T I X , T I Y , T I ZF F SUBROUTINE F F L D ( T H E T . P H I . E T H . E P H )

l.Tt.ZSCRN.EX.EY.EZ.GX.GY,GZ,FRATI
COMMON / D A T A /

LD.NI.N2.N.NP.MI.M2.M.MP.X(3OO).Y(30O).Z(300).SI(300 FF ~).BI(~~O),ALP(~DO),~ET(~OO),ICON~(~~~).ICON~(~OO).ITAG(~OO F) F, I C O N X (
23OO).WLAM,IPSYM COMMON /ANGL/ S A L P ( ~ O O ) FF FF

FF

COMMON / C ~ N T / A I R ( 3 O O ) . A I I ( 3 0 0 ) . B I R ( 3 0 0 ) . B I I ( 3 0 0 ) , C I R ( 3 D O ) C ( 3 0 0 F F I).CUR(900) FF F, F COMMON / G N O / Z R A T I . Z R A T I ~ . F R A T I , C L , C H , S C R W L ~ S C R W R , N R A D L , K S Y M P . I F A R 1IPERF. T I . 1 2 FF D I M E N S I O N C A B ( ! ) . S A B ( 1 ) . CONSX(2) FF EOUIVALENCE (CAB.ALP). ( S A B . B E T ) . (CONST.CONSX) FF DATA P I . T P . E T A / 3 . 1 4 1 5 9 2 6 5 4 . 6 . 2 8 3 1 8 5 3 0 8 , 3 7 6 . 7 3 / FF OATA C O N S X / O . . - 2 9 . 9 7 9 2 2 0 8 5 / FF PHX=-SIN(PH1) FF PHY=COS(PHI) FF ROZ=COS( T H E T ) Ff ROZS=ROZ FF THX=ROZ*PHY FF THY=-ROZ-PHX FF THZ=-SIN(THET) FF FF ROX=-THZaPHY FF ROY=THZ*PHX IF ( N . E O . O ) GO TO 2 0 FF FF LOOP FOR STRUCTURE IMAGE I F ANY DO 1 9 K=1 .KSYMP C A L C U L A T I O N OF R E F L E C T I O N C O E F F E C I E N T S IF IF (K.EO.I) GO TO 4 (IPERF.NE.I) GO TO I FF FF FF FF FF FF FF

FF
FF FF FF FF FF FF FF FF FF FF FF FF

FOR PERFECT GROUND RRV=-( I . , O . ) RRH=-( 1 . , O . ) GO TO 2 FOR I N F I N I T E PLANAR GROUND

ZRSIN=CSQRT(I.-ZRATI*ZRATI*THZ*THZ)
RRV=-(ROZ-ZRATI-ZR~IN)/(ROZ+ZRATI*ZRSIN)

RRH=(ZRATI.ROZ-ZR~IN)/(ZRATI.ROZ+ZRSIN)
IF (IFAR.LE.~)
GO T O 3
PROBLEM. TWO R E F L C T I O N C O E F F I C I E N T S C A L C U L A T E D

FF
FF FF FF FF FF

FOR THE CLIFF


R R V I =RRV R R H I =RRH

LOOP OVER STRUCTURE SEGMENTS

S U M M A T I O N FOR F A R F I E L D I N T E G R A L

C A L C U L A T I O N OF I M A G E C O N T R I B U T I O N I N C L I F F AND GROUND SCREEN PROBLEMS. DR=Z(I).TIHET SPECULAR P O I N T D I S T A N C E O=DR.PHY+X(I) I F (IFAR.EO.2)

GO TO 13

FF FF FF FF FF FF FF FF FF

I F ((SCRWL-O).LT.O.)

GO TO 12

R A D I A L W I R E GROUND SCREEN R E F L E C T I O N C O E F F I C I E N T D=D+T2

FFLD
RRH=(RRH-RRV)/(RRH+HRY) RRV=ZRATI.RRV RRV=-(ROZ-RRV)/(ROZ+RRV) ETH=(GX'PHX+GY*PHY)*(RRV) GX=GX.RRV+ETH*PHX GY=GY*RRV+ETH'PHY GZ=GZ'RRV EX-EX+GY EY=EY+GY EZ=LZ-GZ CONTINUE EX=EX+CIX*CONST EY=EY+CIY.CONST

EPH=EX.PHX+EY*PHY RETURN END

FFLDS
!:l.'I,os ~-~ --I'UK1'OSE

To c a l c ~ ~ l i ~ t hter x , y , z conlponents o f t h e f a r e l e c t r i c f i e l d d u e t o s u r f ; ~ c ec u r r e n t s . The t e r m e x p ( - j k r n ) / ( r o / h ) is o m i t t e d .

MtTHOD
The f i e l d i s computed u s i n g t h e s u r f a c e p o r t i o n o f e q u a t i o n ( 1 2 6 ) i n Part I. With l e n g t h s n o r m a l i z e d t o t h e w a v e l e n g t h , t h e e q u a t i o n i s

where

JS = s u r f a c e c u r r e n t o n s u r f a c e S
I
= i d e n t i t y dyad
A A

The d o t p r o d u c t w i t h t h e dyad kk

r e s u l t s i n t h e component o f t h e i n t e g r a l

transverse to k.

The i n t e g r a l i s e v a l u a t e d b y summation o v e r t h e p a t c h e s

w i t h t h e c u r r e n t assumed c o n s t a n t o v e r e a c h p a t c h .
SYMBOL DICTIONARY ARG
=

k Ti,

r.

= center o f patch '

CONS = CONSX = j ~ / 2
CT
= exp(jk. - . .
A

Ti)

~ A / A a t ~F L 1 8

F ( r ) a t FL24 0
z components of
.

EY C%
L
.I

- x, y , -

F(r 0 ) a t FL22

= ( r o / h ) e x p ( j k r 9 ) E ( r O ) a t PL27 = a r r a y l o c a c i o n of = p:ltch

p a t c t ~d a t a

nurnbcr

= c u r r e n t a r r a y index

FFLDS

ROX l
ROY ROZ
S(I)

x , y , z components o f k
( a r e a oE p a t c h I ) / A 2

SCUR = a r r a y c o n t a i n i n g s u r f a c e c u r r e n t components
TPI = 2rr
=

a r r a y s c o n t a i n i n g c e n t e r p o i n t c o o r d i n a t e s of p a t c h e s normalized t o wavelength.

ZS
CODE L I S T I N G

SUBROUTINE FFLDS (ROX.ROY.ROZ,SCUR.EX,EY,EZ) C A L C U L A T E S THE XYZ COMPONENTS OF THE E L E C T R I C F I E L D DUE TO SURFACE CURRENTS COMPLEX C T . C O N S . S C U R . E X . E Y . E Z LD.Nl,N2.N.NP,MI,M2.M.MP.X(300).Y(30O),Z(3OO),SI(300 COMMON /DATA/ 1 ) .B1(30b) . A L b ( 3 0 0 ) .BET(300) ,ICON1 ( 3 0 0 ) , I C O N 2 ( 3 0 0 ) , I T A G ( 3 0 0 ) ,ICONX( 23OO).WLAM,IPSYM DIMENSION XS(1). Y S ( t ) , Z S ( 1 ) . S ( 1 ) . SCUR(1). CONSX(2) EOUIVALENCE ( X S . X ) . (YS.Y). (2S.Z). (S.BI). (CONS.CONSX) DATA TPI/6.283185308/.CONSX/O . 1 8 8 . 3 6 5 / EX=(O..O.) EY=(O. . O . ) EZ=(O..O.) I=LD+l DO 1 J = l .M I=I-1

FL FL FL FL FL

ARG=TPI*(R~X*X~(I)+ROY~YS(I)+ROZ~ZS(I)) CT=CMPLX(CO~(AR~)*~(I),SIN(ARG)*S(I))
K=3* J
EX=EX+SCUR(K-2).CT EY=EY+SCUR(K-I)*CT EZ=EZ+SCUR(K).CT CONTINUE CT=ROX'EX+ROY.EY+ROZ'EZ EX=CONS~(CT~ROX-EX) EY=CON~.(CT.ROY-EY) EZ=CONS* ( C T - R O Z - E Z ) RETURN CND

FL

C T: -.

I'UKPOSI:

'Lo s u p p l y v a l u e s o f t h e i n t e g r a t e d f u n c t i o n e x p ( j k r ) / ( k r ) n u o ~ c r i c a li n t e g r a t i o n r o u t i n e INTX. METHOD

t o the

'The g e o m e t r y p a r a m e t e r s f o r i n t e g r a t i o n o v e r a s e g m e n t are shown i n


t h e Following diagram.

i n which

I F t h e f i e l d p o i n t (p,z)

i s n o t on t h e s o u r c e s e g m e n t , t h e i n t e g r a n d v a l u e i s

I f t h e f i e l d p o i n t i s on t h e s o u r c e segment (p = 0 , z = O ) , t h e i n t e g r a n d
value is

I n t l w l a t t e r c a s e , iP k r i s less t h a n 0 . 2 , t h e n ( c o s k r ) / k r i s e v a l u a t e d b y
t h e f i r s t t h r e e t e r m s of i t s T a y l o r ' s s e r i e s t o r e d u c e n u m e r i c a l e r r o r .
SYMROL 1)ICTIONARY CO
COS
1.1

= r e a l p a r t of G ( z ' ) = e x t c r n a l [unction

(cosine)
i s on s o u r c e s e g m e n t ( b y IJ
=

= i l a g t o i n d i c a t e when f i e l d p o l n t

0)

L<t:

= k r

-153-

KKB2 = (kp)
SI SIN

= imaginary part of G ( z ' ) = external Function (sine)

SQRT = external function (square root)

ZDK
ZK

= =

kz' - kz
kz'

ZPK = kz
CONSTANTS -1.388888893-3

4.166666673-2

0.5
CODE LISTING

= constants i n series for (cos kr

- l)/kr

SUBROUTINE GF (ZK.CO.SI) GF COMPUTES THE INTEGRAND EXP(JKR)/(KR) COMMON /TMI/ ZPK,RKBL.IJ ZDK=ZK-ZPK RK=SORT(RKB~+ZDK*ZDK) SI=SIN(RK)/RK IF (IJ) 1.2.1 CO=COS(RK)/RK RETURN IF (RK.LT..2)GO TO 3 CO=(COS(RK)-l.)/RK RETURN RKS=RKSRK RETURN END

G F
GF

F FOR NUMERICAL INTEGRATION. G GF GF GF G F G F GF G F G F


GF

2 3
4 5 6

7
8
9

10
11

CO=((--1.38888889E-3*RKS+4.16666667E-2).RKS-.5)*RK

GF G F G F GF
GF

12 13 14 15

16
17 18-

GF

CFIL -GFII I'UKPOSE To r e a d t h e NGF E i l e and s t o r e p a r a m e t e r s i n t h e p r o p e r a r r a y s .

METHOD GI22 GI30 Miscellaneous parameters a r e read.

GI48

Segment c o o r d i n a t e s were c o n v e r t e d t o t h e f o r m i n v o l v i n g t h e segment c e n t e r , segment l e n g t h , a n d o r i e n t a t i o n ( s e e S e c t i o n 1 1 1 , COIYIYON/DATA/) w i t h d i m e n s i o n s o f wavelength. They must b e c o n v e r t e d b a c k t o t h e

c o o r d i n a t e s o f t h e segment e n d s s o t h a t s u b r o u t i n e CONNECT c a n l o c a t e c o n n e c t i o n s . t o Inete'is. P a t c h c o o r d i n a t e s a r e c o n v e r t e d from u n i t s o f w a v e l e n g t h t o m e t e r s s i n c e t h e y w i l l be s c a l e d b a c k t o w a v e l e n g t h s a l o n g w i t h t h e new s e g m e n t s a n d p a t c h e s . i'latrix blocking parameters a r e read. I n t e r p o l a t i o n t a b l e s f o r t h e Sommerfeld i n t e g r a l s a r e r e a d i f t h e Sommerfeld/Norton g r o u n d t r e a t m e n t was u s e d . Matrix A Dimensions a r e c o n v e r t e d

i s read f o r in-core F AF i s r e a d f o r ICASE = 4 .


AF i s r e a d f o r ICASE = 3 o r 5.

s t o r a g e (ICASE = 1 o r 2 ) .

A h e a d i n g summarizing t h e NGF f i l e i s p r i n t e d .

SYMBOL 0 LCTIONAKY
DX
= nalf

segment l e n g t h ( m e t e r s )

IGFL IOUT
LPK'C
NBLZ

= f i l e number f o r NGF f i l e = number o f e l e m e n t s i n m a t r i x = 1 t o p r i n t c o o r d i n a t e s of e n d s o f s e g m e n t s = two t i m e s number o f b l o c k s i n m a t r i x A

( s i n c e A~ i s F s t o r e d t w i c e , i n a s c e n d i n g and d e s c e n d i n g o r d e r )

NE9

= o r d e r of t h e N G F matrix
= number o f s y m m e t r i c s e c t i o n s = number o t unknowns f o r a s y m m e t r i c s e c t i o n

NO P
N PEQ

XI, YI,

L I

= c o o r d i n a t e s of

t h e c e n t e r of a segment o r p a t c h

GFIL
I

2 C 3 c

G F I L READS THE N . G . F .

FILE

COMPLEX C M . S S X . Z R A T I . Z R A T I 2 , T l . Z A R R A Y . A R l . A R 2 . A R 3 . E P S C F . F R A T I COMMON / D A T A / LD.N1 .N2.N.NP.Ml . M 2 . M . M P , X ( 3 0 0 ) . Y ( 3 0 0 ) , Z ( 3 0 0 ) , S 1 ( 3 0 0 1 ) . B I ( 3 0 0 ) . A L P ( 3 0 0 ) . ~ ( 3 0 0 ,)I C O N l ( 3 0 0 ) . I C O N 2 ( 3 0 0 ) , I T A G ( 3 0 0 ) , I C O N X ( 23OO),WLAM,IPSYM COMMON /CMB/ CM(4000) COMMON /ANGL/ SALP(3OO) COMMON /GND/ZRATI.ZRATIZ.FRATI.CL.CH.SCRWL.SCRWR.NRADL.KSYMP.IFAR. 1IPE T I T? -R F

.-

~ O M M o N/GGRID/

AR1(11.10.4).AR2(17,5.4).AR3(9,8,4),EPs~~,~x~(~),~~

~A(~).XSA(~).Y~A(~).NXA(~),NYA(~) COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST,NBLSYM,NPSYM.NLSYM,IMAT,I

lCASX.NBBX.NPBX.NLBX,NBBL.NPBL,NLBL
COMMON /SMAT/ SSX(16.16) COMMON /ZLOAD/ ZARRAY(30O).NLOAD,NLODF COMMON /SAVE/ IP(GOO) . K C O M . C O M ( I ~ , ~ ) , E P ~ R , S I G ~ S C R W L T . S ~ R ~ RH T Z DATA I G F L / P O / REWIND I G F L READ ( I G F L ) N1.NP.Ml.MP,WLAM.FMHZ.IPSYM.KSYMP.IPERF.NRADL.EPSR,SIG 1.SCRWLT.SCRWRT.NLODF.KCOM N=Nl M=Ml N2=Nl+l M2=M1+1 I F ( N 1 . E Q . O ) GO TO 2 READ SEG. OATA A N 0 CONVERT BACK TO END COORD. I N U N I T S OF METERS READ (IGFL) (x(I).I=I .NI).(Y(I).I=I .NI).(z(I),I=I .NI)
~-

GI G I GI GI

.. 18 19 20 21

READ (IGFL) (sI(I).I=I.NI).(BI(I).I=~.NI).(ALP(I).I=I,N~) READ (IGFL) (BET(I).I=I.N~).(SALP(I).I=I.NI) READ ( I G F L ) C I( O )N I(I .I=I .NI) .(ICONZ(I) .I=\ .NI) READ ( I G F L ) ( I T A G ( I ) . I = l . N l ) I F ( N L O O F . N E . 0 ) REAO ( I G F L ) ( Z A R R A Y ( I ) . I = l . N l ) DO I I = I . N f XI=X(I).WLAM
YI=Y(I)*WLAM

ZI=Z(I).WLAM DX=SI(I)*.S.WLAM X(I)=XI-ALP(I)*DX Y(I)=YI-BET(I)*DX Z(I)=ZI-SALP(I).DX SI(I)=XI+ALP(I).DX ALP(I)=YI+BET(I)~OX BET(I)=ZI+SALP(I)*DX BI(I)=RI(I).WLAM CONTINUE I r (MI ~ 0 . 0 1 GO 10 4 J=LD-MI+$ READ P A T C H OATA AND CONVERT TO METERS READ ( I G F L ) (X(I).I=J.LD),(Y(I).I=J,LD).(Z(I).I=J.LO) R F A O (IGFL) (SI(I).I=J.LD).(BI(I).I=J,LO),(ALP(I).I=J,LD) REAO ( I G F L ) (BET(I).I=J.LO).(SALP(I),I=.J,LD) REAO ( I G F L ) (ICONI(I).I=J.LD).(ICON2(I).I=J.LD) READ ( I G F L ) ( I T A G ( I ) . I = J . L D ) OX=WLAM.WLAM DO 3 I = J . L D X(I)=X(I)*WLAM Y(I)=Y(I).WLAM Z(I)=Z(I)*WLAM BI(I)=BI(I).DX READ ( I G F L ) I C A S E . N B L O K S . N P B L K . N L A S T , N B L S Y M . N P S Y M . N L S Y M , I M A T I F ( I P E R F . E O . 2 ) READ ( I G F L ) A R I . A R 2 . A R 3 . E P S C F . D X A , D Y A , X S A a Y S A , N X A A

IF ( N O P . G T . I ) READ (IGFL) ((SSX(I.J).I=I.NOP).J=I.NOP) READ ( I G F L ) ( I P ( I ) . I = l . N E O ) . C O M READ M A T R I X A AND W R I T E T A P E 1 3 FOR OUT OF CORE I F ( I C A S E . G T . 2 ) GO TO 5 IOUT=NEO*NPEQ READ ( I G F L ) ( C M ( I ) . I = l . I O U T ) GO TO 1 0 REWIND 1 3 I F ( I C A S E . N E . 4 ) GO TO 7 IOUT=NPEO*NPEO DO 6 K = l .NOP READ ( I G F L ) ( C M ( J ) . J = l . I O U T ) WRITE ( 1 3 ) (CM(J).J=l.IOUT) GO TO 9 IOUT=NPSYM.NPEO*2

DO 8 1=1 . N B L 2 CALL BLCKIN ( C M . I G F L . l . I O U T . l . 2 0 6 ~ C A L L BLCKOT ( C M . 1 3 . l . I O U T . l . 2 0 5 ) REWIND 1 3 REWIND I G F L P R I N T N . G . F . HEADING PRINT 1 6 PRINT 1 4 PRINT 1 4 PRINT 1 7 PRINT 1 8 . N l . M l I r ( N O P . G T . I ) PRINT 1 9 , NOP PRINT 2 0 . 1MAT.ICASE I F ( I C A S E . L T . 3 ) GO TO 1 1 NBL2=NEO*NPEO PRINT 2 1 . NBL2 P R I N T 2 2 . FMHZ I F IKSYMP.EO.2.AND.IPERF.EQ.l~ PRINT 2 3 I F ~ K S Y M P . E O . ~ . A N D . I P E R F . E Q . O ) PRINT 2 7 I F (KSYMP.EO.2.AND.IPERF.EQ.2) PRINT 2 8 I F (KSYMP.EO.~.AND.IPERF.NE.I)PRINT 2 4 . EPSR.SIG PRINT 17 DO 1 2 J=1 .KCOM PRINT 1 5 . (COM(1. J ) . I = l . 1 3 ) PRINT 17 PRINT 1 4 PRINT 1 4 P P I N i 1G I F ( I P R T . E O . 0 ) RETURN PRINT 2 5 00 1 3 I = I . N 1 P R I N T 2 6 . I.X(I).Y(I).Z(I).SI(I),ALP(I).BET(I) RETURN

-. ,

FORMAT (5X.3H.' . 1 3 A 6 , 3 H ") G I 122 G I 123 FORMAT (////I FORMAT (5X,2H...80X,2H") G I 124 N U M E R I C A L GREEN'S f U N C T I O N . 5 3 X . 2 H ~ * . / , 5 X . l 7 H " NO GI 1 2 5 FORMAT ( 5 X . 2 9 H ' . 1 SEGMENTS = , 1 4 . 1 0 X . l 3 H N O . PATCHES = . 1 4 . 3 4 X . 2 H 0 * ) G I 126 G I '2FORMAT ( 5 X . 2 7 H e . NO. SYMMETRIC S E C T I O N S =.14,51X,ZH..) FORMAT ( 5 X . 3 4 H a * N . G . F . M A T R I X - CORE STORAGE = . 1 7 , 2 3 H COMPLLX NU G I 1 2 6

IMBERS. CASE.I2,16X,2H*.) FORMAT ( 5 X . 2 H . . . 1 9 X . 1 3 H M A T R I X S I Z E = . 1 7 , 1 6 H COMPLEX N U M E E R S . 2 5 X . 2 H I") FORMAT (5X.14H.. FREQUENCY = . E l 2 5 . 5 H MHz . 5 I X . Z H . * ) FORMAT ( 5 X . 1 7 H ' . PERFECT GROUND,65X,2H..) FORMAT ( 5 X . 4 4 H . . GROUND PARAMETERS - D I E L E C T R I C CONSTANT = . E 1 2 . 5 . 2 16X.2H.'./.5X.2H".2(X.14HCDNDUCIIVIiY = . E 1 2 . 5 . 8 H MHOS/M .25X,2tI..) FORMAT ( 3 9 X . 3 1 H N U M E R I C A L GREEN'S F U N C T I O N O A T A . / . 4 1 X , 2 7 H C O O R D I N A T E I S OF SEGMENT E N D S . / . S 1 X . 8 H ( M E T E R S ) , / , 5 X X 4 H S E G . . l l X . 1 9 H - - END ON 2 E - - - - . 2 6 X , 1 9 H - - - END TWO -./.6X.3HN0..6X.1HX,14X.IHY,14X.1

3HZ.I4X.1HX.14X.1HY.14X.IllZ~

FORMAT ( 1 X . 1 7 . 6 E 1 5 . 6 ) FORMAT ( 5 X . 5 5 H m ' F I N I T E GROUND. 1ION.27X.2H.') FORMAT ( 5 X . 3 8 H . ' F I N I T E GHOUND.

R E F L E C T I O N C O E F F I C I E N T APPROXIMAT
G I

SOMMERiELD S O L U T I O N , 4 4 X , 2 H * . )

142 G I 143

GFLD

C12LI) -

l~~lI~'~Sl<
'1'0

compute t h e e l e c t r i c f i e l d a t i n t e r m e d i a t e d i s t a n c e s f r o m a r a d i a t i n g

r+r r u c t u r e o v e r g r o u n d , i n c l u d i n g t h e s u r f a c e - w a v e f i e l d c o m p o n e n t .
MI:TLIOI) Approximate e x p r e s s i o n s f o r t h e f i e l d of a h o r i z o n t a l o r v e r t i c a l c u r r e n t e l e n ~ c n Lo v e r a g r o u n d p l a n e w e r e d e r i v e d b y K. A. N o r t o n ( r e f . 2 ) . These

expressions a r e u s e d t o e v a l u a t e t h e f i e l d o f e a c h s e g m e n t i n a s t r u c t u r e and

t h e components summed f o r t h e t o t a l f i e l d o f t h e s t r u c t u r e .

To e v a l u a t e
y',
2')

N o r t o n ' s e x p r e s s i o n s f o r segment i, a l o c a l c o o r d i n a t e s y s t e m ( x ' , defined ( f i g .

is

63) w i t h o r i g i n on t h e ground p l a n e a n d t h e v e r t i c a l z a x i s I n t h e (x, y, z) c o o r d i n a t e system ( f i g . 6 b ) the

p a s s i n g t h r o u g h s e g m e n t i.

L o c a t i o n and o r i e n t a t i o n of segment i a r e

cos

a cos B x + cos a s i n 6 y + s i n a z
2). The o r i g i n o f t h e primed

, .

and t h e F i e l d o b s e r v a t i o n p o i n t i s a t ( p , @ , cirordinate system i s a t ( x . , yi,


1

0 ) i n t h e umprimed c o o r d i n a t e s , and t h e x '


t h e segment o n t h e g r o u n d p l a n e .

a x i s i s ; i l o n g t h e p r o j e c t i o n of

Norton's expressions give the e l e c t r i c f i e l d i n p',

I$', a n d

z'

components

I u r i n f i n i t e s i m a l c u r r e n t e l e m e n t s e i t h e r v e r t i c a l o r h o r i z o n t a l , and d i r e c t e d alclng t l t c x ' a x i s . To e v a l u a t e t h e f i e l d o f a s e g m e n t , t h e s e g m e n t c u r r e n t

i ! ; decomposed i n t o h o r i z o n t a l a n d v e r t i c a l c o m p o n e n t s , and t h e f i e l d s of t h e
i i l l i n i t e s i m a l c u r r e n t elements a r e i n t e g r a t e d o v e r t h e segment. c o m ~ ~ , n r nfto r t h e i n f i n i t e s i m a l c u r r e n t e l e m e n t h a s t h e f o r m Each f i e l d

for

GFLD

Segment i

x'

fie
of segment i
L

y Y
r 3,
'

'

(a) Norton's Coordinates

Segment i

(b) NEC

Coordinates

Flyure 6 . Coordinate Systems Used t o Evaluate Norton's Expressions Fur Lhr Ground Wave F i e l d s i n t t ~ eN E C Program.

GFLD

wherc F

nnd P a r e a l g e b r a i c f u n c t i o n s o f R and R and c a n b e c o n s i d e r e d I 2 1 2 c o n s t d n t Lor i n t e g r a t i o n o v e r t h e segment a s l o n g a s R and R a r e much 1 2 g r e < i t t r t h a n t h e segment l e n g t h . To i n t e g r a t e t h e e x p o n e n t i a l F a c t o r s o v e r t h e s e g m e n t , R and R a r e a p p r o x i m a t e d a s 1 2

where R =

R1 = R1/IR1l. R2 = r! i' = p o s i t i o n and o r i e n t a t i o n I ' o f image oE segment i, and s = v a r i a b l e of l e n g t h a l o n g t h e s e g m e n t ( s = 0 a t The c u r r e n t on t h e segment is

IiI.

, .

R ~ / ~ R ~ I-;
-

, .

segment c e n t e r ) .

I . ( s ) = A.
I

B. s i n ks
1

C . cos k s .
1

With FI and F

c o n s i d e r e d c o n s t a n t , each v e c t o r component o f t h e f i e l d 2 produced b y segment i i n v o l v e s a n i n t e g r a l o f t h e form

where
F;
= h F
=

1
2

exp[-jk(R exp[-jk(R
A

P;

2 A F
A

.r.)] - R2 - r;)l
0

R1
A

w=-R
, , , I

- i
A

-R

. 2

i'

A = segment l e n g t h

The i n t e g r a l s c a n b e e v a l u a t e d a s

GFLD
Ai2 X

2nG

sin n w d

w
Bi s i n [IT ( 1 - w)d] j ~ ( 1 - w) s i n [ n ( 1 - w)dl ( 1 - ILI)
+

sin

( 1 + w)d] (1 + 0 )

s i n [n ( 1 + w)d] (1 + 0)

wherc d =
. 1

AIL.

The i n t e g r a l i o r G

( t h e c o e f f i c i e n t of F ' )

i s t h e same w i t h

and G and o t h e r 1 2 necessary q u a n t i t i e s a r e passed t o s u b r o u t i n e G W A V E t h r o u g h cOMMON/GWAV/. (:WAVE r e t u r n s t h e f i e l d components


EV I'
1 ;
=

r . and i r e f l e c t e d i n t h e ground p l a n e .

The t e r m s G

p ' component o f f i e l d d u e t o v e r t i c a l c u r r e n t component


f i e l d d u e t o v e r t i c a l c u r r e n t component

v
7 .

= z component o f

h = p ' component o f f i e l d d u e t o h o r i z o n t a l c u r r e n t component 0


=
41'

Eh 4
L
I1

component o f f i e l d d u e t o h o r i z o n t a l c u r r e n t component f i e l d d u e t o h o r i z o n t a l c u r r e n t component

= z component o f

'She common f a c t o r e x p ( - j k R ) o c c u r r i n g i n F ' and F ' i s o m i t t e d f r o m t h e f i e l d 1 2 c o ~ n p o n e ~ i tasn d i n c l u d e d i n t h e t o t a l f i e l d a f t e r summation. T h e s e f i e l d components a r e t h e n combined t o f o r m t h e t o t a l f i e l d i n

x , y , z components a n d summed f o r e a c h s e g m e n t .
to r,

The f i e l d i s f i n a l l y c o n v e r t e d

0 , $ components i n a s p h e r i c a l c o o r d i n a t e s y s t e m c o i n c i d i n g w i t h t h e

x, y , z c o o r d i n a t e system. The a p p r o x i m a t i o n s i n v o l v e d i n t h e c a l c u l a t i o n o f t h e s u r f a c e wave a r e 2 v a l i d t o s e c o n d o r d e r i n u , where

2 k = wave number i n Cree s p a c e


k 2 = wave number i n ground medium

u = k/k

T h e a p p r o x i m a t i o n s a r e v a l i d f o r p r a c t i c a l ground p a r a m e t e r s .
t l l e e x p r e s s i o n s a r e n o t u s e d i n a n i n v a l i d r a n g e , however, n o t computed i f / u l is g r e a t e r than 0.5.

To e n s u r e t h a t

t h e s u r f a c e wave i s

R a t h e r , s u b r o u t i n e FFLD i s c a l l e d ,

and t h e I - e s u l t i n g s p a c e wave i s m u l t i p l i e d by t h e r a n g e f a c t o r e x p ( - j k R ) /
(K/A).

I h e r a d i a l f i e l d component w i l l b e z e r o i n t h i s c a s e .

FFLD i s a l s o

c a l ~ l e di f

RIA

i s g r e a t e r t h a n 10

, o r i f t h e r e i s no g r o u n d p r e s e n t .
-162-

GFLD

= = = =

A115

coefficient of A./i in 2lrC and 2 l r G 1 1 2 external routine (absolute value) argument of exp(
)

ARC ATAN B BOO BOT C CAB (I CABS CALF CBET

For phase factor and 2vG2

external routine (arctangent) i 1

= coefficient of B /A in 2nG = sin (BOT)/BOT


=

n(l - w)d
1

= coefficient of C./A in 2vG


= =

and 2nG

cos a cos

for segment I

external routine (magnitude of complex number)

= cos (3

x, y, z components in summation for field external routine (forms complex number)

CMPLX

cos
CPH

= external routine (cosine) = cos 6'

x, y, z components of i

, .

EL

= =

EPH EPI
ERD ERH EKV ETH

nd h h E$ or E$ cos a ( @ ' component of total field of segment i) R component of field of structure


En and p ' component of total field of segment i
h

= $ component of field of structure


= = = =

E~

P 8 component of field of structure

EX EXA

= x component of field for segment i


=

phase factor at GD30 and GD130:

EY EZH
E7.V

= y =

component of field for segment i h E and z component of total field of segment i z

GFLD FFLD GWAVE


1

(computes s p a c e wave) v = e x t e r n a l r o u t i n e (computes E E~ , .)


=

= external routine

DO l o o p i n d e x (i)

P'

..

= DO l o o p i n d e x ( l o o p o v e r segment a n d image) =

KSYMP OMEGA PHI


PHX

1 if g r o u n d i s p r e s e n t ; 0 o t h e r w i s e

= w
=

, .

= x component of =
=

PHY
PI

, . y component o f @

R RFL RHO RHP


RHS
RHX

=
=

RIA
s i g n E a c t o r t o r e f l e c t segment c o o r d i n a t e s i n g r o u n d

= = =

P/A p'/h (P'/A)~

= x component o f =

6'
A

RHY RI

y component o f p '

= imaginary p a r t o f

RIX
RIY
RIZ

= x component o f
= y component o f

R1
-

2nG o r 2nG 1 2 /A o r R2/h


or K2/~
-

R1/A

: ,
RNZ RR RX
RXYZ

= z component o f

R /A o r R /A 1 2 R
, .
A

= x, y,

z components o f

or R

or

= r e a l p a r t of

2nG

o r 2nG

= x component o f

; / A

RY
RZ

= R /A o r R2/X ( f o r s = 0 ) 1 . . = y component o f p/h

z/h

SAB(1) = c o s

SBET

SILL

a sin B sin B
ndw (sine)

SIN
SPH

= external routine

= sin

4'

GFLD
SOR1
THET
= extcrn.11 r o u t i n e ( s q u a r e r o o t ) = 0 i n s p h e r i c a l c o o r d i n a t e system

THX THY THZ TOO TOP TP

= x component of 0 = y component o f O
=

z component o f 0

, .

= sin =

(TOP)/TOP

~ r ( 1+ u ) d

= 2ir = u = u = u = C =

U
UX
U2 XX1

exp(jkR1 exp ( j S 2

,UZ

c2

- Tl)
-

r.)
1

CONSTANTS
l.E-20 l.E-7
= tolerance i n t e s t for zero
=

tolerance i n t e s t f o r zero

1 .E-6

= tolerance i n t e s t f o r zero
=

0.5

u p p e r l i m i t For lul

3.141592654 = n 6.289185308
= =

2n
upper l i m i c f o r

1.E+5

R b

GD GD GO GFLO COMPUTES THE R A D I A T E D r I E L D I N C L U D I N G GROUND W A V E . GD COMPLLX C l J R . E P I . C I X . C I Y . C I Z , E X A . X X l . X X 2 . U . U 2 . E R V . E Z V . E R H . E P H GO COMPLEX E Z H . E X . E Y . E T H . U X . E R D GD COMMON /DATA/ LD.N1.N2.N.NP.M1.M2.M.MP.X(3D0).Y(30O).Z(300).SI(300 GD l).BI(30O).ALP(300),BET(300),ICONI(3OO),ICON2(3OO),ITAG(3OO).ICDNX( GD 23OO),WLAM,IPSYM GD SALP(300) GD COMMON /ANGL/ COMMON /CRNT/ AIR(~~~).AII(~~~),BIR(~~~).BII(~OO),CIR(~OD), GD CII(~DO 1).CUR(900) GO COMMON /GWAV/ U.U~.XX~.XX~.R~,R~.ZMH.ZPH GO DIMENSION CAB(!). SAB(1) GD EQUIVALENCE ( C A B ( l ) . A L P ( I ) ) . (SAB(l).BET(I)) GD GD DATA PI.TP/3.141592654.6.28J185308/ R=S0RT(RHOwRHO+RZ*RZ) GD GD I F ( K S Y M P . E O . 1 ) GO TO I IF ( C A B S ( U X ) . G T . . S ) GO TO I GO I F ( R . G T . I . E S ) GO TO 1 GD GD GO TO 4 GD GD COMPUTATION OF SPACE WAVE ONLY GD I F (RZ.LT.1.E-20) GO TO 2 GD

SUBROOTINF G I L D

(RHO.PHI.RZ.ETH.EPI.ERD.UX.KSYMP)

THET=PIa.5 CALL FFLD (THET.PHI.ETH.EP1) ARC=-TP.R

EXA=CMPLX(C~~(ARC),~IN(ARG))/R
ETH=ETHaEXA EPI=EPIaEXA ERD=(D..O.) RETURN COMPUTATION OF SPACE AND GROUND WAVES.

u=ux
u2=u.u PHX=-SIN(PH1)

PHY=COS(PHI) RX=RHO*PHY RY=-RHO-PHX CIX=(o..o.) CIY=(o..O.) cIz=(o..o.)


~

SUMMATION OF F I E L D FROM I N D I V I D U A L SEGMENTS

GO GD GD GD GD GD GD CD GD GD GD GD GD GD GD GD

49 50 51 52 53 54

55
56 57

58
59 60 61 62 63 64

GD FACTOR) OVER SEGMENT AND I M A G E FOR GO I N T E G R A T I O N OF (CURRENT)'(PHASE CONSTANT. S I N E . AND C O S I N E CURRENT D I S T R I B U T I O N S GO

77 78 79

I F (ABS(OMEGA).LT.l.E-7) A=2:5IN(SILL)/OMEGA GO TO 1 0 I F (ABS(TOP).LT.l.E-7) TOO=SIN(TOP)/TOP GO TO 1 2 TOO=l.-TOP'TOP/6. I F (ABS(BOT).LT.l.E-7) BOO=SIN(BOT)/BOT GO TO 1 4 BO0=1.-BOT*BOT/6. E=EL*(BOO-TOO) c=EL~(soo+roo)

GO TO 9

A=(2.-OMEGA'OMEGA*EL*EL/3.)*EL
GO TO 1 1

GO TO 1 3

RR=A*AIR(I)+B*BII(I)+C*CIR(I) RI=A'AII(I)-B*BIR(I)+C.CII(I)
ARG=TP'(X(I)*RNX+Y(I).RNY+Z(I)*RNZ'RFL)

EXA=CMPLX(COS(ARG).SIN(ARG))*CMPLX(RR.RI)/TP
I F (K.EQ.2) XXI=EXA RI=RXYZ ZMH=RIZ GO TO 1 6 XX2=EXA RZ=RXYZ ZPH=RIZ CONTINUE GO TO 15

C A L L S U B R O U I I N L TO COMPUTE THE F I E L D OF SEGMENT I N C L U D I N G GROUND WAVE C A L L GWAVE ( E R V . C Z V . R H . E Z H . E P H ) ERH=LRH.CPH.CALP+ERv~oz EPH=LPH'SPH.CALP EZH=EiH'CPH'CALP+ELV*DZ EX=ERH*RHX-EPH'RHY EY=ERHaRHY+EPH.RHX

GO GD

CIx=CIX+EX CIY=CIY+EY CIZ=CIZ+EZH ARC=-TP'R EXA=CMPIX(CO~(ARC).SIN(ARG)) CIX=CIX.EXA CIY=CIYeEXA CIZ=CIZ*FXA RNX=RX/R RNY=RY/R RNZ:RZ/R 1HX=RNZ8PHY THY=-RNZ-PHX THZ=-RHO/R

ETH:CIX.THX+CIY.THY+CIZ.IHL
EPI=CIX.PHX&CIY.PHY

ERD=CIX*RNX+CIY.RNY+CIZ0RNZ
RETURN END

GFOUT GFOUT PURPOSE

T o w r i t e t h e NGF f i l e .

The c o n t e n t s o f t h e COMMON b l o c k s i n GFOUT a r e w r i t t e n t o f i l e 2 0 .

If

1CASE i s 3 o r 5 t h e b l o c k s o f t h e LU d e c o m p o s i t i o n o f m a t r i x A a r e o n f i l e 1 3

i n a s c e n d i n g o r d e r and o n f i l e 1 4 i n d e s c e n d i n g o r d e r . t o f i l e 20.

Both f i l e s a r e w r i t t e n

SYMBOL D ICTIONAKY
1GFL LOUT NEQ NOP NPEQ

= NGF f i l e number

= number o f e l e m e n t s i n m a t r i x
= order of matrix A = number o f s y n u n e t r i c s e c t i o n s
= number o f unknowns f o r a s y m m e t r i c s e c t i o n

GFOUT
GO GO WRITE N.G.F. FILE GO GO COMPLEX CM.SSX.ZRATI.ZRATI2.T1.ZARRAY.ARl.AR2.AR3.EPSCF.FRATI GO GO COMMON /DATA/ LD.N1.N2.N.NP.M1.M2.M.MP,X(300),Y(300),Z(300),S1(300 l),BI(300) ,ALP(300) .BET(300) ,ICON1(300) . I C O N 2 3 0 0 I T A G ( O O ) I C O N X ( GO 23OO).WLAM,IPSYM GO COMMON /CMB/ CM(4000) GO COMMON /ANGL/ SALP(3OO) GO COMMON /GND/ZRATI.ZRATI2.FRATI.CL.CH.SCRWL,SCRWR,NRADL.KSYMP.IFAR. GO 1 IPERF. TI .T2 GO COMMON /GGRID/ ARl(ll.10.4).AR2(17.5.4).AR3(9.8.4),EPSCFFDXA(3),OY GO lA(3).XSA(3).YSA(3).NXA(3),NYA(3) GO COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST.NBLSYM,NPSYM.NLSYM,IMAT,I GO lCASX.NBBX.NPBX.NLBX,NBBL,NPBL,NLBL GO COMMON /SMAT/ SSX(16.16) GO COMMON /ZLOAD/ ZARRAY(300),NLOAD,NLODF GO COMMON /SAVE/ IP(6OO).KCOM.COM(l3,5),EPSRRSIGSSCRWLTTSCRWRT,FMHZ GO DATA IGFL/20/ GO NEO=N+Z*M GO NPEO=NP+Z.MP GO NOP=NEO/NPEO GO WRITE (IGFL) N.NP.M.MP.WLAM.FMHZ,IPSYM,KSYMP,IPERF.NRADL,EPSR,SIG, GO 1SCRWLT.SCRWRT.NLOAD.KCOM GO IF (N.EO.0) GO TO 1 GO W R I T E ( I G F L ) (x(I).I=I.N).(Y(I).I=I,N),(z(I),I=I,N) GO WRITE (IGFL) (SI(1) ,I=l ,N),(BI(I) ,I=l .N) ,(ALP(I),I=l ,N) GO W R I T E ( I G F L ) (BET(I).I=I.N).(SALP(I).I=I.N) GO WRITE (IGFL) (ICONl(I),I=l.N).(ICON2(I).I=l.N) GO . . WRITE ( I G F L ) (ITAG(I);I=I .N)' . IF (NLOAD.GT.O)W R I T E (IGFL) (ZARRAY(I).I=I.N) SUBROUTINE GFOUT

WRITE (ICFL) ( B ~ l ( 1 ) .I=J.LD) ;(SALP(I) .I=J;LQ) WRITE (IGFL) (ICONl(I).I=J.LD).(ICON2(I).I=J.LD) ~. W R I T E (IGFL) (ITAG(I).I=J.LD) WRITE (IGFL) ICASE.NBLOKS.NPBLK.NLAST,NBLSYM.NPSYM,NLSYM,IMAT IF (IPERF.EO.2) WRITE (IGFL) A R l . A R 2 . A R 3 . E P S C F . D X A , 0 Y A A X S A A Y S A . N X A 1 .NYA IF (NOP.GT.1) WRITE (IGFL) ((SSX(I.J).I=l.NOP).J=l.NOP) W R I T E ( I G F L ) (IP(I),I=I.NEO).COM IF (ICASE.GT.2) GO TO 3 IOUT=NEO.NPEO WRITE (IGFL) (CM(I).I=l.IOUT~ REWIND 13 I=NPEO.NPEO DO 4 K=l.NOP READ (13) (CM(J).J=l.I) WRITE (IGFL) (CM(J).J=l.I) REWIND 13 GO TO 12 REWIND 13 REWIND 14 IF (ICASE.EO.5) GO TO 8 IOUT=NPBLK.NEO02 DO 6 I=l.NBLOKS CALL BLCKIN (CM.13.1.10UT.1.201) CALL BLCKOT (CM.IGFL.l.IOUT.1.202) DO 7 1=1 .NBLOKS

GO GO GO GO GO GO GO GO GO

CALL B L C K I N (CM,14.l.IOUT.1.2OS) C A L L BLCKOT ( C M . I G F L . I . I O U T . 1 . 2 0 4 ) GO TO 1 2 IOUT=NPSYMmNPE0*2 DO I I I O P = I .NOP DO 9 I = 1 .NBLSYM CALL B L C K I N ( C M . 1 3 . 1 . I O U T . I . 2 0 5 ) C A L L BLCKOT ( C M . I G F L . I . I O U T . 1 . 2 0 6 ) DO 1 0 I = I . N B L S Y M CALL B L C K I N (CM.14.1.IOUT.1.207) C A L L BLCKOT ( C M . I G F L . I . I O U T . 1 . 2 0 8 ) CONTINUE REWIND 1 3 REWIND 1 4 REWIND I G F L PRINT 1 3 . 1GFL.IMAT RETURN FORMAT ( / / / . 4 4 H l..'../.SK.l6HMATRIX END * * * * N U M E R I C A L GREEN'S F U N C T I O N F I L E ON T A P E . 1 3 . 5 H STORAGE - . 1 7 . 1 6 H COMPLEX NUMBERS.///)

GIL
GI1 .

PURPOSE 'To c o m p u t e t h e f u n c t i o n t h a t i s n u m e r i c a l l y i n t e g r a t e d f o r t h e n e a r ti f i e l d o r a segment. METHOD The v a l u e r e t u r n e d by GH is

where

p ' = p c o o r d i n a t e of t h e f i e l d o b s e r v a t i o n p o i n t i n a c y l i n d r i c a l coord i n a t e s y s t e m w i t h o r i g i n a t t h e c e n t e r o f t h e s o u r c e s e g m e n t and


z a x i s o r i e n t e d a l o n g t h e s o u r c e segment z'

= z c o o r d i n a t e of t h e f i e l d o b s e r v a t i o n p o i n t i n t h e c y l i n d r i c a l

coordinate system

= z coordinate of

t h e i n t e g r a t i o n p o i n t on t h e s o u r c e s e g m e n t

k = 2rr/X
SYMUOL IIICTIONARY CKK HK Ill R
= cos k r = r e a l p a r t of G = imaginary p a r t o t G = kr

RHKS = (kp ' )

2 2

KR2 RR3
1IS

= l/(kr) = l/(kr) = (kr)


=

SKR
ZI< ZI'K

s i n kr

= kz =

kz'

SUBROUTINE CH ( Z K . H R . H I ) I N T E C R A N D FOR H F I E L D OF A W I R E COMMON /TMH/ ZPK.RHKS RS=ZK-ZPK RS=RHKS+RSeRS R=SORT(RS) CKR=COS(R) SKR=SIN(R) RR2=1 ./RS RR3=RRZ/R HR=SKR'RRZ+CKR*RRS HI=CKR*RR2-SKR.RR3 RETURN END

GWAVE

I'URI'OSF

To compute t h e components o f e l e c t r i c f i e l d due t o an e l e c t r i c c u r r e n t element o v e r a ground p l a n e a t i n t e r m e d i a t e d i s t a n c e s , i n c l u d i n g t h e s u r f a c e wave f i e l d . M E T H O D Approximate e x p r e s s i o n s f o r t h e e l e c t r i c f i e l d of a v e r t i c a l o r h o r i z o n t a l i n f i n i t e s i m a l c u r r e n t element above a ground p l a n e , i n c l u d i n g s u r f a c e wave, were d e r i v e d by K . A. Norton ( r e f . 2 ) . The geometry i s shown

i n f i g u r e 6a f o r a c u r r e n t element a t h e i g h t a above t h e ground p l a n e and f i e l d o b s e r v a t i o n p o i n t a t p. The c u r r e n t element is l o c a t e d on t h e z ' a x i s , The

and t h e h o r i z o n t a l c u r r e n t element i s d i r e c t e d a l o n g t h e x' a x i s .

v e r t i c a l c u r r e n t element produces z ' and p ' f i e l d components g i v e n by


EV =
Z

exp(-jkRl)

2X

R1

+ Rv

cos 2

exp (-jkR
I)

2
R2

(1

Rv) cos

JI F

exp (-j kR2) R2

+ +

exp(-jU,)

R1

(&+
(3+
+

(jkR1) 2 ,

(I

sin

2
+I)

exp (-jkRp)

s i n $ cos $ (1

e x p (-jkR2) R )

2 jkRZ

3 s i n $' c o s $I'

exp (-j kRl)

3 s i n $ cos

e x p (-j kR2)

where
F
= 1
=

/=
2

exp(-w)

e r f c (j&)

erfc(z) er(z)
w

erf(z) exp(-t 2
) dt

2 4pl/(l -jkR u 2 2

(error function)

= =

Rv) (1

2 u 2 cos Z 2 $ ) / ( 2 c o s $) Z
JI
2,

Pl
K
u
k

cos - s i n ~ - u J ~ - u s i n IJJ
= = =

Ji -

u2 c o s 2 $

k/k2 wave number i n f r e e s p a c e wave number i n lower medium

k2 sin Q

= (z =

+
-

a)lR2 a)/R

sin

IJJ'

(z

CWAVE
The h o r i z o n t a l c u r r e n t e l e m e n t d i r e c t e d a l o n g t h e x' a x i s p r o d u c e s p ' ,

$', and z ' E i e l d components g i v e n b y


e x p ( - j kRl) s i n J,' c o s J,'

E~ =
z

2h

cos

4'

R1

Rv s i n J, c o s J,

exp(-jkR R2

+
+ +

c o s J, ( 1

exp(-jkR Rv) R2 e x p (- j kR )

s i n J, c o s J, ( 1

Rv)

j kR2

3 sin

cos

( 2 + jkRl ( j kR1)
2)

e x p ( - j kRl)
R1

e x p (- jkR2 ) c o s J, ( 1

- R , )

2 2 j kR2

- (1

- u2COS%)

U.

(1

exp (-jkK )

Ry) P R2

2 -

+(&+
(jkR1)
X

2)

(1-3.0.

2 9 . ) exp ( - j kR 1)

R1

+ u2

cos

$ I (1

Rv)

(1 - u

cos

9)

sin

exp (-jk.R2)

wllere
i;
= [ I

6e x l > ( - v )

arfc ( j

&)I,

q l = -jkk2 ( 1

u2 cos2 v)/(2u2 c o s 2 6)

Kh

J 1 - u 2 c o s 2 JI - u s i n
=

+ u s i n JI
.

The a p p r o x i m a t i o n s i n t h e s e e x p r e s s i o n s a r e v a l i d f o r R1 and R~ I n each g r e a t e r t h a n a b o u t a w a v e l e n g t h arid t o s e c o n d o r d e r i n u 2 e q u a t i o n , t h e f i r s t t e r m r e p r e s e n t s t h e d i r e c t s p a c e wave f i e l d o f t h e c u r r e o t e l e m e n t , t h e s e c o n d t e r m i s t h e s p a c e wave f i e l d r e f l e c t e d f r o m t h e g r o u n d , and t h e f o l l o w i n g h i g h e r o r d e r t e r m s i n v o l v i n g F and G r e p r e s e n t t h e g r o u n d wave. and R a r e t h e F r e s n e l v h r e f l e c t i o n c o e f f i c i e n t s f o r v e r t i c a l and h o r i z o n t a l p o l a r i z a t i o n , r e s p e c t i v e l y . To o b t a i n t h e f i e l d d u e t o a s t r u c t u r e , t h e s e e x p r e s s i o n s a r e i n t e g r a t e d o v e r e a c h s e g m e n t a n d t h e f i e l d s o f t h e s e g m e n t s a r e summed i n s u b r o u t i n e GFLD. F o r i n t e g r a t i o n , R l and R 2 a r e t h e d i s t a n c e s f r o m t h e i n t e g r a t i o n S i n c e R1 and R 2 a r e assumed l a r g e
I t may be n o t e d t h a t t h e c o e f f i c i e n t s R

point L ! o n t h e segment t o p o i n t p. compared t o t h e s e g m e n t l e n g t h , R1,

Rg, 6, and Q' a r e c o n s i d e r e d


1 a n d jkii2

c o n s t a n t d u r i n g i n t e g r a t i o n o v e r t h e segment e x c e p t where jkR occur i n exponential functions.

Thus, i f s r e p r e s e n t s d i s t a n c e a l o n g t h e

s e g m e n t , t h e i n t e g r a l o f e a c h e x p r e s s i o n o v e r t h e segment i s o b t a i n e d by r e p l a c i n g (1dk/h ) exp(-jkRl) and XX2 from s u b r o u t i n e GFLD.

and ( ~ d l l / A ) e x p ( - j k R 2 ) by X X 1

A f a c t o r o f exp(-jkR)

i s o m i t t e d from t h e

f i e l d s and i s i n c l u d e d a f t e r summation i n GFLO. 1 1 ~ ' i n X X l and XX2 makes a f a c t o r o f


R

Including a f a c t o r o f

a v a i l a b l e t o n o r m a l i z e K l and

i n t h e d e n o m i n a t o r s o f t h e f i e l d e x p r e s s i o n s . The f a c t o r s s i n c$' o r 2 c o s 9' a r e o m i t t e d from t h e f i e l d s d u e t o a h o r i z o n t a l c u r r e n t e l e m e n t i n


C!dAVE a n d a r e s u p p l i e d l a t e r .

GWAVE

SYMBOL DICTIONARY CPP CPPP


= cos

= c o s y' 2 CPPPZ = c o s $I' 2 CPP2 = c o s $

ECON EPH ERH ERV


EZH
EZV

=
=

-J

d 2 ( 0 = impedance o f Eree s p a c e )

E h / s i n 4' 4,
E / c o s 9' 'k
P
I1

=E"

h = EZ/cos

4'

EX
j = a

F
FJ
G

= F

=
= G
= 1 = ll

OMR

K,

PI
P1

= P1 = 41 = R, = -jkKI = -JkR2
=

Q1
RH

RK1
RK 2

KV

Kv
R ~ / X
KZ/A

RI
K2 SPP SPPP
SPPPZ
SPPP

= sin
= sin = sin2

9'
$'

= sin2 $ = 2~lj

TPJ

X4)

= f i r s t , second,

..., s e v e n t h

term i n e a c h f i e l d e x p r e s s i o n

GWAVE
S U B R O U T I N E GWAVE ( E R V . E Z V . E R H . E Z H . E P H ) GWAVE COMPUTES THE E L E C T R I C F I E L D . I N C L U D I N G GROUNO WAVE. OF A CURRENT ELEMENT OVER A GROUND PLANE U S I N G FORMULAS OF K . A . NORTON (PROC. I R E . S E P T . . 1 9 3 7 . P P . 1 2 0 3 . 1 2 3 6 . ) GW GW GW GW GW

COMPLEX F J . T P J . U Z . U . R K ~ . R K ~ . T ~ . T ~ . T ~ . T ~ . P ~ . R V . O M R . W . F . O ~ . R H . V . G . X R

ll.XR2.X1.X2.X3.X4.X5.X6.X7.EZV.ERV.EZHHERH.EPH.XXl.XX2.ECON,FBAR
COMMON /GWAV/ U.U2.XXl,XX2.R1,R2,ZMH,ZPH D I M E N S I O N F J X ( 2 ) . T P J X ( 2 ) . ECONX(2) EQUIVALENCE ( F J . F J X ) . ( T P J ~ T P J X ) . (ECON.ECONX) D A T A ~1/3.141592654/,~~~/O.,l./.TPJX/O..6.283185308/ DATA ECONX/O..-188.367/ SPPP=ZMH/Rl SPPP2=SPPP.SPPP CPPP2=1.-SPPP2 I F (CPPP2.LT.l.E-20) CPPPZ=l.E-20 CPPP=SORT(CPPPZ) SPP=ZPH/R2 SPP2=SPP.SPP CPP2=1.-SPP2 I F (CPP2.LT.l.E-20) CPPZ=l.E-20 CPP=SORT(CPP2) RKI=-TPJ*Rl RK2=-TPJ.R2 T 1 = l .-U2.CPP2 TZ=CSORT(Tl) T 3 = ( 1 . -1 . / R K I ) / R K I T4=(1.-l./RK2)/RK2 Pl=RK2*U2'Tl/(Z.'CPP2) RV=(sPP-u*l2)/(SPP+u.T2) OMR=l . -RV W= 1 . /OMR W=(4..o.).PI*W.W F=FBAR(W)

GWAVE
ERH=(X~-X~-X~-X~+X~+X~).LCON Xl=XRl X2=RH0XR2 X3=(RH+1.)*GoXR2 X4=T3.XRl X5=T4.(1.-U2.(1.+RV)-U2.OMR.F)*XR2

X6=.S'U2'OMR'(F'(U2'Tl-SPP2-l./RK2)+1./RK2)oXRZ/RK2
pH=-(XI-X~+X~-X~+X~+X~)*ECON RETURN END

PURPOSE
To evaluate terms For the field contribution due to segment ends in the thin wire kernel.
SYMDOL DICTIONARY GZ
=

exp(-jkr)/r

= Go

CZP = -11

+ jkr) exp(-jkr)/r
= p 2
+ z

R R2

= r
= r
= p
=

RH RK
XK ZZ

k R
2v/X

= z

CODE L I S T I N G

SUBROUTINE GX ( Z Z . R H . X K . G Z . G Z P ) SEGMENT END CONTRIBUTIONS FOR T H I N WIRE APPROX. COMPLEX GZ.GZP RZ=ZZ0ZZ+RH*RH R=SPRT(R2) RK=XKaR GZ=CMPLX(COS(RK),-SIN(RK))/R GZP=-CMPLX(I.,RK)*GZ/R2 RETURN END

GXX
6 X .X
['UKI'OSK

T o e v a l u a t e terms f o r t h e f i e l d c o n t r i b u t i o n due t o segment ends i n t h e

exLendfd t h i n wire k e r n e l .

METHOD
Equations 89 t h r o u g h 94 i n P a r t I a r e e v a l u a t e d f o r p > a , and S e v e r a l v a r i a b l e s are used f o r s t o r a g e e q u a t i o n s 99 t h r o u g h 103 f o r p < a .

of i n t e r m e d i a t e r e s u l t s b e f o r e being s e t t o t h e i r f i n a l v a l u e s . S Y M B O L DICTIONARY

A A2 C1 C2 C3 G1

r a d i u s of s o u r c e segment, a 2 = a
= = 1

jkr

= 3(1 =

0 jkr ) 0

2 2

ro
15(1

(6

j k r )k2rO2 0

jkro)

= G1

GIP = G2

a cI ,tazl

= G2

G ~ = P ~ G ~ I ~ Z *

G3
GZ

= =

aGltap Go

GZP = a G

0 IRA = 1 t o i n d i c a t e p < a
=
=

/az'

ro
2 rO

R2 R4
RH

r o4
2

= p

KH2 = p

GXX
S u B R O U T I N C GXX ( Z Z . R H . A . A ~ . X K . I R A . G I . G I P . G ~ . G ~ P , G ~ . G Z P ) SEGMENT END C O N T R I B U T I O N S FOR E X T . T H I N W I R E APPROX. COMPLEX GL.Cl.C2.C3.GI.GIP.G2.G2P,G3.CZP R2=ZZ.LZ+RH.RH R=SQRT(RZ) R4=RZeR2 RK=XKoR RK2=RK*RK RH2=RHeRH 11=.25.AZ.RH2/R4 T2=.5.A2/R2 Cl=CMPLX(l.,RK) C2=3:Cl-RK2

1 2
3
4

6
7

8 9
10 11 12 13 14 15
Ir l i

C3=CMPLX[6..RK).RKZ-l5:Cl GZ=CMPLX(CO~(RK).-SIN(RK))/R
GZ=GZ.(I.+Tl.CZ) GI=G2-T2*CleGZ GZ=GZ/R2 G2P=GZ*(Tl*C3-Cl) GZP=TZ.C2.GZ G3=G2P+GZP GlP=GJ.ZZ I r ( 1 R A . E Q . l ) GO TO 2 G3=(G3+GZP)*RH GZP:-ZZ.CI.GZ IF ( K H . G I . l . E - 1 0 ) GO TO 1 G2=0 czp=o. RETURN G2=GZ/RH GZP=G2PWZZ/RH RETURN T2:.5*A G2=-12*CI*GZ

18 IS 20 21 22 23 24 25
26

27

28
29 30 31 32 33 34 35 36 3i

RETURN END

38 39
40-

H F K PURPOSE

To compute t h e n e a r H f i e l d of a uniform c u r r e n t f i l a m e n t by n u m e r i c a l integration. M E T H O D The H f i e l d of a c u r r e n t f i l a m e n t of l e n g t h A w i t h uniform c u r r e n t d i s t r i b u t i o n of magnitude I = h i s

where r , p', z' and z a r e d e f i n e d i n t h e d e s c r i p t i o n of s u b r o u t i n e GH.

The

numerical i n t e g r a t i o n is performed by t h e method of Romberg q u a d r a t u r e w i t h v a r i a b l e i n t e r v a l w i d t h , which is d e s c r i b e d i n t h e d i s c u s s i o n of s u b r o u t i n e

INTX.

The i n t e g r a l i s m u l t i p l i e d by kp1/2 a t HF79 and HF80 i n t h e code.

SYMBOL DICTIONARY
T h i s l i s t i n g e x c l u d e s t h o s e v a r i a b l e s used i n t h e n u m e r i c a l q u a d r a t u r e a l g o r i t h m , which a r e d e f i n e d under s u b r o u t i n e INTX.
RHK
=

kp'
2

R H K S = (kp') SGI S G R ZPK

= i m a g i n a r y p a r t of
= =

H$

r e a l p a r t of H $

kz' (z'

z c o o r d i n a t e of o b s e r v a t i o n p o i n t )

ZPKX = ZPK

S U B R O U T I N E HFK ( E L I . E L 2 . R H K . Z P K X . S G R . S G I ) HFK COMPUTCS THE H F I E L O OF A U N I F O R M CURRENT I NUMERICAL INTEGRATION ZPK.RHKS COMMON /TMH/ OATA N X . N M . N T S . R X / ~ . ~ ~ ~ ~ ~ . ~ . ~ . E - ~ / ZPK=ZPKX RHKS=RHK*RHK Z=ELI ZE=LL2 S=LE-Z EP=S/(IO:NM) ZENO=ZE-EP SGR=O. 0 SCI=O . o NS=NX NT=O C A L L GH ( Z . G I R . G I 1 ) OZ=S/NS ZP=Z+OZ I F (ZP-ZE) 3.3.2 DZ=ZE-Z I F (ABS(DZ)-EP) 17.17.3 D Z O T = 0 Z o .5 ZP=Z+OZOT C A L L GH ( Z P . G 3 R . G 3 1 ) ZP=Z+OZ C A L L GH ( Z P . G S R . G 5 1 ) TOOR=(G1RtG5R)*OZOT rooI=(clI+GsI).DzoT TO~R=(TOOR+OZ'G~R)'O.~ TO1 I = ( T o o I + o z ~ G 3 I ) ~ o . 5 T~oR=(~.o*TOIR-TOOR)/~O

Tl01=(4.0*~0lI-T00I)/3.0
C A L L TEST ( T O I R . T I O R . T E I R . T O I I , T I O I I T E I I , O . ) I F ( T E 1 1 - R x ) 5.5.6 I F (TEIR-RX) 8.8.6 ZP=Z+DZ.O.25 C A L L GH ( Z P . G 2 R , G L I ) ZP=Z+OZ'0.75 C A L L GH ( Z P . G 4 R . G 4 1 ) To~R=(TO~R+OZOT~(G~R+G~R))~O.~ TOZI=(TOI I+DzoT*(G~I+G~I)).o.~

TllR=(4.O*T02R-TOlR)/3.0

T~~I=(~.O*~O~I-T~~I)/~.O
T20~=(l6.0'TllR-TlOR)/15.0

T~oI=(I~.o*TI~I-~~oI)/~~.o
C A L L TEST (Tl1R,T20R.TE2R.T1lI.T20I.TE2I.O.) I F (TEZI-Rx) 7.7.14 If( T E Z R - R X ) 9 . 9 . 1 4 SGR=SGR+TIOR SGI=SGI+TIOI NT=NT+2 GO TO 1 0 SGR=SGR+TZOR SGI=SGI+T201 NT=NT+I

G I R=GSR GI I=G5I I F (NT-NTS) 1.12.12 I F (NS-NX) 1.1.13 NS=NS/P NT=I

I r (NS-NM) PRINT 1 8 . GO TO 9 NS=NSa2


DZ=S/NS

i6.ts.i5

DZOT=DZ*0.5 G5R=G3R GSI=G3I G3R=G2R G3I=G2I GO TO 4 CONTINUE SGR=SGR*RHK0.5 SGI=SGI*RHK0.5 RETURN FORMAT ( 2 4 H S T E P S I Z E L I M I T E D AT Z = . F 1 0 . 5 ) END

HINTG

To compute t h e n e a r magnetic f i e l d due t o a s i n g l e p a t c h i n f r e e s p a c e

o r o v e r ground. M E T H O D The magnetic f i e l d i s computed a t t h e p o i n t , X I , Y I , Z I due t o t h e p a t c h d e f i n e d by p a r a m e t e r s i n COMMON/DATAJ/. (Z1)z due t o p a t c h i, c e n t e r e d a t r

The H f i e l d a t

r=

(XI);

(YI)~

i'

i s approximated as:

w l ~ c r eR = r

- r i'

and A . is t h e a r e a of p a t c h i.
1

This expression t r e a t s the

s u r f a c r c u r r e n t s a s lumped a t t h e c e n t e r of t h e p a t c h . c u r r e n t s along t h e s u r f a c e vectors t

and ; li 21' When a ground i s p r e s e n t , t h e code is e x e c u t e d t w i c e i n a l o o p .

H is computed f o r u n i t

In the

second p a s s , t h e f i e l d o f t h e image of t h e p a t c h is computed, m u l t i p l i e d by t h e r e f l e c t i o n c o e f f i c i e n t s , and added t o t h e d i r e c t f i e l d . S Y M B O L DICTIONARY CR C T H


= cos = cos

(kR)
0, 8 = a n g l e between t h e r e f l e c t e d r a y and t h e normal t o

EXC

EYC
EZC

Ex i :

EYK
EZK
EYS

1 1
1

t h e ground
=

x , y, and z components of H e x c l u d i n g

(X

71 .)

term

f o r Ji

tli

exs )
=

for J
i

.
= t

2i

EZS

f o r .I. = t
P1Z

. direct or reflected f i e l d contribution li'

F2Z FPI

G
-

o r J

= t

, .
2i'

d i r e c t o r reflected f i e l d contri,ution

=4n
= H e x c l u d i n g t h e t e r m (KIA) r
= 1

CAM
IP

Ti

for direct field, 2 for reflected f i e l d

IPERF = 1 f o r p e r f e c t g r o u n d , 0 o t h e r w i s e KSYMF' = 1 f o r f r e e s p a c e , 2 f o r ground


= =

PY
R

u n i t v e c t o r normal t o p l a n e o f i n c i d e n c e f o r r e f l e c t e d r a y p

RIA
d i r e c t f i e l d , -1 f o r r e f l e c t e d f i e l d

RFL RK RRH R R V
RSQ

= +1 f o r =

kR; k = 2n/X

= l$, = RV =

R ~ I A ~

=E,A
RZ

s
SR TlXJ

A ~ I2 A

= s i n (kR)

TlZJ TZXJ T1YJ TZZJ TlZR

iZl
A

= z

f o r p a t c h i o r f o r t h e image o f p a t c h i li r e f l e c t e d i n t h e ground

component o f t

T2ZR TP

= =

same a s TlZR f o r t h e 2ll

; 21
; / A

= f i e l d evaluation point

zI

HINTG

= position of center

of patch

f i/ A

ZJ

XYMAG
CONSTANTS

magnitude of ir/h projected o n the x-y plane

12.56637062 6.283185308

= =

4n
271

HI NTG
SUBROUTINE H I N T G ( X I . Y I . Z I ) H I N T G C O M P U T E S THE H F I E L D OF A P A T C H C U R R E N T COMPLEX EXK.EYK.EZK.EXS,EYS,EZS,EVCCEYCCEZCCZRATI,ZRATI2.GAM.F1X,F

11Y.F1Z.F2X.F2Y.F22.RRV,RRHHT1.FRATI
COMMON / D A T A J /
S.B.XJ.YJ.ZJ.CABJ.SABJ.SALPJ,EXK,LYK.EZK,EXS,EYS,EZ

lS.EXC.EYC.EZC.RKH.IEXK.INDl.INO?.IPGNO COMMON /GND/ZRATI.ZRATI2.FRATI.CL,CHHSCRWL,SCRWR,NRADL,KSYMP.IFAR,


1IPERF.TI.TZ EQUIVALENCE ( T I X J . C A B J ) . (T1YJ.SABJ). 1 J . I N O l ) . (TZZJ.IND2) D A T A FPI/12.56637062/.TP/6.283185308/ RX=XI-X J RY=YI-YJ RFL=-1 . EXK=(O. . o . ) EYK=(O..O.) EZK=(O..O.) EX5=(0..0.) EYS=(O..O.) EZS=(O..O.) DO 5 I P = I . K S Y M P RFL=-RFL (T1ZJ.SALPJ). (T2XJ.B). (T2Y

RRV--(CTH-RRV)/(CTH+RRV) GAM=(FIL'PX+F~Y*PY).(RRV-RRH)

71X=FIX'RRH+CAM.PX FIY=FlY.RRH+CAM.PY ! l Z = F 1i.RRH GAM:(FZX.PX+r2Y.PY).(RRV-RRH) F2X=F2XeRRH+GAM*PX FZY=FZY.RRH+GAM.PY F2Z=F2Z*RRH EXK=EXK+FlX EYK=EYK+FlY EZK=EZK+FlZ EXS=EXS+FZX EYS=EYS+F2Y EZS=EZS+FZZ CONTINUE RETURN FND

IISFLD --PUKPOSE
To compute t h e n e a r m a g n e t i c f i e l d due t o c o n s t a n t , s i n e , and c o s i n e

c u r r e n t d i s t r i b u t i o n s on a segment i n f r e e s p a c e o r o v e r g r o u n d . MKTHOD The m a g n e t i c f i e l d i s c o n ~ p u t e da t t h e p o i n t X I , Y I , Z I d u e t o t h e s e g m e n t d e f i n e d by p a r a m e t e r s i n COMMON/DATAJ/. r u u t i n e HSFLX a r e s t o r e d i n /DATAJ/. executed t w i c e i n a loop. The f i e l d s computed by t h e code i s

When a ground is p r e s e n t ,

I n t h e s e c o n d p a s s , t h e f i e l d o f t h e image o f t h e

s e g m e n t i s computed, m u l t i p l i e d by t h e r e f l e c t i o n c o e f f i c i e n t s , and a d d e d t o the direct field. The E i e l d is e v a l u a t e d i n a c y l i n d r i c a l c o o r d i n a t e s y s t e m w i t h t h e s o u r c e segment a t t h e o r i g i n . The r a d i u s o f a s e g m e n t on w h i c h t h e f i e l d i s

e v a l u a t e d i s t r e a t e d i n t h e same way a s f o r t h e e l e c t r i c f i e l d i n s u b r o u t i n e EFLD. When t h e f i e l d e v a l u a t i o n p o i n t i s n o t o n a s e g m e n t , t h e o b s e r v a t i o n Thus, a s f o r t h e e l e c t r i c

segment r a d i u s i s s e t t o z e r o i n t h e c a l l t o HSFLD.

f i e l d , t h e p c o o r d i n a t e o r t h e f i e l d e v a l u a t i o n p o i n t i s computed f o r t h e 2 s u r f a c e o f t h e o b s e r v a t i o n segment a s p ' = ( 0 + a 2 ) ' I 2 , w h e r e p i s t h e d i s t a n c e f r o m t h e a x i s o f t h e s o u r c e segment t o (XI, Y I , ZI) a n d a i s t h e r a d i u s of t h e o b s e r v a t i o n segment.


P/O'.

The r e s u l t i n g H f i e l d i s m u l t i p l i e d by

SYMBOL DICTLONARY

AI
CTH

= r a d i u s of o b s e r v a t i o n segment, = cos

i f any

0,

8 = a n g l e b e t w e e n t h e r a y r e f l e c t e d from t h e g r o u n d

and v e r t i c a l

ETA
HPC

HPK
HPS

1
11

=n=m
=

H
41

due t o c o s i n e , c o n s c a n t , a n d s i n e c u r r e n t . r e s p e c t i v e l y

P H Y PHZ

= ( ( I / [ ) ' ) $ i n t h e c y l i n d r i c a l c o o r d i n a t e s of

t h e s o u r c e segment

o r i t s image

HSFLD

::: /
QZ RFL
RH

PY

u n i t v e c t o r normal t o t h e plane of i n c i d e n c e oE t h e r e f l e c t e d ray, P


A

p/pt

[%$ + (% -

R ~ ) ( $ ;);I

f o r r e f l e c t e d ray

= =

+1 f o r d i r e c t f i e l d , -1 f o r r e f l e c t e d f i e l d
p'

RHOSPC = d i s t a n c e from c o o r d i n a t e o r i g i n t o t h e p o i n t where t h e r a y from t h e s o u r c e t o (XI, Y I , ZI) r e f l e c t s from t h e ground


RHOX

RHOZ

RMAG

d i s t a n c e from t h e f i e l d e v a l u a t i o n p o i n t t o t h e c e n t e r of t h e s o u r c e segment

RRH
RRV

- R~
= =

%
z component of u n i t v e c t o r i n t h e d i r e c t i o n of t h e s o u r c e segment o r i t s image

SALPR

x, y, z coordinares of t h e f i e l d evaluation p o i n t

ZI

"" I ZIJ
YIJ

x, y , z components of d i s t a n c e from c e n t e r of s o u r c e segment to f i e l d observation point

XSPEC YSPEc
XYMAG

x , y c o o r d i n a t e s of t h e ground p l a n e r e f l e c t i o n point

h o r i z o n t a l d i s t a n c e from t h e s o u r c e segment t o t h e f i e l d observation point

ZP

p r o j e c t i o n of t h e v e c t o r (XIJ, Y I J , Z I J ) on t h e a x i s o f t h e s o u r c e segment

ZRATX

temporary s t o r a g e f o r ZRATI

5UBROUTINE HSFLD ( X I . Y I . Z I . A I ) ;IS H S f L D COMPUTES THE H F I E L D FOR CONSTANT. S I N E . AND C O S I N E CURRENT HS ON A SEGMENT I N C L U D I N G GROUND EFFECTS HS C O M P L t X E X K . E Y K . E L K . E X S . E Y S , L L S , E X C , E Y C C E L C C L R A T I , Z R A T I 2 , T I . H P K . H P HS IS.HPC.QX.OY.Q7.RRV.RRH.ZRATX.FAATI HS COMMON / D A T A J / 5 . B . X J . Y J . Z J .CABJ.SABJ ,SALPJ,EXK, EYK, E L K E XY E HS

1S.CXC.EYC,EZC.RKW.1EXK,1N01.IN02,IPGN0 HS COMMON / G N O / Z P A T I . Z R A T I 2 . F R A T I I C L , C H H S C R W L . S C A W R , N R A D L , K S Y M P , I F A R , US
1I P E R r . T I .T2 DATA E T A / 3 7 6 73,' XIJ=XI-XJ IIJ=YI-YJ RFL=-I . DO I I P = I .KSYMP RFL=-RFL SALPR=SALPJ.RFL ZIJ=LI-RFL-ZJ ZP=XIJ*CABJ+YIJ'SABJ+ZIJ*SALPR RHOX=XIJ-CABJaZP RHOY=YIJ-SABJVZP HHOZ=ZIJ~SALPR'ZP RH=SORT(RHOX~RHOX+RHOY~RHOY+RHOZ~RHOZ+AIoAI) I F ( R H . G T . 1 E - 1 0 ) GO TO 1 EXK=O. EYK-0. EZK=O . EXS=O. EYS:O. EZS=O. EXC;.O. EYC=O. EZC=O . GO 1 0 7 RHOX=RHOX/RH RHOY=RHOY/RH RHOZ=RHOZ/RH PHX=SABJ.RHOZ-SALPR0RHOY PHY=SALPRBRHOX-CABJ'RHOZ PHZ=CABJ0RHOY-SABJ'RHOX CALL HSFLX (8.RH.ZP.HPK.HPS.HPC) I F ( I P . N E . 2 ) GO TO 6 I F ( I P E R F . E O . 1 ) GO TO 5 ZRAIX=ZRATI RMAG=SQRT(ZP.ZP+RH*RH)
XYMAG=~ORT(XIJ-XIJ+YIJY~J)

US

SET P A R A M E l E R S FOR R A D I A L W I R E GROUND SCRLEN

RHOSPC=SQRT(XSPEC'XSPEC+YSPEC'YSPEC+T~~T~) I F (RHOSPC.GT.SCRWL) GO TO 2 RRV-Tl'RHOSPC'ALOC(RHOSPC/T2) ZRATX=(RRV'ZRATI)/(ETA*ZRATI+RRV) I F (XYMAG G T 1 . E - 6 ) CO TO 3


C A L C U L A T I O N OF R E F L E C T I O N C O E F F I C I E N l S WHEN GROUND I S S P E C I F I E D .

HS HS HS HS HS HS HS HS HS HS
'-1 5

:is

rls
9s

HS

HSFLD
PX=-YIJ/XYMAG PY=XIJ/XYMAG CTH=ZIJ/RMAG RRV=CSQRT(I.-ZRATK*ZRATX*(I.-CTH'CTH)) RRH=ZRATXWCTH RRH=-(RRH-RRV)/(RRH+RRV) RRV=ZRATX.RRV RRV=(CTH-RRV)/(CTH+RRV) QY=(PHX*PX+PHY*PY)*(RRV-RRH) OX=QY0PX+PHX*RRH PY=OY0PY+PHY*RRH OZ=PHZ*RRH EXK=EXK-HPKWOX EYK=EYK-HPK*QY EZK=EZK-HPK0OZ EXS=EXS-HPS'QX EYS=EYS-HPS*QY EZS=EZS-HPS*OZ EXC=EXC-HPC0OX EYC=EYC-HPC*OY EZC=EZC-HPC*QZ GO TO 7 EXK=EXK-HPKWPHX EYK=EYK-HPK0PHY EZK=EZK-HPK'PHZ EXS=EXS-HPS0PHX EYS=EYS-HPS'PHY EZS=EZS-HPS'PHZ EXC=EXC-HPC0PHX EYC=EYC-HPC8PHY EZC=EZC-HPC0PHZ GO TO 7 EXK=HPK0PHX EYK=HPK0PHY EZK=HPK0PHZ EXS=HPS0PHX EYS=HPS*PHY EZS=HPS0PHZ EXC=HPC*PHX EYC=HPCWPHY EZC=HPC0PHZ CONTINUE RETURN END HS HS HS HS HS HS HS HS HS HS HS HS HS HS HS HS 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

HS
HS HS HS HS HS HS HS HS HS HS HS HS HS HS HS NS HS HS HS HS HS HS HS HS HS HS HS

85
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

106
107 108-

HSFLX

HSFLX
PURPOSE

To compute t h e n e a r H f i e l d o f f i l a m e n t a r y c u r r e n t s o f s i n e , c o s i n e , and c o n s t a n t d i s t r i b u t i o n o n a segment.


METHOD

The w i r e segment i s c o n s i d e r e d t o b e l o c a t e d a t t h e o r i g i n o f a l o c a l c y l i n d r i c a l c o o r d i n a t e s y s t e m w i t h t h e p o i n t a t which t h e H f i e l d is computed b e i n g (p, $, 2 ) . The c o o r d i n a t e geometry f o r a f i l a m e n t o f c u r r e n t o f l e n g t h For a s i n e o r c o s i n e c u r r e n t d i s t r i b u t i o n , For a c u r r e n t the field

A i s shown i n f i g u r e 7.

c a n b e w r i t t e n i n c l o s e d form.

the f i e l d is

I /A
0

= 1

is assumed i n t h i s r o u t i n e .
Hence, f o r z > 0 and

F o r s m a l l v a l u e s o f p w i t h l z l > Al2, t h i s e q u a t i o n may p r o d u c e l a r g e n u m e r i c a l e r r o r s d u e t o c a n c e l l a t i o n of l a r g e t e r m s . p/(z

A/2) <

a more s t a b l e a p p r o x i m a t i o n f o r s m a l l p / ( z t A/2) is u s e d :

i
rxp(j*n/?) (sin(kA/2)) 2 2 cos ( k n / 2 ) (7.- AI2) / A

(z+,/2)2/A2

c o s (kA12) The f i e l d o f a

For z < 0 , t h e ahovf e q u a t i o n i s e v a l u a t e d f o r H ( 0 ,

z).

s i n kz' c u r r e n t i s m u l t i p l i e d by -1 i n t h i s c a s e , s i n c e i t i s a n odd f u n c t i o n of
2.

H S FLX

Segment
' 0 /
/ '

-an : I
F i g u r e 7. C o o r d i n a t e s f o r E v a l u a t i n g H F i e l d o f a Segment.

The f i e l d due t o a c o n s t a n t c u r r e n t i s o b t a i n e d by n u m e r i c a l i n t e g r a t i o n , which i s p e r f o r m e d by s u b r o u t i n e HFK. t i e s a r e s e t to zero, since H SYMBOL DICTIONARY I f p is zero, a l l f i e l d quanti-

is u n d e f i n e d .

CDK
CONS

= =

cos(ka/2) -j/(Zkp)

DH
DK

= A12
= = =

kA/2 exp(-jkr exp(-jkr

EKRl EKR2 FJ FJK

1
2

= j
=

-j2n

HKR, H K I = r e a l a n d i m a g i n a r y p a r t s of H HPC

HPK
HPS H SS
P I8

due t o a c o n s t a n t c u r r e n t

= H

d u e t o c o s i n e , c o n s t a n t , and s i n e c u r r e n t s , r e s p e c t i v e l y

s i g n of z

= 8.rr

HSFLX
S
= 1\
=

SDK
'C P

sirx(kA/Z)

= 21r =

Z1

A12

22
ZI'

= z

A/2

HSFLX
SUBROUTINE HSFLX ( S . R H . Z P X . H P K . H P S . H P C ) HX CALCULATES H FIELD OF SINE COSINE. A N D ' C O N S T A N T CURRENT OF SEGMENT H X COMPLEX FJ.FJK.EKRl.EKR2.TI.TZ.CONS.HPS.HPC.HPK HX DIMENSION F J X ( 2 ) . FJKX(2) EOUIVALENCE (FJ.FJX). (FJK.FJKX) D A T A ~ ~ / 6 . 2 8 3 1 8 5 3 0 8 / . ~ ~ ~ / I0 ../ :. F J K X / O . .-6.283185308/ DATA P I 8 / 2 5 . 1 3 2 7 4 1 2 3 /

GO TO 4 RHZ=l . OK=TP'OH CDK=COS(OK) SOK=SIN(OK) C A L L HFK ( - D K . O K . R H ' T P . Z P ~ T P . H K R . H K 1 ) HPK=CMPLX(HKR.HKI) I F (RHZ.LT.1.E-3) GO TO 5 RH2=RH0RH RI=SORT(RH2+Zl*Zl)

EKR~=CEXP(FJK~R~~ Tl=Zl.EKRl/RI TZ=ZZ.EKRZ/RZ HPS=(COK*(EKR2-EKR1)-FJmSDK*(T2+Tl))*HSS HPC=-SDK'(EKR2+EKRI)-FJ.CDK.(T2-T1) CONS=-FJ/(Z.*TP*RH) HPS=CONSWHPS HPC=CONS9HPC RETURN EKRl=CMPLX(COK.SOK)/(Z2~22)

EKR2=CMPLX(COK.-SOK)/(Zl*Zl)
Tl=TP'(l./Zl-l./Z2) T2=CEXP(FJKWZP)*RH/PIB

HPS=T2'(Tl+(EKRl+EKR2).SDK)*HSS HPC=T2'(-FJ'Tl+(EKRl-EKR2).COK) RETURN HPS=(O..O.) HPC=(O..O.) HPK=(O..O.) RETURN END

INTRP INTRP

PURPOSE To e v a l u a t e t h e Somnlerfeld i n t e g r a l c o n t r i b u t i o n s t o t h e f i e l d o f a s o u r c e o v e r g r o u n d by i n t e r p o l a t i o n i n precomputed t a b l e s .

METHOD The i n t e r p o l a t i o n r e g i o n i n R1 and 6 i s c o v e r e d by t h r e e g r i d s a s shown i n F i g u r e 1 2 o f P a r t I. The i n t e r p o l a t i o n t a b l e s and t h e number o f d a t a

p o i n t s and t h e b o u n d a r i e s o f e a c h g r i d a r e r e a d f r o m f i l e 2 1 and s t o r e d i n
COMMON/GGKIL)/

by t h e main program.

I n s u b r o u t i n e INTPP t h e v a r i a b l e x

c o r r e s p o n d s t o K1 and y t o 8. T h e t h r e e i n t e r p o l a t i o n t a b l e s a r e s t o r e d i n t h e a r r a y s A R 1 , A R Z and AR3 i n coMHON/GGRID/. For g r i d i , ARi(I,J,K) i s t h e v a l u e a t

, Ax. = D x A ( ~ ), Ni where s . = X S A ( ~ )
1 1

NXA(~)

t i = YSA(i)

Ay. = D Y A ( ~, ) Mi = N Y A ( ~ )
L

Each a r r a y c o n t a i n s v a l u e s f o r I

V V H H I and I Erom e q u a t i o n s 1 5 6 t h r o u g h 1 5 9 p' Iz' p d

oE P a r t I f o r K e q u a l t o 1 t h r o u g h 4 , r e s p e c t i v e l y .

The g r i d b o u n d a r i e s and

d e n s i t y oE p o i n t s c a n be v a r i e d b u t t h e r e l a t i v e p o s i t i o n s o f t h e t h r e e g r i d s m u s t be a s shown i n F i g u r e 12 o f P a r t I f o r t h e l o g i c f o r c h o o s i n g t h e c o r r e c t g r i d t o work c o r r e c t l y . I n p a r t i c u l a r , XSA(l), ySA(1) and Y S A ( ~ must ) be

z e r o ; and XSA(2) and x S A ( ~ )must be e q u a l . F o r a g i v e n x and y t h e v a l u e s o f I

p'

IZ'

"

and I

4' a r e f o u n d by

b i v a r i a t e c u b i c i n t e r p o l a t i o n and r e t u r n e d i n t h e v a r i a b l e s F1, F2, F 3 and

F4.

The g r i d c o n t a i n i n g ( x , y ) i s d e t e r m i n e d and a f o u r by f o u r p o i n t r e g i o n I f x . and y


1

a r e t h e minimum v a l u e s o f x k and y i n t h e f o u r by f o u r p o i n t r e g i o n t h e n f o u r i n t e r p o l a t i o n p o l y n o m i a l s i n
x a r e computed f o r y = y . w i t h j = k , k + 1, k J

containing (x,y) is selected.

+ 2 , k + 3.

These a r e

INTRP

where

C.

= (x

x.

1+1

)/Ax

1 b . . = - [F. . 1J 1 , 2 c . . = F. i 1+2,j d . . = F.
1J

2F.
1

j
$3

+F. . 1+2, J

I
+ Fi+3,

1 - 6

[2Fi

. + 3Fi+l,

l+l, J

F. . = F(xi, 193

yj)

A c u b i c polynomial i n y , f i t t o t h e p o i n t s E..(x) f o r j = k , k + 3 is '3 then evaluated f o r the given y t o obtain the interpolated value f ( x , y )

...

To r e d u c e c o m p u t a t i o n t i m e t h e c o e f f i c i e n t s a . . , b . . , c . . and d . . a r e 13 13 13 13 s a v e d a s l o n g a s s u c c e s s i v e p o i n t s ( x , y ) f a l l i n t h e same f o u r by f o u r p o i n t region of a grid. I n a d d i t i o n t h e f o u r by f o u r p o i n t i n t e r p o l a t i o n r e g i o n s

a r e r e s t r i c t e d t o s t a r t i n g i n d i c e s i and k w i t h v a l u e s 3n + 1, n = 0 , 1 Thus t h e r e g i o n s do n o t o v e r l a p .

....

This is l e s s accurate than centering the

region on each x,y p o i n t but r e q u i r e s l e s s f r e q u e n t computation o f t h e coefficients.


A t t h e o u t e r e d g e s of a g r i d t h e r e g i o n s a r e c h o s e n t o e x t e n d

t o t h e e d g e b u t n o t beyond.

I f x,y i s o u t of t h e e n t i r e t h r e e g r i d r e g i o n t h e

n e a r e s t f o u r by f o u r p o i n t r e g i o n i s used f o r e x t r a p o l a t i o n . The c o e f f i c i e n t s a , . b . ., c . . and d . . a r e s t o r e d i n two 13' 13 13 'J d i m e n s i o n a l a r r a y s from I T 1 0 6 t o I T 109. When t h e y a r e u s e d , from I T 1 1 8 t o

INTRP

I T 149 t h e y arc: u s e d a s s i m p l e v a r i a b l e s ( A ( 1 , l ) E A l l ) t o s a v e t i m e .
t h e t h r e e d l m f n s i o n a l a r r a y s AKI,

Also

AK2, and AR3 a r e u s e d a s l i n e a r a r r a y s from

IT 92 t.o L1' 105. IT 91.

The v q u i v a l e n t t h r e e s u b s c r i p t s a r e shown i n t h e comment a t

SYMBOL DICTIONARY
A ij
= A(i,j)

= a,.

1J

AK 1

= ARLl = g r i d 1

AR2
AR 3

= ARL2 = g r i d 2
= ARL3 = g r i d 3
= B(i,j) = C(i,

H ij
Cij

= b.. 13
1J

j) = c . .

Di j
DX
D XA

= D(i,j) = d . .

'1

= L h f o r g r i d being used = a r r a y of

Ax v a l u e s f o r t h e t h r e e g r i d s

DY UYA EPSCF

= by f o r g r i d b e i n g u s e d

= a r r a y of A y values
=

c1 - ~ U IWE 0

FXl FX2 FX3

= fi = fi
3

.(x)
3 J

F X4
IADD

. (x) J+I = f . . (x) 1,~+2 = f i . (x) ,J + 3 = i n d e x f o r l i n e a r a r r a y s ARL1, e t c .


= i n i t i a l v a l u e f o r IADD
= g r i d number f o r p r e s e n t x , y = g r i d number f o r l a s t x , y

IADZ

IGR IGRS IX I XEG

= x index of t h e g r i d coordinate j u s t l e s s than x


= x index o f

t h e upper edge of t h e l a s t norlnally

l o c a t e d i n t e r p o l a t i o n b a t c h when a p a t c h o u t o f t h e

INTRP

normal L o c a t i o n s i s u s e d a t t h e o u t e r e d g e o f a g r i d , -1000O o t h e r w i s e
= 1 p l u s t h e x i n d e x o f t h e l o w e r e d g e o f 4 by 4 p o i n t

interpolation patch
IY,
: t

IYEG, l Y S

= same f o r y a s I X , = 1, 2,

I X E G and I X S

V H 3, 4 f o r ID, I=, In, ZH b

N1)
NUA

= NDA f o r t h e p a r t i c u l a r g r i d
= a r r a y c o n t a i n i n g t h e f i r s t d i m e n s i o n s o f AR1,

A K 2 and

AR 3 NDP NUPA
= NOPA f o r a p a r t i c u l a r g r i d

= a r r a y c o n t a i n i n g t h e product o f t h e f i r s t two

d i m e n s i o n s i n AR1, A K 2 a n d AR3
NXA NXM2 NXMS
= number o f x v a l u e s i n e a c h g r i d

= N U

2 for a particular grid

= upper x index of t h e l a s t normally l o c a t e d p a t c h a t

t h e edge of a g r i d
NYA, NYMZ, NYMS

= same f o r y a s N U , NXMZ and NXMS

P1, PZ, P3, P4


X XS XS 2 XSA XX XZ Y YS YS3 Y SA YY YZ

= XSA f o r t h e p r e s e n t g r i d = XSA( 2 ) t h r o u g h e q u i v a l e n c e
= a r r a y of v a l u e s o f x a t l o w e r e d g e o f e a c h g r i d ( s . )
1

Ci

= x. f o r computing 1+L
=

5;

= YSA f o r p r e s e n t g r i d = y S ~ ( 3 ) through equivalence = a r r a y o f v a l u e s of y a t l o w e r e d g e o f e a c h g r i d ( t i )

"k

~ f+ o r ~computing

I l k

INTRP
1 2 3 4 5 6 7 SUBROUTINE I N T R P ( X . Y . F I . F 2 . F 3 . F 4 ) C C C C I N T R P USES E I V A R I A T E C U B I C I N T E R P O L A T I O N TO O B T A I N THE VALUES OF 4 F U N C T I O N S AT THE P O I N T ( X . Y ) . COMPLEX FI.F2.F3.F4.A.B.C.D.fXI,fX22FX3,FX4.P1.P2.P3,P4,A1l.A12.A1 13.~14.~21.A22.A23.A24.A31.A32.A33.A34,A41.A42.*43.A44,8l1.812.B13. IT IT I T IT T T T T T

8 9
10 11 12 13 14 15

I I I 2E14.B21.822.823.824.E31.B32,B33JB34,E41.B42.843.B44,Cl1,Cl2,C13,C1 I 34.C21.C22.C23.C24.C31.C32.C33.C34.C41.C42.C43,C44.Dll.D12.013.D14. I

I T I T COMPLEX ARl.AR2.AR3.ARLI.ARL2.ARL3,EPSCF COMMON /GGRID/ A R ~ ( I ~ . ~ ~ . ~ ) . A R ~ ( ~ ~ . ~ . ~ ) . A R ~ ( ~ , ~ , ~ ) , E P IS TC F , D X A ( ~ ) D Y l A ( 3 ) . X S A ( 3 ) . Y S A ( 3 ) . N X A ( ~ ). N Y A ( 3 ) I T DIMENSION NDA(~). NDPA(~) I T DIMENSION ~ ( 4 . 4 ) . ~ ( 4 . 4 ) . C(4.4). D(4.4). A R L I ( 1 ) . ARLP(1). ARL3(1 I T 1) EOUIVALENCE ( A ( I . l ) . A l l ) . (A(1.2).A12). (A(1.3).A13). (~(1.4).~14 EOUIVALENCE ( A ( 2 . 1 ) . A 2 1 ) . (*(2.2).A22). (A(2.3) ,A23). (A(2.4) .A24) EOUIVALENCE ( ~ ( 3 . 1 ). A 3 1 ) . ( A ( 3 . 2 ) . A 3 2 ) . ( A ( 3 . 3 ) . A 3 3 ) . ( A ( 3 . 4 ) .A34) EOUIVALENCE ( A ( 4 . 1 ) , A 4 1 ) . (A(4.2).A42). (A(4.3).~43). (A(4,4).A44) .1).811). (B(1 .2).812). (8(1 .3).813). (8(1 .4).814) EOUIVALENCE ( ~ ( 1 (8(2.2).822). (E(2.3).823). (8(2.4).824) EOUIVALENCE ( 8 ( 2 . 1 ) . 8 2 1 ) . (8(3.2).832). (E(3.3).833). (8(3.4).834) EOUIVALENCE ( 8 ( 3 . 1 ) . 8 3 1 ) . (8(4.2).842). (8(4.3).843). (B(4.4).844) EOUIVALENCE ( 8 ( 4 . 1 ) . 8 4 1 ) . (C(1,2).C12). (C(1,3).C13). (C(1,4).C14) EOUIVALENCE ( C ( l . l ) . C I l ) . (C(2,2).C22). (C(2,3).C23). (C(2,4).C24) EOUIVALENCE ( C ( 2 . 1 ) . C 2 1 ) . EOUIVALENCE ( C ( 3 . 1 ) .C31). (C(3.2).C32). ( C ( 3 . 3 ) .C33). ( C ( 3 . 4 ) .C34) (C(4,2),C42). (C(4,3).C43), (C(4,4).C44) LOUIVALENCE ( C ( 4 , 1 ) , C 4 1 ) . EOUIVALENCE ( D ( I . l ) . D l I ) . (D(1,2).D12). ( D ( 1 3 ) 0 1 3 ) (D(1.4).014) EOUIVALENCE ( 0 ( 2 , 1 ) . D 2 1 ) . (D(2.2).022). (0(2.3).023). (D(2.4).024) EOUIVALENCE ( 0 ( 3 , 1 ) . D 3 1 ) . (D(3.2),032). (0(3.3).033). (0(3,4).D34) EOUIVALENCE ( ~ ( 4 , 1 ) . D 4 1 ) . ( D ( 4 . 2 ) . D 4 2 ) . (D(4.3).D43). (0(4,4).D44) (ARL3.AR3). (XSZ.XSA(2)). (YS3 EOUIVALENCE ( A R L I . A R 1 ) . ( A R L Z . A R 2 ) . 1 .YSA(3)) DATA IXS.IYS.IGRS/-10.-10,-1O/,DXXDYYXS.YS/1..l..0..0./ I T )I T I T I T I T I T I T I T I T I T I T I T IT I T I T I T I T IT I T I T

IX=INT((X-XS)/DX)+I IY=INT((Y-YS)/DY)+I
I F P O I N T L I E S I N SAME 4 BY 4 P O I N T R E G I O N A S P R E V I O U S P O I N T . V A L U E S ARE REUSED

I f (1X.LT.IXEG.OR.IY.LT.IYEG) GO TO 1 I F (IABS(IX-IXS).LT.~.AND.IABS(IY-IYS).LT.Z)
D E T E R M I N E CORRECT G R I D AND G R I D R E G I O N I F (X.GT.XS2) IGR-1 GO TO 3 IGR=2 I F (Y.GT.YS3) I F (IGR.EOIGRS) IGRS=IGR DX=DXA(IGRS) DY=DYA(IGRS) xs=xsA(rGRs) YS=YSA(IGRS) GO TO 2

GO TO 1 2

IGR=3 GO TO 4

[ NTRP

I I I I I I I I I I I I I COMPUTE C O E F F I C I E N T S OF 4 C U B I C POLYNOMIALS I N X FOR THE 4 G R I D V A L U E S OF Y FOR EACH OF THE 4 FUNCTIONS IAOZ=IXS+(IYS-3)'ND-NDP DO Il K=1 . 4 IADZ=IADZ+NDP IAOD=IAOZ DO 1 1 I = 1 . 4 IADO=IAOO+NO GO TO ( 7 . 8 . 9 ) . IGRS PI=ARI(IXS-1.IYS-2+I.K) P I = A R L l ( IADO-1) PZ=ARLI(IAOD) P3=ARL1(IAOO+l) P4=ARLl(IADO+2) GO TO 1 0 PI=ARL2(IADO-1) P2=ARL2(1AOO) P3=ARLZ(IADD+l)

T T T T T T T T T T T T T

I T
I T

68 69 70 71 72 73 74 75 76 77 78 79 80 81
82

EVALUATE POLYMOMIALS I N X AND THEN USE C U B I C I N T E R P O L A T I O N I N Y FOR EACH Of THE 4 F U N C T I O N S .

I T 113 I T 114

INTRP
129 130 131 132 I33 134 135 136 13,' 138 I39 140 141 142 143 44 145 146 147 148 149 150 151

'

I NTX

IN'I'X --

PURPOSE l o n u m e r i c a l l y compute t h e i n t e g r a l o f t h e f u n c t i o n e x p ( j k r ) / k r .
METIIOL)

l ' r ~ r e v a l u a t i o n o f t h e f i e l d due t o a s e g m e n t , a Local c y l i n d r i c a l

c o o r d i n a t e svstenl is d e f i n e d w i t h o r i g i n a t t h e c e n t e r of t h e segment and z a x i s i n t h e segment d i r e c t i o n . o f s u b r o u t i n e GP. the integral T h i s geometry i s i l l u s t r a t e d i n t h e d i s c u s s i o n

S u b r o u t i n e INTX i s c a l l e d by s u b r o u t i n e EFLD t o e v a l u a t e

- -W/2

exp (- j k r ) d(kz) kr

where

r = [pt2

(z

- z l ) 2 11 1 2 ,

and r j t h e r s y m b o l s a r e d e f i n e d i n t h e d i s c u s s i o n o f s u b r o u t i n e GF.

The n u m e r i c a l i n t e g r a t i o n t e c h n i q u e o f Romberg i n t e g r a t i o n w i t h v a r i a b l e
i n t e r v a l w i d t h i s used ( r e f s .

3 and 4 ) .

The Romberg i n t e g r a t i o n f o r m u l a i s The

o b t a i n e d f r o m t h e t r a p e z o i d a l f o r m u l a by a n i t e r a t i v e p r o c e d u r e ( r e f . 1 ) .

trapezoidal r u l e f o r integration of the function f ( x ) over a n i n t e r v a l (a, b ) k u s i n g 2 s u b i n t e r v a l s is

where

N = 2k
1 X. =
1

f . = (xi) a

i(b

a)lN

These t r a p e z o i d a l - r u l e

answers a r e then used i n t h e i t e r a t j v e formula

INTX The r e s u l t s T m,n may be a r r a n g e d i n a t r i a n g u l a r m a t r i x of t h e form

where t h e e l e m e n t s i n t h e f i r s t column. r e s u l t s f o r 2k s u b i n t e r v a l s .

represent the trapezoidal rule TOk' r e s u l t s , and t h e e l e m e n t s i n t h e d i a g o n a l , TkO, a r e t h e Romberg i n t e g r a t i o n

Convergence t o i n c r e a s i n g l y more a c c u r a t e answers t a k e s p l a c e down t h e f i r s t column and t h e d i a g o n a l , as w e l l a s towards t h e r i g h t a l o n g t h e rows. The row convergence g e n e r a l l y p r o v i d e s a more r e a l i s t i c i n d i c a t i o n of e r r o r magnitude t h a n two s u c c e s s i v e t r a p e z o i d a l - r u l e o r Romberg a n s w e r s .

T h i s convergence a l o n g t h e rows i s used t o d e t e r m i n e t h e i n t e r v a l w i d t h i n t h e v a r i a b l e i n t e r v a l - w i d t h scheme. The complete i n t e g r a t i o n i n t e r v a l i s

f i r s t d i v i d e d i n t o a minimum number of s u b i n t e r v a l s ( p r e s e n t l y s e t t o 1 ) and a r e computed on t h e f i r s t s u b i n t e r v a l . The r e l a t i v e 10 d i f f e r e n c e o f TO1 and T10 i s t h e n computed, and i f l e s s t h a n t h e e r r o r T10 is a c c e p t e d a s t h e i n t e g r a l o v e r t h a t i n t e r v a l , and i n t e criterion, R x ' g r a t i o n proceeds t o t h e next i n t e r v a l . I f t h e d i f f e r e n c e of T and T is 01 10 t o o g r e a t , TO2, Tll and TZ0 a r e computed. The r e l a t i v e d i f f e r e n c e of T and and T

1 1

TZ0 i s t h e n computed, and i f l e s s t h a n Rx, T20 i s a c c e p t e d a s t h e i n t e g r a l over t h e s u b i n t e r v a l . and T i s t o o g r e a t , t h e sub1 1 20 i n t e r v a l i s d i v i d e d i n h a l f and t h e p r o c e s s r e p e a t e d s t a r t i n g w i t h T f o r the 00 l e f t hand, new s u b i n t e r v a l . The s u b i n t e r v a l i s r e p e a t e d l y h a l v e d u n t i l conX

I f t h e d i f f e r e n c e of T

vergence t o l e s s than R

is found.

The p r o c e s s i s r e p e a t e d f o r s u c c e s s i v e

s u b i n t e r v a l s u n t i l t h e r i g h t - h a n d s i d e of t h e i n t e g r a t i o n i n t e r v a l i s r e a c h e d . When convergence h a s been o b t a i n e d w i t h a g i v e n s u b i n t e r v a l s i z e f o r a few times, t h e r o u t i n e attempts doubling the s u b i n t e r v a l s i z e t o maintain t h e l a r g e s t s u b i n t e r v a l s i z e t h a t w i l l give the required accuracy. fewer p u i n t s where t h e f u n c t i o n is smoothly v a r y i n g . S i n c e t h e f u n c t i o n t o be i n t e g r a t e d i s complex, t h e convergence of b o t h r e a l and imaginary p a r t s i s t r s t e d and b o t h must be l e s s t h a n R s u b i n t e r v a l s i z e s a r e used f o r r e a l and imaginary p a r t s .
X

Thus, t h e

r o u t i n e w i l l u s e many p o i n t s i n a r a p i d l y changing r e g i o n o f a f u n c t i o n and

The same

INTX When t h e I i e l d oE a segment i s b e i n g computed a t t h e s e g m e n t ' s own c e n t c r , t h e l e n g t h r becomes

w h e r e b is t h e w i r e r a d i u s .

For s m a l l v a l u e s of b , t h e r e a l p a r t of t h e

i n t e g r a n d i s s h a r p l y peaked a n d , h e n c e , d i f f i c u l t t o i n t e g r a t e n u m e r i c a l l y . Hence, t h e i n t c g r a l is d i v i d e d i n t o t h e components

6' =

kA/2

exp(- j k r ) kr

- 1

d(kz)

G'

must b e computed n u m e r i c a l l y ; however, t h e i n t e g r a n d i s no l o n g e r p e a k e d . which c o n t a i n s t h e s h a r p p e a k , c a n b e computed a s

G",

C"

= 2 log

(-+

A)
t h e i n t e g r a l of G' is

To F u r t h e r r e d u c e i n t e g r a t i o n t i m e Eor t h e s e l f t e r m , computed from -kA/2 SYMBOL DICTIONARY

t o 0 , and t h e r e s u l t d o u b l e d t o o b t a i n G ' .

ABS

= external routine

(absolute value)

ALOG = e x t e r n a l r o u t i n e ( n a t u r a l l o g )

B
DZ

= wire radius,

b/X

= s u b i n t e r v a l s i z e on which T

00' TOl.

... a r e

computed

DZOT = 0 . 5 DZ EL1 EL2 EP F N M


= -kA/2 = kA/2 = t o l e r a n c e For e n d i n g t h e i n t e g r a t i o n i n t e r v a l
=

r e a l number e q u i v a l e n t of NM

FNS
GF
GlI

= r e a l number e q u i v a l e n t oE N S

= external routine (integrand)


= i m a g i n a r y p a r t of = r e a l p a r t of

GlR

INTX C2I G2R G31 G3R G41 G4R G51 G5R imaginary p a r t of f 2 i m a g i n a r y p a r t of E 3 imaginary p a r t of f 4 r e a l p a r t of E

= = =

2 3

= real part of f
=

= real p a r t of f

= imaginary p a r t of f = real p a r t o f f

IJ

= i n d i c a t i o n o f s e l f t e r m i n t e g r a t i o n when e q u a l t o z e r o = minimum a l l o w e d s u b i n t e r v a l s i z e i s a / N M = p r e s e n t s u b i n t e r v a l s i z e i s kA/NS = c o u n t e r t o c o n t r o l i n c r e a s i n g of s u b i n t e r v a l s i z e


=

NM
NS N T NTS
NX

l a r g e r v a l u e s r e t a r d i n c r e a s i n g oE s u b i n t e r v a l s i z e

= maximum a l l o w e d s u b i n t e r v a l s i z e i s kA/NX = R
=

R X S SGI SGR

A/A

= imaginary p a r t of G = real p a r t of G

SQRT = e x t e r n a l r o u t i n e ( s q u a r e r o o t ) TEST = e x t e r n a l r o u t i n e (computes r e l a t i v e c o n v e r g e n c e ) T E l I = r e l a t i v e d i f f e r e n c e of T0 1 and TElR = r e l a t i v e d i f f e r e n c e o f T and 01 TEZI = r e l a t i v e d i f f e r e n c e o f T and 1 1 TEZR = r e l a t i v e d i f f e r e n c e o f T 1 1 and TOO1 = i m a g i n a r y p a r t T 00 TOOR = r e a l p a r t Too TO11 = i m a g i n a r y p a r t T 01 TOlR = r e a l p a r t T 01 TO21 = i m a g i n a r y p a r t T 02 TOZR = r e a l p a r t To2 TlOI = i m a g i n a r y p a r t T TlOR = r e a l p a r t o f TI,, T l l I = imaginary p a r t of T TlIR 10
T

10 T 10 T 20 T 20

f o r imaginary p a r t for real part f o r imaginary p a r t for real part

11

r e a l p a r t of T

1 1

T 2 0 I = i m a g i n a r y p a r t of T 20 T20K = r e a l p o r t o f T 20

INTX

= =

integration variable at left-hand side of subinterval kA/2

ZE
ZP
CONSTANTS

LEND = kA/2
=

- E l ' ;

EP

tolerance term

integration variable

65536

216

limit o f minimum subinterval size (NM)


X

l.E-4 = error criterion, R

INTX
IN 2 I N T X PERFORMS NUMERICAL I N T E G R A T I O N OF F X P ( J K R ) / R BY THE METHOD OF I N 3 V A R I A B L E I N T E R V A L W I D T H ROMBERG I N T L G R A T I O N . THE I N T E G R A N D VALUE I N 4 I S S U P P L I L D BY SUBROUTINL GF IN 5 DATA N X . N M . N T S . R X / 1 . 6 5 5 3 6 . 4 . 1 . E - 4 / Z=ELI ZE=CLZ I F ( I J . E O . 0 ) ZE=O. S=ZL-Z FNM=NM EP-S/( 1 0 . *FNM) ZEND=ZE-EP SGR=O. SGI=O. NS=NX NT=O C A L L GF ( Z . G I R . G I I ) FNS=NS OZ=S/FNS ZP=Z+DZ I F (ZP-ZE) 3 , 3 . 2 OZ=ZE-Z I F (ABS(DZ)-EP) 17.17.3 DZOT=OZ..5 ZP=ZtozOT C A L L GF ( Z P . G 3 R . G 3 I ) ZP=Z+OZ

TEST CONVERGENCE OF 3 P O I N T ROMBERG R E S U L T . C A L L TEST (TOlR.TIOR.TE1R.TOII,T1OIITE(I.O.) I F (TEII-RX) 5.5.6 I F (TEIR-RX) 8.8.6 ZP=Z+DZ.O.25 C A L L GF ( Z P . G 2 R . G 2 I ) ZP=Z+oZ-0.75 C A L L GF ( Z P . G 4 R . G 4 I )

TO2R=(TOlR+DZOT'(G2R+G4R):'0.5 T~ZI=(T~II+~Z~T~(G~~+C~I))~O.~ TllR=(4.O'TO2R-TOlR)/J.O TIII=(~.O~TOZI-~OII)/~.O T2DR=(l6.0'TllR-T10R)/15.0 T20I-~l6.O*TllI-TlOI)/15.0


TEST CONVERGENCE OF 5 P O I N T ROMBERG R E S U L T . CALL rEST ( T l l R . 1 2 0 R . T L Z R . ~ I 1 I , T 2 O I , T E 2 I . O . ) I F (TE2I--KX) 7 . 7 . 1 4 I F (TE2R-RX) 9.9.14 SGR-SCRcTIOR SGI=SGItTIOI NT=NT+Z GO TO 1 0 SGR=SGR+TZOR SCI=SGI+TZOI

I NTX
NT=NT+ I Z=Z+D? TF (Z-ZLND) 1 1 . 1 7 . 1 7 G I R=65H GI I=G5I I F (NT-NTS) 1.12.12 I F (NS-NX) 1.1.13 DOUBLE STEP S I Z E NS=NS/2 NT=I GO TO I NT=O I F (NS-NM) 16.15.15 PRINT 2 0 . 1 GO TO 9 HALVE STEP S I Z E NS=NSa2 FNS=NS 07-S/FNS OZOT=OZ.O 5 G5H=G3R G5I- G J I G3R=G2R G3I=GZI GO TO 4 CONTINUE I F ( I J ) 19.18.19 ADD C O N T R I B U T I O N OF NEAR S I N G U L A R I T Y FOR D I A G O N A L TERM SGR22 ' ( S G R + A L O C ( ( S O R T ( B * B + S * S ) + S ) / B ) ) SGI=Z 'SGI CON1 I N U E RETURN FORMAT ( 2 4 H STEP S I Z E L I M I T E D AT Z = . F 1 0 . 5 ) END

ISEGNO

ISEGNO I'URPOSE To d e t e r m i n e t h e segment number o f t h e m


th

s e g m e n t o r d e r e d by i n c r e a s i n g

s e g m e n t numbers i n t h e s e t o f s e g m e n t s w i t h t a g numbers e q u a l t o t h e g i v e n t a g number. METHOD S e a r c h s e g m e n t s c o n s e c u t i v e l y a n d c h e c k t h e i r t a g numbers a g a i n s t a g i v e n tag. With a g i v e n t a g o f z e r o , segment number m i s r e t u r n e d .

SYMBOL DICTIONARY
I
ICNT
= DO l o o p i n d e x = counter

ITAGl = i n p u t t a g number ( g i v e n t a g ) M
= i n p u t q u a n t i t y s p e c i f y i n g t h e p o s i t i o n i n t h e set of segments

with t h e given tag

CODE LISTING
FUNCTION ISEGNO (1TAGI.MX) I S E G N O RETURNS THE SEGMENT NUMBER OF THE MTH SEGMENT H A V I N G THE TAG NUMBER I T A G I . I F I T A G I = O SEGMENT NUMBER M I S RETURNED. COMMON /DATA/ LD.N1.N2.N.NP.Ml.M2,MMMPPX(SOO),Y(3OO),Z(3OO),SI(3OO l).B1(300).ALP(300).sET(300),IC0N1(300).1C0N2(300),1TAG(300),1C0NX( 2300).WLAM,IPSYM I F (MX.GT.0) GO TO 1 PRINT 6 STOP ICNT=O I F (ITAGI.NE.O) GO TO 2 ISEGNO=MX RETURN I F (N.LT.l) GO TO 4 DO 3 1 = 1 . N I S I S I S I S I S I S I S I S I S I S I S I S S I I S I S I S I S

I I I rORMAT ( 4 X . 9 1 H C H E C K DATA. PARAMETER S P E C I F Y I N G SEGMENT P O S I T I O N I N I 1 A GROUP O f EQUAL TAGS MUST NOT BE ZERO) I SEGMENT HAS AN I T A G OF . I 5 ) I FORMAT ( / / / . l O X , 2 6 H N O END I

I F (1CNT.EO.MX) CONTINUE PRINT 7. I T A G I STOP ISEGNO=I RETIJRN

GO TO 5

S S S S S S S

LFACTR LFACTR PURPOSE


To perrorm t h c G a u s s - D o o l i t t l e

f a c t o r i z a t i o n c a l c u l a t i o n s on two b l o c k s

or t h e matrix i n core storage.

T h i s r o u t i n e i n c o n j u n c t i o r ~w i t h FACIO f a c t o r s

a m a t r i x t h a t i s t o o l a r g e f o r c o r e s t o r a g e i n t o an upper and lower t r i a n g u l a r m a t r i x using t h e Gauss-Doolittle technique. The f a c t o r e d m a t r i x i s used by

LUNSCR and LTSOLV t o d e t e r m i n e t h e s o l u t i o n of t h e t r a n s p o s e d m a t r i x e q u a t i o n T T T xA = B . M E T H O D The b a s i c a l g o r i t h m used i n t h i s r o u t i n e i s p r e s e n t e d by R a l s t o n i n r e f . 1 on pages 411-416. manual.


A b r i e f d i s c u s s i o n is a l s o g i v e n under FACTR i n t h i s

The main d i f f e r e n c e between LFACTR and FACTR i s t h a t LFACTR i s s e t up

t o perform t h e c a l c u l a t i o n s on two b l o c k s of columns of t h e t r a n s p o s e d m a t r i x t h a t reside i n core storage. T h i s s i t u a t i o n a r i s e s when t h e m a t r i x i s t o o

l a r g e t o f i t i n c o r e a t one t i m e ; t h u s , t h e m a t r i x i s d i v i d e d i n t o b l o c k s of columns and s t o r e d on f i l e s . T h i s m a t r i x i s t h e n f a c t o r e d i n t o a lower

t r i a n g u l a r m a t r i x and an upper t r i a n g u l a r m a t r i x by t h e s u b r o u t i n e s FACIO and LFACTR. The f u n c t i o n o f t h e s e two s u b r o u t i n e s i s c l o s e l y t i e d t o g e t h e r :

LFACTR performs t h e mathematical computations i n v o l v e d i n t h e f a c t o r i z a t i o n , w h i l e FACIO c o n t r o l s t h e i n p u t and o u t p u t of m a t r i x b l o c k s i n c o r e s t o r a g e , and, t h u s , c o n t r o l s t h e n e c e s s a r y b l o c k o r d e r i n g i n p u t t o LFACTR. For

c l a r i f i c a t i o n of t h e o r d e r i n g of m a t r i x b l o c k s d u r i n g f a c t o r i z a t i o n , r e f e r t o FACIO. The c o m p u t a t i o n s performed i n LFACTR a r e s l i g h t l y d i f f e r e n t f o r t h r e e matrix block conditions: ( 1 ) b l o c k numbers 1 and 2 ,

(2) adjacent matrix

b l o c k s , and ( 3 ) non-adjacent m a t r i x b l o c k s .

I f t h e b l o c k s a r e numbers 1 and

2 , b o t h b l o c k s a r e f a c t o r e d , and t h e computations proceed e x a c t l y a s i n

FACTR.

The o n l y d i f f e r e n c e between LFACTR and FACTR h e r e i s t h a t t h e two

b l o c k s do n o t form a s q u a r e m a t r i x , and t h e row and column i n d i c e s i n LFACTR have n o t been i n t e r c h a n g e d a s i n FACTR.


1 and 2 a r e compl.etely f a c t o r e d .
A t t h e end o f t h i s s t a g e , b o t h b l o c k s

For c a s e 2 , where t h e b l o c k s a r e a d j a c e n t

i n t h e m a t r i x and o t h e r t h a n 1 and 2 , t h e f i r s t b l o c k i s assumed f a c t o r e d and


is used t o complete t h e f a c t o r i z a t i o n of t h e p a r t i a l l y f a c t o r e d second b l o c k .

The c o m p u t a t i o n s s t a r t w i t h t h e f i r s t column o f t h e second b l o c k and proceed a s i n FACTR ( w i t h t h e e x c e p t i o n s noted a b o v e ) . If t h e blocks a r e not a d j a c e n t ( c a s e 3 ) , t h e f i r s t b l o c k i s assumed f a c t o r e d and i s used t o p a r t i a l l y

f a c t o r t h e s e c o n d bl.ock. second block.

Col~~putation sst a r t w i t h t h e F i r s t column of t h e

F a c t o r i z a t i o n c a n n o t b e c o m p l e t e d , s i n c e v a l u e s from t h e

i n t e r v e n i n g columns a r e n e c e s s a r y . CODING LF2O

- LF39
-

I n i t i a l i z a t i o n of loop parameters f o r t h e v a r i o u s m a t r i x block conditions.

~F40 LF44 LF49

LF99 Loop o v e r columns t o be f a c t o r e d o r p a r t i a l l y f a c t o r e d . LF46 Write column of A i n s c r a t c h v e c t o r D . LF62 C o m p u t a t i o n s f o r u

ir

( s e e FACTR), where p o s i t i o n i n g f o r The r a n g e o f i i s d e t e r m i n e d

s i z e is t a k e n i n t o a c c o u n t . by t h e m a t r i x b l o c k s u s e d . LF69

LF71 F o r c a s e 3 , t h e p a r t i a l l y f a c t o r e d column i s s t o r e d i n A ,
and a jump t o LFIOO i s made. LF87 F o r c a s e s 1 and 2 , t h e maximum v a l u e i n t h e column i s found For p o s i t i o n i n g .

LF73

LF92

LW4 F o r c a s e s 1 and 2 ,

'ir

( s e e FACTR) i s c a l c u l a t e d ; l i m i t s on

i a r e dependent on b l o c k s .

SYMBOL DICTIONARY

a r r a y which c o n t a i n s t h e two b l o c k s of columns o f t h e t r a n s p o s e d m a t r i x i n some s t a t e o f f a c t o r i z a t i o n

C O N J G = e x t e r n a l r o u t i n e ( c o n j u g a t e of complex numbers)

s c r a t c h v e c t o r , temporary s t o r a g e o f o n e column

D M A X

= maximum v a l u e i n column
= =

ELMAG
I
IFLG IP

intermediate variable D O loop index a r r a y containing positioning information index f i r s t b l o c k number, i n p u t s e c o n d b l o c k number, i n p u t D O loop index

= small pivot value f l a g


= = = = = =

IXJ

1x1
1x2

J
JPl
J1

J ~ J
J2P1
=

= D O loop l i m i t s

52

LFACTK

121'2 K L1

.I2

= 00

loop index

l o g i c a l v a r i a b l e s For t e s t i n g

NCOL NROW PJ
PR

= = =

number o f columns number of rows intermediate variables

1 1

R
REAL

= DO

l o o p index

e x t e r n a l r o u t i n e ( r e a l p a r t o f a complex number) l o o p l i m i t s , r e l a t i v e column number l i m i t s f o r

= DO

R2

~~~lculations

I n programs u s i n g double p r e c i s i o n accumulation i n t h e m a t r i x s o l u t i o n , t h e f o l l o w i n g d o u b l e p r e c i s i o n v a r i a b l e s a r e u s e d i n LFACTR.

"I1 DAIZ

DAR2
I)R[

r e a l and i m a g i n a r y p a r t s o f a number f o r t e m p o r a r y s t o r a g e

r e ; l l and i m a g i n a r y v e c t o r s r e p l a c i n g t h e complex v e c t o r D i n s i n g l e p r e c i s i o n programs

DI
CONSTANT

1.E-10 = s m a l l v a l u e t e s t

LFACTR
1 2 C 3 C 4 C 5 C 6 C 7 C 8 C 9 10 11 12 13 14 I 5 16 17 C 18 C 19 C 20 21 22 23 24 25 1 26 27 28 29 30 2 31 32 33 34 35 3 36 37 4 38 5 39 40 C 41 C 42 C 43 44 45 6 46 C 47 C 48 C 49 50 51 S U B R O U T I N E LFACTR ( A . N R W . I X I . I X 2 . I P ) LF 1 LF I L F A C I R PERFORMS GAUSS-OOOLITTLE M A N I P U L A T I O N S ON THE TWO BLOCKS OF L F THE TRANSPOSED M A T R I X I N CORE STORAGE. THE GAUSS-OOOLITTLE LF A L G O R I T t i M I S PRESENTED ON PAGES 4 1 1 - 4 1 6 OF A . RALSTON A FIRST LF COURSE I N N U M E R I C A L A N A L Y S I S . COMMENTS BELOW REFER TO COMMENTS I N L F RALSTONS T E X T . LF

? 3
4
5

--

6 7

COMPLEX A . D . A J R INTEGER R . R l . R Z . P J . P R LOGICAL L l . L Z . L 3 COMMON /MATPAR/ ICASE.NBLOKS.NPBLK, 1CASX.NBBX.NPBX.NLBX.NBEL.NPBL.NLBL COMMON /SCRATM/ D(600) DIMENSION A(NROW.l). IP(NR0W) IFLG=O INITIALIZE RI,R2.JI.J2 LI=IXI . f a . ! .AND.IXZ.EO.Z L2=(IX2-1).EO.IXI L3=IX2.EO.NBLSYM I F ( L 1 ) GO TO 1 GO TO 2 R1=1 R2=2*NPSYM J1=l J2=-1 GO TO 5 Rl=NPSYM+I R2=2*NPSYM J I = ( I X l - 1 )*NPSYM+I I F ( L Z ) GO TO 3 GO TO 4 JZ=JI+NPSYM-2 GO TO 5 JL=Jl+NPSYM-1 I F ( L 3 ) RZ=NPSYM+NLSYM DO 1 6 R = R I . R 2 STEP 1 DO 6 K = J I .NROW D(K)=A(K.R) CONTINUE STEPS 2 AN0 3 I F (Ll.DR.L2) J2=J2+1 I F (JI.GT.JZ) GO TO 9 IXJ=O DO 8 J = J I . J Z IXJ=IXJ+l PJ=IP(J) AJR=O(PJ) A(J.R)=AJP D(PJ)=D(J) JPl=J+l DO 7 I = J P I .NROW D(I)=D(I)-A(I.IXJ)*AJR CONTINUE CONTINUE CONTINUE

LFACTR
STEP 4 LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

. .
CONTINUE

GO TO 1 6 OMAX=REAL(D(JZPl)*CONJG(D(J2Pl))) I P ( J 2 P l )=JZPl J2P2=J2+2 I F (J2PZ.GT.NROW) GO TO 1 3 DO 1 2 I=JZPZ,NROW

ELMAG=REAL(D(I)'CoNJG(D(I)))
I F (ELMAG.LT.DMAX) GO TO 1 2 DMAX=ELMAG IP(JZPl)=I CONTINUE CONTINUE I F (DMAX. L T . 1 . E-10) I F L G = l PR=IP( J Z P l ) A(JZPI.R)=D(PR) O(PR)=D( J Z P l )
STEP 5 I F (JZP2.GT.NROW) GO TO 1 5 AJR=l./A(JZPl.R) DO 1 4 I=JPPZ.NROW A(I.R)=O(I)*AJR CONTINUE CONTINUE I F ( I F L G . E P . 0 ) GO TO 1 6 P R I N T 1 7 . JZ.DMAX IFLG=O CONTINUE RETURN FORMAT ( 1 H END

97
98 99 100 101 102 103 104 105-

.6HPIVOT(.I3.2H)=.E16.8)

L O A D LOAD PURPOSE To compute t h e i m p e d a n c e s a t a g i v e n f r e q u e n c y f o r t h e l o a d i n g s p e c i f i e d by L D cards. METHOD The v a l u e o f X Z I A , w h e r e Z is t h e t o t a l impedance o n a s e g m e n t and A i s t h e l e n g t h oE t h e s e g m e n t , is computed Eor e a c h l o a d e d s e g m e n t a n d s t o r e d i n t h e a r r a y ZARRAY. The p r o p e r impedance f o r m u l a i s c h o s e n by t h e v a l u e o f t h e Tllese c o m p u t a t i o n s a r e p e r f o r m e d from t h e s e q u e n c e and t h e f o r m u l a s a r e :

i n p u t q u a n t i t y LDTYP.

LO74 t o LO96 o f t h e program,

LDTYP = 0

( s e r i e s R, L , and C):

2' =

R - =-+

a A

j2nc

(3

1
j2.c

2 (f) (f)

w h e r e c i s t h e s p e e d of l i g h t and R, L, and C a r e i n p u t .

LDTYP = 1 ( p a r a l l e l R , L, a n d C ; R, L, and C i n p u t ) :

Z'

(X)R+~~TICE

j2.c

(f)' (f)
are input)

LDTYP = 2 a n d 3 (same as a b o v e , b u t

RIA, LIA, C I A

LDTYP = 4 ( r e s i s t a n c e a n d r e a c t a n c e i n p u t ) :
2'

resistance

+
A A

j reactance

LDTYP = 5 ( c a l l a n o t h e r s u b r o u t i n e f o r w i r e c o n d u c t i v i t y c a l c u l a t i o n )

-222-

LOAD

AUS AlMAG CMPLX

= e x t e r n a l r o u t i n e ( a b s o l u t e v a l u e o f a r e a l number)
=

e x t e r n a l r o u t i n e ( i m a g i n a r y p a r t o f a complex number)

= e x t e r n a l r o u t i n e (Corms a complex number) = check [lag

ICHK
lSTEP

i n diagnosing data e r r o r s

= loading card subscript = f l a g cllecking f o r m u l t i p l y loaded segments


= LDTYP f 1 = t a g number,

LWARN
JUMP

LDTAG

input quantity

LDTAGF = i n p u t q u a n t i t y LDTAGS = LDTAG(1STEP) LDTAGT = i n p u t q u a n t i t y T.DTYP NLOAD PRNT REAL TPCJ


= input quantity specifying loading type = number o f

input loading data cards ( p r i n t s t h e impedance d a t a i n a t a b l e ) a complex number)

= external routine

= e x t e r n a l r o u t i n e ( t a k e s t h e r e a l p a r t of

= jZnc,

where c is t h e s p e e d of l i g h t

ZARRAY = a r r a y c o n t a i n i n g XZIA f o r e a c h s e g m e n t , d i m e n s i o n e d t o t h e maxilnum number o f s e g m e n t s ZINT


= external routine

( c a l c u l a t e s t h e i n t e r n a l impedance o f a f i n i t e l y

:::1
ZLR ZT CONSTANTS l.E-20

conducting wire)
= input quantities,

t h e d e f i n i t i o n s a r e a f u n c t i o n o f t h e t y p e of For t h e c a s e o f s e r i e s RLC (LDTYP = 0 ) : and

loading specified.

ZLC = c a p a c i t a n c e ( f a r a d s ) , Z L I = i n d u c t a n c e ( h e n r y s ) ,
ZLR = r e s i s t a n c e (ohms).
= %I

For t h e r e m a i n i n g c a s e s , s e e P a r t 111.

= XZfA f o r o n e segment; however, v a r i a b l e name i s u s e d

d u r i n g t h e c a l c u l a t i o n of t h i s q u a n t i t y

i l o a t i n g point zero t e s t

( 0 , 1.88365371E+9) = j 2 1 r c , where c i s t h e v e l o c i t y of l i g h t

LOAD
S U B R O U T I N E LOAD

(LOTYP.LDTAG.LDTAGF.LDTAGT,ZLR,ZLI.ZLC)

LO LO LO LO

2
3 4

LOAD C A L C U L A T E S THE IMPEDANCE OF S P E C I F I E D SEGMENTS FOR V A R I O U S TYPES OF L O A D I N G

LO 5 COMPLEX Z A R R A Y . Z T , T P C J . Z I N T LO 6 COMMON /DATA/ LD.Nl.N2.N.NP.Ml.M2,MMMPPX(300),Y(3OO),Z(3~~),SI(3OO L O 7 ~ ) . B I ( ~ ~ O ) . A L P ( ~ O O ) . ~ E T ( ~ ~ ~ ) , I C O N ~ ( ~ O O ) , I C O N ~ ( ~ O O ) , I T A G ( ~ O O )L ,O ICON 8X ( 2300),WLAM,IPSYM LO 9 COMMON /ZLOAD/ ZARRAY(3OO).NLOAD.NLODF LO 10

E~UIVALENCE

(TPCJ;TPCJX)

DATA T P C J X / O . , I , 8 8 3 6 9 8 9 5 5 E + 9 / PRINT HEADING PRINT 2 5 I N I T I A L I Z E D ARRAY. INFORMATION. DO 1 I = N 2 . N ZARRAY(I)=(O..O.) IWARN=O C Y C L E OVER L O A D I N G CARDS ISTEP=O ISTEP=ISTEP+l F I (ISTEP.LE.NLOAO) GO TO 5 I F (IWARN.EO.1) PRINT 2 6 I F (N1+2'Ml.GT.O) GO TO 4 NOP=N/NP I F ( N O P . E O . 1 ) GO TO 4 DO 3 I=t .NP ZT=ZARRAY(I) Ll=I DO 3 L 2 = 2 , N O P Ll=LI+NP Z A R R A Y ( L 1 )=ZT . RETURN I F (LOTYP(ISTEP).LE.5) GO TO 6 PRINT 2 7 . .LOTYP(ISTEP) STOP U S E 0 FOR TEMPORARY STORAGE OF L O A D I N G
-

LO LO LO LO LO LO LO

19 20 21 22 23 24 25

SEARCH SEGMENTS FOR PROPER I T A G S

PRINT 29 STOP DO 1 7 I = L I . L 2 F I ( L O T A G S . E Q . O ) GO TO a I F (LOTAGS.NE.ITAG(1)) GO TO 1 7

LOAD

C A L C U L A T I O N OF LAMOA'IMPEO. S E C T I O N FOR L O A D I N G TYPE GO TO ( 1 0 . 1 1 . 1 2 . 1 3 . 1 4 . 1 5 ) .

PER U N I T LENGTH.

JUMP TO A P P R O P R I A T E

LO LO L -O LO LO

69 70
7 .1 , 72 73 74 75
76

JUMP

ZT=ZLR(ISTEP)/~I(I)+TPCJ*ZLI(ISTEP)/(SI(I)*WLAM) ZT=ZT+WLAM/(TPCJ'SI(I)*ZLC(ISTEP)) I F (AES(ZLC(ISTEP)).GT.l.E-20)


GO TO 1 6

LO LO

IA
LU

ZT=TPCJ'SI(I)*ZLC(ISTEP)fiLAM I F (ABS(ZLI(ISTEP)).GT.I.E-20) I F (ABS(ZLR(ISTEP)).GT.I.E-20)


ZT=l ./ZT GO TO 1 6

LO ZT=ZT+SI(I)~WLAM/(TPCJ~ZLI(ISTEP)) LO ZT=ZT+SI(I)/ZLR(ISTEP) LO LO LO LO LO LO LO LO LO LO LO LO LO LO LO IWARN= L O LO

,77 78 79 80

ZT=ZLR(I~TEP)*WLAM+TPCJ*ZLI(ISTEP) I F (ABS(ZLC(ISTEP)).GT.I.E-~O) ZT=ZT+I./(TPCJ*SI(I)*SI(I)*ZLC(ISTE


IP)) GO TO 1 6

81 82

83
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

ZT=TPCJ"sI(I)*sI(I)*ZLC(ISTEP) I F (ABS(ZLI(ISTEP)).GT.l.E-20)
I F (ABS(ZLR(ISTEP)).GT.I.E-20) ZT=l ./ZT GO TO 1 6

ZT=ZT+I./(TPCJ*ZLI(ISTEP)) ZT=ZT+I./(ZLR(ISTEP).WLAM)

ZT=CMPLX(ZLR(I~TEP),ZLI(ISTEP))/SI(I)
GO TO 1 6 ZT=ZINT(ZLR(ISTEP)'WLAM.81(1)) I F ((ABS(REAL(ZARRAY(I)))+ABS(AIMAG(ZARRAY(I)))).GT.~.E-~O) II ZARRAY(I)=ZARRAY(I)+~T CONTINUE I F (ICHK.NE.0) GO TO 1 8 P R I N T 2 8 . LDTAGS STOP P R I N T I N G THE SEGMENT L O A D I N G DATA. JUMP TO PROPER P R I N T

GO TO ( 1 9 . 2 0 . 2 1 . 2 2 . 2 3 . 2 4 ) . JUMP C A L L PRNT ( L D T A G S . L D T A G F ( I S T E P ) . L D T A G T ( I S T E P ) , Z L R ( I S T E P , Z L I I S T E P

LO LO LO LO LO LO LO LO LO LO

C A L L PRNT (LDTAGS.LDTAGF(ISTEP).LDTAGT(ISTEP).ZLR(ISTEP),ZLI(ISTEP I).ZLC(ISTEP).O.,O..0..8HPARALLEL.8)

LO LO GO TO 2 LO CALL PRNT (LOTAGS.LOTAGF(ISTEP).LDTAG~(ISTEP),ZLR(ISTEP),ZLI(ISTEP LO l).ZLC(ISTEP).O..0..0..18HSERIE~ (PER M E T E R ) . l 8 ) LO GO TO 2 LO LO C A L L PRNT ( L D T A G S . L O T A G F ( I S T E P ) . L D T A G T ( I S T E P ) . Z L R ( I S T E P . Z L I I S T E P

108 109 110 111 112 113 114

C A L L PRNT (LDTAGS.LDTAGF(ISTEP).LDTAGT(ISTEP),O..O..O..ZLR(ISTEP), IZLI(ISTEP).O..I5HFIXEO IMPEOANCE.15) GO TO 2 C A L L PRNT (LDTAGS.LOTAGF(ISTEP).LDTAGT(ISTEP),O..O..O..O..O..ZLR(I ISTEP).6H WIRE.6) GO TO 2 FORMAT (//.7X.8HLOCATION.IOX.IOHRESISTANCEE3XX1OHINOUCTANCE,2X,llH lCAPACITANCE,7X,l6HIMPEOANCE (OHMS).SX.12HCONDUCTIVITY,4XX4HTYPE./. 24X.4HITAG.lOH FROM T H R U . I O X . 4 H O H M S . 8 X , 6 H H E N R Y S . 7 X . 6 H F A R A D S , 8 X , 4 H R E

3AL.6X.9HIMAGINARY.4X,IOHMHOS/METER)

LO LO LO LO LO LO LO LO LO LO LO

117 118 119 120 121 122 123 124 125 126 127

128 179 130 131 132 133 134 135 136

26 27 28 29

FORMAT ( / . I O X . 7 4 H N O T E . SOME OF THE ABOVE SEGMENTS HAVE BEEN 1 TWICE - IMPEDANCES ADDED) FORMAT (. /.. l O X . 4 6 H I M P R O P E R L O b D TYPE CHOOSEN. REQUESTED TYPE 1) FORMAT (, / , l O X . 5 O H L O A D I N G DATA CARD ERROR. NO SEGMENT H A S AN 1 .I5) FORMAT ( 6 3 H ERROR - L O A D I N G MAY NOT BE ADDED TO SFGMENTS I N 1 SECTION) EN0

LOADED LO 1 2 8 I S .I3 ITAG

N.G.T.

LO LO LO LO LO LO LO LO

129
130 131 132 133 134
~

135
136-

ZTSOLV

LTSOLV PUHLJCISIS T o s o l v e t h e m a t r i x e q u a t i o n XR L O =, ' B w h e r e R d e n o t e s a row v e c t o r

and L and U are t h e lower and upper t r i a n g u l a r m a t r i c e s s t o r e d a s b l o c k s o n files.

METHOD The L and U t r i a n g u l a r m a t r i c e s are w r i t t e n i n a s q u a r e a r r a y , where t h e

1 ' s o n t h e d i a g o n a l o f t h e L m a t r i x are s u p p r e s s e d .

T h e a r r a y i s s t o r e d by

b l o c k s o f columns i n ascending o r d e r o n f i l e IFLl and descending o r d e r o n f i l e IFL2. The s o l u t i o n procedure is a s follows. F i r s t solve the equation

then

s i n c e X LU = B

The s o l u t i o n s o f e q u a t i o n s ( 1 ) and ( 2 ) a r e In particular for

straightforward, s i n c e both matrices a r e triangular. equation ( I),

R y. =
J

u.. JJ

(by

yf u i j )

j = 1,

..., n

and s i m i l a r l y f o r e q u a t i o n (2). S e v e r a l right-hand s i d e v e c t o r s may b e s t o r e d i n t h e t w o d i m e n s i o n a l

a r r a y I%.T h e f o r w a r d a n d b a c k w a r d s u b s t i t u ~ i o ni s t h e n d o n e o n e a c h v e c t o r i n t h e l o o p s t r o m LT 2 3 t o LT 34 a n d LT 4 3 t o LT 56. T h i s c a n b e much f a s t e r

t h a n c a l l i n g LTSOLV f o r e a c h v e c t o r s i n c e t h e f i l e s I F L l a u d I F L 2 a r e r e a d o n l y once. T l l i s f e a t u r e i s u s e d i n c o m p u t i n g A - ~ B f o r t h e NGF s o l u t i o n .


L t

i s n o t used w i t h t h e m u l t i p l e e x c i t a t i o n s f o r a r e c e i v i n g p a t t e r n o r t o
c o m p u t e t h e d r i v i n g p o i n t i n t e r a c t i o n m a t r i x i n NETWK b u t c o u l d r e d u c e t h e out-01-core solution t i m e i n chese cases.

LTSOLV Kow i n t e r c h a n g e s were used t o p o s i t i o n e l e m e n t s f o r s i z e i n f a c t o r i n g the transposed s t r u c t u r e matrix; therefore, t h e elements i n t h e s o l u t i o n v e c t o r 'X a r e not i n the original locations. u s i n g t h e I X a r r a y ( f i l l e d by The i n t e g e r

LUNSCR), t h e v e c t o r c a n be p u t back i n t o t h e o r i g i n a l o r d e r .

c o n t a i n e d i n I X ( J ) i s t h e i n d e x o f t h e o r i g i n a l l o c a t i o n o f t h e p a r a m e t e r now i n the jth location. right-hand The s o l u t i o n v e c t o r i s o v e r w r i t t e n o n t h e i n p u t


K

s i d e vector B

SYMBOL DICTIONAKY

A
I)

= a r r a y f o r matrix blocks K = B , r i g h t - h a n d s i d e and s o l u t i o n = number o f words i n a b l o c k = f i l e w i t h b l o c k s i n normal o r d e r = f i l e with blocks i n reversed o r d e r = s o l u t i o n unscramble v e c t o r = b l o c k number = row i n d e x = i n i t i a l value f o r J = number o f columns i n a b l o c k = column i n d e x = t o t a l number o f e q u a t i o n s = number o f r i g h t - h a n d

I2
IFLl IFLZ

IX
IXBLKl

J
JST

K2 KP
NEQ

NRH
N R O W S U M

side vectors i n B

= row d i m e n s i o n o f A (number o f e q u a t i o n s i : ~ a symmetric s e c t i o n ) = summation r e s u l t

LTSOLV
SUBROUTINE LTSOLV

(A.NROW.IX.B.NEQ.NRH.IFLI.IFL2)

LT

LT L T S O L V SOLVES THE M A T R I X EO. Y ( R ) * L U ( T ) = B ( R ) WHERE ( R ) DENOTES ROW L T VECTOR AND L U ( T ) DENOTES THE L U DECOMPOSITION OF THE TRANSPOSE OF LT THE O R I G I N A L C O E F F I C I E N T M A T R I X . THE L U ( T ) D E C O M P O S I T I O N I S LT STORED ON TAPE 5 I N BLOCKS I N ASCENDING ORDER AND ON F I L E 3 I N LT BLOCKS OF DESCENDING ORDER. LT LT COMPLEX A . B . Y . S U M LT COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST,NBLSYM,NPSYM,NL~YM.IAT,I LT ICASX.NBBX.NPBX.NLBX.NBBL,NPBL,NLBL LT Y(600) COMMON /SCRATM/ LT DIMENSION A(NROW.NRW). B ( N E O . N R H ) . IX(NEO) LT LT FORWARD S U B S T I T U T I O N LT LT 12=2*NPSYM*NROW LT DO 4 I X B L K I = I .NBLSYM LT CALL BLCKIN ( A . I F L l . I . 1 2 . 1 . 1 2 1 ) LT K2=NPSYM LT F I (IXBLKI.EQ.NBLSYM) KZ=NLSYM LT

2 3
4

5
6 7

8 9
10 11 12 13 I 4 15 16

17 18 19 20 21

JMI =J J=J+I suM=(D..o.) I F (JMI.LT.l) GO TO 2 DO 1 1 = 1 JM1 SUM=SUM+A(I.K)'B(I.IC)

B(J.Ic)=(B(J.Ic)-SUM)/A(J.K)
CONTINUE CONTINUE BACKWARD S U B S T I T U T I O N JST=NROW+l DO 8 I X B L K l = I .NBLSYM C A L L BLCKIN (A.IFLP.I.I~.~.I~~) K2=NPSYM I F ( I X B L K I . E O . 1 ) KZ=NLSYM DO 7 I C = l . N R H KP=K2+1 J=JST DO 6 K=1 . K 2

KP=KP-1
JPl=J J=J-I SUM=(O..O.) I F ( N R O W . L T . J P 1 ) GO TO 6 DO 5 I = J P I .NROW SUM=SUM+A(I.KP)*B(I.IC) B(J.IC)=B(J.IC)-SUM CONTINUE CONTINUE JST=JST-K2 UNSCRAMBLE S O L U T I O N

65 66 10 67 68

DO 10

I=: . NROW

B(I.IC)=y(I)
RETURN CND

LUNSCR 1,UNSCR . PIIRPOSI? To u n s c r a m b l e t h e Lower t r i a n g u l a r m a t r i x o f t h e F a c t o r e d o u t - o f - c o r e m a t r i x a n d t o d e t e r m i n e t h e a p p r o p r i a t e o r d e r i n g o f t h e unknowns. The

u n s c r a m b l e d f a c t o r e d m a t r i x i s w r i t t e n i n b l o c k s on f i l e IU3 i n a s c e n d i n g o r d e r and on f i l e IU4 i n d e s c e n d i n g o r d e r . METHOD D u r i n g f a c t o r i z a t i o n by LFACTR, t h e e l e m e n t s i n t h e l o w e r t r i a n g u l a r m a t r i x L w e r e n o t e x p l i c i t l y a r r a n g e d i n a c c o r d a n c e w i t h t h e row i n t e r c h a n g e s used i n p o s i t i o n i n g f o r s i z e during t h e c a l c u l a t i o n s . Specifically, a s the

f a c t o r i z a t i o n p r o c e e d s by columns from l e f t t o r i g h t i n t h e m a t r i x , row r e a r r a n g e m e n t s i n t h e r t h column a r e n o t e x p l i c i t l y p e r f o r m e d i n t h e l e f t

1 columns; r a t h e r , p o s i t i o n i n g i n f o r m a t i o n i s s t o r e d i n t h e IP a r r a y .
c a l c u l a t i o n s , t h e s e rearrangements a r e included during t h e For t h e o u t - o f - c o r e case, rearrangement

For t h e i n - c o r e

f i n a l s o l u t i o n ( s u b r o u t i n e SOLVE).

d u r i n g t h e s o l u t i o n ( s u b r o u t i n e LTSOLV) i s i n c o n v e n i e n t , s i n c e t h e t r a n s p o s e d r t r . s y s t e m x A = B 1s b e i n g s o l v e d , where r s i g n i f i e s a row v e c t o r . T h e p r o c e d u r e Eor u n s c r a m b l i n g t h e L m a t r i x i s a s f o l l o w s . positioning information contained i n IP(K). b e a temporary v a r i a b l e : pk i s t h e

Then f o r t h e r t h column, l e t t

pk3r

overwrites

k, r for k
=

t o v e r w r i t e s !Z

Pk'F

1,

..., n

- 1~

S i n c e row i n t e r c h a n g e s w e r e u s e d o n t h e t r a n s p o s e d m a t r i x , t h e p o s i t i o n s o f t h e unknowns i n t h e e q u a t i o n s h a v e c h a n g e d . The f i n a l a r r a n g e m e n t i s Specifically,

d e t e r m i n e d by p e r f o r m i n g i n t e r c h a n g e s on a v e c t o r o f i n t e g e r s . let x. = i
1

i =

1.

...,

then s e t

LUNSCR
x

overwrites x k

t overwrites x

f o r k = 1, Pk

...,

The i n t e g e r now c o n t a i n e d i n x . s p e c i f i e s t h e o r i g i n a l p l a c e m e n t o f t h e
1

i t h unknown.
SYMBOL DICTIONARY
A = array or matrix blocks = f i r s t word o f m a t r i x b l o c k = l a s t word o f m a t r i x b l o c k = a r r a y of p i v o t index d a t a = input f i l e
= o u t p u t f i l e , b l o c k s i n normal o r d e r

I1 I2
IP

IU2
IU3
IU 4 IX IXBLKl

= output f i l e , blocks i n reversed order = array x.


1

= b l o c k number = increment t o l o c a t e t h e K K su ~bm ~ a t r i x i n c a s e oE symmetry = number o f symmecric s e c t i o n s = row d i m e n s i o n o f A

KA NOP
NROW

LUNSCR
LU LU S/R W H I C H UNSCRAMBLES. SCRAMBLED FACTORED M A T R I X LU LU COMPLEX A . T E M P LU COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST.NBLSYM.NPSYM.NLSYM,IMAT. I L U lCASX.NBBX.NPBX.NLBX,NBBL,NPBL,NLBL LU D I M E N S I O N A(NROW.1). IP(NROW). IX(NROW) LU 11=1 LU I2=2.NPSYM.NROW LU NM 1 =NROW-1 LU REWIND I U 2 LU REWIND I U 3 LU REWIND I U 4 LU DO 9 KK=1 .NOP LU KA=(KK-1 )-NROW LU DO 4 I X B L K l = I . N B L S Y M LU CALL BLCKIN ( A . I U 2 . 1 1 . 1 2 . 1 . 1 2 1 ) LU Kl=(IXBLKl-l)*NPSYM+2 LU I F (NM1.LT.Kl) GO TO 3 LU J2=0 LU DO 2 K = K l . N M l I F (JZ.LT.NPSYM) JZ=J2+1 IPK=IP(K+KA) DO 1 J = l J 2 TEMP=A(K.J) A(K.J)=A(IPK.J) A(IPK.J)=TEMP CONTINUE CONTINUE CONTINUE C A L L BLCKOT ( A . I U 3 . 1 1 . 1 2 . 1 . 1 2 2 ) CONTINUE DO 5 I X B L K l = l . N B L S Y M BACKSPACE I U 3 I F ( I X B L K l . N E . 1 ) BACKSPACE I U 3 CALL BLCKIN (A.1U3.11.12.1.123) C A L L BLCKOT ( A . I U 4 . 1 1 . 1 2 . 1 . 1 2 4 ) CONTINUE DO 6 I=1 ,NROW IX(I+KA)=I CONTINUE DO 7 I = l . N R O W IPI=IP(I+KA) IXT=IX(I+KA) IX(I+KA)=IX(IPI+KA) IX(IPI+KA)=IXT CONTINUE I F (NOP.EQ.1) GO TO 9 NBl=NBLSYM-1 S K I P N B 1 L O G I C A L RECORDS FORWARD DO 8 I X B L K l = l . N B l CALL BLCKIN (A.IU3.11.12.1.125) CONTINUE CONTINUE REWIND I U 2 REWIND I U 3 REWIND I U 4 RETURN END S U B R O U T I N E LUNSCR

(A.NROW.NOP.IX.IP.IU2.IU3.IU4)

2 3 4

5
6

7 8 9 10 11 12 13 14 15 16

17 18
19 20 21

M O V E

MOVE

PURPOSE
To r o t a t e and t r a n s l a t e a p r e v i o u s l y d e f i n e d s t r u c t u r e , e i t h e r moving

o r i g i n a l s e g m e n t s and p a t c h e s o r l e a v i n g t h e o r i g i n a l f i x e d and p r o d u c i n g new segments and p a t c h e s . METHOD The f o r m a l p a r a m e t e r s ROX, ROY, ROZ a r e t h e a n g l e s o f r o t a t i o n a b o u t t h e x , y , and z a x e s , r e s p e c t i v e l y , and XS, YS, ZS a r e t h e t r a n s l a t i o n d i s t a n c e s i n t h e x , y , and z d i r e c t i o n s . a n g l e r e p r e s e n t s a right-hand r o t a t i o n . Angles a r e i n r a d i a n s , a n d a p o s i t i v e The s t r u c t u r e i s f i r s t r o t a t e d a b o u t

t h e x a x i s by ROX, t h e n a b o u t t h e y a x i s by ROY, t h e n a b o u t t h e z a x i s by R O Z , and f i n a l l y t r a n s l a t e d by XS, Y S , ZS. coordinates x, y, z t o x ' , y',


z',

These o p e r a t i o n s transform a p o i n t w i t h

where

where TI1 = cos @ cos 8 TI2 = cos @ s i n 8 s i n J, T13 = cos @ s i n 8 c o s J, TZ1 = s i n $ c o s 8 TZ2 = s i n @ s i n 0 s i n @

s i n @ c o s J, sin $ I s i n J,

+ +

cos @ cos @ cos @ s i n @

- sin0 T31 - T32 = cos O s i n


=
COS

T23

s i n @ s i n O cos @

~b

COS

with
J,
= ROX

0 @

= ROY = ROZ

Xs =

xs
YS

= =

Zs

zs

MOVE This transformation is applied to those wire segments from segment number i
S

to the last defined segment in COMMON/DATA/.

than 1, the segments from 1 to i s transformed.

Thus, if i is greater s 1 are unaffected. All patches are If NRPT is zero, the transIf NRPT

NRPT is the structure repetition factor.

formed segment and patch coordinates overwrite the original coordinates so that the structure is moved with nothing left in the original location. is greater than zero, the transformed coordinates are written on the ends of the arrays in COMMON/DATA/ and the process repeated NRPT times so that NRPT

new structures are formed, each shifted from the previous one by the specified
transformation, while the original structure is unchanged. CODING M018 Adjust symmetry flag if structure is rotated about the x or y axis. M019 M037 M063 If the ground plane flag is also set on the GE card, symmetry will not be used in the solution.

M033 Compute transformation matrix. M061 Transform segment coordinates. M093 Transform patch coordinates. IX > 1.

M094 - M097 Set parameters co no-symmetry condition if NRPT > 0 or

SYMBOL DICTIONARY ABS COS CPH CPS CTH IR ITGI ITS IX


11
= external routine (absolute value)
= =

external routine (cosine) cos $ cos 0 DO loop index, array index for original patch

= cos Y
= =

ISEGNO = external routine (searches segment tag numbers)


= increment applied to segment tag numbers as segments are

transformed
= is is the first occurring segment in COMMON/DATA/ with tag ITS
= = = =

i s lower DO loop limit for I (initially I1 array index for new patch

K
KR

increment to segment number for transformed segment

LDI NRP

= L D f
=

upper DO loop l i m i t f o r I R (radians)

NKPT
ROX

= repetition factor
= Y

ROY ROZ

= H
=

SIN SPH SPS

= external routine (sine)

=sin$
= sin Y

:::/ :::/
STH T1Z T2Z
XI

= s i n e

, . a r r a y s c o n t a i n i n g components of t f o r p a t c h e s

= a r r a y s c o n t a i n i n g c0.pon.nts

of t 2 f o r p a t c h e s

, .

old x coordinate
X
S

xs
XX

- T1l
= T12 = T13
=

XY

xz
X2(I)
YI

x c o o r d i n a t e of end 2 of segment I

= old y coordinate

Yz

= T23
=

Y2(I)
ZI

y c o o r d i n a t e of end 2 of segment I

= old Z coordinate =

zS
ZX ZY

- T 3 ~
= T32
=

zS

zz
Z2(I)

- T33
Z c o o r d i n a t e of end 2 of segment I

MOVE
SUBROUTINE MOVE

(ROX.ROY.ROZ.XS.YS.ZS.ITS.NRPT.ITGI)

MO
MO MO MO MO MO MO ( MO ~ ~ ~ ) . S I ( ~ O O MO MO un MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO MO

S U B R O U T I N E MOVE MOVES THE STRUCTURE W I T H RESPECT TO I T S COORDINATE SYSTEM OR REPRODUCES STRUCTURE I N NEW P O S I T I O N S . STRUCTURE I S R O T A T E 0 ABOUT X . Y . 2 AXES BY ROX.ROY.ROZ R E S P E C T I V E L Y , THEN S H I F T E D BY X S . Y S . Z S COMMON /DATA/ L D . N ~ . N ~ . N . N P . M ~ . M ~ . M . M P . X ( ~ ~ ~ ) . Y ( ~ ~ O ) . Z 1) .BI(300) . A L P ( ~ o ~ , B)E T ( J O O ) , I C O N 1 ( 5 0 0 ) , C O N 2 3 0 0 ) T A G ( 3 0 0 ) I C O N X ( 2300).WLAM,IPSYM COMMON /ANGL/ S A L P ( J O O ) DIMENSION TIX(I), T l Z ( 1 ) . TZX(1). TZY(1). TZZ(1). XZ(1). Y 12(1). Z2(1) EQUIVALENCE ( X Z ( I ) . S I ( l ) ) . (YZ(l).ALP(l)). (Z2(1).BET(l)) E Q U I V A L E N C E (TIX.SI). (TIY.ALP). (T1Z.BET). (T2X.ICONl). (T2Y.ICON 1 2 ) . (T2Z.ITAG) I F (ABS(ROX)+ABS(ROY).GT.l.E-10) IPSYM=IPSYM.3 SPS=SIN(ROX) CPS=COS(ROX) STH=SIN(ROY) CTH=COS(ROY) SPH=SIN(ROZ) CPH=COS(ROZ) XX=CPHWCTH XY=CPH0STH*SPS-SPHmCPS XZ=CPH*STH*CPS+SPH*SPS YX=SPHmCTH YY=SPHoSTH*SPS+CPH*CPS YZ=SPHoSTH*CPS-CPH*SPS ZX=-STH ZY=CTHmSPS ZZ=CTHmCPS NRP=NRPT I F ( N R P T . E O . 0 ) NRP=l I F ( N . L T . N Z ) GO TO 3 I l = I S E G N O ( I T S . I) I F (Il.LT.N2) I1=N2 IX=Il K=N K=II-1 I F (NRPT.EO.0) 00 2 I R = l .NRP DO 1 I = 1 1 . N K=K+l XI=X(I)

il~(i).

N=K CONTINUE

MOVE

T~Z(KR~=XI*ZX+YI*ZY+ZI*ZZ
SALP(KR)=SALP(IR) BI(KR)=BI(IR) 11=u+1 M=K
I F

((NRPT.EO.O).AND.(IX.EQ.l))

RETURN

NP=N MP=M IPSYM=O RETURN END

iNl',k~i.I~ ~!.'lJl<I'OS I,: Tu. c o l n p u ~ c t l ~ cn e a r e l e c t r i c f i e l d due t o c u r r e n t s induced on


CODING
2

structure.

NE30 NE30

NE93 NE41

Near E f i e l d due t o c u r r e n t s on segments i s computed. Each segment is checked t o d e t e r m i n e whether t h e f i e l d o b s e r v a t i o n p o i n t (XOB, YOB, ZOB) f a l l s w i t h i n t h e segment volume. segment. I f i t does, AX is set t o t h e r a d i u s of t h a t AX i s t h e n s e n t t o r o u t i n e EFLD a s t h e r a d i u s of I f (XOB, YOB, ZOB) i s on t h e a x i s

t h e o b s e r v a t i o n segment.

o f a segment a t i t s c e n t e r , t h e f i e l d c a l c u l a t i o n w i t h AX s e t t o t h e segment r a d i u s i s t h e same a s t h a t used i n f i l l i n g t h e matrix. Loop computing t h e f i e l d c o n t r i b u t i o n of each segment. P a r a m e t e r s o f s o u r c e segment a r e s t o r e d i n COMMON/DATAJ/. When t h e extended t h i n w i r e a p p r o x i m a t i o n i s u s e d , I N D l i s s e t t o 0 i f end 1 of segment I i s c o n n e c t e d t o a s i n g l e p a r a l l e l segment of t h e same r a d i u s .

1 i f i t i s a f r e e end,
a bend, o r

and 2 i f i t c o n n e c t s t o a m u l t i p l e j u n c t i o n , a segment of d i f f e r e n t r a d i u s .

IND2 i s t h e same f o r end 2.

I f I N D l o r IND2 i s 2 , t h e e x t e n d e d t h i n w i r e a p p r o x i m a t i o n
w i l l n o t b e used f o r t h a t end.

EFLD s t o r e s t h e e l e c t r i c f i e l d s d u e t o c o n s t a n t , s i n k s , and c o s ks c u r r e n t s i n COMMON/DATAJ/. The f i e l d components a r e m u l t i p l i e d by t h e c o e f f i c i e n t s of t h e c o n s t a n t , s i n k s , and cos k s components of t h e t o t a l segment c u r r e n t , and t h e f i e l d i s summed. Near f i e l d due t o p a t c h c u r r e n t s is computed. SYElBOL DICTIONARY
ACX
=

c o n s t a n t component of segment c u r r e n t a t NE88; t patch c u r r e n t a t N E l l O

, . component
1

of

AX

segment r a d i u s when t h e f i e l d e v a l u a t i o n p o i n t f a l l s w i t h i n a segmenL volume s o u r c e segment r a d i u s

I:

, .
BCX,
= s i n k s component of segment c u r r e n t a t NE8Y;

component of

patch curcent a t N E l l l
CCX
= c o s k s coniponent of segment c u r r e n t a t N E Y O

E Z
EZC

x , y , and z components of t o t a l e l e c t r i c f i e l d

= E f i e l d due t o a cos k s c u r r e n t on a segment

EXK
EyK

= E f i e l d due t o a c o n s t a n t c u r r e n t a t Nm7; E f i e l d due t o t h e


component of p a t c h c u r r e n t a t NE114
A

EZK E X S
=

E f i e l d due t o a s i n k s c u r r e n t a t NEB; E f i e l d due t o t h e t 2 component o f p a t c h c u r r e n t a t NE114

EZS IP

= l o o p i n d e x f o r d i r e c t and r e f l e c t e d f i e l d ( 1 , 2 , r e s p e c t i v e l y )
A

1 T1Z TlXT TlYJ) =

il

f o r source patch

:::/
TlZJ T2Z T2YJ

= array.

for t

T2ZJ lZXJ

XI

= t

f o r source path

= c o s i n e of t h e a n g l e between segment I and t h e segment connected

yOBl
XOB
ZOB

t o i t s end

= f i e l d evaluation point

ZP

= c o o r d i n a t e s of t h e f i e l d e v a l u a t i o n p o i n t , z o r p
coordinaee
system

centered

on

in a t h e s o u r c e segment

NEFLD
CONSTANTS

0.5001

f r a c t i o n o f segment length used t o t e s t whether t h e f i e l d e v a l u a t i o n point E a l l s w i t h i n a segment

0.9

f r a c t i o n o f segment radius used t o t e s t whether t h e f i e l d e v a l u a t i o n p o i n t E a l l s w i t h i n a segment

0.999999 = minimum X I f o r extended t h i n w i r e k e r n e l (maximum a n g l e = 0 . 0 8 degree)

NEFLD
SUBROUTINE NEFLO (XOB.YOB.ZOB.EX.EY.EZ)

NE

NE NE NE NE COMPLEX E X . E Y . E Z . C U R . A C X . B C X . C C X , E X K , E Y K , E Z K , E X S , E Y S , E Z S , E X C E Y C , E NE IZC.ZRATI.ZRATI2,Tl.FRATI NE COMMON /DATA/ LD.N1.N2.N.NP.M1.M2,MMMP,X(300),Y(300),Z(300).S1(300 NE 1 ) , B I ( S O O ) . A L P ( 3 0 0 ) ,BET(SOO) , I C O N 1 ( 3 0 0 ) , I C O N 2 ( 3 0 0 ) I A G ( O 0 ) I C O N X ( N E ZSOO).WLAM.IPSYM NE COMMON /ANGL/ SALP(SOO) NE COMMON /CRNT/ A I R ( 3 0 0 ) . A I I ( 3 0 0 ) , B I R ( S O O ) , B I I ( 3 0 0 ) . C I R ( 3 0 0 ) C I I ( 3 0 0 N E l).CUR(900) NE COMMON /DATAJ/ S.B.XJ.YJ.ZJ.CABJ.SABJ,SALPJ,EXK,EYK,E~K,E~~,EY~,E NE ~ lS.EXC.EYC.EZC.RKH.IEXK,IND1,IND2,IPGND NE COMMON /GND/ZRATI.ZRATIZ.FRATI.CL.CH.SCRWL.SCRWR.NRADL.KSYMP.IFAR. NE 1IPERF.Tl T2 NF N E F L D COMPUTES THE NEAR F I E L D AT S P E C I F I E D P O I N T S I N SPACE AFTER THE STRUCTURE CURRENTS HAVE BEEN COMPUTED.

--

E Q U I V A L E N C E (TIX.SI); (TIY.ALP); (T1Z.BET). (T2X.ICONl). (T2Y.ICON 1 2 ) . (T2Z.ITAG) EOUIVALENCE ( T 1 X J . C A B J ) . (T1YJ.SABJ). (T1ZJ.SALPJ). (T2XJ.B). I J . I N D 1 ) . (T2ZJ.IND2) EY=(O..O.) EZ=(0..0.) AX=O . I F (N.EO.0) GO TO 2 0 DO 1 I = I . N XJ=XOB-X(1) YJ=YOB-Y(1) ZJ=ZOB-Z(1) ZP=CAB(I)*XJ+SAB(I)'UJ+SALP(I)*ZJ I F (ABS(ZP).GT.0.5001*51(1)) GO TO 1 ZP=XJ*XJ+YJ*YJ+ZJ*ZJ-ZP*ZP XJ=BI(I) I F (ZP.GT.0.9'XJ'XJ) GO TO 1 AX=XJ GO TO 2 CONTINUE DO 1 9 1=1 .N S=SI(I) B=BI(1) XJ=X(I) YJ=Y(I) ZJ=Z(I) CABJ=CAB(I) SABJ=SAB(I) SALPJ=SALP(I) I F (IEXK.EQ.0) GO TO 1 8

NE NE

21 22

N EFLD
GO TO 1 0 INol=l GO TO 1 0 INDl=2 IPR=ICONZ(I) I F (IPR) 11.16.12 IPR=-IPR IF f-ICONZ(IPR).NE.I)

GO TO 1 7

I F (ICONI(IPR).NE.I) GO TO 1 7 XI=AB~(~ABJ*~AB(IPR)+~A~J~~AB(IVR)+~ALPJ*SALP(IPR)) I F ( X I . L T . 0 . 9 9 9 9 9 9 ) GO TO 1 7 I F (ABS(BI(IPR)/B-l.).GT.!.E-6) GO TO 1 7 INOZ=O GO TO 1 8 INO2=1 GO TO 1 8 IND2=2 CONTINUE CALL EFLD (X0B.YOB.ZOB.AX.I)

ACX=CMPLX(AIR(I).AII(I)) BCX=CMPLX(BIR(I).BII(I)) CCX=CMPLX(CIR(I),CII(I))


EX=EX+EXK*ACX+EXS*BCX+EXCCCX EY=EY+EYK*ACX+EYS*BCX+EYC*CCX EZ=EZ+EZK*ACX+EZS*BCX+EZCCCCX I F (M.EQ.0) RETURN JC=N JL=LO+l 00 2 1 1 = 1 .M JL=JL-1 S=BI(JL) XJ=X(JL) YJ=Y(JL)

TZZJ=TZZ(JL) JC=JC+3 ACX=T~XJ*CUR(JC-Z)+~~YJ*CUR(JC-I)+TIZJJCUR(JC) BCX=T~XJ*CUI~(JC-~)+T~YJ*CUR(JC-~)+T~ZJ'CUR(JC) DO 2 1 I P = I .KSYMP IPGND=IP C A L L UNERE f X O B . Y O B . Z O B )

EZ=EZ+ACX*EZK+BCX*EZS RETURN END

N E T W K N E T W K PURPOSE To s o l v e f o r t h e v o l t a g e s and c u r r e n t s a t t h e p o r t s of n o n - r a d i a t i n g networks t h a t a r e p a r t of t h e a n t e n n a . This r o u t i n e a l s o is involved i n the

s o l u t i o n f o r c u r r e n t when t h e r e a r e no n o n - r a d i a t i n g n e t w o r k s , and computes t h e r e l a t i v e d r i v i n g p o i n t m a t r i x asymmetry when t h i s o p t i o n i s r e q u e s t e d . M E T H O D Driving P o i n t M a t r i x Asymmetry (NT32 t o NT84):

To s a t i s f y p h y s i c a l r e c i p r o c i t y , t h e e l e m e n t s of t h e i n v e r s e o f t h e i n t e r a c t i o n matrix should s a t i s f y t h e condition

where A

= l e n g t h of segment i. T h i s c o n d i t i o n is n o t s a t i s f i e d e x a c t l y , i e x c e p t on s p e c i a l s t r u c t u r e s , s i n c e t h e terms computed a r e n o t t r u e r e a c t i o n s .

The r e l a t i v e asymmetry of a m a t r i x element i s d e f i n e d a s

The code from NT32 t o NT84 computes t h e r e l a t i v e asymmetries o f m a t r i x e l e m e n t s f o r i and j o f a l l d r i v i n g p o i n t segments: d r i v i n g p o i n t s o r network c o n n e c t i o n p o i n t s . e i t h e r voltage source The maximum r e l a t i v e asymmetry

is l o c a t e d , and t h e r m s r e l a t i v e asymmetry o f a l l e l e m e n t s used i s computed.


LOCAL CODING STRUCTURE NT32

NT44 Determine numbers of segments t h a t a r e network c o n n e c t i o n points.

NT46

NT54 Determine numbers o f segments t h a t a r e v o l t a g e s o u r c e driving points. I n d i c e s o f segments w i t h network connect i o n s o r v o l t a g e s o u r c e s a r e s t o r e d i n a r r a y IPNT w i t h no d u p l i c a t i o n of numbers.

NT59 NT70

- NT69
-

-1 /a f o r k,R = a l l segment numbers i n IPNT. k R . NT84 Compute r e l a t i v e asymmetries of e l e m e n t s computed above,


Compute G s e a r c h f o r maximum and compute r m s asymmetry.

N E T W K I.OCAL SYMBOL D1CT IONAKY


ASA

~ U I I I0 1

s q u a r e s o f r e l a t i v e asymmetries and

rnls

value

A S M CMN(J,I)

- *ISC~ = G-~/A ; k

b e f o r e NT70; maximum r e l a t i v e asymmetry a f t e r NT69

CUR
IPNT

= I P N T ( J ) , t = LPNT(1) k9. 1 1 = t e m p o r a r y s t o r a g e of G-'/A I l k k = a r r a y o f d r i v i n g p o i n t segment i n d i c e s = number o f e n t r i e s i n IPNT = t e m p o r a r y s t o r a g e o f segment i n d e x

IROWl
ISCl

MASYM
NTEQ NTSC P W K RHS

= f l a g ; i f non-zero,

m a t r i x asymmetry i s computed

= row i n d e x o f e l e m e n t h a v i n g maximum asymmetry = column i n d e x of

e l e m e n t h a v i n g maximum asymmetry

= r e l a t i v e m a t r i x asymmetry

= v e c t o r f o r m a t r i x s o l u t i o n u s e d i n o b t a i n i n g GkQ

-1

Non-radiating

Network S o l u t i o n (NT89 t o NT262): networks a r e p r e s e n t is d i s c u s s e d

The s o l u t i o n method when n o n - r a d i a t i n g i n P a r t I. Data f o r n o n - r a d i a t i n g where

n e t w o r k s i s p a s s e d t h r o u g h t h e COMMON/NETCX/

CSEGl(1) = number of t h e segment t o which end 1 o f

two-port

network

is connected
ISEGZ(1) = number o f segment t o which end 2 o f connected NONET
= number o f t w o - p o r t

two-port

network is

networks f o r which d a t a i s g i v e n

Network p a r a m e t e r s a r e c o n t a i n e d i n t h e a r r a y s X l l R , X111, X12R, X121, X22R, and X221, a n d t h e t y p e of n e t w o r k i s d e t e r m i n e d by NTYP: I f NTYP i s 1

--

t h e network parameters a r e t h e s h o r t - c i r c u i t a d m i t t a n c e

p a r a m e t e r s of t h e nctwork:

X l l K , X I T I = r e a l and i m a g i n i r y p a r t s o f Y
X12R, XI21 = r e a l and i m a g i n a r y p a r t s of Y X22R, X22I = r e a l a n d i m a g i n a r y p a r t s of Y

11 12
-

Y21

22

I f NTYP i s 2 o r 3

--

t h e network i s a t r a n s m i s s i o n l i n e :

X l l R = c h a r a c t e r i s t i c impedance o f L r a n s a ~ i s s i o n l i n e
X l l L = l e n g t h O F trnnsmLssfon l l n e l n meters

X12R

r e a l p a r t of

shunt a d ~ n i t t n n ~ oe n end 1 o f l i n e

N E T W K X12I = i m a g i n a r y p a r t o f s h u n t a d m i t t a n c e o n end 1 o f l i n e X22R = r e a l p a r t o f s l ~ u n ta d m i t t a n c e o n end 2 o f l i n e X22I = i m a g i n a r y p a r t of s h u n t a d m i t t a n c e o n end 2 o f l i n e

1f NTYP is 2

--

t h e t r a n s m i s s i o n l i n e r u n s s t r a i g h t between t h e s e g m e n t s w i t h

r e s p e c t t o t h e segment r e f e r e n c e d i r e c t i o n s .

I f NTYP i s 3

--

t h e t r a n s m i s s i o n l i n e is t w i s t e d as shown i n f i g u r e 8.

Y12,

11' 22' a r e computed from NTllO t o NT120 i n t h e c o d e . When NTYP i s 3 , t h e s i g n of Y is r e v e r s e d . 12 The c o d e from NT99 t o NT194 forms a l o o p t h a t f o r e a c h n e t w o r k : computes
andY and Y Z 2 ; s o r t s t h e segment i n d i c e s i n v o l v e d ;

The s h o r t c i r c u i t a d m i t t a n c e p a r a m e t e r s o f t h e t r a n s m i s s i o n l i n e , Y

t h e n e t w o r k p a r a m e t e r s Y 11, Y12 and a d d s t h e p a r a m e t e r s Y

and Y t o t h e a p p r o p r i a t e network e q u a t i o n s . 11' Y12' 22 The s o r t i n g p r o c e d u r e f o r t h e c o n n e c t i o n o f end 1 o f t h e n e t w o r k i s d e s c r i b e d i n f i g u r e g. D e c i s i o n 1 i s made i n t h e code from NT121 t o NT126, d e c i s i o n Segments h a v i n g

2 from NT128 t o NTl33, and d e c i s i o n 3 from NT138 t o NT143.

n e t w o r k c o n n e c t i o n s o n l y a r e a s s i g n e d e q u a t i o n rows i n t h e a r r a y CMN s L a r t i n g from t h e t o p i n t h e o r d e r t h a t t h e s e g m e n t s a r e e n c o u n t e r e d . Segments w i t h

b o t h n e t w o r k and v o l t a g e s o u r c e c o n n e c t i o n s a r e a s s i g n e d e q u a t i o n rows i n CMN s t a r t i n g a t t h e b o t t o m and p r o c e e d i n g up. The f o r m e r are e v e n t u a l l y s o l v e d

f o r t h e unknown gap v o l t a g e s , w h i l e t h e l a t t e r a r e u s e d t o o b t a i n s o u r c e i n p u t a d m i t t a n c e s a f t e r t h e s t r u c t u r e c u r r e n t s h a v e b e e n computed. n e t w o r k s and s e t s LROWZ and ISCZ. The n e t w o r k s h o r t c i r c u i t p a r a m e t e r s are added t o t h e n e t w o r k e q u a t i o n s from NT182 t o NT193. The c o e f f i c i e n t m a t r i x i s t r a n s p o s e d i n f i l l i n g t h e CMN The c o d e from

NT148 t o NT174 a s s i g n s e q u a t i o n numhers f o r t h e c o n n e c t i o n o f end 2 o f t h e

a r r a y , s i n c e t h e m a t r i x s o l u t i o n r o u t i n e s o p e r a t e on a transposed system. Hence, t h e f i r s t i n d e x s h o u l d b e c o n s i d e r e d t h e column number and t h e s e c o n d i n d e x t h e row number. I f a segment NSEGl d o e s n o t h a v e a v o l t a g e s o u r c e and Y a r e added t o column IROWl a t rows I R O W l 11 12 IKOW2 may be e i t h e r ( 1 ) i n t h e u p p e r rows a s p a r t o f

connected, t h e parameters Y and IROWZ, r e s p e c t i v e l y .

t h e e q u a t i o n f i f o r t h e unknown gap v o l t a g e s , o r ( 2 ) i f a v o l t a g e s o u r c e is c o n n e c t e d t o segment NSEGZ, i n t h e lower rows f o r l a t e r d e t e r m i n a t i o n o f t h e s o u r c e c u r r e n l . Tf a v o l t a g e s o u r c e i s c o n n e c t e d t o segment NSEG1, t h e

N E T W K
For NTYP =

Segment i

u
F i g u r e 8.

For NTYP = 3

Segment j

wrnent i

segment

Options f o r Transmission Line Connection.

coefficients Y

and Y a r e m u l t i p l i e d by t h e known s o u r c e v o l t a g e and added 1 1 12 t o t h e r i g h t - h a n d s i d e o f t h e network e q u a t i o n i n t h e rows IROWl and IROW2. and Y

The p a r a m e t e r s Y12 manner.

22

a r e added t o t h e e q u a t i o n s i n a s i m i l a r

The l o o p from NT199 t o NT208 computes t h e e l e m e n t s of t h e i n v e r s e m a t r i x G-I and a d d s them t o t h e network e q u a t i o n s . The network m a t r i x i s m n t h e n f a c t o r e d a t NT213. The code from NT218 t o NT225 computes Bi RHS(I),

where

w i t h (-El) b e i n g t h e known a p p l i e d f i e l d on segment j , n o t i n c l u d i n g unknown 3 v o l t a g e d r o p s a t network p o r t s . Those e l e m e n t s B f o r segments i n t h e network

e q u a t i o n s a r e t h e n added t o t h e r i g h t - h a n d s i d e of t h e network e q u a t i o n s . NT229 t h e network e q u a t i o n s a r e s o l v e d f o r t h e e x c i t a t i o n f i e l d s due t o v o l t a g e d r o p s a t t h e network p o r t s .

At

The n e g a t i v e s of t h e s e f i e l d s a r e added

t o t h e e x c i t a t i o n v e c t o r a t NT234 t o NT236, c o m p l e t i n g t h e d e f i n i t i o n of t h e excitation vector E . . 3 currents. The s t r u c t u r e e q u a t i o n s a r e t h e n s o l v e d f o r t h e induced

From NT241 t o NT261, t h e v o l t a g e , c u r r e n t , a d m i t t a n c e , and power s e e n l o o k i n g i n t o t h e s t r u c t u r e a t each network p o r t a r e p r i n t e d . T h i s c u r r e n t does not

i n c l u d e c u r r e n t through any v o l t a g e s o u r c e s t h a t a r e c o n n e c t e d t o t h e p o r t .

*
NSEGl

ISEG1IJI

Doaa ngrnnrn NSEGl h m a wlug. source

Figure 9.

Sorting Procedure for Segments Having Network Connections

NETWK
The code from NT269 t o NT294 computes and p r i n t s t h e v o l t a g e , c u r r e n t , admitt a n c e , and power s e e n by each v o l t a g e s o u r c e l o o k i n g i n t o t h e s t r u c t u r e and p a r a l l e l connected network p o r t , i f a network i s p r e s e n t . A f t e r t h e network e q u a t i o n s have once been set up, t h e y can b e s o l v e d f o r v a r i o u s i n c i d e n t f i e l d s by e n t e r i n g t h e code a t NT218. I f t h e l o c a t i o n of v o l t a g e s o u r c e s is changed, however, t h e e q u a t i o n s must b e recomputed. I f a s t r u c t u r e has no non-radiating networks, t h e c u r r e n t s a r e computed a t NT266.

SYMBOL DICTIONARY ASA A S M CABS


CM

= sum of s q u a r e s o f r e l a t i v e m a t r i x asymmetries and rms v a l u e = segment l e n g t h and maximum r e l a t i v e m a t r i x asymmetry

e x t e r n a l r o u t i n e (magnitude o f complex number) a r r a y of m a t r i x elements G

1 . l

CMN
CMPLX
CONJG

= a r r a y f o r network e q u a t i o n c o e f f i c i e n t s = e x t e r n a l r o u t i n e (forms complex number)

e x t e r n a l r o u t i n e (conjugate) current excitation vector e x t e r n a l r o u t i n e ( i n t e g e r t o real c o n v e r s i o n )


DO l o o p i n d e x

CO S
CUR

EINC FACTR FLOAT


I

IP IPNT
IROWl

= external routine (cosine)

= e x t e r n a l r o u t i n e (Gauss-Doolittle m a t r i x f a c t o r i n g )

a r r a y of p o s i t i o n i n g d a t a from f a c t o r i n g o f CM

= a r r a y of p o s i t i o n i n g d a t a from f a c t o r i n g o f CMN = m a t r i x element index = m a t r i x element index

IROW2 ISANT ISCl ISC2 ISEGl ISEG2


IX
J

a r r a y of segment numbers f o r v o l t a g e s o u r c e c o n n e c t i o n segment l o c a t i o n i n a r r a y ISANT number of segment t o which p o r t 1 o f network i s connected

= segment l o c a t i o n i n a r r a y ISANT
=

= number of segment t o which p o r t 2 i s connected

= a r r a y of p o s i t i o n i n g d a t a from f a c t o r i n g of

CM

DO loop i n d e x

M A S Y M N C O L

= f l a g t o r e q u e s t m a t r i x asymmetry c a l c u l a t i o n = number of columns i n CM


=

NDM IN

a r r a y dimension of CMN

N E T W K NDIMNP N O N E T N O P NPRINT NROW NSANT NSEGl NSEG2

= NDIMN

number of networks

= N/NP = flag t o control printing

number of rows i n CM

= number of v o l t a g e s o u r c e s = a r r a y of segments t o which p o r t 1 of a network c o n n e c t s = a r r a y of segments t o which p o r t 2 of a network c o n n e c t s

NTEQA(1) = segment number a s s o c i a t e d w i t h NTSC


=

network e q u a t i o n

number of network-voltage s o u r c e e q u a t i o n s network-voltage s o u r c e

NTSCA(1) = segment number a s s o c i a t e d w i t h equation NTSOL

= f l a g t o i n d i c a t e network e q u a t i o n s do n o t need t o b e

recomputed NTYP(1) PIN PNLS


R PW
=

t y p e of

network

= t o t a l i n p u t power from s o u r c e s = power l o s t i n networks = power


=

REAL R H N T

e x t e r n a l r o u t i n e ( r e a l p a r t of complex number) s i d e of network e q u a t i o n s

= v e c t o r f o r right-hand

RHNX
RHS SIN SOLVE SOLVES SQRT TP VLT VSRC(1)

= component of R H N T due t o Y = v e c t o r f o r right-hand


=

11. Y12* Y22 s i d e of s t r u c t u r e i n t e r a c t i o n e q u a t i o n


solution)

external routine (sine)

= e x t e r n a l r o u t i n e (Gauss-Doolittle

= e x t e r n a l r o u t i n e (Gauss-Doolittle s o l u t i o n of CM m a t r i x ) = e x t e r n a l r o u t i n e (square r o o t )
=

2rr voltage v o l t a g e of s o u r c e 6n equations segment i n network-voltage s o u r c e

VSANT(1) = v o l t a g e of s o u r c e on segment NSANT(1)

network o r t r a n s m i s s i o n l i n e s p e c i f i c a t i o n parameters

X22I
X22R

NETWK

YMIT YllI YllR Y12I Y 12R Y22I Y22R

admittance

= imaginary part of
= =

11

11 imaginary part of Y 12 = real part of Y12


= imaginary part of Y22 = real part of Y
=

real part of Y

22

ZPED

impedance

CONSTANTS

6.283185308 30
31

2n row and column dimensions of CMN (row and column dimensions of CMN)

NETWK
SUBROUTINE NETWK (CM.CMB.CMC.CM0.IP.EINC) NT 1

NT SUBROUTINE NETWK SOLVES FOR STRUCTURE CURRENTS FOR A G I V E N NT E X C I T A T I O N I N C L U D I N G THE EFFECT OF NON-RADIATING NETWORKS I F NT PRESENT. NT NT NT COMPLEX C M N . R H N T . Y M I T . R H S . Z P E O , E I N C . V S A N T , V L T , C U R , V S R C R H N X . V Q O V Q lDS.CUX.CM.CM8.CMC.CMO NT COMMON /DATA/ LO.Nl .N2.N.NP.Ml .M2,M,MPPX(300) ,Y(300) , Z O O I ( O 0 NT 1 ) . B I ( 3 0 0 ) .ALP(300) .8ET(300).ICON1(300) . I N 2 ( 3 0 0 ) T A G ( O 0 ) C O N X ( NT 230O).WLAM,IPSYM NT COMMON /CRNT/ AIR(~OO).AII(~~~).BIR(~~~).BII(~~~).CIR(~OO),CI NI T( ~ O O l).CUR(900) NT COMMON /VSORC/ VQO(3O) . V S A N T ( 3 0 ) , V Q O S ( 3 0 ) , I V Q O ( 3 0 ) . I S A N T ( ) I Q O ( NT 13O~.NVQD.NSANT.NOOS NT

lM.ISEG1(30).ISEC2(3O).~llR(30).XllI(30),Xl2R(3O),~121(30).~22~(30)
2,X221(3O).NTYP(30) OIMENSION E I N C ( 1 ) . I P ( I ) O I M E N S I O N C M N ( ~ O ; ~ O ) '.R H N T ( ~ O ) . I P N T ( 3 O ) . l S ( 9 0 0 ) . V S R C ( l 0 ) . RHNX(30) OATA NDIMN.NOIMNP/30.3l/.TP/6.2B3185308/ PIN=O. PNLS=O. NEOT=NEQ+NEQZ I F ( N T S O L . N E . 0 ) GO TO 4 2 NOP=NEO/NPEQ GO TO 1 4 I F (MASYM.EO.0) COMPUTE R E L A T I V E M A T R I X ASYMMETRY IROWl=O I F (NONET.EQ.0) DO 4 I = 1 .NONET NSEGl=ISEGl(I) NTEQA(30). NTSCA(30).

GO TO 5

NT NT NT RH N T NT NT NT NT NT NT NT NT NT NT NT NT NT NT NT

DO J=l IROWI ' I F (NSEGl.EQ.IPNT(J)) CONTINUE I R W 1 =IROW1+1 IPNT(IROWl)=NSEGl NSEGl=ISEGZ(I) CONTINUE I F ( N S A N T . E Q . 0 ) GO TO DO 8 1=1 .NSANT NSEGl=ISANT(I) I F i~I R O W 1 .EO.O) GO TO 00 6 J = l I R O W I I F (NSEGl.EQ.IPNT(J))
~

I P N T ( 1 R O W t )=NSEGl CONTINUE I F ( 1 R O W I . L T . N D I M N P ) GO TO 1 0 PRINT 59 STOP I F ( I R O W l . L T . 2 ) GO TO 1 4 DO 1 2 I = 1 I R O W I ISCl=IPNT(I) ASM=SI(ISCl ) DO 1 1 J = l . N E O l RHS(J)=(O..O.) RHS(ISCl)=(l..O.)

CALL SOLGF (CM.CMB.CMC.CM0.RHS,IPPNPPNl,NNMPPMl,MMNEQ,NEQ2) CALL CABC (RHS) 00 1 2 J = l .IROWl ISCl=IPNT(J) CMN(J.I)=RHS(ISCl)/ASM ASM=O ASA=O DO 1 3 1=2,IRDWl ISCl=I-1 DO 1 3 J = l . I S C l CUX=CMN(I.J)

. .

PWR=CABS((CUX-CMN(J.I))/CUX)
ASA=ASA+PWRWPWR I F (PWR.LT.ASM) GO TO 1 3 ASM=PWR NTEQ=IPNT(I) NTSC=IPNT(J) CONTINUE

..

ASA=SQRT(ASA*~./FLOAT(IROWI*(IROW~-~)~)

SOLUTION OF NETWORK EQUATIONS

SORT NETWORK AND SOURCE DATA AND ASSIGN EQUATION NUMBERS TO SEGMENTS.

CONTINUE I S C l =o I F (NTEQ.EQ.O)

GO TO 21

00 2 0 I = l . N T E O I F ( N S E G I N E . N T E O A ( 1 ) ) GO TO 20 IROWl = I GO TO 2 5 CONTINUE NTEO=NTEO+I IROWl=NTEO NTEOA(NTEO)=NSEGl GO TO 2 5 I F ( N T S C . E O . 0 ) GO TO 2 4 DO 2 3 1 = 1 .NTSC I F (NSEGl.NE.NTSCA(1)) GO TO 2 3 IROWl=NOIMNP-I GO TO 2 5 CONTINUE NTSC=NTSC+l IROWl=NDIMNP-NTSC NTSCA(NTSC)=NSEGl VSRC(NlSC)=VSANT(ISCl) I F ( N S A N T . E Q . 0 ) GO TO 2 7 DO 2 6 1 = 1 .NSANT I F (NSEGZ.NE.ISANT(1)) GO TO 26 ISCZ=I GO TO 3 0 CONTINUE 1sc2=0 I F (NTEO.EO.0) GO TO 29

IROW2=I GO TO 33 CONTINUE NTEQ=NTEQ+l IROW2=NTEQ NTEOA(NTEOI=NSEGZ

CONTINUE NTSC=NTSC+l

V~RC(NT~C)=V~ANT(ISC~) I F (NTSC+NTEO.LT.NOIMNP) PRINT 5 9 STOP

GO TO 34

F I L L NETWORK E O U A T I O N M A T R I X AND R I G H T HAND S I D E VECTOR W I T H NETWORK S H O R T - C I R C U I T A D M I T r A N C E M A T R I X C O E F F I C I E N T S .

RHNX(IROW~)=RHNX(IROW~)+CMPLX(YZZR.Y~~I)*VSANT(ISCI)~LAM CONTINUE

ADD I N T E R A C T I O N M A T R I X ADMITTANCE ELEMENTS TO NETWORK EQUATION MATRIX DO 4 1 I=I .NTEQ 00 39 J s 1 .NEQT RHS(J)=(O..O.) IR~WI=NTEQA(I) RHS(IROWI)=(I..O.) C A L L SOLGF (CM.CMB.CMC.CMD.RHS,IPPNP.NI.N.MP.Mt,M,NEQ.NEQ2) C A L L CABC (RHS) DO 4 0 J = I .NTEQ IROWI=NTEQA(J)

NT 195 NT 1 9 6 NT 1 9 7

CMN(I.J)=CMN(I.J)+RHS(IRWYO
CONTINUE FACTOR NETWORK EQUATION M A T R I X

ADD TO NETWORK EQUATION R I G H T HAND S I D E THE TERMS DUE TO ELEMENT INTERACTIONS F I (NONET.EQ.O) GO TO 4 8 DO 4 3 I=I .NEQT RHS(I)=EINC(I) C A L L SOLGF (CM.CMB.CMC.CM0.RHS,IP.NP,NI,NNMPPM1.M,NEQ,NEQ2) CALL CABC (RHS) DO 4 4 I=I .NTEO IROWi=NTEQA(I)

NT 2 1 5 NT 2 1 6

RHNT(I)=RHNX(I)+RHS(IROWl)
SOLVE N E T K I R K EQUATIONS

CALL SOLVE

(NTEO.CMN.IPNT.RHNT.NDIMN)

ADD F I E L D S DUE TO NETWORK VOLTAGES TO E L E C T R I C F I E L D S A P P L I E D STRUCTURE AND SOLVE FOR INDUCED CURRENT DO 4 5 I = I . N T E Q IROWI=NTEQA(I)

EINC(IRWVI)=EINC(IROWl)-RHNT(1) CALL SOLGF (CM.CMB.CMC.CMD.EINC,IP,NP.N~,N,MP,M~.M.NEQ,NE~~)


CALL CABC (EINC)

I F (NPRINT.EQ.0) I F (NPRINT.EO.0) DO 4 6 I = 1 .NTEQ IRoWl=NTEQA(I)

PRINT 6 1 PRINT 6 0

VLT=RHNT(I)*SI(IRWYI)*WLAM
CUX=EINC(IROWl)*WLAH YMIT=CUX/VLT ZPEO=VLT/CUX
. ..

PNLS=PNLS-PWR I F (NPRINT.EQ.0) PRINT 6 2 . I F (NTSC.EQ.0) GO TO 4 9 .NTSC DO 4 7 I=I IRaUI=NTsCA(I) VLT=VSRC(I) CUX=EINC(IROW~ ) *WLAU YMIT=CUX/VLT

IROW2.IROWI.VLT.CUX.ZPED.YMIT.PWR

JETWK
ZPEO=VLT/CUX IROW2=ITAG(IROWI) PWR=.5*REAL(VLT'CONJG(CUX)) PNLS=PNLS-PWR I F (NPRINT.EO.0) PRINT 62. GO TO 4 9

IROWZ.IROW1.VLT.CUX.ZPEO.YMIT.PWR

SOLVE FOR CURRENTS WHEN NO NETWORKS ARE P R E S E N l

C A L L SOLGF ( C M . C M B . C M C . C M ~ . E I N C , I P ~ N P ~ N I , N . M P . M I . M . N E Q . N E Q Z ) C A L L CABC ( E I N C ) NTSC=O I F ( N S A N T + N V Q D . E O . O ) RETURN PRINT 6 3 PRINT 6 0 I F (NSANT.EO.0) GO TO 56 DO 5 5 1=1 .NSANT ISCl=ISANT(I)

I R O W l =O GO TO 5 4 I R O W l =NDIMNP-J CUX=RHNX(IROWI) 00 5 3 J = l .NTEO

cux=cux-CMN(J.IROWI)*RHNT(J)
ZPEO=VLT/CUX PWR=.S*REAL(VLT'CONJG(CUX)) PIN=PIN+PWR I F (IROWl.NE.0) PNLS=PNLS+PWR IROWZ=ITAG(ISCI) P R I N T 6 2 . IROW2.ISCI.VLT.CUX.ZPE0.YMIT.PWR I F ( N V Q O . C Q . 0 ) RETURN 0 0 5 7 1 = 1 .NVOO ISCl=IvQO(I) VLT=VaD(I)

IROWZ=ITAG(ISCl) P R I N T 6 4 . IROW2.ISCI.VLT.CUX.ZPED.YMIT.PWR RETURN R E L A T I V E ASYMMETRY OF THE D R I V I N G P O I N T . FORMAT ( / / / . 3 X , 4 7 H M A X I M U M 1 2 1 H ADMITTANCE M A T R I X 1 5 . E l O . J . I 3 H FOR S E G M E N T S . I S . 4 H A N D , 1 5 . / . 3 X , 225HRMS R E L A T I V E ASYMMETRY I S . E 1 0 . 3 ) FORMAT ( l X . 4 4 H E R R O R - - NETWORK ARRAY D I M E N S I O N S TOO S M A L L ) FORMAT ( / . 3 X . 3 H T A G . 3 X . 4 H S E G . . 4 X , I S H V O L T A G E (VOLTS),9X.l4HCURRENT ( lAMPS).9X.l6HIMPEDANCE ( O H M S ) . 8 X , 1 7 H A D M I T T A N C E (MHOS).6X,SHPOWER./,

23X.3HN0..3X.3HNO..4X.4HREAL.8X.5HIMAG.,3(7X.4HREAL,BXX5H~MAG.),5X.
37H(WATTS)) '3RMAT ( / / / . 2 7 X , 6 6 H

- STRUCTURE E X C I T A T I O N DATA AT NETWORK CONN

NETWK
321

322 62 323 63 3 2 4 64 325

lECTION FORMAT FORMAT FORMAT EN0

POINTS - - -) (2(1X.15).9E12.5) (///.42X,36HANTENNA INPUT PARAMETERS (1X.15.2H *.14.912.5)

--

--

-)

NT NT NT NT NT

321 322 323 324 325-

NFPAT N F PAT PUKPOSE To compute and p r i n t Lhe n e a r E o r H f i e l d o v e r a r a n g e o f p o i n t s .

METHOD The r a n g e of p o i n t s i n r e c t a n g u l a r o r s p h e r i c a l c o o r d i n a t e s i s o b t a i n e d from p a r a m e t e r s i n COMMON/FPAT/. Subroutine NEFLD i s c a l l e d f o r n e a r E f i e l d

and NHFLLI i s c a l l e d f o r n e a r H f i e l d .

SYMBOL D I C T I O N A R Y C PH CTH L)XNK


= cos $
= cos

8
for x i n rectangular coordinates o r R i n

= increment

spherical coordinates DYNK


= increment

for y i n rectangular coordinates o r

in

spherical coordinates DZNR


= increment

f o r z i n rectangular coordinates o r 0 i n

sptierical coordinates E X , E Y , EZ NEAK


= x , y and z components o f E o r H
= 0 f o r rectangular coordinates

1 f o r spherical coordinates NFEH


=

0 o r near E f i e l d
1 For n e a r H f i e l d

N K X , NRY,
S PH

NKL

= number o f v a l u e s f o r x ,
=

y and z o r R , @,

sin @

S'TH

= sin b =

'TA XNK XNKT XO n Y NR YNKT YO0


Z NR

n/lW
x or K

= initial x or R =
'X

= initial y or $ =

y or 0

= Y = initial = z or =
2

z or 0

ZNKT

ti

zon

NFPAT
NP NP NP NP ~ ) . B I ( ~ O O ) . A L P ( ~ O O ) . ~ E T ( ~ ~ ~ ) , I C O N ~ ( ~ O O ~ , I C O N ~ ( ~ O O ) , I T A G ( ~ O ONP ),ICONX( 2300).WLAM,IPSYM NP COMMON / F P A T / N T H . N P H . I P D . I A V P . I N O R , I A X , T H E T S , P H I S ~ ~ T H , ~ P H , R F L NP ~,GN 10R.CLT.CHT.EPSR2.SIG2,IXTYPPXPR6.PINR.PNLR,PLOSS,NEAR,NFEH,NRX,NRY NP 2.NRZ.XNR.YNR.ZNR.DXNR.OYNR.DZNR NP DATA T A / 1 . 7 4 5 3 2 9 2 5 2 E - 0 2 / I F ( N F E H . E Q . 1 ) GO TO 1 PRINT 1 0 GO TO 2 PRINT 1 2 ZNRT=ZNR-DZNR DO 9 1 = 1 .NRZ ZNRT=ZNRT+OZNR I F ( N E A R . E O . 0 ) GO TO 3 CTH=COS(TA0ZNRT) STH=SIN(TA*ZNRT) YNRT=YNR-DYNR 00 9 J = I . N R Y YNRT=YNRT+DYNR I F (NEAR.EQ.0) GO TO 4 CPH=COS(TA.YNRT) SPH=SIN(TA.YNRT) XNRT=XNR-OXNR 00 9 K K = l .NRX XNRT=XNRT+DXNR F I (NEAR.EQ.O) GO TO 5 XOB=XNRT0STH*CPH YOB=XNRT*STH*SPH ZOB=XNRTmCTH GO TO 6 XOB=XNRT YOB=YNRT ZOB=ZNRT TMPI=XOB/WLAM TMPZ=YOB/WLAM S U B R O U T I N E NFPAT COMPUTF NEAR E OR H F I E L D S OVER A RANGE OF P O I N T S COMPLEX E X . E Y . E Z COMMON /DATA/ LO.Nl.N2.N.NP.MI.M2.M.MP.X(300).Y(300),Z(3OO).SI(3OO

TMP~=ZOB/LILAM
I F ( N F E H . E P . 1 ) GO TO 7 CALL NEFLO ( T M P l . T M P 2 . T M P 3 . E X . E Y . E Z ) GO TO 8 CALL NHFLD ( T ~ P l . T M P Z . T M P 3 , E X . E Y . E Z ) TMPl=CABS(EX) TMPZ=CANG(EX) TMP3=CABS(EY) TMP4=CANG(EY) TMPS=CABS(EZ) TMP~=CANG(EZ) PRINT 1 1 . XOB.YOB.ZOB.TMPI.TMP2.TMP3.TMP4.TMP5.TMP6 CONTINUE RETURN

NP NP NP NP NP NEAR E L E C T R I C F I E L D S -.//.12X814HL NP FORMAT ( / / / . 3 5 X , 3 2 H lOCATION -.21X.8HEX - . 1 5 X , 8 H EY - . 1 5 X , 8 H EZ -./.8X.IHX.l NP 2 0 X . 1 H Y . 1 0 X . 1 H Z . 1 0 X . 9 H M A G N I T U D E , 3 X . 5 H P H ~ S E . 6 X . 9 H M A G N I T U O E . 3 X . 5 H P H A S NP 3 E . 6 X . 9 H M A G N I T U 0 E . 3 X . 5 H P H A S E E / , 6 X X 6 H M E T E R S , 5 X , 6 H M E T E R S , 5 X , 6 H M E T E R S , NP 48X.7HVOLTS/M.3X.7HDEGREES,6XX7HV0LTS/M,3X,7H0EGREES,6X.7HV0LTS/M,3 NP 5X.lHDLGREESI NP FORMAT ( ~ x . i ( 2 ~ . ~ 9 . 4 ) . 1 X . 3 ( 3 X . E l l .4.2X.F7.2)) NP NEAR M A G N E T I C F I E L D S -.//.12X.l4HL NP FORMAT ( / / / . 3 5 X . 3 2 H -

. .

--

--

--

61

62

VFPAT
65 66 67 68
3 E . 6 X . 9 H M A G N I T U D E . 3 X . S H P H A S E E / , 6 X X 6 H M E T E R S , 5 X , 6 H M E T E R S , 5 X , 6 H M E T E R S , NP 65 ~ ~ X . ~ H A M P S / M . ~ X . ~ H D E G R E E S . ~ X . ~ H A M P S / M . ~ X . ~ H D E G R E E S . ~ X . ~ H A M NP P S / M66 .~X.~

SHDEGREES)
END

NP
NP

67 68

N H F L D PURPOSE To compute t h e n e a r magnetic f i e l d due t o c u r r e n t s induced on a structure. CODING NH28 NU29

NH56 Near H f i e l d due t o c u r r e n t s on segments i s computed. NH40 Each segment i s checked t o d e t e r m i n e w h e t h e r t h e f i e l d o b s e r v a t i o n p o i n t (XOB, YOB, ZOB) f a l l s w i t h i n t h e segment volume. segment.
I f i t d o e s , AX i s s e t t o t h e r a d i u s of t h a t

AX i s t h e n s e n t t o r o u t i n e HSFLD a s t h e r a d i u s of

t h e o b s e r v a t i o n segment t o a v o i d a s i n g u l a r i t y NH41 NH42 NH50 NH54

i n the field.

NH56 Loop computing t h e E i e l d c o n t r i b u t i o n of each segment. NH49 P a r a m e t e r s of s o u r c e segment a r e s t o r e d i n COMMON/DATAJ/. HSFLD s t o r e s t h e magnetic f i e l d due t o c o n s t a n t , s i n k s , and c o s ks c u r r e n t s i n COMMON/DATAJ/.

NH56 The f i e l d components a r e m u l t i p l i e d by t h e c o e f f i c i e n t s of t h e c o n s t a n t , s i n k s , and cos k s components of t h e t o t a l segment c u r r e n t , and t h e f i e l d is summed.

NH58 NH62 NH72 NH76

NH78 Near H f i e l d s due t o p a t c h c u r r e n t s a r e computed. NH71 P a r a m e t e r s O F s o u r c e p a t c h a r e s e t i n COMMON/DATAJ/.

H f i e l d i s computed by HINTC.
NH78 H f i e l d s due t o and t 2 c u r r e n t components a r e m u l t i p l i e d
A

by t h e c u r r e n t s t r e n g t h s and summed. S Y M B O L DICTIONARY


A

ACX

c o n s t a n t component o f t h e segment c u r r e n t a t NH51; of p a t c h c u r r e n t a t NH74

AX

segment r a d i u s when t h e E i e l d e v a l u a t i o n p o i n t f a l l s w i t h i n a segment volume


A

BCX

s i n k s component of segment c u r r e n t a t NH52; t p a t c h c u r r e n t a t NH75

component of

CCX IiX BY,

c o s k s component o f segment c u r r e n t a t NH53 t o t a l tl field

Hz

TlXJ TlYJl = f o r patch 1

I:

TlZJ
A

= arrays for t2

T2Z

f o r patch I TZZJ
XOB YOB ZOB
ZP

= f i e l d evaluation point
L

c o o r d i n a t e s of t h e f i e l d e v a l u a t i o n p o i n t , z o r p

in a

c y l i n d r i c a l c o o r d i n a t e system c e n t e r e d on t h e s o u r c e segment. CONSTANTS 0 . 5 0 0 1 = f r a c t i o n of segment l e n g t h used t o t e s t whether t h e f i e l d e v a l u a t i o n p o i n t f a l l s w i t h i n a segment 0.9


=

f r a c t i o n of segment r a d i u s used t o t e s t whether t h e f i e l d e v a l u a t i o n p o i n t f a l l s w i t h i n a segment

S U B R O U T I N E NHFLO ( X 0 B . Y O B . Z O B . H X . H Y . H Z ) N H F L O COMPUTES THE NEAR F I E L D AT S P E C I F I E D P O I N T S I N SPACE AFTER THE STRUCTURE CURRENTS HAVE BEEN COMPUTED. COMPLEX H X . H Y . ~ 1 Z . C U R . A C X . B C X . C C X . E X K . E Y K . E Z K . E X S . E Y S . E Z S , E X C , E Y C . E 1 ZC COMMON /DATA/ LD.NI.N2.N.NP.MI.M2.M.MP.X(300),Y(30O),Z(3OO),SI(3OO

NH NH NH NH

NH NH NH NH ~ ) . B I ( ~ ~ ~ ) . A L P ( ~ ~ ~ ) . ~ E T ( ~ O O ) . I C O N ~ ( ~ O O ) , I C O N ~ ( ~ O O ) , I T A G ( ~NH OO),ICONX( 23OO).WLAM,IPSYM NH COMMON /ANGL/ SALP(3OO) NH COMMON / C R N T / A I R ( 3 0 0 ) . A I I ( 3 0 0 ) . B I R ( 3 0 0 ) . 8 1 1 ( 3 0 0 ) . C I R ( 3 0 0 ) C I I ( 3 0 0 NH I).CUR(900) NH NH COMMON / O A T A J / S . B . X J . Y J . Z J . C A B J . S A B J , S A L P J . E X K K E Y K K E Z K , E X S , E Y S , E Z IS.EXC.EYC.EZC.RKH.IEXK.INDl.IND2.IPGNO NH DIMENSION C A B ( ( ) . SAB(I) NH DIMENSION T l X ( 1 ) . 1 Y l T Z l TZX(1). TZY(1). TZZ(1). XS(1). Y NH IS(1). zs(1) NU

EQUIVALENCE ( C A B . A L P ) . H X = ( O . .O.) HY=(O..O.) HZ=(O..O.) AX=O I F ( N . i Q . 0 ) GO TO 4 00 1 I = 1 . N X J=XOB-X( I ) YJ=YOB-Y(I) ZJ=ZOB-Z( I )

(SAB.BET)

ZP=CAB(IJ'XJ+SAB(I)'YJ+SALP(I)*ZJ I F (ABS(ZP).GT.O.5OOI*SI(I)) GO TO 1
ZP=XJgXJ+YJ.YJ+ZJ'ZJ-ZP'ZP
XJ=BI(I) I F (ZP.GT.0.9'XJ.XJ) AX=XJ GO TO 2 CONTINUE DO 3 1 - 1 . N GO TO I

SABJ~=SAB(I) SALPJ-SALP(1) CALL H5FLII (XOB.YOB.ZOB.AX)

ACX=CMPL~(AIR(I).~II(I)) ~CX=CMPLX~EIR(I).BII(I))

ccx-cMrLx(c1a(r).~11(1))
HX=~HX+EXK~ACXt~XS~ECXcFXC~CCX HY=HY+EYK.ACXtLYS.BCX+EYCCCCX

HZ=HZ+FiK.ACX+FZS.BCX+EZC*CCX I F ( M . E Q 0 ) RETURN
JC-N JL-LDfl 00 5 1 = 1 . M JLrJibl S=BI(JL) XJ=X(JL: YJ=Y(JL)

ZJ=Z(JL) TlXJ=TlX(JL) TlYJ=TIY(JL) TlZJ=TtZ(JL) TZXJ=TZX(JL) TZYJ=TZY(JL) TZLJ=TZZ(JL) C A L L HINTG ( X O B . Y O B . Z O 0 ) JC=JC+J

ACX=TlXJ'CUR(JC-2)+TlYJ.CUR(JC-l)+TlZJ.CUR(JC)
BCX=T2XJ'CUR(JC-2)+TZYJ~CUR(JC-l)+TZZJ*CUR(JC) HX=HX+ACX.EXK+BCXotXS HY=HY+ACX0EYK+BCX*EYS HZ=HZ+ACX*EZK+ECX*EZS RETURN END

PATCH PATCH ( e n t r y SUBPH)

PURPOSE To g e n e r a t e p a t c h d a t a f o r s u r f a c e s .

METHOD The c o d e f r o m PA14 t o PAL29 g e n e r a t e s d a t a f o r a s i n g l e new p a t c h o r multiple patches. There a r e f o u r o p t i o n s f o r d e f i n i n g a s i n g l e patch, a s F o r a s i n g l e p a t c h , N X i s z e r o and N Y i s

i l l u s t r a t e d i n F i g u r e 5 o f P a r t 111.

N S + 1 where N S i s t h e p a r a m e t e r f r o m t h e SP i n p u t c a r d a n d i s shown o n F i g u r e 5. R e c t a n g u l a r , t r i a n g u l a r o r q u a d r i l a t e r a l p a t c n e s a r e d e f i n e d by t h e In the

c o o r d i n a t e s o f t h r e e o r f o u r c o r n e r s i n t h e p a r a m e t e r s X 1 t h o u g h 24.

a r b i t r a r y s h a p e o p t i o n ( F i g u r e 5A i n P a r t 1 1 1 ) t h e c e n t e r o f t h e p a t c h i s X1, Y1, LL; u i s X2; D i s Y2; and t h e a r e a i s 22. The p a t c h d a t a i s s t o r e d i n

C C ) ~ O N / D A T A / f r o m t h e t o p o f t h e a r r a y s downward ( s e e S e c t i o n 111). The c o d e f r o m PA131 t o PA190 d i v i d e s a p a t c h i n t o f o u r p a t c h e s and i s u s e d when a w i r e c o n n e c t s t o a p a t c h . I f NY i s e q u a l t o z e r o t h e p a t c h N X i s Patches

d i v i d e d i n t o f o u r p a t c h e s t h a t become p a t c h e s N X t h r o u g h N X + 3.

t o leave space f o r t h e f o l l o w i n g N X a r e s h i f t e d i n t h e a r r a y s i n COMMONIDATAI


three additional patches. I f NY i s g r e a t e r t h a n z e r o , p a t c h N X i s l e f t i n t h e a r r a y s b u t f o u r new p a t c h e s t o r e p l a c e i t a r e a d d e d t o t h e e n d o f t h e a r r a y s .
The z c o o r d i n a t e o f p a t c h NX i s t h e n changed t o 1 0 , 0 0 0 a t PA189.

SYMBOL DLC'I'IONAKY
MI
,'I I A
N 'PP
= a r r a y index f o r patch d a t a

= a r r a y index f o r patch d a t a = p a t c h t y p e (NY f o r a s i n g l e p a t c h )


= z e r o f o r a s i n g l e patch.

NX

For multiple patches NX is A f t e r ENTRY SUI~PH, N X

d e f i n e d i n F i g u r e 6 o f P a r t 111.

i s t h e number o f t h e p a t c h t o b e d i v i d e d

s lX,
S ALN

S L Y , S1Z

= v e c t o r from c o r n e r 1 t o c o r n e r 2 = v e c t o r from c o r n e r 2 t o c o r n e r 3 = + I from a r r a y SALP

S I X , SZY, 522

SALL'N

= f a c t o r i n c o m p u t i n g c e n t e r o f mass o f q u a d r i l a t e r a l

XA

IS1 x 5 2 1 = a r e a o f r e c t a n g l e o r t w i c e a r e a o f t r i a n g l e (PASJ)

XNL,

YNZ,

ZN2

= S

< i t PA79 t o PA81. L i n e PA89 c n e c k s t h a t t h e 4 f o u r c o r n e r s a r e c o p l a n a r by t h e t e s t


x S

(Sl
XNV, XS, YNV, YS, ZNV

s2).(sj

s4)/ls1

s21 is3
-

S ~ >I

o.wYa

= u n i t v e c t o r normal t o t h e p a t c h a t PA54 t o PA56 = p a t c h c e n t e r a t PA151 t o PA153

ZS

XST

ISl

g21

a t PA57

CONSTANTS

0.9998 Z c o s ( 1 .

O )

i n t e s t Eor p l a n a r p a t c h

PATCH
S U B R O U T I N E PATCH ( N X . N Y . X l . Y 1 . Z l . X 2 . 1 2 2 i 2 , X 3 3 Y 3 . Z 3 . X 4 , ~ 4 4 Z 4 ) P A T C H GENERATES AND M O U I F I E S PATCH GtOMETRY DATA COMMON /DATA/ LD.Nl.N2.N.NP.Ml.M2.M.MP.X(300).Y(30O).Z(300).SI(300

1).BI(500).ALP(300).sET(3OO),ICON1(3OO),ICON2(3OO),ITAG(3OO),ICONX(
230O).WLAM.IPSYM COMMON /ANGL/ SALP(300) DIMENSION T l X ( 1 ) . T I Y ( 1 ) . T l Z ( 1 ) . T2X(1). T2Y(1). TZZ(1) EQUIVALENCE ( T I X . S I ) . (T1Y.ALP). (T1Z.BET). (TZX.ICON1). (T2Y.ICON 1 2 ) . (T2Z.ITAG) NEW PATCHES. FOR NX=O. N Y = 1 . 2 . 3 . 4 PATCH I S ( R E S P E C T I V E L Y ) A R B I T R A R Y . RECTAGULAR. T R I A N G U L A R . OR Q U A D R I L A T E R A L . FOR NX AND NY . G T . 0 A RECTANGULAR SURFACE I S PRODUCED W I T H NX BY NY RECTANGULAR PATCHES. M=M+ 1 MI=LD+I-M NTP=NY I F ( N X . G T . 0 ) NTP=2 I F ( N T P . G T . 1 ) GO TO 2 X(MI)=Xl Y(MI)=YI Z(MI)=Zl BI(MI)=Z2 ZNV=COS(XZ) XNV=ZNV*COS(Y2) YNV=ZNV.SIN(YZ) ZNV=SIN(X2)

PATCH

PRINT 14 STOP

PATCH
RETURN D I V I D E PATCH FOR W I R E CONNECTION ENTRY S U B P H ( N X . N Y . X I . Y I . Z l . X 2 . Y 2 . Z 2 . X 3 . Y 3 . Z 3 . X 4 . Y 4 . Z 4 ) I F (NY.GT.0) 60 TO 1 0 I F ( N X . E I 2 . M ) GO TO 1 0 NXP=NX+l IX=LD-M DO 9 I Y = N X P . M IX=IX+! NYP=IX-3

YT=XST I F ( N Y . G T . 0 ) GO TO I 1 MIA=MI GO TO 1 2 M=M+l MP=MP+I M I A = L D + l -M DO 1 3 I X = I . 4 X(MIA)=XS+XT*SlX+YT*S2X Y(MIA)=YS+X~*SIY+Y~.S~Y

z(~~~)=zs+x~-s~z+~r*s~z
eI(hcIn)=xn TIX(MIA)=SlX TIY(MIA)=SIY TIZ(MIA)=SlZ TZX(MIA)=SZX T2Y(MIA)=S2Y TZZ(M1A)-SZZ SALP(MIA)=SALN I F ( I X E O . 2 ) YT=-YT I F ( I X . E O . l . O R . I X . E Q . 3 ) XT=-XT MIA=MIA-1 CONTINUE M=M+3 I r ( N X . L E . M P ) MP=MP+3 I f (NY.GT.0) Z(MI)=10000. RETURN FORMAT f 6 2 H ERROR -- CORNERS OF Q U A D R I L A T E R A L P A T C H DO NOT L I E I N

PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA PA

131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192

193 194

I A PLANE)

END

PCINT
1'C 1N1'

I'UI<l'OSE

To computc t h e i n t e r a c t i o n m a t r i x e l e m e n t s r e p r e s e n t i n g t h e e l e c t r i c f i e l d , t a n g e n t t o a segment connected t o a s u r f a c e , due t o t h e c u r r e n t on t h e f o u r p a t c h e s around t h e c o n n e c t i o n p o i n t . M E T H O D The f o u r p a t c h e s a t t h e b a s e o f a connected w i r e a r e l o c a t e d a s shown i n figure l ! J with respect to the vectors and ; ; 1 2' where p a t c h numbers The p o s i t i o n of a p o i n t
A

i n d i c a t e t h e o r d e r of t h e p a t c h e s i n t h e d a t a . a r r a y s . on t h e s u r f a c e i s d e f i n e d by

+ S 2 t 2 , where is t h e 11 p o s i t i o n of t h e c e n t e r of t h e f o u r p a t c h e s where t h e w i r e c o n n e c t s , and S 1 and S a r e c o o r d i n a t e s measured from t h e c e n t e r . The c u r r e n t o v e r t h e s u r f a c e 2 i s r e p r e s e n t e d by J ( S S ), t h e c u r r e n t s a t t h e c e n t e r s of t h e f o u r p a t c h e s 1' 2 are


= p

5 (S 1' S2 )

and t h e c u r r e n t a t t h e b a s e of t h e segment, f l o w i n g o n t o t h e s u r f a c e , i s I The c u r r e n t i n t e r p o l a t i o n f u n c t i o n i s t h e n

0'

where

PCINT

F i g u r e 10. P a t c h e s a t a Wire Connection P o i n t .

IF

(p)d~ and r 2 (p)dA


, .

a r e t h e e l e c t r i c f i e l d s a t t h e c e n t e r of t h e

c o n n e c t e d segment d u e t o u n i t c u r r e n t s a t p on t h e s u r f a c e dA, f l o w i n g i n t h e directions t


are

and

; 2'

r e s p e c t i v e l y , t h e n i n e m a t r i x e l e m e n t s t o b e computed

PCINT

where

and w h e r e i = t h e u n i t v e c t o r i n t h e d i r e c t i o n o f t h e c o n n e c t e d segment. The i n t e g r a t i o n i s o v e r t h e t o t a l a r e a o f t h e f o u r p a t c h e s and i s p e r Eormed b y n u m e r i c a l q u a d r a t u r e . The number o f i n c r e m e n t s i n S and S u s e d 1 2 When PCINT i s c a l l e d , t h e

i n i n t e g r a t i o n i s s e t by t h e v a r i a b l e NINT.

p a r a m e t e r s i n COMMON/DATAJ/ h a v e t h e v a l u e s f o r t h e f i r s t c o n n e c t e d p a t c h . During i n t e g r a t i o n , t h e s e p a r a m e t e r s a r e set f o r e a c h i n t e g r a t i o n p a t c h . t h e end o f PCINT, t h e y a r e r e s e t t o t h e i r o r i g i n a l v a l u e s . SYMBOL DICTIONARY


A

At

CAB1
D

= =

x component o f i
d

DA

= a r e a of t h e s u r f a c e e l e m e n t , u s e d i n i n t e g r a t i o n = w i d t h o f t h e s u r f a c e element of a r e a DA
=

DS

E
EXK EyK\ EZK

a r r a y used t o r e t u r n t h e v a l u e s E

1'

E2,

...,

x, Y , ' a n d z ComPOnents of i = l ( F ) ~ a ~ t PC50; a t PC51, E X K is s e t


to

.T 1 ( P ) ~ ~
. F2(P)DA

EXS
EY S

EZS

x, y , and z components oE F 2 ( , ) ~ ~ a t PC50; a t PC52, EXS i s s e t


to

i<l
v :
1 :

2
3

= E2
=

E4
E5
Eh
E7

E. 3 = E4

E5

= E6 =

E ,

E8 E9
FCON

=
= =

E8
E
9 in
A

11( 4 1 ~ d ) f a c t o r ' tl
A

f2,

...
...

Fl
F2

= h(S1.S2) -

= h(S1,S2)
=

'

GCON
G1

1 / ( 4 d 2 ) f a c t o r i n g1(S1,S2).

= g1 ( S I' S2 )
= g (S ,S )

G2 G3 G4

2 1 2 = g3(s1,s2)

=g4(S1.S2)
= D O loop index
= DO l o o p i n d e x = number of

I1

I2

NINT
S

f o r El,
=

s t e p s i n S1 and S 3 u s e d i n a p p r o x i m a t i n g t h e i n t e g r a l s E2, , E9

. ..

area o f e a c h of t h e f o u r p a t c h e s a t PC11; a r e a o f t h e s u r f a c e
e l e m e n t u s e d i n i n t e g r a t i o n a t PC20
A

SARI

= y component o f

i
A

SALPI = z component o f i

S1 S2 S2X
TPI
'.PlXJ T1'i.l

= S =

s2
S

= i n i t i a l v a l u e of

=2n

'I'lX~l

.r2x.1 1
1'21.1

i
/

x , y , a n d z components o f t 1

= x, y ,

and z

o f t,, -

'rzw
X!

x c o o r d i n a t e o f t h e c e n t e r of t h c c o n n e c t e d s e g m e n t

= c e n t e r o f f i r s t p a t c h above

F'C41; c e n t e r o f i n t e g r a t i o n e l e m e n t

ZJ

below P C 4 1 S ) 1' 2 = i n i t i a l x c o o r d i n a t e o f p(S


=

X S XSS XXJ
xyJ

x component o f p ( S

XZ J

S ) 1' 2
saved

= i n i t i a l v a l u e o f X i li, i

X1

= x component o f p ( d , d ) u s e d a s r e f e r e n < , < :f o r c o m p u t i n g ;(S


=

S ) 1' 2

YL
YS YSS
Y1

y c o o r d i n a t e of t h e c e n t e r o f t h e c o n n e c t e d s e g m e n t
S )

= y component o f ;(S

1 ' 2 = i n i t i a l y component o f p(S


= y component o f p ( d , d )

S ) 1' 2

ZI ZS ZSS Z1

= z c o o r d i n a t e o f t h e c e n t e r of t h e c o n n e c t e d s e g m e n t

S ) 1 ' 2 = i n i t i a l z component o f p ( S
=

z component o f

,(s

S ) 1' 2

= z component o f ;(d,d)

PCINT
S U B R O U T I N E P C I N T (XI.YI. ZI.CABI.SABI.SALP1.E) I N T E G R A T E OVER PATCHES AT W I R E CONNECTION P O I N T COMPLEX E X K . E Y K . E Z K . E X S . E Y S . E Z S , E X C , E Y C C E Z C C E E E 1 . E 2 . E 3 . E 4 . E 5 , E 6 , E 7 1 .E8.E9

DIMENSION E f 9 ) EQUIVALENCE'(~!XJ.CAEJ). (TlYJ.SABJ). 1 J . I N D I ) . (TZZJ.INO2) OATA TPI/6.283l85308/,NINT/lO/

(TlZJ.SALPJ).

(T2XJ.B).

(T2Y

ZJ=ZJ-DS-TZZJ C A L L UNERC ( X I . Y I . Z I )

E6=E6+EXS.G2 E7=E7+EXS*G3 E8=EB+EXS*G4 E9=E9+EXK.F1+EXSmF2 E(1)-El E(Z)=E2 E(3)=E5 E(4)=E4 E(5)=E5 E(6)=E6 E(7)=E7 E(8)=E8 E(9)=E9 XJ=XXJ YJ=XYJ Z J=XZ J S=XS RETURN END

PRNT PURPOSE To s e t up t h e Formats f o r p r i n t i n g a r e c o r d o f t h r e e i n t e g e r s , s i x f l o a t i n g p o i n t n u m b e r s , and a H o l l e r i t h s t r i n g , where t h e v a r i a b l e s e q u a l t o z e r o a r e r e p l a c e d by b l a n k s . impedance d a t a t a b l e . METHOD A v a r i a b l e format is used t o g e n e r a t e t h e r e c o r d w i t h a r b i t r a r y b l a n k fill. E l e m e n t s o f t h e f o r m a t a r e p i c k e d f r o m t h e a r r a y IFORM i n t h e DATA Through I F s t a t e m e n t s o p e r a t i n g o n t h e s u b r o u t i n e i n p u t q u a n t i t i e s , T h i s r o u t i n e i s u s e d by LOAD i n p r i n t i n g t h e

statement.

t h i s r o u t i n e c h o o s e s t h e d e s i r e d f o r m a t e l e m e n t s and b u i l d s t h e f o r m a t i n t h e a r r a y IVAR. The program i s d i v i d e d i n t o two s e c t i o n s : the f i r s t builds the

i n t e g e r p a r t o f t h e f o r m a t and t h e s e c o n d t h e f l o a t i n g p o i n t p a r t . SYMBOL DICTIONARY ABS FL


=

external routine (absolute value) input

= elements of t h i s a r r a y a r e s e t equal t o t h e f l o a t i n g p o i n t

q u a n t i t i e s FLl FLT

FL6
f l o a t i n g p o i n t input q u a n t i t i e s t o be p r i n t e d

= a r r a y o f non-zero

= input f l o a t i n g point q u a n t i t i e s

I'L4

HALL
I
1A

4H ALL ( H o l l e r i t h

ALL)

= DO l o o p i n d e x
=

input llollerith s t r i n g (array) characters i n the input Hollerith s t r i n g

ICHAK IFORM

= number o f

= a r r a y c o n t a i n i n g f ornlat e l e m e n t s = a r r a y s e t r l u a l t o i n p u t i n t e g e r q u a n t i t i e s (IN1 = non-zero

IN
INT

IN3)

integer quantities t o be printed

i n p u t i n t e g e r quant

i l ics

IN3

IVAR

= v a r i a b l e format a r r a y

T1
J

= DO l o o p l i m i t = impLied DO l o o p i n d e x = index parameter = i m p l i e d DO l o o p i n d e x = number o f H o l l e r i t l ~c h a r a c t e r s p e r computer word

K L

NCPW
NFLT

= F l o a t i n g p o i n t p r i n t i n d e x , number o f n o n - z e r o
= integer print

reals

NINT

i n d e x ; number o f n o n - z e r o

integers

W O R D S = number oZ computer words i n t h e i n p u t H o l l e r i t h s t r i n g

PRNT
S U B R O U T I N E PRNT ( I N l . I N ? . I N J . F L l . F L 2 . F L 3 . F L 4 . F L 5 , F L 6 , I A . I C H A R ) PRNT S E T S UP THF P R I N T FORMATS FOR IMPEDANCE L O A D I N G DIMENSION 1 V A R ( l J ) . INTEGER HALL IA(~). IrORM(8). IN(3). INT(3). FL(6). FLT(6; PP PR PR
an

2
3

PR PR

NUMBER OF CHARACTERS PER COMPUTER WORD I S NCPW

I N T E G E R FORMAl

IVAR(K)=IFORM(4) DO 3 I = I 1 . 3 K=K+l I F (IN(I).EQ.O) GO TO 2 NINT=NINT+l INT(NINT)=IN(I) IVAR(K)=IFORM(Z) GO TO 3 IVAR(K)=IFORM(J) CONTINUE K=K+l IVAR(K)=IFORM(7) F L O A T I N G P O I N T FORMAT

GO TO 5 IVAR(K)=IFORM(6) CONTINUE K=K+l K=K+l IVAR(K)=IFORM(8) P R I N T I V A R . (INT(I),I=~.NINT).(FLT(J).J=~.NFLT).(IA(L).L=~.NWORDS) PR PR PR

PRNT
65

66

RETURN END

QDSRC

QDSRC PURL'OSE To f i l l t h e e x c i t a t i o n a r r a y f o r a c u r r e n t s l o p e d i s c o n t i n u i t y v o l t a g e source. METHOD The c u r r e n t s l o p e d i s c o n t i n u i t y v o l t a g e s o u r c e i s d e s c r i b e d i n s e c t i o n

IV-1 o f P a r t 1.
CODING

QD22

QD23

The c o n n e c t i o n number f o r end 1 of segment I S i s t e m p o r a r i l y seL t o 0 , and TBF i s c a l l e d t o g e n e r a t e t h e f u n c t i o n f " ( s ) for P

a.

IS.

The z e r o i n t h e second argument of TBF c a u s e s

E* t o go t o z e r o a t t h e f i r s t end o f segment I S r a t h e r
P
t h a n t h e u s u a l non-zero v a l u e t h a t a l l o w s f o r c u r r e n t f l o w i n g o n t o t h e w i r e end c a p . Q~26 - QD31 QD32

BQ i s computed and o t h e r q u a n t i t i e s s e t .
f * i s non-zero.

QD119 T h i s l o o p computes t h e f i e l d s due t o e a c h segment o n which

a.

QD33

QD77

P a r a m e t e r s o f t h e s o u r c e segment a r e s t o r e d i n COMMON/ DATAJ/. F l a g s f o r t h e extended t h i n w i r e approximation

a r e s e t a s i n r o u t i n e CMSET. QD78 QD95

QDYl

T h i s loop e v a l u a t e s t h e e l e c t r i c f i e l d on each segment.

QD116 T h i s l o o p e v a l u a t e s t h e m a g n e t i c f i e l d a t e a c h p a t c h .

SYMBOL DICTIONARY
A1
=

r a d i u s o f segment on which f i e l d i s e v a l u a t e d .

CAB1 = x component o f u n i t v e c t o r i n t h e d i r e c t i o n of segment I

CCJ

= CCJX = -j/60

CURD = Ba.
E
= =

a r r a y o f segment and p a t c h e x c i t a t i o n f i e l d s

ETC

E f i e l d t a n g e n t t o a segment o r H f i e l d components on a p a t c h
d u e t o c o s i n e , c o n s t a n t , and s i n e c u r r e n t components, r e s p e c t i v e l y , on a segment

Eljl
ETS
11
1 . 1

=
=

a r r a y index f o r patch e x c i t a t i o n
tLag which,

i F zeru, i n d i c a t e s t h a t the f i e l d i s b e i n g e v a l u a t e d

o n t h e s o u r c e segment

QDSRC

IPR

temporary s t o r a g e of c o n n e c t i o n number

IS
,J

= segment w l l i c l ~ h a s t h e s o u r c e l o c a t i o n on end 1
=

s o u r c e segment number

SABI = y component o f u n i t v e c t o r i n t h e d i r e c t i o n o f segment I

a r r a y s o f components of t

T2X

and

f o r patches

TP

TI
~ompone.ts o t

, . or
1

f o r patches

TZ
V
=

source voltage c o o r d i n a t e s of p o i n t where f i e l d i s e v a l u a t e d ; X I is a l s o used i n t h e t e s t f o r t h e extended t h i n w i r e approximation Tor t h e e l e c t r i c f i e l d

YI

1
]

ZI

CONSTANTS 0.01666666667 = 1 / 6 0 0.999999


= minimum X I f o r t h e e x t e n d e d t h i n wire a p p r o x i m a t i o n

(maximum a n g l e 6.283185308
=

0.08 d e g r e e s )

271

ODSKC
S U B R O U T I N E QOSRC ( 1 S . V . E ) F I L L I N C I D E N T F I E L D ARRAY FOR CHARGE D I S C O N T I N U I T Y VOLTAGE SOURCE COMPLEX VQOS.CURO.CCJ.V.EXK.EYK.EZK,EXS,EYS,EZS,EXC,EYC,EZC,ETK.ET OD OD .-

00

1S.ETC.VSANT.VOO.E.ZARRAY OD LD.Nl.N2.N.NP.Ml.M2.M.MP.X(300).Y(30O).Z(300),SI(300 OD COMMON /OATA/ ~).BI(~~~).ALP(~~~).~ET(~~~).ICON~(~~~).ICON~(~OO),IT OD AG(~OO),ICONX(


23OO).WLAM,IPSYM COMMON / V ~ O R C / V O D ( 3 0 ) . V S A N T ( 3 0 ) . V O D S ( 3 0 ) . I V O D ( 3 0 ) . I S A N ( O ) O D ( IJO).NV~D.NSANT.NOOS COMMON / S E G J / ~ ~ ( 3 0 B) ~. ( 3 0 ) .CX(3O). JCO(30). JSNOOISCON(50) N C N I ICON(IO).NPCON COMMON./DATAJ/ S.B.XJ.YJ.ZJ.CABJ.SABJ.SALPJ,EXK,EYK,EZK,EXS,EYSEZ

nn OD
OD

on -

00
QD

lS.EXC.EYC.EZC.RKH.IEXKKINOl,IN02,1PGND
COMMON /ANGL/ SALP(300) COMMON /ZLOAD/ ZARRAY(30O).NLDAD9NLODF DIMENSION C C J X ( 2 ) . E ( 1 ) . CAB(1). SAB(1) DIMENSION T l X ( 1 ) . T l Y ( 1 ) . TlZ(1). TZX(1). TZY(1). TZZ(1) EOUIVALENCE (CCJ.CCJX). (CAB.ALP). (SAB.BET) EOUIVALENCE ( T 1 X . S I ) . (T1Y.ALP). (T1Z.BET). (T2X.ICONl). 1 2 ) . (T2Z.ITAG) DATA T P / 6 , 2 8 3 1 8 5 3 0 8 / , C C J X / O . . - . 0 1 6 6 6 6 6 6 6 6 7 / I=ICONI(IS) ICONl(IS)=O C A L L TBF ( 1 S . O ) ICONl(IS)=I S=SI(IS)*.S IN(TP.S))*WLAM) NOOS=NQOS+l VQOS(NODS)=V IODS(NODS)=IS DO 2 0 J X = l JSNO J=JCO( J X ) S=SI(J) B=BI(J) XJ=X(J) YJ=Y(J) ZJ=Z(J) CABJ=CAB(J) SABJ=SAB(J) SALPJ=SALP(J) I F ( I E X K . E O . 0 ) GO TO 1 6 IPR=ICONl(J) I F (IPR) 1.6.2 IPR=-IPR I F (-ICONI(IPR).NE.J) GO TO 7 GO TO 4 I F (IPR.NE.J) GO TO 3 I F (CABJ0CABJ+SABJ'SABJ.GT.I.E-8) GO TO 5 I F (ICONZ(IPR).NE.J) GO TO 7

00
OD OD OD (T2Y.ICDN

OD 00

00
OD OD OD OD OD

a0
OD OD OD OD OD OD OD OD OD OD OD OD

CURD=CCJ*V/((ALOG(~.*S/~I(IS))-~.).(BX(JSNO)*COS(TP.S)+CX(JSNO)*SI

00
OD

OD
OD OD OD

GO TO 7

XI=AB~(CABJ*CAB(IPR)+SABJ*SAB(IPR)+SALPJ~SALP(IPR))
I F (XI.LT.0.999999) GO TO 7 I F (ABS(BI(IPR)/B-l.).GT.l.E-6) INDl=O GO TO 8 INDl=l GO TO 8 I N 0 1 =2 IPR=ICON2(J) I F (IPR) 9.14.10 IPR=-IPR I F ( - I C O N ~ ( I P R ) . N E . J ) GO T O I S GO TO I 2 GO TO 7

00 OD OD OD 00 OD OD

OD
OD OD 00 OD OD OD OD OD

00
OD OD OD

QDSRC

GO TO 1 6 IND2=1 GO TO 1 6 IND2=2 CONTINUE DO 1 7 I = 1 . N IJ=I-J

CALL E F L D ( X I . Y I . Z I . A I . I J ) cA~I=cAB(I)

IJ=LD+I
Il=N DO 1 8 1=1 .M IJ=IJ-I XI=X(IJ) YI=Y(IJ) ZI=Z(IJ) CALL HSFLO ( X I . Y I . Z I . 0 . ) I1=11+1 TX=T2X(IJ)

CONTINUE RETURN END

RDPAT

PUI<POSE

To c o m p u t e a n d p r i n t r a d i a t e d f i e l d q u a n t i t i e s .

HETHOD

The q u a n t i t i e s computed and t h e o u t p u t f o r m a t s d e p e n d o n t h e o p t i o n s s e l e c t e d b y t h e f i r s t i n t e g e r (WAR) a n d f o u r t h i n t e g e r (IPD,


o n t h e RP c a r d ( s e e P a r t 111).

IAVP, I N O R , IAX)

These q u a n t i t i e s a r e d e f i n e d a s follows:

(1)

Power G a i n I n t h e d i r e c t i o n (6,Q)

where Pil(t),q)

i s t h e power r a d i a t e d p e r u n i t s o l i d a n g l e i n t h e g i v e n
In

d i r e c t i o n , a n d P.

i s t h e t o t a l power a c c e p t e d by t h e a n t e n n a .
where V i s t h e a p p l i e d s o u r c e v o l t a g e , and

Therefore,

P . = (1/2)Re(VI*), in

where K i s t h e o b s e r v a t i o n s p h e r e r a d i u s .
b y FFLD ( c a l l i t

Since the e l e c t r i c f i e l d calculated

E')

does not include exp(-jkR)/(R/h),

and

RDPAT
'C~IUS.

i n terms o f t h e p r o g r a m v a r i a b l e s .

( 2 )

D i r e c t i v e Gain I n the direction (8,q),

w h e r e 't

i s t h e t o t a l p o w e r r a d i a t e d by t h e a n t e n n a . The o n l y d i f f e r e n c e rad - Pin f r o i n p o w e r g a i n i s t h a t P. i s r e p l a c e d by P r a d , a n d Prad where Ln Ploss~ P i s c a l c u l a t e d a s t h e power l o s t i n d i s t r i b u t e d a n d l u m p e d l o a d s o n t h e Loss s t r u c t u r e and i n t h e networks loads.

Component G a i n The g a i n s a r e a l s o c a l c u l a t e d f o r s e p a r a t e , o r t h o g o n a l f i e l d components

( u , v).

i s r e p l a c e d by E E U u t o t a l g a i n i s t h e sum o f t h e t w o c o m p o n e n t s .
I n t h i s case, E'
'

E'*

or E E

v v

*,

and t h e

(4)

Average Gain T h e u s e r s p e c i f i e s a r a n g e and number o f p o i n t s i n t h e t a and p h i t h a t i n

t e r n s p e c i f y t h e t o t a l s o l i d a n g l e c o v e r e d , 11, a n d t h e s a m p l i n g d e n s i t y f o r t h e i n t e g r a l i n t h e expression f o r average gain:

The t r a p e z o i d a l r u l e i s u s e d i n e v a l u a t i n g t h e i n t e g r a l .

RDPAT

(5)

Normalized G a i n N o r m a l i z e d g a i n i s s i m p l y t h e g a i n d i v i d e d by i t s maximum v a l u e o r some

v a l u e s p e c i f i e d by t h e u s e r . The d i s c u s s i o n o f g a i n s a p p l i e s o n l y t o t h e c a s e o f a s t r u c t u r e u s e d a s a r a d i a t i n g antenna. F o r t h e c a s e o f a n i n c i d e n t p l a n e wave, t h e p r o g r a m 2 . c o n s t a n t s a r e d e f i n e d s u c h t h a t t h e v a l u e o f a/X 1 s p r i n t e d u n d e r t h e The c a l c u l a t i o n i s

h e a d i n g "GAIN."

o-=

4m2

'sc -a t 'inc

4n

A'

Ei . nc

.E

scat ~ ~

where W

i s t h e s c a t t e r e d power p e r u n i t a r e a a t d i s t a n c e R i n a g i v e n scat i s t h e power p e r u n i t a r e a of t h e i n c i d e n t p l a n e wave, and direction, W . inc t h e p r i m e s o n t h e e l e c t r i c f i e l d s s p e c i f y t h e f i e l d s u s e d i n t h e program a s


d e f i n e d above. For t h e cage of a Hertzian d i p o l e used a s a s o u r c e , t h e g a i n
1n

e q u a t i o n s a r e u s e d ; however, P. Hertzian source. That i s

i s e q u a l t o t h e t o t a l power r a d i a t e d by t h e

where t h e q u a n t i t y I t i s a n i n p u t q u a n t i t y .

(6)

E l l i p t i c Polarization E l l i p t i c p o l a r i z a t i o n paratneters a r e c a l c u l a t e d a s Follows:

RDPAT

M = i(E

Y"

cos Y

zm

cos

2 2 sin y)2 + E sin zm

sin

yJ

112

N = [E

Ym

s i n y - E

zm

cos C c o s y)

2 2 +EZm sin

cos

yl

112

where

= E

Y"'

expIj(wt

kx)l

a n d y i s g i v e n by

2E m E z m ~ o s C t a n 2y =

Y,

I n t h i s r o u t i n e , t h e c o o r d i n a t e s y and z a b o v e a r e r e p l a c e d by I3 and @, respectively.

The EieLd i s computed by FFLD a t RD74 f o r s p a c e wave o r by GFLD a t RD76 f o r s p a c e a n d g r o u n d wave.


K D 8 7 t o KD118.

E l l i p t i c p o l a r i z a t i o n p a r a m e t e r s a r e computed f r o m

Kt1127 t o RD137 s t o r e s g a i n i n t h e a r r a y G A I N f o r The i n t e g r a l o f r a d i a t e d power f o r t h e a v e r a g e g a i n F i e l d s and g a i n a r e p r i n t e d a t RD162 Average g a i n i s computed and p r i n t e d

normalization.

c a l c u l a t i o n i s summed a t KD140 t o RD147. f o r s p a c e wave o r KD165 f o r g r o u n d wave. f r o m KD168 t o RD173.

Normalized g a i n i s p r i n t e d from RD174 t o RD208.

SYMUOL OICTIONAKY AXhA'C


C H'L'

= N/M

(elliptic axial ratio)

= height of c l i f f i n meters = d i s t a n c e i n m e t e r s of c l i f f edge from o r i g i n = e l e m e n t o f s o l i d a n g l e f o r a v e r a g e g a i n summation = p h a s e d i f f e r e n c e between E e and E

c~ ' r
DA
1 ) FAL

polarization

For e l l i p t i c

RDPAT
= increment f o r @ = increment f o r 8

= ti2 (M = m a j o r a x i s ) 2 = N
= E

( p h i component o f e l e c t r i c f i e l d , w i t h o r $ w i t h o u t t h e t e r m e x p ( - j k ~ ) / ( ~ / id )e p e n d i n g on r e t u r n from G F L D o r FFLD)

EPHA E PHM
EPHMZ EPSR E PSR2

= phase a n g l e o f =

EPH

lEPHl

= IEPHI'
= relative dielectric constant

= r e l a t i v e d i e l e c t r i c c o n s t a n t o f s e c o n d medium = r a d i a l e l e c t r i c f i e l d f o r g r o u n d wave
= p h a s e oE ERD

ERD
E KDA E RDM

= IEKL) I = Etl
= phase o f E o =

ETH
ETHA ETHM ETHM2

lEel

= lEel 2 = p h a s e oE e x p ( - j k R ) = 1/R = Eactor m u l t i p l y i n g

EXKA
E XKM G CON

1 ~ 1 ' t o yield gain o r

o/x2
GCOP
= GCON e x c e p t when GCON y i e l d s d i r e c t i v e g a i n ;

t h e n GCOP

r e m a i n s power g a i n
G MAX GNH
GNMJ
= v a l u e used f o r normalized g a i n = horizontal gain i n decibels,

$ component

= major a x i s g a i n i n d e c i b e l s
= minor a x i s g a i n i n d e c i b e l s = i f non-zero,

GNMN CNOK GNV GTOT

equals input gain quantity

= vertical gain = total gain

(8)

LAVP
IAX

= Flag f o r a v e r a g e g a i n = f l a g f o r gain type

I FAK

= f i r s t i n t e g e r from K P c a r d

RDPAT [NO I<


i PI>
1 X'CYP
= = = =

integer to select normalized gain flag to select power or directive gain cxcitatio~~ type dimension of FNORM (maximum number of gain values that will be stored for normalization)

NORMAX

NPH NTH PHA PHI PHIS PI P INR PINT PLQSS PNLK P KAD RFLD SIG

= number of
=

JI values

number of 0 values in radians

= $

= $ I in degrees
=

initial $

= TI

= input power for current element source


= = =

summation variable for average gain power dissipated in structure loads power dissipated in networks and transmission lines

= power radiated by the antenna


=

if non-zero, equal to the observation distance in meters

= conductivity of ground (mhosfm)


= = = = =

SIG2
STILTA TA TD THA THET THETS TILTA

conductivity of second medium (mhosfm) sin y; y is tilt angle of the polarization ellipse nf180 180171

tl in radians
initial tl

= tl in degrees
=

=
=

y ( t i l t angle of ellipse)
minor axis of polarization ellipse or strength of current element source

XPR6

CONSTANTS

1.745329252E-2

= =

711180 small value test

1. E-20

1.E-5 -1.ElO 3.141592654

= s m a l l v a l u e test

= n e a r minus i n f i n i t y
=

90.01

= t e s t value

for a n g l e e x c e e d i n g 90 d e g r e e s

RDPAT
S U B R O U T I N E RDPAT COMPUTE R A D I A T I O N PATTERN. G A I N . N O R M A L I Z E D G A I N INTEGER HP0L.HELK.HCIR.HCLIF COMPLEX E T H . E P H . E R O . Z R A T I . Z R A T I 2 , T l . F R A T I COMMON /DATA/ LD,Nl.N2.N.NP.MI.M2.M.MP.X(300),Y(30O).Z(300).SI(30D ~ ) . E I ( ~ ~ ~ ) . A L P ( ~ ~ O ) . ~ E T ( ~ ~ ~ ) , I C O N ~ ( ~,ITAG(~oo),IcoNx( ~~).ICON~(~D 23OO).WLAM.IPSYM COMMON /SAVE/ IP(600).KCOM.CDM(13.S).EPSR.SIG,SCRWLT.SCRWRT,FMHZ COMMON /GND/ZRATI.ZRAlIi.FRATI,CL,CH.SCRWL,SCRWR,NRADL,KSYMP,IFAR, 1IPERF.Tl .T2 COMMON /FPAT/ NTH.NPH.IPO.IAVP.INOR.IAX.IHETS.PHIS,DTH,DPH.RFLD.GN RD RO RD RO RO O RD ) RD RD RO RD RD 1

2 3
4 5 6 7 8

9
10 11

COMMON /SCRATM/ GAIN(1200) DIMENSION I G T P ( 4 ) . I G A X ( 4 ) . I G N T P ( l 0 ) . H P O I ~ ( 3 ) DATA H P O L / 6 H L I N E A R . 5 H R I G H T . 4 H L E F T / . H B L K . H C I R , / I H .6HCIRCLE/ DATA I G T P / 6 H - .6HPOWER .6H- O I R E . 6 H C T I V E j OATA I G A X / 6 H M A J O R , 6 H M I N O R . 6 H V E R T . . 6 H HOR. / D A T A I G N T P / 6 H MAJOR.6H A X I S . 6 H M I N O R . 6 H A X I S . 6 H VER.6HTICAL I H HORIZ.6HONTAL . 6 H .6HTOTAL / OATA PI.TA.TD/3.141592654.1.745329252E-02.57.29577951/ OATA NORMAX/1200/ I F (IFAR.LT.z) TO 2 PRINT 3 5 I F ( I F A R . L E . 3 ) GO TO 1 P R I N T 3 6 . NRA0L.SCRWLT.SCRWRT I F (IFAR.E0.4) GO TO 2 I F (IFAR.ECl.2.OR.IFAR.EO.5) HCLIF=HPOL(I) I F (IFAR.EO.3.0R.IFAR.EQ.6) HCLIF=HCIR CL=CLT/WLAM CH=CHT/WLAM

.6

GO

ZRATI2=CSORT(I./CMPLX(EPSR2.-SIG2'WLAM.59,96)) P R I N T 3 7 . HCLIF.CLT.CHT.EPSR2.SIG2
I F (IFAR.NE.I) GO TO 3 PRINT 41 GO TO 5 I=2.IPD+1 J=I+I ITMP1=2*IAX+I ITMPZ=ITMPl+I PRINT 3 8 GO TO 4 I F (RFLD.LT.1.E-20) EXRM=I./RFLD EXRA=RFLD~LAM EXRA=-36O.*(EXRA-AINT(EXRA)) P R I N T 3 9 . RFLD.EXRM.EXRA P R I N T 4 0 . IGTP(I).IGTP(J).IGAX(ITMPI).IGAX(ITMP~) I F (IXTYP.EQ.O.OR.IXTYP.EO.5) GO TO 7 I F ( I X T Y P . E Q . 4 ) GO TO 6 PRAD=D .

DO 2 9 K P I i = l .NPH PHI=PHI+UPH PHA=PHI0TA THET=lHtTS-UlH DO 2 9 K T H z l . N T H THET=THET+OTH I F (KSYMP.EO.2.ANO.lHET.GT.90 O I . A N D . I F A R . N E . 1 ) GO TO 2 9 THA=THET0TA I F (IFAR.EQ.1) GO TO 9 CALL FFLD ( T H A . P H A . E T H . E P H ) GO TO 1 0 C A L L GFLO ( R F L D / I V L A M . P H A . T H E T / W L A M . E T H . E P H . E R O . Z R A T I . K S Y M P ) ERW=CABS(ERD) ERDA=CANG(ERD)

ETHM2=REAL(ETH'CONJG(ETH))
ETHM=SORT(ETHMZ) fTHA=CANG(ETH)

EPHM2=REAL(EPH8C0NJG(EPH)) EPHM=SORT(EPHML) EPHA=CANG(EPH) I F (IFAR.EQ.1) GO TO 2 8 E L L I P T I C A L P O L A R I Z A T I O N CALC. I F (ETHM2.GT.l.E-2O.OR.EPHMZ.GT.I.E-20) GO TO 1 1 TILTA=O. EMAJR2=0. EMINRZ=O. AXRAT=O. ISENS=HBLK GO TO 16 DFAZ=EPHA-ETHA I F (EPHA.LT.0.) GO TO 1 2 DFAZ2=DFAZ-360. GO TO 1 3 DFAZZ=DFAZ+360. I F ( A B S ( O F A Z ) . G T A B S ( D F A Z 2 ) ) DFAZ=DFAZZ

TMP5=GNMJ TMP6=GNMN GO TO 2 6 TMPS=GNV TMP6=GNH ETHM=FTHM.WLAM EPHM=EPHM.WLAM I F (RFLD.LT.1.E-20) GO TO 2 7 CTHM=ETHM*EXRM ETHA=ETHA+EXRA EPHM=EPHMSEXRM EPHA:EPHA+EXRA PRINT 4 2 . THET.PHI.TMP5.TMP6,GTOTTAXRAT.TILTA.ISENS,ETHM,ETHA I EPHA

GO TO 29 PRINT 4 3 . RFLD.PHI.THET.ETHM.ETHA.EPHM,EPHA,ERDM,ERDA CONTINUE I F ( I A V P . E O . 0 ) GO TO 3 0 TMP3=THETS.TA TMP4=TMP3+OTH'TA'FLOAT~NTH-I)

TMP3=AES(OPH~TA'FLOAT(NPH-I)~(COS(TMP3)-COS(TMP4)))
PINT=PINT/TMP3 TMP3=TMPJ/PI PRINT 4 4 . PINT.TMP3 I F ( I N O R E O . 0 ) GO TO 3 4 IF ( A R S ( G N O R ) . G T I . E - 2 0 ) CMAX=CNOR ITMPI-(INOR-I ).2+1 ITMPZ=IIMPl+l P K I N T 4 5 , IGNTP(ITMPl),iGNTP(ITMPZ),GMAX TTMP2-NPHeNTH If ( 1 T M P Z . C T . N O R M A X ) ITMP2:tIORMAX ITMPl=( ITMP2+2)/3 llMP2=ITMPI~J-ITMPI ITMP3=ITMPl ITMP4=2'1 IMP1 I F ( I T M P ? E O . 2 ) : 1MP4=11MP4-1 D!J I L- ! , ITLllJl ITMD3-i lMP3+I ITMP4=iJMP4+1 J=(I-i >/NrH T M P I : ? H I T S c F l O A T ' I I'PITH-I).OTH TMPZ=PCIIE+I L C i A T ( J ) . C P I i J = ( I T M P . 5 - ' !/NTH

REBLK

PuI<POSI.:

To r e a d t h e m a t r i x 8 by b l o c k s o f r o w s a n d w r i t e i t by b l o c k s o f c o l u m n s .

NETHOD When LCASX i s 3 o r 4 s u b r o u t i n e CMNGF w r i t e s 8 t o f i l e 1 4 by b l o c k s o f rows. F i l l i n g 6 by r o w s i s c o n v e n i e n t s i n c e t h e f i e l d o f a s i n g l e s e g m e n t may

c o n t r i b u t e t o s e v e r a l columns. However, b l o c k s o f c o l u m n s a r e n e e d e d when -1 A B is computed. Hence t h e f o r i n a t i s c o n v e r t e d .


N B 8 X i s t h e n u m b e r o f b l o c k o f B s t o r e d by r o w s a n d NBrlL i s t h e n u m b e r

o f b l o c k s s t o r e d by c o l u m n s .

T h e l o o p f r o m R B l 6 t o KB23 r e a d s f i l e 1 4 a n d This process is repeated f o r

s t o r e s t h e e l e m e n t s f o r b l o c k NPB o f c o l u m n s . e a c n o f t h e NBBL b l o c k s o f c o l u m n s .

SYMBOL DICTIONAKY
B

= a r r a y f o r b l o c k s o f columns o f B = a r r a y f o r b l o c k s o f rows o f B = number o f columns i n B = n u m b e r oE r o w s i n B = n u m b e r o f r o w s i n b l o c k s o f r o w s o f B (NPBX) = n u m b e r o f c o l u m n s i n b l o c k s of c o l u m n s (NPBL o r NLBL f o r l a s t

SX
N2C NB
NUX

NPB

block) NPX
= NPBX o r NLBX f o r l a s t b l o c k o f r o w s

RE BLK
S U B R O U T I N E REBLK ( B . B X . N B . N B X . N 2 C ) REBLOCK ARRAY B I N N . G . F . S O L U T I O N FROM BLOCKS OF ROWS ON T A P L I 4 TO BLOCKS OF COLUMNS ON TAPE16 COMPLEX B . B X COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLASl,NBLSYM,NPSYMMNLSYMIAT,l ICASX.NBBX.NPBX.NLBX,NBBL.NLBL DIMENSION B ( N B . l ) . BX(NBX.1) REWIND 1 6 NIB=O NPB=NPBL DO 3 I B = l . N B B L F I (IB.EO.NBBL) NPB=NLBL REWIND 1 4 NIX=O NPX=NPRX DO 2 I B X = l .NBBX I F (1BX.EQ.NBBK) NPX=NCBX REAO ( 1 4 ) ((BX(I.J).I=I,NPX).J=1.N2C) DO 1 I = l . N P X IX=I+NIX DO 1 J = l . N P B B(IX.J)=BX(I.J+NIB) NIX=NIX+NPBX W R I T E ( 1 6 ) ((B(I.J).I=l.NB).J=l.NPB) NIB=NIB+NPBL REWIND 1 4 REWIND 1 6 RETURN END RB RR RB RB RB RB RB RB RB RB RB

RB
RB RB RB RB RB RB RB RB RB RB RB RE RB RB RB RB RB

REFLC

IIEFI.C .~
r[lfil'usL.:

To g e n e r a t e geolnctry d a t a For s t r u c t u r e s h a v i n g p l a n e o r c y l i n d r i c a l symmetry by f o r m i n g s y m m e t r i c images o f a p r e v i o u s l y d e f i n e d s t r u c t u r e u n i t . METHOD The f i r s t p a r t o f t h e c o d e , from s t a t e m e n t RE20 t o RE153, forms p l a n e

s y m m e t r i c s t r u c t u r e s by r e f l e c t i n g s e g m e n t s and p a t c h e s i n t h e c o o r d i n a t e planes. and I Z . The r e f l e c t i o n p l a n e s a r e s e l e c t e d by t h e Eormal p a r a m e t e r s I X , I Y , I f IZ i s g r e a t e r t h a n z e r o , an image o f t h e e x i s t i n g s e g m e n t s and p l a n e , which w i l l b e c a l l e d

p a t c h e s i s formed by r e f l e c t i o n i n t h e x-y r e f l e c t i o n along the z axis.

N e x t , i f IY is g r e a t e r t h a n z e r o , a n image o f

t h e e x i s t i n g segments and p a t c h e s , i n c l u d i n g t h o s e g e n e r a t e d i n t h e p r e v i o u s s t e p by r e f l e c t i o n a l o n g t h e z a x i s , is formed by r e f l e c t i o n a l o n g t h e y a x i s . F i n a l l y , i f I X i s g r e a t e r t h a n z e r o , a n image o f a l l s e g m e n t s a n d p a t c h e s , i n c l u d i n g a n y p r e v i o u s l y formed by r e f l e c t i o n a l o n g t h e z a n d y a x e s , i s rormed by r e f l e c t i o n a l o n g t h e x a x i s . values of I X , Any c o m b i n a t i o n o f z e r o a n d n o n - z e r o

I Y , and I Z may h e u s e d t o g e n e r a t e s t r u c t u r e s w i t h o n e , two, Tag numbers o f image s e g m e n t s a r e i n c r e m e n t e d

o r t h r e e p l a n e s o f symmetry.

by ITX f r o m t a g s o f t h e o r i g i n a l s e g m e n t s , e x c e p t t h a t t a g s o f z e r o a r e n o t incremented. A f t e r e a c h r e f l e c t i o n i n a c o o r d i n a t e p l a n e , ITX i s d o u b l e d .

T h u s , i f ITX i s i n i t i a l l y g r e a t e r t h a n t h e l a r g e s t t a g o f t h e e x i s t i n g s e g m e n t s , no d u p l i c a t e t a g s w i l l be formed by r e f l e c t i o n i n o n e , two, o r t h r e e

The c o d e f r o m RE157 t o RE204 forms c y l i n d r i c a l l y s y m m e t r i c s t r u c t u r e s h y rorlning i m a g e s o f p r e v i o u s l y d e f i n e d s e g m e n t s a n d p a t c h e s r o t a t e d a b o u t t h e


z axis.

The number o f i m a g e s , i n c l u d i n g t h e o r i g i n a l s t r u c t u r e , i s s e l e c t e d 'The a n g l e by which e a c h image i s r o t a t e d

hv NOP i n t h e Formal p a r a m e t e r s .

a b o u t L I I - . z a x i s f r u a t h e p r e v i o u s image i s computed a s ZirjNOP, s o t h a t t h e


ir~ia&:r.s a r c uniEormLy d i s t r i b u t e d a b o u t t h e z a x i s .

Tag numbers of s e g m e n t s

a r e i n c r e m e n t e d by LTX,
When REFLC

except t h a t t a g s o f zero a r e n o t incremented.

is t ~ s e d t o iurm s t r u c t u r e s w i t h e i t h e r p l a n e o r c y l i n d r i c a l
ill

r ty l~c data
,iF

c:OMMUN/I)ATA/ i s s e t s o t h a t t h e program w i l l t a k e T h i s i s done by

advanta$:c

symmetry i a f i l l i n g a n d f a c t o r i n g t h e m a t r i x .

s,:rr
I

trig

N c q u a l t o t l ~ et o t a l number o f s e g m e n t s b u t l e a v i n g NP e q u a l t o c h c
o

sei:nkcliLs

irl

thc! ( , r i g i n n 1 s t r u c t u r e u n i t t h a t was r e i l e c t e d

(J:-

REFLC

roLnLed. symmetry:

The symmetry f l a g IPSYM i s a l s o s e t t o i n d i c a t e t h e t y p e o f p o s i t i v e v a l u e s i n d i c a t i n g p l a n e symmetry and n e g a t i v e v a l u e s T h e s e symmetry c o n d i t i o n s may l a t e r b e c h a n g e d i f t h e

c y l i n d r i c a l symmetry.

s t r u c t u r e is m o d i i i e d i n s u c h a way t h a t symmetry is d e s t r o y e d . SYMlSOL DICTIONARY ABS COS CS


= external routine = external routine = cos

(absolute value) (cosine)

(2nINOP)

El
E2 FNOP
1

= segment c o o r d i n a t e (temporary s t o r a g e ) = segment c o o r d i n a t e = NOP = DO l o o p i n d e x

(temporary s t o r a g e )

ITAGI = s e g m e n t t a g ( t e m p o r a r y s t o r a g e ) IT1 ITX


=

segment t a g increment

= segment t a g increment
= E l a g For r e f l e c t i o n a l o n g

IX
IY

x axis

= f l a g f o r r e f l e c t i o n along y a x i s = f l a g For r e f l e c t i o n a l o n g z a x i s = a r r a y l o c a t i o n f o r new p a t c h d a t a = segment i n d e x and a r r a y l o c a t i o n f o r o l d p a t c h d a t a = number o f s e c t i o n s i n c y l i n d r i c a l l y s y m m e t r i c s t r u c t u r e

IZ
J

NOP
NX

= s e g m e n t i n d e x and a r r a y l o c a t i o n For new p a t c h d a t a


= a r r a y l o c a t i o n f o r o l d patch = 2nINOP = external routine = s i n (2ir/NOP)

NNX
SAM

SIN
SS

(sine)

XK

= x c o o r d i n a t e o f segment

XZ(1) = x c o o r d i n a t e o f end two of segment I

YK

= y c o o r d i n a t e o f segment

REFLC

YZ(1)
ZZ(1)

= =

y coordinate of end two of segment I

z coordinate of end two o f segment I

CONSTANTS
1 . E-6
1 . E-5
= =

tolerance i n t e s t f o r zero tolerance i n t e s t f o r zero

6.283185308 = 2 7 ~

SUElROUTItiE R E F L C ( 1 X . I Y . I Z . I T X . N O P ) R E F I C k L F L L C T S P A R T I A I STRUCTURt A l O N G X . Y . OR STRUCTURE TO COMPLETE A S Y M M E I R I C STRUCTURE

RE
0T

Z AXES OR ROTATES

COMMON / D A T A / L D , N I . N 2 . N . N P . M I . M 2 . M . M P . X ( 3 0 0 ) . Y ( 3 0 0 ) . Z ( 3 0 0 ) . 5 I ( 3 0 0 1 ) . B I ( 3 0 0 ) .ALP(30O),BET(300) .ICON1(300) , I C O N 2 ( 3 0 0 ) . 1 T A G ( 3 0 0 ) ,ICONX( 2300).WLAM.IPSYM COMMON /ANGL/ SALP(3OO) DIMENSION T l X ( 1 ) . T I Y ( 1 ) . T l Z ( 1 ) . TZX(1). TZY(1). TZZ(1). XZ(1). Y 12(1). 22(1)

MP=M IPSYM=O ITI=ITX I F ( 1 X . L T . O ) GO TO 1 9 RETURN I F (NOP.EO.0) IPSYM=I I F ( I Z . E Q . 0 ) GO TO 6 R E F L E C T ALONG Z A X I S IPSYM=2 I F ( N . L T . N 2 ) GO TO 3 DO 2 I = N 2 . N NX=I+N-NI EI=Z(I) E2=Z2(1) I F (ABS(EI)+ABS(E2).GT.l.E-5.AND.EI.E2.GE.-E-6) PRINT 24. I STOP X(NX)=X(I) Y(NX)=Y(I) Z(NX)=-El XZ(NX)=XZ(I) YZ(NX)=YP(I) ZZ(NX)=-E2 ITAGI:ITAG(I) I F (1TAGI.EQ.O) ITAG(NX)=O I F (ITAGI.NE.0) ITAG(NX)=ITAGI+ITI BI(NX)=BI(I) N=NS2-NI ITI=I:1.2 I F ( M . L T M 2 ) GO TO 6 NXX=LDtl-MI DO 5 I = M ? . M NXX=NXX-1 NX=NXX-M+MI I F (ABS(Z(N/.X)).GI.I.E-lo) GO TO 4 PRINT 2 5 , I STOP X(NX)=X(NXX) Y(NX)=Y(hXX) Z ( N X ) - - L NXX) TIX(NX)=IIX(NXX)

GO TO 1

R L I L E L T ALONG Y A X I S

PRINT 2 4 . I STOP X(NX)=X(I) Y(NX)=-El Z(NX)=Z(I) XZ(NX)=X2(1) Y2(NX)=-E2 Z2(NX)=Z2(I)

ITAGI=ITAG(I) I F (ITAGI.EQ.O) ITAG(NX)=O I F (ITAGI.NE.O) T I A G N (X T = ) I A G T + I RI(NX)=BI(I) N=Na2-Nl ITI=IT1.2 I F ( M . L T . M Z ) GO TO 1 2 N X X = L D + l -MI 00 1 I 1 - 4 2 .M NXX=NXX-1 NX=NXX-M+M1 I F (ABS(Y(NXX)).GT.l.E-10) PRINT 2 5 . I STOP X(NX)=X(NXX)

GO TO 1 0

REFLECT ALONG X A X I S

tz=xi(i) I F (ABS(Ll)+ABS(EZ) PRINT 2 4 , I STOP Y(NX)=-El Y(NX)=Y(I)

GT.1.E-5.ANO.El*E2.GE.-1.E-6)

GO TO 1 3

RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE R i RE RE RE RE RE RE RE

74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 \lb 117 ilf 1'9 '"3 121 12' 12:
'-4
L~

.c li' '28
1

BI(NX)=BI(I) N=N02-NI I F ( M . L T . M Z ) GO TO 1 8 NXX=LD+l-MI DO 1 7 I = M Z . M NXX=NXX-I NX=NXX-M+M1 I F (ABS(X(NXX)).GT.I.E-10) PRINT 25. I STOP X(NX)=-X(NXX) Y(NX)=Y(NXX) Z(NX)=Z(NXX) TlX(NX)=-TlX(NXX) TlY(NX)=TlY(NXX) TlZ(NX)=TlZ(NXX) T2X(NX)=-TZX(NXX)

GO TO 1 6

M=M*2-MI RETURN REPRODUCE STRUCTURE W I T H R O T A T I O N TO FORM C Y L I N D R I C A L STRUCTURE

RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE RE

145 146 147 148 149 150 151 152 I53 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168

REFLC

--FORMAT ( 2 9 H GEOMETRY DATA E R R O R - - S E G M E N T . I 5 , 2 6 H LIES IN PLANE OF S 1YMMETRY) FORMAT ( 2 7 H GEOMETRY DATA E R R O R - - P A T C H . I 4 . 2 6 H L I E S I N PLANE OF S Y M IMETRY) END RE RE RE RE RE 207 208 209 210 211-

PUKPOSI:

'1.~0 n u m e r i c a l l y i n t e g r a t e o v e r t h e c u r r e n t d i s t r i b u t i o n o n a s=groent t o

o b t a i n t h e f i e l d d u e t o t h e Sommerfeld i n t e g r a l term. HETHOD ROM2 i n t e g r a t e s t h e p r o d u c t o f c u r r e n t o v e r a segment.

ES(;)

( s e e d i s c u s s i o n o f EFLD) and t h e

Separate integrals a r e evaluated f o r current

d i s t r i b u t i o n s of constant, s i n k(s

s o ) and c o s k ( s

so).

With t h r e e

v e c t o r components o f t h e E i e l d , t h e r e a r e n i n e i n t e g r a l s e v a l u a t e d s i i n u l t a n e o u s l y and s t o r e d i n t h e a r r a y SUM. The i n t e g r a t i o n method i s t h e

same a s t h a t d e s c r i b e d f o r s u b r o u t i n e INTX, b u t l o o p s from o n e t h r o u g h n i n e a r e used a t e a c h s t e p . The p a r a m e t e r D M I N i s s e t i n EFLD t o

where

2 kl [ED(;)+

-2 '' E
2

I(

1 ds

segment

kl + k

D M L N i s p a s s e d t o TEST a s t h e lower limit f o r t h e d e n o m i n a t o r i n t h e r e l a t i v e

e r r o r evaluation t o avoid trying t o maintain r e l a t i v e accuracy i n i n t e g r a t i n g t h e Sommerfeld i n t e g r a l when i t i s much s m a l l e r t h a n t h e o t h e r t e r m s .

SYMBOL D I C ' r I O N A K Y
A 15

= lower l i m i t o f i n t e g r a l
=

upper l i m i t of i n t e g r a l

DMIN

= minimum f o r d e n o m i n a t o r i n r e l a t i v e

error test
= subinterval s i z e
= =

0 . 5 DZ tolerance f o r h i t t i n g upper l i m i t

ROM2

GL, G 2 , G 3 , G 4 , G 5

= integrand values a t points within the

subinterval
N NM NS N'C

= number o f f u n c t i o n s ( 9 )
= minimum s u b i n t e r v a l s i z e i s ( 0 = present subinterval s i z e is

(B -

A)/NM A)/NS

= counter t o control increasing

subinterval size
N'CS

= larger values retard increasing


subinterval size

NX KX
S

= maximum s u b i n t e r v a l s i z e i s ( B
= relative error l i m i t = B - A = array f o r integral values = ( s e e s u b r o u t i n e INTX)

A)INX

SUM

TOO, TOL, T 0 2 , T 1 0 , T l l , T 2 0 TMAG I , TMAG2

= sum o f t h e m a g n i t u d e s o f t h e i n t e g r a l
contributions f o r the constant current distribution

= integration variable at l e f t side of

subinterval

ZE

= 6 = upper l i m i t

Z END
CONS'TAN'TS

1.E-4

= relative error criterion = limit

65536

for cutting subinterval s i z e

RO RO FOR THE SOMMERFELD GROUND O P T I O N . ROM2 I N T E G R A T E S OVER THE SOURCE RO SEGMENT TO O B T A I N THE TOTAL F I E L D DUE TO GROUND. THE METHOD OF RO THERE ARE 9 RO V A R I A B L E I N T E R V A L W I D T H ROMBERG I N T E G R A T I O N I S USED. RO F I E L D COMPONENTS - THE X . Y . AND Z COMPONENTS DUE TO CONSTANT. S I N E . AND C O S I N E CURRENT D I S T R I B U T I O N S . RO RO COMPLEX SUM.G1.G2.G3,G4.G5.TOO.TOI.T10.T02.Tl1.T20 RO D I M E N S I O N S U M ( 9 ) . G l ( 9 ) . G 2 ( 9 ) . C 3 ( 9 ) . G 4 ( 9 ) . G 5 ( 9 ) , T O l ( 9 ) . T l D ( 9 RO 1 ) . T20(9) RO DATA N M . N T S . N X , N / 6 5 5 3 6 . 4 , l 1 9 / , R X / 1 . E - 4 / RO Z=A RO ZE=B RO S=B-A RO I F (S.GE.0.) GO TO 1 RO PRINT is STOP

SUBROUTINE ROM2 (A.B.SUM.DM1N)

CALL SFLOS ( Z . G l ) DZ=S/NS I F (Z+DZ.LE.Zf) GO TO 4 DZ=ZE-Z I F (DZ.LE.EP) GO TO 1 7 DZOT=DZ*.5 C A L L SFLOS ( Z + D Z O T . G J ) CALL SFLDS ( z + o z . G ~ ) . TMAGl=O. TMAGZ=O. EVALUATE 3 P O I N T ROMBERG RESULT AND TEST CONVERGENCE DO 6 I = 1 . N Too=(Gl(I)+G5(I))*ozoT

rol(I)=(roo+oZ'G3(I))-.5 TlO(I)=(4.'TOl(I)-TO0)/3.
I F ( I . G T . 3 ) GO TO 6 TR=REAL(TOI(I))
TI=AIMAC(TO~(I))

TMAGl=TMAGI+TR*TR+TI*TI TR=REAL(TIO(I)) TI=AIMAG(TIO(I)) TMAG2=TMAG2+TR0TR+TI*TI CONTINUE TMAGI=SORT(TMAGI) TMAG2=SORT(TMAGZ) C A L L TEST(TMAGl.TMAG2.TR.O..O..TI.DMIN) I F ( T R . G T . R X ) G O TO 8 DO 7 I = 1 .N SUM(I)=SUM(I)+TIO(I) NT=NT+2 GO TO 1 2 CALL SFLDS (Z+OZ0.25.G2) C A L L S F L O S (Z+DZ. . 7 5 ; ~ 4 j TMAGl =O TMAGZ=O

. .

EVALUATE 5 P O I N T ROMBERG RESULT AND TEST CONVERGENCE

CONTINUE TMAGI=SORT(TMAG~ ) TMAGZ=SQRT(TMAG2) C A L L T E S T ( T M A C I .TMAGZ,TR,O. I F ( T R . G T . R X ) G O TO I 4 DO 1 1 1 = 1 N

.O. . T I . D M I N )

SUM(I)=SUM(I)+T~O(I) NT=NT+l

NT=l GO TO 3 NT=O I F (NS.LT.NM) PRINT 1 9 . Z GO TO 1 0 NS=NSw2 DZ=S/NS DZOT=OZ*.S DO 1 6 1 = 1 . N GS(I)=G3(1)

GO TO 1 5

CONTINUE RETURN FORMAT ( 3 0 H ERROR - 0 L E S S THAN A I N ROM2) FORMAT ( 3 3 H ROM2 -- STEP S I Z E L I M I T E D AT Z = , END

SBF SBF PURPOSE To e v a l u a t e t h e c u r r e n t e x p a n s i o n [ u n c t i o n a s s o c i a t e d w i t h a g i v c n s e g m e n t , r e t u r n i n g o n l y t h a t p o r t i o n on a p a r t i c u l a r s e g m e n t . METHOD SBF is v e r y s i m i l a r t o r o u t i n e TBF. expansion functions. Both r o u t i n e s e v a l u a t e t h e c u r r e n t

However, w h i l e TBF s t o r e s t h e c o e f f i c i e n t s f o r e a c h SBF r e t u r n s t h e

segment o n w h i c h a g i v e n e x p a n s i o n f u n c t i o n is non-zero, c o e f f i c i e n t s f o r o n l y a s i n g l e s p e c i f i e d segment.

I n t h e c a l l t o SBF, I i s t h e segment o n which t h e e x p a n s i o n f u n c t i o n i s centered.


C
j

I S i s t h e segment f o r which t h e f u n c t i o n c o e f f i c i e n t s A , , B . and J J a r e r e q u e s t e d . T h e s e c o e L E i c i e n t s a r e r e t u r n e d i n AA, B B , C C , r e s p e c t i v e l y . R e f e r t o TBF f o r a d i s c u s s i o n o f t h e c o d i n g and v a r i a b l e s . One a d d i -

t i o n a l v a r i a b l e i n SBF

--

.TUNE

--

i s s e t t o -1 o r +1 i f segment IS i s found

c o n n e c t e d t o end 1 o r end 2 , r e s p e c t i v e l y , o f segment I .

I f I = I S and

segment I is n o t c o n n e c t e d t o a s u r f a c e o r ground p l a n e , t h e n JUNE i s s e t t o 0 .

SBF
SUBROUTINE SBF (1.IS.AA.BB.CC) COMPUTE COMPONENT OF BASIS FUNCTION I ON SEGMENT IS. COMMON /DATA/ L O . N ~ . N ~ . N . N P . M I . M ~ . M . M P . X ( ~ ~ ~ ) , Y ( ~ O O ) , Z ( ~ O O ) , S I ( ~ O O 1 ) .BI(300) . ~ ~ P ( 3 0 0 .BET(300) ) ,ICON1(300) .ICON2(300) ,ITAG(300) ,ICONX( 2300).WLAM,IPSYM OATA PI/J.l41592654/.JMAX/30/ AA=O . BB=0. cc=o. JUNE=O JSNO=O PP=0. JCOX=ICONI(I) IF (JCOX.GT.10000) JCOX=I JENO=-1 IENO=-1 SIG=-1 . IF (JCOX) 1.11.2 JCOX=-JCOX GO TO 3 SIG=-SIC JENO=-JEND JSNO=JSNO+l IF (JSNO.GE.JMAX) GO TO 24 O=PI-SI(JCOX) SOH=SIN(O) CDH=COS(O) SD=2.*SOH0COH IF (O.GT.O.015) GO TO 4 O M C = 4 : D * O
OMC=((l.3888889E-3~OMC-4.1666666667E-2)*OMC+.5)*OMC GO TO 5

OMC=I.-COH*COH+SDH*SOH
AJ=~./(ALOG(~./(PI'BI(JCOX)))-.577215664)

PP=PP-OMC/SO.AJ IF (JCOX.NE.IS) GO TO 6 AA=AJ/SO0SIG BB=AJ/(Z.*COH) CC=-AJ/(z.-SOH)*SIG JUNE=IEND IF (JCOX.EQ.1) GO TO 9 IF (JENO.EQ.1) GO TO 7 JCOX=ICONl(JCOX) GO TO 8 JCOX=ICON2(JCOX) IF (IABS(JCOX)EO.I) GO TO 1 0 IF (JCOX) 1 . 2 4 . 2 IF (JCOX.EO.IS) BB=-BB IF (1ENO.EQ.I) GO TO 12 PM=-PP PP=o. NJUNl=JSNO JCOX=ICON2(1) IF (JCOX.GT.10000) JCOXzI JENO=l IENO=l SIG=-1 . IF (JCOX) 1.12.2 NJUNZ=JSNO-NJUNl 0=PI.SI(I) SOH=SIN(O) COH=COS(O) S O = Z : S O H . C O H CO=CDH.CDH-SOH'SOH

I F (JUNE) 1 5 . 1 8 . 1 6 AA=AAWOM BB=BB*OM CC=CC*OM GO TO 1 7 AA=-AA*OP BB=BBg0P CC=-CC.0P F I (I.NE.IS) RETURN AA=AA-I . BB=BB+(AJ*OM+AP*OP)'~DH/SD CC=CC+(AJ*QM-AP'OP) *CDH'/SO RETURN

XXI=OP*OP

xxI=OP.(1.-.5.XXI)/(I.-XXI)
OP=-(OMC+XXI*SD)/(SO*(AP+XXI*PP)+CO~(XXI*AP-PP)) F I (JUNE.NE.I) GO TO 20 AA=-AA'OP BB=BB0OP CC=-CC'OP I F (1.NE.IS) RETURN AA=AA-I . o=co-XXI'SO

BB=BB+(SDH+AP*OP-(CDH-XXI*SDH))/D CC=CC+(CDH+AP.OP*(sOH+XXI'COH))/O
RETURN OM=PI.BI(I) XXI=OM*OM

XXI=OM*(l.-.5*XXI)/(l.-XXI)

o~=(o~c+xxI~so)/(so*(~~-xxI~P~)+co*(Pu+xxI*~~))
I F (JUNE.NE.-1) GO TO 2 2 AA=AA0OM B8=BB0OM CC=CC*OM I F (1.NE.IS) RETURN AA=AA-1 . o=co-XXI'SO BB=BB+(AJ*OM'(CDH-XXI.SOH)-SOH)/D RETURN AA=-I . OP=PI.BI(I) XXI=QP.oP

cc=cc+~co~-~~*o~~(s j;~ o~+~~~;Co~~

XXI=OP.(l.-.5.XXI)/(I.-XXI)
CC=l./(CDH-XXI'SOH) RETURN PRINT 2 5 . I STOP FORMAT ( 4 3 H SBF

SEGMENT CONNECTION ERROR FOR SEGMENT.15)

124

END

SECOND

SECOND PURPOSE To o b t a i n t h e t i m e i n s e c o n d s M E T H O D T h i s s u b r o u t i n e a c t s a s an i n t e r f a c e of t h e computer s y s t e m ' s time f u n c t i o n and t h e N E C program. The system time f u n c t i o n is c a l l e d , t h e program through t h e

number is c o n v e r t e d t o s e c o n d s , and r e t u r n e d t o t h e N E C argument of s u b r o u t i n e SECOND.

On CDC 6000 s e r i e s computers, t h e s y s t e m t i m e program. This subroutine is,

f u n c t i o n is SECOND and is c a l l e d by t h e NEC t h e r e f o r e , o m i t t e d on CDC 6000 computers. C O D E LISTING

C a l l system time f u n c t i o n and s e t T equal t o time i n s e c o n d s .


9
RETURN

I0

END

PIJKPOSE To evaluate the Sommerfeld-integral field components due to an infinitesimal current elemeiit on a segment-

ME'CHOL)

'Tile coordinates of t l i e segment are stored in COMMONIDATAJI.


ZT).

The current

elelnenc, at a distance T from the center of the segment is located at (XT, YT, From SLl6 to S L 4 2 the p,

and z coordinates of the field evaluation

point (XO, YO, ZO) are computed in a coordinate system with the z axis passing througl~the currriit element and @ = 0 in the direction of the segment rrirrencs direction projected on the x,y plane.
K 2 is as shown in Figure 6

(page 160) and is the same as R1 in Section IV of Part I. The Sommerfeld-integral field is computed from SL85 to SLlll by giving
K 2 and 6'. with

8' = tan

to subroutine INTKP. 159 of Part I as

INTRP returns the quantities in equations 156 through

EKV

I P

EZV = IZ

EKH

H I

P
H

EPH = I

6
)/R. The components for

I'trese qudritlties are then multiplied by exp(-jkK

2'

a horizontal current element are multiplied by the appropriate factors o f

sin q or cos q~ and combined with the components for a vertical current element
according to the elevation angle of the segment. the p ,
z

Thus lines SL94 to SLY6 are These are

and

+ components
x,

of the field of the current element.

converted to

and z components and stored in ~ ( l ) E,( ? ) and

SFLDS
Ei3).

They a r e a l s o m u l t i p l i e d by s i n ( k T ) and c o s ( k ~ ) f o r t h e s i n e and c o s i n e

c u r r e n t d i s t r i b u t i o n s and s t o r e d i n o t h e r e l e m e n t s o f E. d h e n t h e s e p a r a t i o n o f t h e s o u r c e segment and o b s e r v a t i o n p o i n t i s l a r g e enougli t h a t t h e N o r t o n a p p r o x i m a t i o n i s u s e d f o r t h e f i e l d , t h e c o d e from SL49 t o SL80 i s e x e c u t e d . segment. I n t h i s c a s e S F W S i s c a l l e d d i r e c t l y by EFLD, w i t h T

e q u a l t o z e r o , a n d r e t u r n s a n a p p r o x i m a t i o n t o t h e f i e l d o f t h e whole The c u r r e n t i s lumped a t t h e c e n t e r f o r a p o i n t s o u r c e a p p r o x i m a t i o n .

GWAVE c o m p u t e s t h e t o t a l f i e l d i n c l u d i n g d i r e c t f i e l d a n d t h e a s y m p t o t i c

a p p r o x i m a t i o n o f t h e f i e l d d u e t o ground.

S i n c e EFLD h a s a l r e a d y computed

t h e s e terms must b e removed from t h e f i e l d computed by GWAVE. field

The d i r e c t The

ED i s

set t o z e r o by s e t t i n g X X 1 t o z e r o b e f o r e c a l l i n g GWAVE.

s e c o n d t e r m i s s u b s t r a c t e d from t h e f i e l d r e t u r n e d by G W A V E from SL59 t o

SL63.

The f i e l d components of a v e r t i c a l (V) and h o r i z o n t a l (H) c u r r e n t

e l e m e n t i n t h e d i r e c t i o n 9 = 0 a t t h e image p o i n t a r e

Ep = (En + E ) s i n 0 c o s b T

EZ

2 E cos 6 R

2 ETsin 8

Ep =
H

sin2 8 - ETcos 2 8) c o s

E~

(En + ET) s i n 8 c o s 8 c o s

E~ = E s i n 9 Q T

where

SFLDS

c o s t) = ( z + z l ) / l > . 2 s i n U = plK
2

a n d c u r r e n t moment, I L I A

= 1.

T h e s i n g and c o s g f a c t o r s are o m i t t e d t o m a t c h t h e q u a n t i t i e s r e t u r n e d by GWAVE. Also, t h e f i e l d s of t h e h o r i z o n t a l c u r r e n t a r e r e v e r s e d These

s i n c e t h e image o f t h e s o u r c e i s i n t h e d i r e c t i o n I$ = 180 d e g r e e s .

q u a n t i t i e s a r e m u l t i p l i e d by FRAT1 and s u b t r a c t e d f r o m t h e f i e l d s r e t u r n e d by

GWAVE.
The t o t a l f i e l d , i n x , y and z c o m p o n e n t s , i s s t o r e d f r o m SL70 t o SL72. S i s t h e Length o f t h e segment i n w a v e l e n g t h s . Hence i t i s ILIA 2 when
I
=

1.

The c u r r e n t moment f o r a s i n e d i s t r i b u t i o n i s z e r o and f o r a

c o s i n e d i s t r i b u t i o n is sin(rrS)/n.

SYMBOL DICTIONAKY
CPH E EP H EK
= cos

+
H o r 1

= a r r a y f o r r e t u r n i n g f i e l d components

= E

9
H

0
H

= EK

E i<H
EKV ET EZH EZV FKATI
IlKH

= E

o r 1 o r 1

= E

v
P

v
P

E.r H H o r IZ Z

= E

= EZ o r I

v z

= EH f o r image o f P

source current element

SFLDS HRV HL V
= E

v
P

= HZ
A

P HX
P HY

= x component o f . @ . = y component o f @ =

PI
POT

= nl2 = d i r e c t d i s t a n c e t o source ( s e t t o a r b i t r a r y v a l u e ) = d i s t a n c e t o image = ( ~ 2 ) ~

R1

K2
R 2s

KHS
R HX RHY
KK

= PL = x component of p = y component o f D = kR2 = v a l u e o f current o r current moment


=

S FAC S PH T

sin @

= d i s t a n c e from c e n t e r o f segment t o c u r r e n t element = 8' = 2n

THET
TP XT,

YT, ZT

z PHs
CONSTANTS 1.570796327 3.141592654 6.283185308

= c o o r d i n a t e s o f current element 2 = (2 + 2')

= n/2 = n
= 2n

SUBROUTINE SFLOS ( 1 . E ) SFLOX RETURNS THE F I E L D DUE TO GROUND FOR A CURRENT ELEMENT ON THE SOURCE SEGMENT AT T R E L A T I V E TO THE SEGMENT CENTER. COMPLEX E , E R V . E Z V . E R H . E Z H . E P H . T I . E X K . E Y K . Z K . E X S . E Y S , E Z S , E X C . E Y C . E IZC.XXI.XX2.U.UZ.ZRATI.ZRATI2.FRATI.ER.ET.HRV.HZV,HRH COMMON /DATAJ/ S.B.XJ.YJ.ZJ.CABJ.SA8J.SALPJ.EXK.EYK.ELK.EXSEYSEZ

SL SL SL SL SL SL SL SL SL SL SL SL
?I

2
3
4

5 6 7 8

IS.EXC.EYC.EZC,RKH,IEXK,INOI.IND2.IPGND
COMMON /INCOM/ XO.YO.ZO.SN.XSN.YSN.ISN0R COMMON /GWAV/ U.U2.XX1,XX2.Rl.RZ.ZMH.ZPH COMMON /GND/ZRATI.ZRATI2.FRATI.CL.CH.SCRWL.SCRWR.NRADL.KSYMP,IFAR. IIPERF.Tl.T2 D I M E N S I O N E(9) DATA P I / 3 . 1 4 ! 5 9 2 6 5 4 / . T P / 6 . 2 8 3 1 8 5 3 0 8 / , P O T / l . 5 7 0 7 9 6 3 2 7 / XT=XJ+T*CABJ YT=YJ+TeSA8J

9
10 II
I

12 ' .

USE NORTON A P P R O X I M A T I O N FOR F I E L D DUE TO GROUND. CURRENT I S IUMPCO AT SEGMENT CENTER W I T H CURRENT MOMENT FOR CONSTANT. S I N E . OR C O S I N E D I S T R I B U T I O N .

SL SL SL SL SL SL SL SL sL

C A L L GWAVE ( E R V . E Z V . E R H . E Z H . E P H )

1=-(0..4.77134)'FRATI*XX2/(R2S*R2)

E(4)=0. E(5)=0. E(6)=0. SFAC=PIWS SFAC=SIN(SFAC)/SFAC E ( 7 ) = ~ ( 1) * S F A C E(~)=E(~)*sFAc E(~)=E(~)'sFAC RETURN I N T E R P O L A T E I N SOMMERFELD F I E L D TABLES

F I ( R n o . L r . i . ~ - 1 2 ) GO TO 4 THET=ATAN(ZPH/RHO) GO TO 5 THET=POT CALL INTRP (R2.THET.ERV.EZV.ERH.EPH) COMBINE V E R T I C A L AND HORIZONTAL COMPONENTS AND CONVERT TO X . Y . 2 COMPONENTS. M U L T I P L Y BY EXP(-JKR)/R. XX2=XX2/R2 SFAC=SN.CPH ERH=XX~'(SALPJ.ERV+SFAC*ERH) EZH=XX2'(SALPJ.EZV-sFACWERV) EPH=SN.SPH0XX2*EPH X . Y . 2 F I E L D S FOR CONSTANT CURRENT E(l)=ERH*RHX+EPH.PHX
. .

RK=TP*T X . Y . Z F I E L D S FOR S I N E CURRENT SFAC=SIN(RK) E(4)=E(t)*SFAC C(S)=E(Z).SFAC E(6)=E(3)*SFAC X . Y . 2 F I E L O S FOR C O S I N E CURRENT SFAC=COS(RK)

SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL SL

89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110

E(~)=E(J).sFAc RETURN

SOLGF PURPOS B T o solve for the basis function amplitudes in the NGF procedure. UTHOD The operations performed here are described in the NGF overview in jection VI. SOLGF is called for either a NGF solution o r a normal solution. For the normal solution, or for a NGF solution when no n e w segments o r patches lave been added, the solution is obtained by calling SOLVES at SF14. )therwise, the rest of the code is executed. T h e excitation vector XY is filled in the subroutine ETMNS in the order

SOLGF

1.
2.

E o n NGF segments (N1 elements) E o n new segments (N

N1 elements) 2M1 elements)

3.

H o n NGF patches (2M1 elements) H o n new patches (2M

4.

From SF18 t o SF29 this vector is put in the order

1.
2 . 3.

E on NGF segments
H o n NGF patches
E o n new segments

\
j

I
)

4.

H o n new patches

o conform to the matrix structure.

From SF30 to SF36, zeros are stored in XY Line SF37 then computes

.-1
-2;

n the locations opposite the rows of the C' matrix.


~ storing 1 it in place of El.

SF41 to SF52 computes E 2 El. From SF55 to SF80

C A - ~ E and ~ stores it in palce of

Matrix C is read from file 15 if necessary to form the product with

SOLCF

i s computed i n t h e o r i g i n a l l o c a t i o n o f E2.

I f ICASX i s 4 t h e b l o c k can

p a r a m e t e r s f o r t h e p r i m a r y m a t r i x a r e t e m p o r a r i l y changed t o t h o s e o f
D

C A - ~ B s o t h a t LTSOLV, which u s e s t h e p r i m a r y b l o c k p a r a m e t e r s ,

perform t h e s o l u t i o n procedure.

From SF84 t o SF95

i s computed.

The r e o r d e r i n g s t e p a t t h e b e g i n n i n g o f SOLGF i s t h e n r e v e r s e d

from SF98 t o SF107 t o p u t t h e s o l u t i o n v e c t o r i n t h e o r d e r

1. 2.

amplitudes of N G F basis functions a m p l i t u d e s o f new b a s i s f u n c t i o n s NGF p a t c h c u r r e n t s new p a t c h c u r r e n t s a m p l i t u d e s of m o d i f i e d b a s i s f u n c t i o n s f o r NGF s e g m e n t s t h a t c o n n e c t t o new segments meaningless values associated w i t h B

3. 4.

5.
6.

ss

F i n a l l y , from SF109 co SF113 t h e a m p l i t u d e s o f t h e m o d i f i e d b a s i s f u n c t i o n s a r e s t o r e d i n p l a c e of t h e N G P b a s i s f u n c t i o n s t h a t were set t o zero.

SYMBOL DIC'TIONAKY
A
= =

F a r r a y s t a r t i n g j u s t a f t e r A i n CM ( u s e d f o r f a c t o r i n g
D

array f o r matrix A

CA-'6

f o r ICASX = 2 , 3 o r 4 )

= = =

array f o r matrix C a r r a y used f o r f a c t o r i n g D s a v e d v a l u e o f ICASE a r e s t o r e d i n descending F o r d e r ( a s c e n d i n g o r d e r i s always o n 13)

C A - ~ B when ICASX = 1

ICASS

I FL

= f i l e i n which b l o c k s o f A

= a r r a y of p i v o t element i n d i c e s = number o f p a t c h e s

SOI.CF

= number o f p a t c h e s i n NGF
= number o f p a t c h e s

i n o n e s y m m e t r i c s e c t i o n o f t h r NGF

structure
N
= number o f s e g m e n t s

N1 NLC N2 N 2C NBLSYS NEQ N EQS NLSYS NP

= number o f s e g m e n t s i n NGF
= number o f unknowns i n NGF (N1

+ 2M1)
D)

= N 1 + 1
= number oE new unknowns ( o r d e r o f = s a v e d v a l u e o f NBLSYM

= t o t a l number o f unknowns ( N G F and new) = number o f columns i n B


= s a v e d v a l u e o f NLSYM = number o f s e g m e n t s i n a s y m m e t r i c s e c t i o n oE t h e NGF
SW

and d s s

structure NPSYS SUM XY


= s a v e d v a l u e o f NPSYM
= summation v a r i a b l e f o r m a t r i x p r o d u c t s

= e x c i t a t i o n and s o l u t i o n v e c t o r

2 C 3

S U B R O U T I N E SOLGF (A.B.C.D.XY.IP.NP.Nl.N.MP.Ml.M.NlC.N2C) SOLVE FOR CURRENT I N N . G . F . PROCEDURE COMPLEX A . B . C . D . S U M . X Y . Y COMMON /SCRATM/ Y(600)

-.

SF

CoMMoN /SEGJ/ A X ( 3 0 ) . B X ( 3 0 ) . C X ( 3 0 ) , J C 0 ( 3 0 ) , J S N O . I S C O N ( 5 0 ) N S C O N P SF I C O N ~( l O ) . N P C O-N c c a . COMMON /MATPAR/ I C A S E . N B L O K S . N P B L K . N L A S T . N B L S Y M , N P S Y M , N L S Y M I M A T I SF ICASX,NBBX.NPBX.NLBX,NBBL,NPBL,NLBL SF DIMENSION B ( N I C . l ) . C(NlC.1). D(N2C.1). IP(1). XY(1) SF

,.

I F (N~C.GT.O) TO 1 NORMAL S O L U T I O N . NOT N . G . F C A L L SOLVES ( A . 1 P . X Y . N 1 C , 1 . N P . N , M P , M , 1 3 , 1 F L ) GO TO 2 2 I F (NI.EO.N.OR.MI.EQ.0) GO TO 5 REORDER E X C I T A T I O N ARRAY

GO

DO 6 I=NEQS.NEQ xY(I)=(o..o.) C A L L SOLVES (A.IP.XY.NlC.1.NP.N1.MP.M1.I3.IFL) NI=O NPB=NPBL COMPUTE EZ-C(INV(A)EI) DO 1 0 J J = l . N B B L I F ( J J . E Q . N B B L ) NPB=NLBL I F (ICASX ~ 1 . 1 ) R E A D ( 1 5 ) ((C(I.J).I=I.NIC).J=I.NPB) II=NIC+NI DO 9 1 = 1 . N P B SUM=(O..O.) DO 8 J = I . N l C SUM=SUM+C(J.I)*XY(J) J=II+I XY(J)=XY(J)-SUM NI=NI+NPBL REWIND 1 5 JJ=NIC+l COMPUTE INV(D)(EZ-C(INV(A)EI)) = 12 I F ( I C A S X . G T . 1 ) GO TO 1 1 C A L L SOLVE ( N 2 C , D , I P ( J J ) . X Y ( J J ) , N 2 C ) GO TO 1 3 I F ( I C A S X . E Q . 4 ) GO TO 1 2 NI=N2C.N2C READ ( 1 1 ) ( B ( J . l ) . J = l .NI) REWIND I 1 C A L L SOLVE (NZC,B,IP(JJ).XY(JJ).N2C)

SOLGF
NPSYS=NPSYM NLSYS=NLSYM ICASS=ICASE NBLSYM=NBBL NPSYM=NPBL NLSYM=NLBL ICASE=3 REWIND 1 1 REWIND 1 6 CALL LTSOLV ( B . N Z C . I P ( J J ) . X Y ( J J ) , N ~ C . ~ , ~ ~ , ~ ~ ) REWIND 1 1 REWIND 1 6 NBLSYM=NBLSYS NPSYM=NPSYS NLSYM=NLSYS

NPB=NPBL COMPUTE I N V ( A ) E l - ( I N V ( A ) B ) I 2 = I 1 DO 1 6 J J = I . N B B L I F ( J J . E O . N B B L ) NPB=NLBL I F ( 1 C A S X . G T . l ) READ ( 1 4 ) ((B(I,J).I=I.NIC).J=1.NPB) I I = N l C+NI DO 1 5 I = I . N I C SUM=(O. . O . ) DO 1 4 J = I . N P B JP=II+J SUM=SUM+B(I.J)*XY(JP)

XY(I)=XY(I)-SUM
NI=NI+NPBL REWIND 1 4 I F (N1.EO.N.OR.MI.EQ.O) GO TO 2 0 REORDER CURRENT ARRAY DO 1 7 I = N Z . N P M Y(I)=XY(I) JJ=NlC+l J=NI DO 1 8 I = J J . N P M J=J+I XY(J)=Y(I) DO 1 9 I = N Z . N I C J=J+I XY(J)=Y(I) I F ( N S C O N . E O . 0 ) GO TO 2 2 J=NEQS-1 DO 2 1 I=I .NSCON J=J+I JJ=ISCON(I) XY(JJ)=XY(J) RETURN END

SOL t ---V -

PUI<POSlS

To s o l v e t h e s y s t e m LUX = U , w h e r e L i s a l o w e r t r i a n g u l a r m a t r i x w i t h o n e s o n t h e d i a g o n a l , U i s a n upper t r i a n g u l a r m a t r i x , and B is t h e right-hand s i d e v e c t o r (RHS) . METHOD The a l g o r i t h m u s e d i s d e s c r i b e d o n p a g e s 409-415 o f r e f . 1. The s o l u -

t i o n o f t h e m a t r i x e q u a t i o n LUX = B i s f o u n d b y f i r s t s o l v i n g Ly = U , and t h e n

since LUX = Ly = B

The s o l u t i o n o f e q u a t i o n s ( 3 ) and ( 4 ) is s t r a i g h t f o r w a r d s i n c e t h e m a t r i c e s a r e both triangular. The s o l u t i o n o f e q u a t i o n ( 3 ) c a n b e w r i t t e n

Equation (4) c a n be w r i t t e n s i m i l a r l y . The L and U m a t r i c e s a r e b o t h s u p p l i e d by t h e s u b r o u t i n e FACTR a n d a r e s t o r e d i n t h e m a t r i x A; t h e 1 ' s on t h e d i a g o n a l o f L a r e s u p p r e s s e d . must b e e x e r c i s e d i n t h e s o l u t i o n , s i n c e rows w e r e i n t e r c h a n g e d d u r i n g f a c t o r i z a t i o n , and t h i s n e c e s s i t a t e s r e a r r a n g i n g t h e RHS v e c t o r ; f u r t h e r m o r e , t h e L m a t r i x i t s e l f is n o t completely rearranged. The i n f o r m a t i o n p e r t i n e n t Care

t o the row r e a r r a n g e m e n t s h a s been s t o r e d b y FACTR i n a n i n t e g e r a r r a y (IP), and i t i s u s e d i n tlie c o m p u t a t i o n s .


T l ~ cF i n a l s o l u t i o n of t h e e q u a t i o n s i s

o v e r w r i t t e n o n tire i n p u t RHS v e c t o r E . The o n l y d i l I f c r e n c e s between t h e c o d i n g i n SOLVE a n d t h e c o d i n g

suggested i n r e f .

I are:

( 1 ) doublc p r e c i s i o n v a r i a b l e s a r e n o t used f o r

t h e a c c u m u l a t i o n o f s o n r s , sincc., f o r t h e s i z e o f m a t r i c e s a n t i c i p a t e d i n c o r e ,
t i l e cvmpuner w o r d lengrlr i s s u C C i c i e n L ,
and ( 2 )

che t r a n s p o s e s o f

t h e L and U

m a t r i c e s a r e s u p p l i e d i n A by I:ACTII.

T ~ I I S , t h ~ 'row a n d column i n d i c e s u s e d i n

the r o u t i n e a r c r c v e r s e d t o a(.rount f o r t h i s L r a n s p o s i t i o n .

-326-

COD LNG

- SO25 SO29 - SO39


5015

T h < . s o l u t i o n For y i n e q u a t i o n ( 3 ) .

The s o l u t i o n l o r x i n e q u a t i o n ( 4 ) and t h e s t o r a g e o f t h e s o l u t i o n i n B.

SYMBOL DICTIONARY

A
B

= a r r a y c o n t a i n s t h e i n p u t L and U m a t r i c e s = a r r a y c o n t a i n s t h e i n p u t RHS a n d i s o v e r w r i t t e n w i t h t h e

solution

I IP
IPI
J

DO l o o p i n d e x

= a r r a y c o n t a i n s row p o s i t i o n i n g i n f o r m a t i o n
= I =
= =

DO l o o p i n d e x DO l o o p i n d e x
o r d e r of t h e m a t r i x being s o l v e d

K
N

NDIM = d i m e n s i o n o f t h e a r r a y where t h e m a t r i x i s s t o r e d N D I M > N


PI S U M
= intermediate integer = intermediate variable = scratch vector

SOLVE
S U B R O U T I N E SOLVE ( N . A . I P . B . N D I M ) S U B R O U T I N E TO SOLVE THE M A T R I X E Q U A T I O N LU*X=B WHERE L I S A U N I T LOWER T R I A N G U L A R M A T R I X AND U I S AN UPPER T R I A N G U L A R M A T R I X BOTH OF W H I C H ARE STORED I N A . THE RHS VECTOR B I S I N P U T AND THE S O L U T I O N I S RETURNED THROUGH VECTOR B . ( M A T R I X TRANSPOSED. COMPLEX A . B . Y . S U M INTEGER P I COMMON /SCRATM/ Y(600) DIMENSION A(ND1M.NDIM). FORWARD S U B S T I T U T I O N

IP(N0IM).

B(ND1M)

00 3 I=I .N

B~PI)=E(I~ 1p1=1+1 I F ( I P 1 . G T . N ) GO TO 2 DO 1 J = I P I . N B(J)=B(J)-A(I.J)*Y(I) CONTINUE CONTINUE CONTINUE


BACKWARD S U B S T I T U T I O N DO 6 K = I . N I=N-K+I SUM=(O..O.) IPI=I+I I F ( I P 1 . G T . N ) GO TO 5 DO 4 J = I P I . N SUM=SUM+A(J.I).B(J) CONTINUE CONTINUE ~(I)=(Y(I)-suM)/A(I.I) CONTINUE RETURN END

SOLVES SOLVES -PUIZPOSE To c o n t r o l s o l u t i o n o f t h e m a t r i x e q u a t i o n , i n c l u d i n g t r a n s f o r m i n g and reordering t h e solution vector. METHOD When SOLVES i s c a l l e d , t h e a r r a y B c o n t a i n s t h e e x c i t a t i o n computed by s u b r o u t i n e s ETMNS o r NETWK. The e x c i t i n g e l e c t r i c f i e l d o n a l l s e g m e n t s i s In

s t o r e d f i r s t i n B , f o l l o w e d by t h e m a g n e t i c f i e l d s o n a l l p a t c h e s .

t h e c a s e o f a s y m m e t r i c s t r u c t u r e , however, t h e m a t r i x i s f i l l e d w i t h t h e c o e f f i c i e n t s of a l l s e g m e n t and p a t c h e q u a t i o n s i n t h e f i r s t s y m m e t r i c qector occurring f i r s t . These a r e followed by t h e c o e f f i c i e n t s f o r This order is required f o r the solution

s u c c e s s i v e s e c t o r s i n t h e same o r d e r .

p r o c e d u r e f o r s y m m e t r i c s t r u c t u r e s d e s c r i b e d i n s e c t i o n 111-5 of P a r t

I.

For

t h e c a s e o f a s y m m e t r i c s t r u c t u r e w i t h b o t h s e g m e n t s a n d p a t c h e s , SOLVES f i r s t rearranges the e x c i t a t i o n c o e f f i c i e n t s i n a r r a y B t o correspond t o t h e order of t h e m a t r i x c o e f f i c i e n t s . F o r s y m m e t r i c s t r u c t u r e s , SOLVES t h e n computes t h e t r a n s f o r m s o f t h e s u b v e c L o r s i n B a c c o r d i n g t o e q u a t i o n (88) o f P a r t I . S u b r o u t i n e SOLVE o r The

LTSOLV i s t h e n c a l l e d t o compute t h e s o l u t i o n o r s o l u t i o n s u b v e c t o r s . p r o c e d u r e i s s e l e c t e d by t h e p a r a m e t e r ICASE as f o l l o w s .

1 No symmetry, m a t r i x i n c o r e . 2
3
Symmetry, m a t r i x i n c o r e .

SOLVE i s c a l l e d f o r t h e s o l u t i o n .

SOLVE i s c a l l e d f o r e a c h s u b v e c t o r .

No symmetry, m a t r i x o u t o f c o r e .

LTSOLV is c a l l e d f o r t h e s o l u t i o n .

Symmetry, c o m p l e t e m a t r i x d o e s n o t f i t i n c o r e b u t s u b m a t r i c e s d o . SOL.VE i s c a l l e d For e a c h s u b v e c t o r a f t e r f i r s t r e a d i n g t h e a p p r o p r i a t e s u b m a t r i x from f i l e IFL1.

Symmetry, s u b m a t r i c e s do n o t f i t i n c o r e . subvector.

LTSOLV is c a l l e d f o r e a c h

SOLVES t h e n c o m p u t e s t h e t o t a l c u r r e n t by i n v e r s e t r a n s f o r m i n g t h e s u b v e c t o r s by e q u a t i o n (115) o f P a r t I . F o r a s y m m e t r i c s t r u c t u r e w i t h s e g m e n t s and p a t c h e s ,

SOLVES t h e n r e a r r a n g e s t h e s o l . u t i o n i n a r r a y B t o p u t a l l s e g m e n t c u r r e n t s first, f o l l o w e d by a l l p a t c h c u r r e n t s , w h i c h i s t h e o r d e r o f t h e o r i g i n a l

excitation coefficients.

SOLVES MuLLiple r i g h t - h a n d - s i d e s t e p i n SOLVES. v e c t o r s (NKH) may b e p r o c e s s e d s i m u l t a n e o u s l y a t e a c h

T l ~ i s r e d u c e s tile t i m e s p e n t r e a d i n g f i l e s when LTSOLV i s i n t h e NGF p r o c e d u r e .

c a l l e d , and 1s u s e d i n c o m p u t i n g A-'I*

COU LNG

SSL2 5543 SS63 SS81 SS96

- SS3Y - SS56 - SS75 - SS94 - SS113

Rearrange e x c i t a t i o n c o e f f i c i e n t s . Cransform s u b v e c t o r s . Solve f o r each subvector. Inverse transform subvectors. Rearrange s o l u t i o n c o e f f i c i e n t s .

SYMISOL DICTIONARY
A

= a r r a y s e t a s i d e f o r in-core m a t r i x s t o r a g e , i . e . ,

factored

matrices
B

= right-hand

s i d e ; t h e s o l u t i o n i s o v e r w r i t t e n on t h i s a r r a y a l s o

FNOP
FNORM

= d e c i m a l f o r m o f NOP
= IIFNOP

IFLl IFL2 I P M
MP
N

= f i l e w i t h m a t r i x b l o c k s i n normal o r d e r

f i l e with matrix blocks i n reversed o r d e r


= a r r a y c o n t a i n i n g p o s i t i o n i n g d a t a u s e d i n SOLVE

= number o f p a t c h e s
= number o f p a t c h e s

i n a symmetric s e c t o r

= number oE s e g m e n t s
= number o f columns i n a r r a y A

NCOL NEQ NOP

= o r d e r o f complete m a t r i x = number o f s y m m e t r i c s e c t o r s

NP
NPEQ
NllH NKOW

= number o f s e g m e n t s i n a syrmnetric s e c t o r
= o r d e r of a submatrix

= number o f r i g h t - h a n d - s i d e
= number of rows i n A

vectors i n 8

SSX

= array containing the c o e f f i c i e n t s S .


Part I
= summation v a r i a b l e = scratch vector

lk

i n e q u a t i o n ($9) of

SUM

SOLVES
SUBROUTINE SOLVES

(A.IP.B.NEO.NRH.NP.N.MP.M.IFLI.IFL~)

SS

ss
S U B R O U T I N E S O t V E S . FOR S Y M M E T R I C S T R U C T U R E S . H A N D L E S THE TRANSFORMATION OF THE R I G H T HAND S I D E VECTOR AND S O L U T I O N O F THE MATRIX EO. COMPLEX A . B . Y . S U M . S S X COMMON /SMAT/ S S X ( 1 6 . 1 6 ) COMMON / S C R A M / Y(600) COMMON /MATPAR/ ICASE.NBLOKS.NPBLK.NLAST,NBLSYM.NPSYM,NLSYM, lCASX.NBBX.NPBX.NLBX,NBBL,NPBLLNLBL DIMENSION A ( 1 ) . I P ( 1 ) . B(NE0.NRH) NPEO=NP+2'MP NOP=NEO/NPEO FNOP=NOP FNORM=l./FNOP NROW=NEO I F ( I C A S E . G T . 3 ) NROW=NPEQ I F ( N O P . E O . 1 ) GO TO 1 1 DO 1 0 I C = I . N R H I F (N.EO.O.OR.M.EO.0) GO TO 6 DO 1 I=l .NEQ Y(I)=B(I.IC) KK=Z*MP IA=NP IB=N J=NP DO 5 K = I .NOP I F ( K . E O . 1 ) GO TO 3 DO 2 I = I . N P IA=IA+I J=J+I B(J.IC)=Y(IA) I F ( K . E O . N O P ) GO TO 5 DO 4 I = I .KK IB=IB+1 J=J+l B( J . I C ) = Y ( I B ) CONTINUE I R A N S F O R M M A T R I X EO. .NPEO DO 1 0 I = I DO 7 K:I.NOP IA=I+(K-I).NPEO Y(K):B(IA,IC) SUM=Y( 1 ) DO 8 K = Z . N O P SUM=SUM+Y(K) B(I.IC)=SUM.FNORM DO 1 0 K:Z.NOP IA=l+(K-l).NPEO SUM=Y ( I ) DO 9 J 7 2 , N O P RHS VECTOR A C C O R D I N G TO SYMMETRY MODES SS SS SS

3
4

su~=su~tY(J)~coN~~(ssx(~.~))
S(IA,TC)=SUM.FNORM IF ( I C A S E L T 3 ) GO TO 1 2 REWIND It L 1 REWIND I F L Z SOLVf
iACH

MODL E O U A T I O N

SOLVES

REAO ( I F L ~ ~ ( A ( J ) . J=1 . I ) IB=l

C A L L SOLVE (NPEO.A(I8).IP(IA).B(IA.IC).NROW) GO TO 1 6 C A L L L T S O L V (A.NPEQ.IP(IA).8(IA,l),NEQ,NRH.IFLl.IFL2) CDNTINUE I F ( N O P . E O . 1 ) RETURN I N V E R S E TRANSFORM THE MODE S O L U T I O N S DO 2 6 I C = I .NRH 00 2 0 I = I .NPEO DO 1 7 K = I .NOP I A = I + ( K - 1 )*NPEO Y(K)=B(IA.IC) SUM=Y( 1 ) DO 1 8 K=L.NOP SUM=SUM+Y(K) B(I.IC)=SUM 00 2 0 K = 2 . NOP I A = I + ( K - I )*NPEO SUM=Y(1) 00 1 9 J=2.NOP SUM=SUM+Y(J)*SSX(K. J ) B(IA.IC)=SUM I f (N.EO.O.OR.M.EO.0) GO TO 26 DO 2 1 1=1 .NEO Y(I)=B(I.IC) KK=ZaMP IA=NP IB=N J=NP 00 2 5 K = l .NOP I F ( K . E O . l ) GO TO 2 3 00 2 2 1 = 1 . N P IA=IA+I J=J+I B(IA.IC)=Y(J) I F ( K . E Q . N O P ) GO TO 25 0 0 2 4 I=I.KK IB=IB+l J=J+l B(IB.IC)=Y(J) CONTINUE CONTINUE RETURN END

TBF
TBF PURPOSE To e v a l u a t e t h e c u r r e n t e x p a n s i o n f u n c t i o n a s s o c i a t e d w i t h a g i v e n segment. METHOD The c u r r e n t e x p a n s i o n f u n c t i o n is d e s c r i b e d i n s e c t i o n 111-1 o f P a r t I . The p a r a m e t e r I is t h e number o f t h e segment o n w h i c h t h e f u n c t i o n i s c e n t e r e d .

On s e g m e n t I a n d o n a l l s e g m e n t s c o n n e c t e d t o e i t h e r end o f s e g m e n t I , t h e
f u n c t i o n h a s t h e form
f .

(s) = A. 3

B. s i n [k(s J

- s )I +
j

C. cos [k(s - s j ) l J

w h e r e j i s t h e segment number.

TBF l o c a t e s a l l c o n n e c t e d s e g m e n t s a n d s t o r e s
j'

and C . j' 3 a n d s t o r e s them i n AX, BX, a n d CX, r e s p e c t i v e l y , i n t h e same l o c a t i o n a s was used i n J C O .


A , , B . , and C . f o r j = I are s t o r e d l a s t i n t h e a r r a y s . J J 1 I f TCAP = 0 , t h e f u n c t i o n g o e s t o z e r o a t a n end o f s e g m e n t I t o which

t h e s e g m e n t numbers, j , i n J C O i n COMMON/SEGJ/. I t computes A

no o t h e r s e g m e n t o r s u r f a c e i s c o n n e c t e d .

I f ICAP

# 0, the function has a

n o n - z e r o v a l u e a t a f r e e e n d , a l l o w i n g f o r t h e c u r r e n t o n t o t h e w i r e end c a p .
CODING

E q u a t i o n s and s y m b o l s r e f e r t o P a r t I. TB9 - TB55 T h i s c o d e forms a l o o p t h a t l o c a t e s a l l s e g m e n t s c o n n e c t e d t o t h e e n d s o f segment I, f i r s t f o r end 1 (IEND = -1) t h e n f o r end 2 (IEND = 1 ) . TB9 and

TB16

Parameters a r e i n i t i a l i z e d t o s t a r t s e a r c h f o r segments c o n n e c t e d t o end 1 of segment I.

TB36

PP =
L.

PT 1

f o r e n d 1 o f segment I o r P

+
i

f o r end 2 o f segment

TB35

TB37

E q u a t i o n s (43) t o (48) of P a r t I e v a l u a t e d e x c e p t f o r Q': AX(JSN0) = A T / Q I 3 BX(JSN0) = B T / Q T 3 CX(JSN0) =


J JCO(JSN0) = j

c?/Q~

E x i t f r o m l o o p i f segment I is c o n n e c t e d t o a s u r f a c e o r

ground p l a n e .

Segment I w i l l o c c u r i n COMMON/SEGJ/

twice

TBF i n t h i s c a s e , once f o r t h e c e n t e r of t h e expansion funct i p n on segment I and o n c e f o r t h e p a r t o f t h e f u n c t i o n e x t e n d i n g u n t o c h e image of segment I i n t h e s u r E a c e . t L i n e TB45 changes t h e s i g n o f B . f o r t h e image t e r m . The 3 sum of t h e two p a r t s o f t h e f u n c t i o n on segment I t h e n h a s z e r o d e r i v a c i v e a t t h e end c o n n e c t e d t o t h e s u r f a c e . TB39

TB42

Check a p p r o p r i a t e end o f segment

t o determine whether

i t shows a c o n n e c t i o n t o segment I (end o f s e a r c h ) o r

c o n n e c t i o n t o a n o t h e r segment ( m u l t i p l e j u n c t i o n ) . TB44 TB46 Continue s e a r c h f o r connected segments ( m u l t i p l e j u n c t i o n ) .

E x i t from l o o p a f t e r f i n i s h i n g s e a r c h f o r b o t h e n d s o f
segment I . S t o r e v a l u e s f o r end 1 o f segment I and i n i t i a l i z e f o r end
2.

TB47 - TB55
TB59

Then r e t u r n t o p r e v i o u s l o o p . a s e r i e s i s u s e d Eor 1 - c o s kA,

TB70

E v a l u a t e f u n c t i o n s o f segment l e n g t h and r a d i u s f o r segment I . For kA < 0 . 0 3 ,

where A = segment l e n g t h . TB73 - TB86 F i n a l c a l c u l a t i o n s i f n e i t h e r end o f segment I i s a f r e e end. TB89 TBllg TB128 SYMBOL DICTIONARY
A,J '\I'
=

TB102

F i n a l c a l c u l a t i o n s f o r f r e e end on end 1 o f segment I.

TB104

TB117 F i n a l c a l c u l a t i o n s f o r f r e e end o n end 2 o f segment I . TI3126 F i n a l c a l c u l a t i o n s f o r f r e e e n d s on b o t h e n d s o f segment I . A. = -1 f o r j = I i n a l l c a s e s .


2

aj
J

= at = cos =

CD CDH

kA.
J

n
ZCAP

cos(kA.12) .I = k A . / 2 o r c o s kA. - X. s i n kA. J 1 1 I = f l a g t o d e t e r m i n e whether t h e f u n c t i o n g o e s t o z e r o a t a f r e e end


-i d u r i n g c a l c u l a t i o n s f o r end 1 u t segment I a n d +1 f o r end 2 .
rcrnrlecti.on i :icles
- 1

,
. ;

i C allrl I

U L

n segment i s

c o n n e c t e d t o segment I , + I i f ~ n 2 d

~ t l n u c c t e dt ~ : ::.,~nrcnt I.

TBF

.IblAX

i n ; ~ x i n , u l n number of segments a l l o w e d i n t h e e x p a n s i o n f u n c t i o n .

Tiiis i n c l u d e s segment 1 and a l l s e g m e n t s c o n n e c t e d t o e i t h e r e n d .


JSNOP
= =

JSN C 1

NJIINI

N-

NJUN2 = N
OMC PI
=

c o s kn. I

PM
PI'

=Pi
=

PI
Qi

QM
QP
SD SDH SIG

=
=

s i n kA. J = s i n (kai/2)
=

XXL
CONSTANTS

s i g n f o r c a l c u l a t i o n o f A . and C . I I = J ( k a . ) / J ( k a . ) ( s m a l l argument series u s e d f o r B e s s e l f u n c t i o n s ) 1 1 0 1


=

0.577215664 0.015 1.3888889E-3 3.141592654 4.1666666667E-2

= =

Eulers constant 0.03/2

= 11720
= %

= 1/24

S U B R O U T I N E T B F (I.ICAP) COMPUTE BASIS FUNCTION I COMMON /DATA/ LD.NI,N2.N.NP.Ml.M2.M.MP.X(300).Y(SOO),Z(300),SI(300 1 ) .B1(300) .ALP(300) ,BET(300) ,ICON1(300) .ICON2(00) T A G ( 3 0 0 ) ICONX( 23OO).WLAM,IPSYM COMMON /SEGJ/ AX(30).BX(3O).CX(30).JC0(30),JSNO,ISCON(5O),NSCON,IP ICON(lO).NPCON DATA P I / 3 . 1 4 1 5 9 2 6 5 4 / . J M A X / 3 0 / JSNO=O PP=O. JCOX=ICONl(I) IF (JCOX.GT.10000) JCOX=I JEND=-1 IEND=-I SIC=-I . IF (JCOX) 1.10.2

TB
TB TB TB TB TB TB TB TB TB TB TB TB TB TB TB

JCOX=ICONZ(JCOX) IF (IABS(JCOX).EQ.I)GO TO 9 IF (JCOX) 1.28.2 BX(JSNO)=-BX(JSN0) IF (1END.EQ.l) GO TO I 1 PM=-PP PP=o. NJUNI=JSNO JCOX=ICONZ(I) IF (JCOX.GT.10000) JCOX=I JEND=1 IEND=I SIC=-!. IF (JCOX) 1.11.2 NJUNZ=JSNO-NJUNI JSNOP=JSNO+I JCO(JSNOP)=I D=PIaSI(I) SDH=SIN(O) CDH=COS(D) SD=2.*SDHCDH CD=COH*CDH-SOH-SOH IF (O.GT.O.015) GO TO 12

TBF

129 130 ? 6 I31 132 C 1 5 3 29 134

RETURN P R I N T 29. STOP FORMAl END

TB 129

I
T B 132
TB 1 3 3 TB 134-

(43H T B F - SEGMENT C O N N E C T I O N ERROR F O R S E G M E N T . 1 5 )

TEST 'TEST

PURPOSE T o c o m p u t e t h e r e l a t i v e d i f f e r e n c e o f two n u m e r i c a l i n t e g r a t i o n r e s u l t s f o r t h e Komberg v a r i a b l e - i n t e r v a l - w i d t h integration routines.

EIE'T!IOD The f i r s t n u m e r i c a l i n t e g r a t i o n r e s u l t i s t h e c o m p l e x number ( F l u , F 1 I ) a n d t h e s e c o n d i s (F2K, F 2 I ) . The r e a l a n d i m a g i n a r y p a r t s o f t h e two r e s u l t s

a r e s u b t r a c t e d a n d t h e d i f f e r e n c e s are d i v i d e d by t h e l a r g e s t o f F Z R , F Z I ,
DrlLN o r

'The d e n o m i n a t o r i s c h o s e n t o a v o i d t r y i n g t o m a i n t a i n a

s m a l l r e l a t ~ v ee r r o r f o r a q u a n t i t y t h a t i s i n s i g n i f i c a n t l y s m a l l .

SYzlUOL DICTIONAUK ABS DEN DMIN FLI FlK F21 F2K 'T I
= external routine (absolute value) = largest of

IF2KI a n d IF211

= minimum d e n o m i n a t o r = imaginary p a r t of f i r s t i n t e g r a t i o n r e s u l t
= r e a l p a r t of

f i r s t integration result

= imaginary p a r t of second i n t e g r a t i o n r e s u l t = r e a l p a r t o f second i n t e g r a t i o n r e s u l t = r e l a t i v e d i f f e r e n c e of = relative difference

imaginary p a r t s

'r l(
CONSTANT l.E-37

of r e a l p a r t s

= tolerance i n t e s t f o r zero

TEST
SUBROUTINE TEST

(fIR.F2R.TR.flI.F2I.TI.DMIN)

TEST FOR CONVERGENCE I N NUMERICAL I N T E G R A T I O N DEN=ABS(FZR) TR=ABS(FZI) I F ( D E N . L T . T R ) DEN=TR IF ( D E N . L T . D M I N ) DEN=DMIN I F ( D E N . L T . 1 . E - 3 7 ) GO TO 1 TR=AB5((F1R-f2R)/DEN) TI=ABS((FII-F2I)/DfN) RETURN TR=O. TI=O. RETURN END

TRIO
T. R -IO

I'URPOSE To e v a l u a t e each o f t h e p a r t s of c u r r e n t expansion f u n c t i o n s on a s i n g l e segment due t o each of t h e segments connected t o t h e g i v e n segment. M E T H O D TRIO c o n s i s t s of a l o o p t h a t u s e s t h e c o n n e c t i o n d a t a i n a r r a y s I C O N 1 and ICON2 t o l o c a t e a l l segments connected t o segment J . S u b r o u t i n e SBF i s

c a l l e d t o e v a l u a t e t h e c u r r e n t expansion f u n c t i o n c e n t e r e d on each connected segment and on segment J . Only t h e f u n c t i o n c o e f f i c i e n t s f o r t h a t p a r t of

each e x p a n s i o n f u n c t i o n on segment J a r e r e t u r n e d and a r e s t o r e d i n a r r a y s


AX,
RX,

and CX.

'The number of t h e segment w i t h which e a c h e x p a n s i o n f u n c t i o n

p a r t i s a s s o c i a t e d i s s t o r e d i n a r r a y J C O and t h e t o t a l number of expansion f u n c t i o n s i n v o l v e d i s s t o r e d a s JSNO. S Y M B O L DICTIONARY IEND


=

-1 d u r i n g c a l c u l a t i o n s f o r end 1 of segment J, and +1 f o r end 2

J C O X = number of a segment connected t o segment J JEND = -1 i f end 1 of segment J C O X i s connected t o segment J ; +1 i f end

2 of segment J C O X is connected t o segment J


JMAX = dimension of t h e a r r a y s i n COMMON/SEGJ/

TRIO
SUBROUTINE T R I O ( J ) COMPUTE THE COMPONENTS OF A L L B A S I S FUNCTIONS ON SEGMENT J TR TR 1 2

COMMON / D A T A / L O . N I . N 2 . N . N P . M 1 .M2.M.MP.X(300).Y(30O),Z(300).SI(300 TR 3 ~ ) . B I ( ~ ~ ~ ) . A L P ( ~ ~ O ) , B E T ( ~ ~ ~ ) , I C O N ~ ( ~ ~ ~ ) . I C O N ~ ( ~ O O ) . I T A G TR ( ~ O O4 ),ICONX( 23OO).WLAM,IPSYM COMMON / S E G J / ~ ~ ( 3 .0 BX ) ( 3 0 ) . C X ( 3 0 ) .JC0(30), ICON(lO).NPCON O A l A JMAX/30/ JSNO-0 JCOX=ICONI(J) I F ( J C O X G T . 1 0 0 0 0 ) GO T O 7 JENO=-l IENO=-I I F (JCOX) 1 . 7 . ? JCOX=-JCOX GO TO 3 JEN0:-JENO I F ( J C 0 X . E O . J ) GO TO 6 JSNO=JSNO+I TR J S N O , I S C O N ( ~ O )N S C O I P TR TR TR TR

TR
TR TR TR TR TR TR TR TR TR

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

38 9

39
40 C 41 1 0 42

I F (JCOX) 1 . 9 . 2 I F (IEND.EQ.I) GO T O a JCOX=ICONL( J ) I F ( J C O X . G T . 1 0 0 0 0 ) GO TO 8 JEND=I IENO=I I F (JCOX) 1 . 8 . 2 JSNO=JSNO+I C A L L SBF ( J . J . A X ( J S N O ) . B X ( J S N O ) . C X ( J S N O ) ) JCO(JSNO)=J RETURN PRINT 1 0 . J . STOP FORMAI END ( 4 4 H T R I O - SEGMENT CONNENTION ERROR FOR S E G M E N T . 1 5 ) TR TR TR 40 41 42-

I'UIII'OSE

To c a l c u l a t e t h e e l e c t r i c F i e l d d u e t o u n i t c u r r e n t s i n t h e t d i r e c t i o n s on a s u r f a c e patch.
METllOl)

and

The e l e c t r i c f i e l d d u e t o o p a t c h j is c a l c u l a t e d by t h e e x p r e s s i o n

2 3 + i 6 8 R I X - 4n (RIA)
(RIX)~ where i
=

AA .

J o b s e r v a t i o n p o i n t , and AA. i s t h e a r e a o f t h e p a t c h . F o r UNERE, J and J J lj 2j are unity. The e x p r e s s i o n a b o v e f o r a s i n g l e p a t c h i s o b t a i n e d f r o m t h e


s u r t a c e i n t e g r a l i n e q u a t i o n ( 3 ) i n P a r t I w h e r e c o n s t a n t c u r r e n t and o n e s t e p i n t e g r a t i o n a r e used f o r t h e patch.
CODING

J-1, J .

. -

= Jij t l j

JZj t Z j , R is t h e v e c t o r from t h e s o u r c e t o t h e

UE14

UE20 z coniponents of p a t c h p a r a m e t e r s a r e a d j u s t e d f o r d i r e c t o r reflected fields.

UE25

UE32 F o r R < 1 0 - l o ,

t h e f i e l d s a r e set t o z e r o .

UE34 - UE47 E x p r e s s i o n f o r E i s e v a l u a t e d f o r UE50 UE57

yj

equal t o
-

^t 1 a n d ^t 2 '

UE55 F o r r e f l e c L i o n i n a p e r f e c t ground,?i

is reversed i n sign.

UE79 F o r r e f l e c t i o n i n a n i m p e r f e c t g r o u n d , E is m u l t i p l i e d by the reflection coefficients.

SYMBOL DICTIONARY

CONST CTH

= -

8n

'10 2

= cos

0;

fl i s t h e a n g l e b e t w e e n t h e r e f l e c t e d r a y and t h e normal

to the surface EDP


=

( i. ^p)

(R,,

\)

= Q 2 (tZi
EXK

EYK EZK

:::/
EZ S

. -RIA)

a t UE44

= E

due t o c u r r e n t t

1 1

due t o c u r r e n t t

21

I P G N D = f l a g t o c a u s e computation of r e f l e c t e d f i e l d when e q u a l t o 2
A

= p;

u n i t v e c t o r normal t o t h e p l a n e o f i n c i d e n c e of t h e

PY Q

r e f l e c t e d ray

2 R
RRH

=[ =[
= = =
=

-1

i2nRIA

2 4 n (RIA)

(R/A13

i6=R/X

4v2(R/~)

(ER)

KIA RH

RRV

\
(RIA)
3

:I
RT RZ R2

= -

RIA
(RIA) 2

= =

an;/x 2

TPI
TT1
l'T2

= 2n = =

-27tRIA 47t2(R/X)
2

UNERE

z:1
ZOE ZR

= f i e l d evaluation point

XYMAG = m a g n i t u d e o f t h e p r o j e c t i o n o f
= z component o f

R/x o n t o

t h e x-y p l a n e

</A

after reflection

CONSTANTS

UNERE
S U B R O U T I N E UNERE ( X O B . Y O B . Z O 0 ) C A L C U L A T E S THE E L E C T R I C F I E L D DUE TO U N I T CURRENT I N THE T I AND T 2 D I R E C T I O N S ON A PATCH COMPLEX E X K . E Y K . E Z K . E X S . E Y S . E Z S . E X C , E Y C , E Z C , Z R A T I , Z R A T I 2 , T l . E R . Q 1 , 102.RRV.RRH.EDP.FRATI COMMON /OATAJ/ S.B.XJ.YJ.ZJ.CABJ,SABJ.SALPJ.EXK.EYK,EZK,EXS,EYSEZ UN UN UN UN UN UN IS.EXC.EYC.EZC.RKH.IEXK,IND1.IND2,1PGND UN COMMON /GND/ZRATI.ZRATI2.FRATI.CL.CH,SCRWLLSCRWR,NRADLKSYMP,IFAR, UN 1 I P E R F . T l .T2 UN EQUIVALENCE ( T I X J . C A B J ) . (T1YJ.SABJ). (T1ZJ.SALPJ). (T2XJ.B). ( T 2 Y UN 1 J . I N D I ) . (T2ZJ.INOZ) UN DATA TPI.CONST/6.283185308.4.771341188/ UN CONST=ETA/(8:PI**2) UN ZR=ZJ UN TlZR=TIZJ UN T2ZR-TZZJ UN I F ( I P G N O . N E . 2 ) GO TO 1 UN ZR=-ZR UN TIZR=-TIZR UN T2ZR=-T2ZR UN RX=XOB-XJ UN RY=YOB-YJ UN RZ=ZOB-ZR UN R2=RX*RX+RYWRY+RZ*RZ UN I F (R2.GT.I.E-20) GO TO 2 UN EXK=(O.,O.) UN EYK=(O..O.) UN EZK=(O..O.) UN EXS=(O..O.) UN EYS=(O..O.) UN EZS=(O..O.) UN RETURN UN R=SORT(R2) UN TTI=-TPI'R UN TT2=TTI.TTI UN RT=R2.R UN

ER=CMPLX(SIN(TT~),-COS(TTI))*(CQNST*S)
QI=CMPLX(TT2-I..TTl)*ER/RT
02=CMPLX(3.-TT2,-3.'TTI)*ER/(RT*R2) ER=Q2'(TlXJ*Rx+TlYJ*RY+TlZR.RZ) EXK=Ql*TIXJ+ERwRX EYK=Ql*TlYJ+ER.RY EZK=Ol*TIZR+ER.RZ ER=CJ~*(T~XJ'RX+T~YJ.RY+T~ZR.RZ) EXS=Ql*T2XJ+ER*RX EYS=QI*T2YJ+EReRY EZS=QIWT2ZR+ER*RZ I F ( I P G N D . E Q . 1 ) GO TO 6 I F ( I P E R F . N E . 1 ) GO TO 3 EXK=-EXK EYK=-EYK EZK=-EZK EXS=-EXS EYS=-EYS EZS=-EZS

UN UN UN UN UN UN UN UN UN UN UN UN UN UN UN UN UN UN UN

UNERE
PY=RX/XYMAG CTH=RZ/~~RT(XYMAG'X~MAG+RZ.RZ)

RRV=CSORT(l.-ZRATI.ZRATI*(I.-CTH0CTH))
RRH=ZRATI.CTH RRH=(RRH-RRV)/(RRH+RRv) RRV=ZRATI.RRV

RRV=-(CTH-RRV)/(CTH+RRV) EOP=(EXK'PX+EYK*PY)*(RAH-RRV)
EXK=EXK0RRV+EDP.PX EYK=EYK*RRV+EDP*PY EZK=EZK.RRV

EDP=(EXS.PX+EYS.PY)*(RRH-RRV)
EXS=EXS*RRV+EDP0PX EYS=EYS*RRV+EDP*PY EZS=EZSWRRV RETURN END

WIRE

PURPOSE 'To compute segment c o o r d i n a t e s t o f i l l COMMON/DATA/ f o r a s t r a i g h t l i n e of segments.

METHOD The f o r m a l p a r a m e t e r s s p e c i f y t h e b e g i n n i n g and e n d i n g p o i n t s of t h e l i n e and t h e number o f segments i n t o which i t i s t o b e d i v i d e d . computes t h e c o o r d i n a t e s of t h e end p o i n t s of e a c h segment. The c o d e

The l e n g t h s of

s u c c e s s i v e segments a r e s c a l e d by t h e f a c t o r RDEL i f t h i s f a c t o r i s n o t o n e . For N S s e g m e n t s , t h e l e n g t h of t h e f i r s t segment i s

or

S1 = L/NS i f RDEL = 1

where L i s t h e t o t a l l e n g t h o f wire. The r a d i u s i s RAD Eor t h e f i r s t segment and i s s c a l e d by RRAD.

SYMBOL DICTIONARY DELL ENS


I ST
=

segment l e n g t h

= r e a l number e q u i v a l e n t of NS = i n i t i a l segment number = t a g number a s s i g n e d t o a l l s e g m e n t s o f t h e l i n e


= = =

ITG
NS

number of s e g m e n t s i n t o which l i n e i s d i v i d e d r a d i u s of f i r s t segment segment r a d i u s

R A D
KADZ R D , KDEL
KKAD
XD
XS 1

= s c a l i n g f a c t o r f o r segment l e n g t h
= =
=

s c a l i n g f a c t o r f o r segment r a d i u s increment t o x c o o r d i n a t e s

x c o o r d i n a t e of f i r s t end of segment

X S2 XW 1
XW 2

= x c o o r d i n a t e o f second end of segment = x c o o r d i n a t e oE f i r s t end of l i n e


=

x c o o r d i n a t e o f second end o f l i n e

WIRE
=

x c o o r d i n a t e o f end 2 of segment I
y c o o r d i n a t e oT t i r s t end o f segment
c o o r d i n a t e o f second end o f segment

= increment t o y c o o r d i n a t e s
=

= y =

y c o o r d i n a t e of f i r s t end of w i r e

= y c o o r d i n a t e of second end o f w i r e
=

y c o o r d i n a t e of end 2 o f segment I

= increment t o z c o o r d i n a t e s = z c o o r d i n a t e of f i r s t end of segment = z c o o r d i n a t e o f second end o f segment


= z

c o o r d i n a t e of f i r s t end of l i n e

= z c o o r d i n a t e o f second end o f l i n e = z c o o r d i n a t e of second end of segment I

WIRE
SUBROUTINE W I R E (XWI.WI.ZW1.XW2.YW2.ZW2.RAD.RDEL.RRAO.NS.ITG) S U B R O U T I N E W I R E G E N E R A T E S S E G M E N T GEOMETRY D A T A F O R A S T R A I G H T W I R E OF NS SEGMENTS. WI WI WI W I

WI COMMON / D A T A / LD.NI.N~.N.NP.MI.M~.M.MP.X(~~~).Y(~OO),Z(~~~) W I. S I ( ~ ~ ~ ~ B I ( 3 0 0 )~ A L P ( ~ ~ O ) . B E T ( ~ O O ) , I C O N ~ ( ~. O IO C) 0 ~ 2 ( 0 0 )~ ~ ~ ( 3I O 0N 0 X() W I 2300j.WLAM.IPSYM WI DIMENSION X2(1). Y2(1). 22(1) WI EoLJIVALENCE ( X 2 ( 1 ) . S I ( l ) ) . (Y2(1) .ALP(l)). IST=N+I N=N+NS NP=N MP=M IPSYM=(I I F ( N S . L T . 1 ) RETURN XD=XWZ-XWI YD=YW2-YWI ZO=ZWZ-ZWI I F (ABS(RDEL-I.).LT.I.E-6) GO TO 1 OELZ=5~RT(XD*KD+YO~YD+~O*ZO) XD=XD/OEL7 YD=YD/DELL zo=zo/oELz

(ZZ(1). B E T ( ] ) )

W W W W W W W

I I I I I I I

DELZ=OLLZ.(I.-ROEL)/(~.-RDEL*.NS)
RO=RDEL G O TO 2 FNS=NS XD=XD/FNS YD=~O/FNS ZD=ZD/FNS OELZ-1

WI W I W I VII WI WI WI W I W I W I W I WI W I W I WI
WT

BI~I~=RAOZ OELZ=OELZ.RD RADZ=RAOZ.RRAD xs1=xs2 YSIlYS2 ZS1=ZS2 XZ(N)=XWZ Y2(N)=YW2 Z2(N)=ZW7 RETllRN END

ZINT
PIIKI'OSI~

To compute t h e i n t e r n a l impedance of a c i r c u l a r w i r e w i t h f i n i t e

co~lcluc tivi~y. E1I:THOII The i n t e r n a l impedance p e r u n i t l e n g t h o f a c i r c u l a r w i r e i s g i v e n by

0 = wire conductivity

IJ

permeability of f r e e space

b = wire radius
f = frequency

Be i

'5er}= K e l v i n f u n c t i o n s

The t e r m t h a t m o d i f i e s t h e d i a g o n a l m a t r i x e l e m e n t G .
1

1i

i n the interaction
1

m a t r i x i s t h e t o t a l impedance o f segment i d i v i d e d b y A . / h , w h e r e A . = segment length. Thus, if C . .


11

i s t h e d i a g o n a l m a t r i x e l e m e n t w i t h o u t l o a d i n g , t h e new

elenlent is

Norm:llizcd t o wavelength, t h i s term i s

whcre
q = ( b / X ) JZncp(oh)
=

velocity of light

ZINT

The Kelvin functions and derivatives of Kelvin functions are computed from their polynomial approximations. CODING 218

ZI15 Functions 8, 9, f, and g for large argument polynomial approximations (see ref. 5 ) .

ZI19-2126 Compute Ber(q) ZI27-2131 Compute Berl(q) zI32 2134 7,135 2136 2138 2139 [Ber(q) Ber (q) [Ber(q) [Ber(q)

+ jBei(q) for q <

8 .

+ jBeil(q)

for q

5 8.

+ Berl(q) + jBeit(q)
+

jBei(q)l/[Ber'(q) + jBeil(q)l. jBei(q) for 8 < q 5 110. for 8 < q < 110. jBei(q)l/[Ber'(q)

+ jBei'(q) I .

+ jBei(q)]/[Bert(q)

+ jBeiV(q)]

for 110 < q <

m.

Computation of Zi.

SYMBOL DICTIONARY BE1 BER BR1 BR2 CEXP

Bei(q) or Beil(q) or Berl(q)

= Ber(q) = Ber(q)

+ j~ei(q) or
+ jBeil(q)

[Ber(q)

+ j~ei(q)]/[Ber'(~) +

Bei'(q)]

= Ber' (q)

= external routine [exp(complex argument)]

CMOTP = cp/(21~) CMPLX = external routine (forms complex number)


CN
=

(1

j)/&

D F(D) FJ

= function argument = f(D) (see ref. 5 )

j (see ref. 5 ) D = 8/X (see ref. 5)

G ( D )

= g ( D )

PH(D) = @ ( X ) , PI = ll POT = T/2 ROLAM = b/A

s
SIGL

= =

(X/8) oA

SQRT = external routine (square root) TH(D) = 8 ( X ) , D = 8/X (see ref. 5 )


TP
=

2n

ZINT
TPCMU = 2 n c ~ ;c = v e l o c i t y o f l i g h t

X
Y

= =

(x/812
1

ZLNT

= Z.

CONSTANTS 1.5707963 3.141592654 6.283185308 60. 2.368705E+3 (O., 1.)


= n/2 =
TI

= 2n = cl.l/Zn = 2ITcp

= j
= (1

(0.70710678, 0.70710678) (0.70710678, -0.70710678)

j)l&

= l i m i t

for q

of [ B e r ( q )

jBei(q)]/

[Ber'cq) + j B e i l ( q ) l O t h e r c o n s t a n t s a r e f a c t o r s i n t h e polynomial a p p r o x i m a t i o n s .

COMPLEX FUNCTION Z I N T ( S I G L . R O L A M ) Z I N T COMPUTES THE I N T E R N A L IMPEDANCE OF A CIRCULAR W I R E

zI zI zI
Z I
LI

COMPLEX T H . P H . F . G . F J . C N . B R l . B R 2 COMPLEX CCl.CC2.CC3.CC4.CC5.CC6,CC77CC8BCC9,CC1O,CCl1.CC12.CCl3.CC 114 OIMENSION F J X ( 2 ) . CNX(2). CCN(28) EQUIVALENCE ( F J . f J X ) . (CN.CNX). (CCl.CCN(1)). (CCZ.CCN(3)). (CC3.C lCN(5)). ( C C ~ . C C N ( ~ ) ) . (CCS.CCN(9)). (CC6.CCN(ll)). (CC7,CCN(13)), 2(CC8,CCN(l5)). (CC9,CCN(17)). (CClO.CCN(l9)). (CCll.CCN(21)). (CC1 JZ.CCN(23)). (CC13,CCN(25)). (CCI4,CCN(27)) DATA PI.POT.TP.TPCMU/3.1415926,1.5707963.6.2831853,2.368705E+3/ DATA CMOTP/60.00/.FJX/O..1./.CNX/.70710678..70710678/ DATA C C N / 6 . E - 7 . 1 . 9 E - 6 . - 3 . 4 E - 6 . 5 . 1 E - 6 . - 2 . 5 2 E - 5 , 0 . . - 9 . 0 6 E - 5 . - 9 . 0 1 E - 5

ZI Z I
7T

1.0..-9.765E-4..01104866-6O11O485,O.,-.392699l.1.6E-6.-3.2E-6.1.17E

ZI Z I Z I Z I ZI Z I Z I Z I Z I

ZINT=FJ*SQRT(CM~TP/~IGL)*BR~/ROLAM
RETURN EN0

Section 111 Common Blocks


T h i s s e c t i o n d i s c u s s e s e a c h l a b e l e d common b l o c k w h i c h i s u s e d i n t h e NEC-2 c o d e . F o r e a c h common b l o c k , a l i s t o f t h e r o u t i n e s i n w h i c h i t i s u s e d

i s g i v e n a l o n g w i t h a d e f i n i t i o n of t h e v a r i a b l e s used i n c o n j u n c t i o n w i t h t h e
common b l o c k . The common b l o c k s are p r e s e n t e d i n a l p h a b e t i c a l o r d e r .

R o u t i n e s U s i n g /ANGL/
CABC, CMSS, CMSW, CMWS, CMWW, DATAGN, ETMNS, FFLD, GFIL, GFLD, GFOUT,

MOVE, NEFLD, NHFLD, PATCH, QDSRC, REFLC

/ANGL/ P a r a m e t e r s f o r Wire Segments SALP(1) = s i n (a),w h e r e

cr

= e l e v a t i o n a n g l e o f segment I ( S e e f i g u r e 1 1 )

/ANGL/ P a r a m e t e r s f o r S u r f a c e P a t c h e s SALP(LD- I + 1 ) = +l i f

;x
*1

-1 i f t l x

i2

= n f o r patch I, o r 2 _ = -n f o r p a t c h I

The s e c o n d c a s e o c c u r s when t h e p a t c h h a s b e e n p r o d u c e d by r e f l e c t i o n o f a patch o r i g i n a l l y input.

R o u t i n e s U s i n g /CMB/

M A I N , GFIL, GFOUT

The i n t e r a c t i o n m a t r i x i s s t o r e d i n a r r a y CM. l a r g e t o f i t i n CM, they a r e needed.

I f t h e matrix is too

t h e n p a i r s o f b l o c k s of t h e m a t r i x a r e s t o r e d i n CM a s

-355-

Figure 1 1 ,

Coordinates of Segment i.

Routines Using /CRNT/ MAIN, CABC, FFLD, GFLD, NEFLD, NETWK, NHFLD /CRNT/ Parameters for Wire Segments Subroutine CABC fills the first six arrays in /CRNT/ with the real and imaginary parts of the constants in the current expansion of each segment, 11 ,(s) = A i where s
=

+ B. sin 1

[k(s

s i ) l + Ci cos [k(s - sill

s. at the center of segment i.


1

Except during intermediate calcula-

tions for non-radiating networks, the current basis-function amplitudes are computed and stored in array CUR. CABC replaces the basis function amplitudes
in CUR by the current at the center of each segment, (Ai

Ci).

For i

I,

AIR( I)
AII( I )

BIR( I)
BII(I)
CIR( I)

CII(1)

I I I
-

Ai/A (real, imaginary) Bi/A

= Ci/A

= amplitude of i basis function going into CABC o r (Ai + Ci)/A at end of CABC

th

/CRNT/ -

Parameters for Surface Patches Before CABC is called, patch i are

Surface current components are stored in CUR. the surface current strengths in directions stored in CUR(N + 21
of segments.

t 1 and i 2 on

1) and CUR(N 2), CUR(N


+

21), respectively where N is the number

After CABC, the x , y and z components of surface current are 31 - 1) and CUR(N + 31), respectively.

stored in CUR(N + 31

COMMON/DATA/ LD, N1, N2, N, NP, M1, M2, M, MP, x(~oo), Y(~oo), ~ ( 3 0 0 ) ~ SI(300), B I ( 300), ALP( 300), BET( 300), 1~0~1(300), ICON^( 300), ITAG( ~oo),
[CONX( 300). WLAM, IPSYM

Routines Using /DATA/ MAIN, ARC, CABC, CMNGF, CMSET, CMSS, CMSW, CMWS, CMWW, CONECT, DATAGN, ETMNS, FFLD, FFLDS, GFIL, GELD, GFOUT, ISEGNO, LOAD, MOVE, NEFLD, NETWK, NFPAT, NHFLD, PATCH, QDSRC, RDPAT, REFLC, SBF, TBF, TRIO, WIRE /DATA/ Parameters for Wire Segments The arrays in /DATA/ are used to store the parameters defining the segments. Two forms of the segment parameters are used. The symbol meanings in During geometry input in routines ARC, CONECT, DATAGN, MOVE, REFLEC and WIRE, the coordinates of the segment ends are stored. the geometry routines are:

SI(1)

[ e q u i v a l e n c e d t o X2(I)

ALP(1) = Y

[equivalenced t o Y2(I)] 2 BET(I) = Z 2 [ e q u i v a l e n c e d t o Z 2 ( I ) ]


Y Z a r e t h e c o o r d i n a t e s o f t h e f i r s t end of t h e segment, and X 1' 1' 1 2' a r e t h e c o o r d i n a t e s of t h e second e n d , a s i l l u s t r a t e d i n f i g u r e 1 1 .

where X

Y2,

Z2

C o o r d i n a t e s may have any u n i t s b u t must b e s c a l e d t o m e t e r s b e f o r e d a t a i n p u t

i s ended, s i n c e t h e main program r e q u i r e s m e t e r s .


I n t h e main program, t h e segment d a t a is c o n v e r t e d t o : the coordinates of t h e segment c e n t e r , components of t h e u n i t v e c t o r i n t h e d i r e c t i o n of t h e segment, and t h e segment l e n g t h . section are: The symbol meanings a f t e r t h e geometry

t:i;
Z(I)

xi,

yi.

zi

( s e e f i g u r e 11.1

SI(I)

= segment l e n g t h

ALP(1) = c o s a c o s I3 [ e q u i v a l e n c e d t o CAB(I)] BET(1) = c o s a s i n f3 [ e q u i v a l e n c e d t o SAB(I)] The z component of t h e u n i t v e c t o r i n t h e d i r e c t i o n of t h e segment, s i n a, i s s t o r e d i n /ANGL/. The o t h e r symbol meanings i n /DATA/ f o r segments a r e : BI(1)
= r a d i u s of segment I

ICONl(1) = c o n n e c t i o n number f o r end 1 of segment I.

If k is a positive

i n t e g e r l e s s t h a n 10,000, t h e meaning of I C O N 1 i s a s f o l l o w s . ICONl(1) = 0: no c o n n e c t i o n . ICONl(1) = ' k : end 1 c o n n e c t s t o segment k. I f more t h a n

one segment c o n n e c t s t o end 1 of segment I , t h e n


k i s t h e number of t h e n e x t connected segment

encountered by s t a r t i n g a t I and g o i n g t h r o u g h t h e l i s t of segments i n c y c l i c o r d e r . ICONl(1) =

+k: p a r a l l e l r e f e r e n c e d i r e c t i o n s w i t h end 2 of t h e o t h e r segment c o n n e c t i n g t o end 1 of segment I. ICONl(1) = -k: opposed r e f e r e n c e d i r e c t i o n s .

ICONl(1) = I: end 1 o f segment I c o n n e c t s t o a ground p l a n e .

1CONl(I) = 1 0 , 0 0 0 + k :

end 1 o f segment I c o n n e c t s t o a

s u r f a c e with t h e 4 patches around t h e c o n n e c t i o n p o i n t numbered k , k + 1 , k

+ 2 and

k + 3.

I C O N ~ ( I ) = c o n n e c t i o n number f o r e n d 2 o f segment I . ITAG(1)


= t a g number o f s e g m e n t I.

T h i s number i s a s s i g n e d d u r i n g

s t r u c t u r e i n p u t t o permit l a t e r r e f e r e n c e t o t h e segment w i t h o u t knowing t h e segment i n d e x I i n t h e d a t a a r r a y s . ICONX(I)


= e q u a t i o n number f o r t h e new b a s i s f u n c t i o n when segment

i s i n a n u m e r i c a l G r e e n ' s f u n c t i o n f i l e and a new segment


c o n n e c t s c o segment I m o d i f y i n g t h e o l d b a s i s f u n c t i o n .

/DATA/

Parameters f o r Surface Patches P a t c h p a r a m e t e r s a r e s e t i n s u b r o u t i n e PATCH. The i n p u t p a r a m e t e r s f o r

a p a t c h a r e t h e c o o r d i n a t e s o f t h e p a t c h c e n t e r , p a t c h a r e a , and o r i e n t a t i o n o f t h e o u t w a r d , normal u n i t v e c t o r , n. The p a r a m e t e r s s t o r e d i n /DATA/ a r e

the center ~ o i n t c o o r d i n a t e s , a r e a , and t h e components o f t h e two s u r f a c e u n i t vectors, i s p a r a l l e l t o a s i d e of t h e 1 t r i a n g u l a r , rectangular, o r q u a d r i l a t e r a l patch. For a patch of a r b i t r a r y and The v e c t o r s h a p e , i t i s c h o s e n by t h e f o l l o w i n g r u l e s :

il

i 2'

For a horizontal patch, t i = x ; For a nonhorizontal patch,

-t 2

i s then chosen a s t

= n x t

t1

= ( z x n)/lz

"

x nl;

With J = L D + 1

X ( .I)'

y(Ji

I , t h e parameters f o r patch I a r e s t o r e d a s follows.

= x , y , and z c o o r d i n a t e s of t h e p a t c h c e n t e r

Z( J )
S I CJ )

ALP( J )
KET(.I)

x , y , z components o f

t1

( e q u i v a l e n c e d t o T l X , TlY, T1Z)

x , y , and
T;z)
p a r c h area

z components o f

E2

( e q u i v a l e n c e d t o TZX, T2Y,

11l(.l)

S c a l a r v a r ~ a b l e si n /DATA/ I P S Y M = symmetry f l a g . I P S Y M = 0: I P S Y M > 0: I P S Y M < 0; IPSYM = 2 : I I P S Y r Y l > 2;

are;

The meanings o f I P S Y M a r e ;

no symmetry p l a n e symmetry c y l i n d r i c a l symmetry p l a n e sytnmetry a b o u t L = 0 s t r u c t u r e h a s been r o t a t e d a b o u t x o r y a x i s . IF

g r o u n d p l a n e i s i n d i c a t e d by I G N D f 0 i n t h e c a l l t o s u b r o u t i n e CONECT and I P S Y M = 2 , symmetry a b o u t a h o r i z o n t a l p l a n e i s removed by m u l t i p l y i n g NP by 2.

I T I L P S Y H I > 2 and IGND # 0 , a l l symmetry i s


removed by s e t t i n g N P = LD
N1

N a n d I P S Y M = 0 i n CONECT.

= l e n g t h o f a r r a y s i n /DATA/ = number o f s e g m e n t s i n NGF.

I f NGF i s n o t u s e d N 1 = 0

N2 N
NP

= N 1 + 1
= t o t a l number o f s e g m e n t s = number o f s e g m e n t s i n a s y m m e t r i c c e l l

M1

= number o f p a t c h e s i n NGF.
= M 1 +

I f NGF i s n o t u s e d M l = 0

M2 M MP W L A M

= t o t a l number o f p a t c h e s

= number o f p a t c h e s i n a s y m m e t r i c c e l l = wavelength i n meters

COMMONIDATAJI S , 8, X J , E Z S , E X C , E Y C , E Z C , KKH,

Y J , Z J , C A B J , S A B J , S A L P J , EXX, EYK, E Z K , E X S , E Y S , I E X K , 1ND1, I N D 2 , I P G N D

Routines PCINT,

Using /DATAJ/ NHFLD,

CMNCF, C M S E T , CMSS, CMSW, CMWS, CMWW, E F L D , H I N T G , H S F L D , N E F L D , VDSKC, SFLDS, UNEKE /DATAJ/

i s u s e d t o p a s s t h e p a r a m e t e r s o f t h e s o u r c e segment o r p a t c h t o

t h e r o u t i n e s t h a t compute t h e

E o r H f i e l d and t o r e t u r n t h e f i e l d c o m p o n e n t s .

/DATAJ/ S

P a r a m e t e r s f o r Wire Segments
= segment l e n g t h = segment r a d i u s

= c o o r d i n a t e s o f segment c e n t e r

CALI J
= x, y,

and z , r e s p e c t i v e l y , o f t h e u n i t v e c t o r i n t h e d i r e c t i o n

o f t h e segment

EYK} EZK

= x,

y , and z components o f t h e E o r H f i e l d d u e t o a c o n s t a n t

current

}
EZS

= x . y , and z components o f t h e E o r H f i e l d d u e t o a s i n k s current

7
EZ C
&KH

x , y , and z components o f t h e E o r H f i e l d d u e t o c o s ku

- current

= minimum d i s t a n c e f o r u s e o f t h e H e r t z i a n d i p o l e a p p r o x i m a t i o n

f o r c o m p u t i n g t h e E f i e l d o f a segment
IEXK

= f l a g t o s e l e c t t h i n wire approximation o r extended t h i n w i r e

a p p r o x i m a t i o n f o r E f i e l d (IEU= 1 f o r extended t h i n w i r e approximation) lNOl


= f l a g t o i n h i b i t use of t h e extended t h i n

w i r e approximation on

e n d 1 o f t h e s o u r c e segment. o r c h a n g e i n r a d i u s a t e n d 1. t h i n wire approximation. LNU2

his i s u s e d when t h e r e i s a b e n d
I N D l = 2 i n h i b i t s t h e extended

= f l a g t o i n h i b i t u s e of t h e extended t h i n w i r e approximation on

end 2 o f t h e s o u r c e segment

IPGND

= not used

/DATAJ/ -

Parameters f o r Surface Patches


= patch a r e a i n u n i t s of wavelength squared = x component o f t

B
XJ

f o r the patch

= x , y , and z components o f t h e p o s i t i o n o f t h e p a t c h c e n t e r

zJ J/

CABJ
= x,

y , and z components o f t l

:;ALPJ

E XK EYKI ELK

x,

y , and z components o f E o r H due t o a c u r r e n t w i t h u n i t

magnitude i n t h e d i r e c t i o n

El

on t h e patch

"Sl

= E o r H due t o a c u r r e n t

i2 on

the patch

EZS

EZC
INDl = y component o f
=

"1'

= n o t u s e d ; may s e r v e a s i n t e r m e d i a t e v a r i a b l e s i n some r o u t i n e s

LND2 LPCND

z component o f

i2 t2
-

= f l a g t o request c a l c u l a t i o n of t h e d i r e c t f i e l d o r f i e l d

r e f l e c t e d from t h e ground ( t w o f o r ground)

COFZIYON/FPAT/

NTH, NPH,

IPD,

IAVP,

INOK, I A X , THETS, P H I S , DTH, DPH, RFLD,

GNOR, CLT, C H T , E P S K Z ,

S I G Z , I X T Y P , X P R b , P I N R , P N L R , P L O S S NEAK, N F E H , N R X ,

N R Y , N K Z , X N R , Y N K , Z N R , DXNR, DYNR, DZNK Koutines -

Using / F P A T / RDPAT

MAIN, NFPAT,

Variables a r e defined i n subroutine descriptions.

COMMUN/GCKID/ DYA(3),

~ R l ( 1 1 , 10, 4 ) , A ~ 2 ( 1 7 , 5, 4 ) , A R 3 ( 9 , YSA(3), NXA(3), NYA(3)

8, 4 ) , E P S C F , D U ( ~ ) ,

XSAO),

Koutines Using /GGRID/

INTKP

WAIN, G F L L , GFOUT,

Variables a r e defined under subroutine INTKP. CU~~O N / G N DZKA'CL, / I P E K F , ' 1 , 'C2

Z K A T I Z , F A A T I , C L , C H , SCKWL, SCRWR, NRAUL, K S Y M P ,

IFAR,

Routi n e s Usin /GND/ - - -- . -g -.--H A I N , CMSW, EFLD, ETMNS, FFI.D, SFLDS, U N E R E


/GNI)/

GFIL, GFOUT, HINTG, HSFLD, NEFLD, RDPAT,

c o n t a i n s p a r a m e t e r s o f t h e g r o u n d i n c l u d i n g t h e two-medium g r o u n d The symbol d e f i n i t i o n s a r e a s f o l l o w s .

and r a d i a l - w i r e g r o u n d - s c r e e n c a s e s . -1/2 O / ~ E ~ ]

ZRATI

= [E

- J.

wnere 0 i s ground c o n d u c t i v i t y ( m h o s f m e t e r ) , Er i s t h e r e l a t i v e d i e l e c t r i c constant,


Eo

i s t h e p e r m i t t i v i t y of

f r e e s p a c e ( f a r a d s f m e t e r ) , a n d w = 2nf. ZKATIZ FKA.TI


CL
CH
S CKAWL
= same a s ZKATI, b u t f o r a s e c o n d g r o u n d medium = (kl

2 k2)/(k:

2 + k 2 ) where k

JliT 0 0

a n d kl = k2/ZRATI

= d i s t a n c e i n w a v e l e n g t h s o f c l i f E e d g e Erom o r i g i n = c l i f f height i n wavelengths

= length of wires i n radial-wire

ground s c r e e n (normalized t o

wavelength) SCKWK NRADL


= r a d i u s o f wires i n s c r e e n i n wavelengths = number o f r a d i a l s i n g r o u n d s c r e e n ; z e r o i m p l i e s no s c r e e n

( i n p u t q u a n t i t y , GN c a r d ) KSYMP I FAK
= g r o u n d f l a g ( = I , no g r o u n d ; = 2 , g r o u n d p r e s e n t )

= i n p u t i n t e g e r f l a g o n RP c a r d ; s p e c i f i e s t y p e o f f i e l d

computation o r type o f ground system f o r f a r f i e l d s I PERF


= f l a g t o s e l e c t type of ground ( s e e GN c a r d )
= constants f o r the radial-wire

TL, 'C2

ground-screen

impedance

COIYI4ON/GWAV/ -- -- U , R u tin e s -U sin g -o . -. --

U2, X X L , XX2, R 1 , R2, ZMH, ZPH

IGNAVI

M A I N , GFLD, GWAVE, SFLDS

Symbol U efinitions; -. . . U = (E r
E

j0/UJEO)

-112

= relative dielectric constant; r ground

= c o n d u c t i v i t y of

X X 1 , XX2
KI

defined in GFLD and SFLDS distance from current element to point at which field is evaluated distance from image of current element to point at which field is evaluated

R2

ZMH Z PH

~1

= Z + E'

where Z is height of the field evaluation point and Z ' is the height of the current element
ISNOK

COMMON/INCOM/ XO, YO, ZO, SN XSN, YSN,

Routines Using - /INCOM/


EFLD, SFLDS

a~bol Definitions:
XO, YO, ZO = point at which field due to ground will be evaluated SN XSN YSN ISNOR
= cos

a (see Figure 11)

= cos 1 3 = sin D = 1 to evaluate field due to ground by interpolation

O to use Norton's approximation


COMMON/MATPAR/ LCASE, NBLOKS, NPBLK, NLAST, NBLSYM, NPSYM, NLSYM, IMAT, I C A S X ,

NBBX, NPBX, NLBX, NBBL NPBL, NLBL

Routines Using /MATPAR/


MAIN, CMNGF, CMSET, FACGF, F A C I O , FACTKS, FBLOCK, FBNGF, G F I L , GFOUT, LFACTK, LTSOLV, LUNSCK, KEBLK, S O L G F , SOLVES /ITATPAR/

contains matrix blocking parameters For cases requiring file Symbol definitions in /MATPAR/ are as follows.

storage o f the matrix.


ICASE

= storage mode For primary matrix, defined as follows.

I unsymmetric matrix fits in core


2 symmetric matrix fits in core

3 unsymmetric matrix out of core

4 symmetric matrix out of core, but submatrices fit in core


5 symmetric matrix out of core, submatrices also out of core

NBLOKS

= number o f b l o c k s o f columns o f t h e computed m a t r i x ( i n c o r e

m a t r i x , NBLOKS NPBLK NLAST NBLSYM 1'4PSYi'I


NL S Y M

1)

= number o f columns i n t h e f i r s t (NBLOKS

1) blocks

= number o f columns i n t h e L a s t b l o c k

IHAr

= same f u n c t i o n a s t h e p r e c e d i n g t h r e e v a r i a b l e s ;

however, i n t h i s c a s e t h e p a r a m e t e r s r e f e r t o t h e s u o m a t r i x i n t h e symmetry c a s e
= s t o r a g e r e s e r v e d i n CM f o r t h e p r i m a r y NGF m a t r i x A o r a b l o c k

o f A (number o f complex numbers) ICASX NtMX


NPBX
NLkiX
= s t o r a g e mode f o r NGF s o l u t i o n ( s e e S e c t i o n V I I )

= number o f b l o c k s i n m a t r i x B s t o r e d by b l o c k s o f rows
= number o f = number o f

rows i n a b l o c k o f B s t o r e d by rows rows i n t h e l a s t b l o c k o f B

L~BBL

= number o f b l o c k s i n m a t r i x C s t o r e d by rows ( a n d number o f

b l o c k s i n B s t o r e d by c o l u m n s ) NPUL
N LBL
= number o f rows ( c o l u m n s ) i n a b l o c k o f C ( B ) = number o f rows ( c o l u m n s ) i n t h e l a s t b l o c k o f C ( 8 )

COMMON/NETCX/ Z P E D , P I N , PNLS, NEQ, NPEQ, N E Q Z , NONET, NTSOL, N P R I N T , MASYM,

1 S ~ c l SO), ( I S E G ~SO), ( X l l ~ ( 3 0 ) ,X l l I ( 3 0 ) , ~ 1 2 ~ ( 3 0 ~ ), 1 2 1 ( 3 0 ) ,~ 2 2 R ( 3 0 ) , X22I( SO), NTYP( 30)

K -o u t i n e s

U s i n g /NETCX/

IHAIN, N E T W K V a r i a b l e s a r e d e f i n e d u n d e r s u b r o u t i n e NEWK.

COMMON/SAVE/ 1 ~ ( 6 0 0 ) ,KCOM, COM(13,5), EPSR, SIG, SCRWLT, SCRWRT, FMHZ

KoutLnes U s i n g /SAVE/ MAIN, GFIL, GFOUT, KDPAT

Symbol -

UeEinitionsr

IP
KCOM
COM

= v e c t o r o f i n d i c e s of p i v o t elements used i n f a c t o r i n g t h e m a t r i x = number o f CM o r CE d a t a c a r d s (maximum 5 )


= a r r a y s t o r i n g t h e c o n t e n t s oE CM o r CE c a r d s

EPSR S IG SCRWLT

= = =

relative dielectric constant of the ground conductivity of the ground length of radials in radial wire ground screen approximation (meters)

SCKWKT = radius of wires in radial wire ground screen approximation (meters)

FMHZ

frequency in MHz

COMttoN/SCRATM/D( 600) in routines CMSET, FACTK, LFACTR COMMON/SCRATM/Y(~OO) in routines LTSOLV, SOLGF, SOLVE, SOLVES

COMMON/SCRATM/GAIN(~~OO)

in routine RDPAT

2 m b o 1 DeEinitions: D and Y GAIN


=

complex vectors used in matrix decomposition and solution


= array to store antenna gain for subsequent normalization

COMMON/SEGJ/ AX(30),

BX( 30), CX( 30), JCO( 30), JSNO, ISCON( 50), NSCON,

IPCON( 10) , NPCON


Routines Using /SEGJ/ MAIN, CABC, CHNGF, CMSET, CMSW, CMWS, CMWW, CONECT, QDSRC, SFLDS, TBF, TRIO /SEGJ/ is used to store the parameters defining current expansion functions. The equations for the current expansion functions are given in Section ItI-I of Part I. i. The ith current expansion function consists of a center section on segment i and branches on each segment connected to segment On segment j , where j is i or the number of a segment connected to segment i, the it'' expansion function is

fl(s) =
J

af +
J

BS s i n
3

[k(s

s . ) ~ + Ci . cos [k(s J J

s . ) ~

J A

w ~ t o t h e c o n s t a n t s d e f i n e d i n P a r t I t o match c o n d i t i o n s o n t h e c u r r e n t .

s u p e r s c r i p t i h a s b e e n added t o i n d i c a t e t h e number o f t h e c u r r e n t e x p a n s i o n function. When s u b r o u t i n e TBF i s c a l l e d f o r e x p a n s i o n f u n c t i o n i , i t l o c a t e s e a c h segment c o n n e c t e d t o segment i and s t o r e s t h e segment number, j , i n a r r a y
JCO.

TilF a l s o computes t h e c o n s t a n t s A . , B . , J J them i n AX, BX, and CX, r e s p e c t i v e l y .

and C . f o r segment j a n d s t o r e s

A f t e r a l l c o n n e c t e d s e g m e n t s have been f o u n d , i i s s t o r e d i n t h e n e x t

i l o c a t i o n i n JCO, and A.
i n A X , B X , and CX.

I '

B.

i
1 '

and C. a r e s t o r e d i n t h e c o r r e s p o n d i n g l o c a t i o n s
1

ISEGJl i s a l s o u s e d by s u b r o u t i n e TRIO.

When TRIO i s c a l l e d f o r segment

j , i t l o c a t e s e a c h segment i c o n n e c t e d t o segment j and s t o r e s i i n a r r a y i i i JCO. TRIO c a l l s SBF t o compute t h e c o n s t a n t s A , , B., and C . f o r t h e b r a n c h o f


J

expansion function a n d CX.

i t h a t e x t e n d s o n t o segment j and s t o r e s t h e s e i n AX,

BX.

The t o t a l number o f e n t r i e s , i n c l u d i n g i = j , i s s t o r e d i n JSNO.

The

r e m a i n i n g p a r a m e t e r s a r e u s e d w i t h t h e NGF s o l u t i o n . ISCON(1)
= number o f t h e segment i n t h e NGF f i l e h a v i n g e q u a t i o n number

I i n t h e set of e q u a t i o n s f o r modified b a s i s f u n c t i o n s .
T h i s i s u s e d when a new segment o r p a t c h c o n n e c t s t o t h e

NSCON IPCON(I)

NGF segment number o f e n t r i e s i n ISCON

= number o f t h e p a t c h i n t h e NGF f i l e h a v i n g e q u a t i o n number I

i n t h e s e t of equations f o r modified patch b a s i s f u n c t i o n s . T h i s i s u s e d when a new segment c o n n e c t s t o t h e NGF p a t c h N PCON number o f e n t r i e s i n IPCON

Koutines Using /SMAT/ CMSET, FdLOCK GFIL, GFOUT, SOLVES In some copies of NEC-2 the variable name S is used in FBLOCK rather than SSX. COMMON/TI~H/ - ZPK, KHKS Koutines Us-% /TMH/ 'The array SSX is descr~oedunder subroutine FBLOCK.

GH, HFK
/ ~ f l H / is used to pass values from HFK to

GH.

The variables ZPK and RHKS

are defined in the discussion of subroutine HFK. COMMON/TMI/ - ZPK, KKB2, IJX Koutines Using /TMI/ EKSC, EKSCX, GF /TMI/ is used to pass values from EKSC or EKSCX to GF. the variables are listed in subroutines EKSC and EKSCX. COMMON/VSOKC/ - VQD( lo), VSANT( lo), VQDS( lo), IVQD( lo), ISANT( lo), IQDS( lo), NVQD, NSANT, NQDS The meanings of

Kout ines U&/VSOKC/ MAIN, CABC, COUPLE, ETMNS, NETWK, QDSKC The arrays in /VSORC/ contain the strengths and locations of voltage sources on wires. Separate arrays are used for applied-field voltage sources The variables are applied-field
th

and current-derivative discontinuity voltage sources. defined as follows. ISANT(I) IVQD(I) VQU(1) VSANT(I)
= number of the segment on which the

source is located
= IQDS(L)
=

number of the segment on end 1 of which the I

current-slope discontinuity voltage source is located


=

VQUS(1) = voltage of the Ith current-slope discontinuity source voltage of the 1t h applied-field voltage source

NSANT
N VQD

number of applied-field voltage sources NQDS, IQDS,

= NQDS = number of current-slope discontinuity voltage sources

NVQD, IVQD, and VQD are set in MAIN from the input data. and VQDS are set in subroutine QDSKC. Loads.

The latter were included to allow for

current-slope discontinuities other than voltage sources, such as lumped Loading by this means has not been implemented in NEC-2 however.

cOMMON/YPARM/ NCOUP, ICOUP, NCTAG( 5), NCSEG( 9 , YllA( 51, Y~ZA( 20) i<outines Using /YPAKM/ XAIN, COUPLE

Symbol Definitions: NCOUP ICOUP


=

number of segments between which coupling will be computed excited. When ICOUP = NCOUP subroutine COUPLE completes the

= number of segments in the coupling array that have been

coupling calculation NCTAG(I)


=

tag number of segment I

NCSEG(I)
YllA(1)

= number of segment in set of segments having tag NCTAG(1) = self admittance of Ith segment specified

~ 1 2 ~ ( 1 ) = m u t u a l a d m i t t a n c e s s t o r e d i n o r d e r c l , ~ ) , (1,3),

(2,4),

... etc.

... (2,3),

Routines Using /ZLOADI MAIN, CMNGF, CMSET, GFIL, GFOUT, LOAD, QDSKC where.2I is the total impedance on segment I, nI is cne length of segment I, and A is the wavelengtn. ZAiWAY(1)
=

Z,/(AI/A),

Section IV System Library Functions Used by NEC


ABS(X)
AIMAG (Z)
= =

a b s o l u t e v a l u e of X imaginary p a r t of t h e complex number Z ; r e s u l t i s r e a l

AINT(X) A L O G (X) ALOGlO(X) ASIN(X) A T A N (X) ATAN2(X

= integer truncation; r e s u l t i s r e a l
= = = =

n a t u r a l l o g of X l o g t o t h e b a s e t e n of X a r c s i n e o f X; r e s u l t i n r a d i a n s a r c t a n g e n t of X; r e s u l t i n r a d i a n s

X ) = a r c t a n g e n t o f X /X r e s u l t i n radians covering a l l four 1' 2 1 2; quadrants


= =

CABS(Z) cexp (z) CMPLX(X

magnitude of t h e complex number, Z complex e x p o n e n t i a l ( e )


2

1 ' 2 C O N J G (Z)
CSQRT(Z) FLOAT(K) IABS(K) TNTCX) KEAL(Z) SIN(X) SQRT(X)
TAN ( x )

X ) = f o r m a t i o n of a complex number,
=

X1

jX2

c o n j u g a t e of t h e complex number Z

C O S (X)

= c o s i n e of X
=

s q u a r e r o o t of a complex number,

fi

= r e a l number e q u i v a l e n t of i n t e g e r K = a b s o l u t e v a l u e of i n t e g e r K = X truncated t o an i n t e g e r
=

r e a l p a r t of t h e complex number Z

= s i n e of X = s q u a r e r o o t of X = t a n g e n t of X

Section V Array Dimension Limitations


A r r a y d i m e n s i o n s i n t h e program l i m i t t h e s t r u c t u r e model i n v a r i o u s ways. Any o f t h e s e l i m i t s may b e i n c r e a s e d i f n e c e s s a r y a t t h e e x p e n s e o f

c u r e s t o r a g e c a p a c i t y , w h i c h may r e q u i r e r e d u c i n g o t h e r a r r a y d i m e n s i o n s . The l i m i t s imposed by a r r a y d i m e n s i o n s a r e d e s c r i b e d b e l o w .

In-Core M a t r i x S t o r a g e . I F

=PO<$

1'

1 -

Arrays:

COMMON/CMB/ C M ( I ~ )

Limit constant : IRESRV = Ir a t MA68 o f M A I N


l r i s t h e number o f words o f c o r e a v a i l a b l e f o r s t o r a g e o f t h e i n t e r a c -

t i o n matrix. (NP

The c o m p l e t e m a t r i x w i l l f i t i n c o r e s t o r a g e i f For out-of-core

(N

2M) x

2MP) is n o t g r e a t e r t h a n I r .

solution, I

l e a s t 2(N

r must b e a t

2M) and s h o u l d b e a s l a r g e a s p o s s i b l e t o m i n i m i z e f i l e m a n i p u l a t i o n .

Maximum Segments-and

Patches

Minimum D u n e n s i o n s f o r N s e g m e n t s a n d COMMON/DATA/ X(N ALP(N

+ M):

Y(N

MY;

M patches: Z(N + M) , S I ( N + M ) , BI(N + M) ,


LCONZ(N

M),

BET(N

M),

ICONl(N

+ M),

M), ITAG(N

M), ICONX(N

\I)

cOMMONIANGL~ SALP (N

M)

SUBROUTINE NETWX:

RHS(N + 3M)

Lllnlt Constant:
L D = N + M a t MA66 o f MAIN
A L L s e g i ~ l e n t sa n d p a t c h e s r e s u l t i n g f r o m r e f l e c t i o n o r r o t a t i o n o f a

syolmetric s t r u c t u r e must be i n c l u d e d i n d e t e r m i n i n g t h e l i m i t i n g s t r u c t u r e size.

Xaximum Number oE N o n - r a d i a t i n g

Networks, N

= 30.

Limit Constants: NETMX = N n


N D IMN = N

a t MA63 o f MAIN a t NT22 o f NEWK

n NUIMNP = N n

+ 1 a t NT22 o f NETWK

Nn

i s t h e l i m i t f o r e i t h e r t h e number o f n e t w o r k s ( i n c l u d i n g

t r a n s m i s s i o n l i n e s ) o r t h e number o f s e g m e n t s h a v i n g o n e o r m o r e n e t w o r k p o r t s connected, whichever is g r e a t e r . When r e l a t i v e d r i v i n g p o i n t m a t r i x a s y m m e t r y

m u s t a l s o b e g r e a t e r t h a n o r e q u a l t o t h e sum o f t h e n u m b e r n o i s e g m e n t s w i t h n e t w o r k p o r t s c o n n e c t e d p l u s t h e number o f s e g m e n t s w i t h voltage sources.

i s computed, N

--- -

Maximum Number u f D e g r e e s o f Symmetry, N


-

16.

Arrays:
COMMON/SMAT/ S ( N

T h e number o f P s y m m e t r i c c e l l s i s e q u a l t o t h e r a t i o o f N t o NP i n CCMMON/DATA/.

P' P l i m i t s t h e number o f s y m m e t r i c c e l l s i n a s t r u c t u r e .

N )

Maximum Number o f S e g m e n t s J o i n e d a t J u n c t i o n s , I f Nand

+ N

a r e t h e numbers o f segments c o n n e c t e d t o e n d 1 and e n d 2 t h e n t h e d i m e n s i o n s i n COMMON/SEGJ/, N must b e

30

of a segment, r e s p e c t i v e l y ,

at l e a s t N - +

+ N +I..

3'

Array:

L i m i t Constants:
JMAX = N . a t SB6 i n SBF J JMAX = N . a t TB8 i n TBF I JMAX = N . a t TR8 i n TRIO 3

Maxlsun! Number o f V o l t a g e S o u r c e s , Nv = 30.


. ..

Arrays:
(:OMMON/VSORC/

VQD(N

, VSANT(NV), VQDS(NV), IVQD(NV), ISANT(NV), IQDS(NV)

Limit Constant : NSMAX = k v a t M A 6 3 o f MAIN


A model may u s e up t o N
v

applied l ~ e l d v o l t a g e s o u r c e s a n d up t o N

current s l o p e disconiinuity voltage sources.

Maximuln Number o f L o a d i n g C a r d s , N
-

= 30

Arrays: MAIN : ZLC(NI) LDTYP(N ) , LDTAG (N ) , LDTAGF(N1) 1 1 LDTAGT (N1)

ZLR(N1)

ZL1(N1)

Limit Constants: at M P 6 3 o f MAIN 1 l % e n t h e ? ! C h o p i o n i s use? o n l y new l o a d i n g c a r e s a r e c o u n t e d , n o t t h o s e LOADMX = N


i n g e n e r a t i n g t h e NGF f i l e .

rlse.1

Number of Comment C a r d s S a v e d , N r = 5

Arrays: CUPIMON/SAVE/: COM(13 ,Nc)

Limit Constant: C o n s t a n t s a t MA71 o f M A I N Any number o f comment c a r d s may b e p l a c e d a t t h e b e g i n n i n g o f a d a t a deck and w i l l b e p r i n t e d i n t h e o u t p u t . Only Nc of t h e c a r d s w i l l b e s a v e d The f i r s t N c

i n a r r a y COM f o r l a t e r u s e i n l a b e l i n g p l o t s , however. comment c a r d s a n d t h e l a s t comment c a r d w i l l b e s a v e d .

Maximllm F i e l d P o i n t s f o r Normalized G a i n , N , , = 1200.

Arrays:
COMMON/SCRATM/ G A I N ( N ~ )

Limit Constant: NORMAX = Ng a t RD22 of SUBROC'I'INE RDPAT


i s t h e maximum number o f ! i c l d p o i n t s from a s i n g l e R P data card that g c a n b e s t o r e d f o r o u t p u t i n n o r m a l i z e d form o r f o r p l o t t i n g i f p l o t t i n g i s N

p o i n t s c a l l s f o r norg tndl zed g a i n , t h e g a i n w i l l be c ~ m p u t e dand p r i n t e d a t a l l r e q u e s t e d a n g l e s , but only t h e f i r s t N


g

irnplc.mented.

I F a n RP c a r d r e q u e s t i n g more t h a n N

g a i n s w i l l be s t o r e d and normalized. COMMON/SCRATM/ D and

COMMON/SCRATM/ G A I N o c c u r s i n SUBROUTINE RDPAT.

COMMON/SCRATM/ Y uccul- i n c e r t a i n o t h e r r o u t i n e s w h e r e D a n d Y are complex ( s e e "Maximum Segments and P a t c h e s " ) . GAIN, D , and Y s h o u l d b e d i m e n s i o n e d s o

t h a t e a c h common s t a t e m e n t c o n t a i n s t h e same number o f w o r d s .

.Number of F r e q u e n c i e s Eor N o r m a l i z e d Impedance o r Maximum Number o f Maximum

A n g l e s f o r Which R e c e i v e d S i g n a l S t r e n g t h Is S t o r e d , Nf

= 200

Array: MAIN: FNORM ( N f )

Limit Constant: N O K M F = Nf a t MA63 o f MAIN

The maximum number of f r e q u e n c i e s f o r which i n p u t i m p e d a n c e may b e s t o r e d and n o r m a l i z e d i s N 1 4 , s i n c e t h e r e a l a n d i m a g i n a r y i m p e d a n c e a n d f m a g n i t u d e a n d p h a s e a r e e a c h s t o r e d . The r e c e i v i n g c u r r e n t c a n b e s t o r e d f o r up t o N

C angles.

Maximum Number o f Points in Coupling Calculation, N

---

= 5.

'The maximum number ot segments among which coupling can be computed (CP cards) is N
C

COMION/YPARM/:

NCTAC(Nc),

NCSEC(N~), yllA(Nc),

Y~ZA(N:

Nc)

Limit Constants: Constants at MA207 and HA212 of MAIN should equal Nc &laximum Number of NCF Segments to Which New Segments or Patches Connect, Ns = 50 --

Limit Constant: NSMAX Ns at CN13 of CONECT

Haximum Number of NGF Patches to Which New Segments Connect, N = 10. P

Limit Constant: NPMAX ' N


P

at CN13 of CONECT

Section V I Overview of Numerical Green's Function Operation


N E C i n c l u d e s a p r o v i s i o n t o g e n e r a t e and f a c t o r a n i n t e r a c t i o n m a t r i x

and s a v e t h e r e s u l t o n a f i l e .

A l a t e r r u n , u s i n g t h e f i l e , may add t o t h e

s t r u c t u r e and s o l v e t h e c o m p l e t e model w i t h o u t u n n e c e s s a r y r e p e t i t i o n o f c a l c u l a t ~ o n s . T h i s p r o c e d u r e i s c a l l e d t h e N u m e r i c a l G r e e n ' s F u n c t i o n (NGF) o p t i o n s i n c e t h e e f f e c t i s a s i f t h e f r e e s p a c e G r e e n ' s f u n c t i o n i n NEC w e r e r e p l a c e d by t h e ree en's f u n c t i o n f o r t h e s t r u c t u r e o n t h e f i l e . a n t e n n a s w i l l be added o r m o d i f i e d . The NGF i s

p a r t i c u l a r l y u s e f u l f o r a l a r g e s t r u c t u r e , s u c n a s a s h i p , o n which v a r i o u s
It a l s o permits taking advantage of

p a r t i a l symmetry s i n c e a NGF f i l e may be w r i t t e n f o r t h e symmetric p a r t o f a s t r u c t u r e , t a k i n g a d v a n t a g e o f t h e symmetry t o r e d u c e c o m p u t a t i o n t i m e . Unsymmetric p a r t s c a n t h e n be added i n a l a t e r r u n . F o r t h e NGF s o l u t i o n t h e m a t r i x i s p a r t i t i o n e d a s

where A is t h e i n t e r a c t i o n m a t r i x f o r t h e i n i t i a l s t r u c t u r e , D i s t h e m a t r i x f o r t h e added s t r u c t u r e , and B and C r e p r e s e n t m u t u a l i n t e r a c t i o n s . c u r r e n t i s computed a s The

a f t e r t h e f a c t o r e d m a t r i x A h a s been r e a d f r o m t h e NGF f i l e a l o n g w i t h o t h e r necessary data. Since t h e L U d e c o m p o s i t i o n i n o b t a i n e d i n NEC r a t h e r t h a n t h e

i n v e r s e , t h e m u l t i p l i c a t i o n by A-I i s a c c o m p l i s h e d by u s i n g t h e s o l u t i o n p r o c e d u r e i n s u b r o u t i n e SOLVE o n e a c h column i n t h e m a t r i x t o t h e r i g h t o f A-~. To u s e t h e NGF o p t i o n t h e p a r a m e t e r s o f t h e f i x e d , o r NGF, p a r t o f t h e model a r e d e f i n e d i n t h e f i r s t run.


A WG d a t a c a r d c a u s e s t h e m a t r i x A t o b e

computed (CMSET), f a c t o r e d (FACTRS), and w r i t t e n t o f i l e TAPE20 by s u b r o u t i n e

GFUUT.

Otller necessary data, such as segment and patch coordinates, frequency, Loading, and ground parameters, are also written to TAPEZO. Nhen the NGF file, TAPEZO, is used the data are read into the usual

arrays by subroutine G F I L and new segments and patches are added to the arrays in COMMON/DATA/. Subroutine CMNCF is then called to compute the matrix FACGF computes A - ~ B , storing it in place of B, and
it into L and U parts, and stores the result

elements in 8, C, and 0 . computes ( U in place of D.

- CA-~B), factors
1

For each excitation E

and E

2 '

SOLGF completes the

procedure of solving for I

and I 2' The ~rocedure is complicated by the connection o f new segments or

patches to NGF segments or patches.

A connection to a segment modifies the


Since the elements in A

current basis function (see Section 111.1 of Part I ) .

cannot be changed, a modified basis function must be treated as a new basis function with a new column added to B and D and the new basis function amplitude added to the end of 12. The amplitude of the original basis

function is set to zero by adding a row containing all zeros except for a one in the column of C corresponding to the modified basis function. Since the

segment is not modified the boundary condition equation is not altered in this case. Mhen a new segment connects to a NGF patch the patch must be divided into four new patches, after the user defined patches, requiring eight new rows and columns in B, C, and D. Two additional rows are added to set the two Since the old patch is replaced

current components on the old patch to zero. should be removed.

by tne four new patches, the condition on the field at the center of the patch This is done by adding two new columns each containing all zeros except for a one in the row of the equation to be removed. The matrix structure is further complicated by the division of each submatrix into sections for segment-to-segment, patch-to-patch, segment-to-patch and patch-to-segment interactions. surface patches. B
SS

The matrix structure is

shown in Figure 12, where the subscript w denotes wire segments and s denotes 'The elements of Bww and 8
SW

are the E fields and H Each column o f

fields due to modified basis functions in the NGF section. and row of C and Css contains 0's and a single 1.
WW

The subroutine E'TMNS fills the excitation array with the E fields illuminating all segments, followed by the H fields on patches. These elements are reordered in SOLGF to correspond to the matrix structure. After

Figure 1 2 .

Matrix S t r u c t u r e f o r t h e NGF S o l u t i o n

CIIL? s n l l l t i o n t l l ~ sr e o r d z r i i l g

i s r e v e r s e d i n SULGF t o p u t b a s i s f u n c t i o n
f o l l o w e d by t h o s e f o r p a t c h e s .

:!ln[)Litud~s f o r s e g l r l r ~ l t si i r s r ,
I S !

I f symmetry i s

i n C i t e NCF s e c t i o n t l r e # m a t r i x A i s s t r u c t u r e d a s s u b m a t r i c e s f o r t h e
Each s u b m a t r i x c o n t a i n s e l e m e n t s For s e g m e n t s and p a t c h e s In this case tne

sylninrtric s e c r i o n s .

i n t h a t s e c t i o n , w i t h t h e o r d e r a s shown f o r A i n F i g u r e 12.

e x c i t a t i o n a n d s o l u t i o n v e c t o r s a r e o r d e r e d i n SOLVES t o c o r r e s p o n d t o t h e subinatrix s t r u c t u r e .

Section VIll Overview of Matrix Operations Using File Storage


I

s t o r a g e i s used
i n UIIYMON/CIVILI/.

WIIL'LI

t l ~ f~ n a t r i xs i z e e x c e e d s tile l e n g t h o f t l ~ r

.dr~-:~: L?l ..

P o r t h e b a s i c s o l u t i o n ( n o t NGF) t h e r e a r e f i v e

wdLrix s l o r a ~ emodes a s s o c i a t e d w i t h t h e i n t e g e r LCASE a s f o l l o w s ; [CASE -1 Matrix Storage

M a t r i x f i t s i n CM;

no s t r u c t u r e symmetry

2
3 4

M a t r i x f i t s i n CM; s t r u c t u r e symmetry u s e d M a t r i x s t o r e d o n f i l e ; no symmetry M a t r i x s t o r e d o n E i l e ; symmetry; e a c h s u b m a t r i x f i t s i n t o CM f o r L U decomposition

M a t r i x s t o r e d o n f i l e ; symmetry; s u b m a t r i c e s d o n o t f i t i n t o CM.

F o r c a s e 3 t h e m a t r i x i s i n i t i a l l y w r i t t e n o n E i l e 1 1 by b l o c k s o f rows. The b l o c k s i z e i s c h o s e n i n s u b r o u t i n e FBLOCK s o t h a t two b l o c k s w i l l The b l o c k s i z e a n d number o f

E i t i n t o CM f o r t h e G a u s s e l i m i n a t i o n p r o c e d u r e .

b l o c k s i s s e t by t h e p a r a m e t e r s NBLOKS, NPBLK, and NLAST i n COMMON/MATPAR/. S u b r o u t i n e FACIO r e a d s f i l e 1 1 and w r i t e s E i l e 1 2 u s i n g 1 3 and 1 4 f o r scratch storage. LUNSCK t h e n r e a d s 1 2 and writes t h e b l o c k s o f t h e f a c t o r e d File 13

m a t r i x o n f i l e 1 3 i n f o r w a r d o r d e r and o n f i l e 1 4 i n r e v e r s e d o r d e r .

i s t h e n u s e d f o r f o r w a r d s u b s t i t u t i o n i n t h e s o l u t i o n and f i l e 1 4 i s u s e d f o r backward s u b s t i t u t i o n . F o r c a s e 4 , FACTRS r e a d s t h e m a t r i x f r o m f i l e 11, where i t was w r i t t e n by b l o c k s o f rows ( c o l u m n s o f t h e t r a n s p o s e d m a t r i x ) , and w r i t e s i t t o f i l e 1 2 by s u b m a t r i c e s . t o 13.


I n c a s e 5 , FACTKS r e a d s t h e m a t r i x Erom f i l e 11 a n d w r i t e s i t t o E i l e 1 2

'The s u b m a t r i c e s a r e t h e n r e a d f r o m 1 2 , f a c t o r e d , and w r i t t e n

by b l o c k s o f rows ( c o l u m n s o f t h e t r a n s p o s e d m a t r i x ) f o r e a c h s u b m a t r i x . P i l r 12 i s t h e n c o p i e d back t o E i l e 1 1 , and t h e p r o c e d u r e o f c a s e 3 i s r e p e a ~ e df o r each submatrix. Nhen a N G F l i l e i s t o be w r i t t e n , h a l f o f CM i s r e s e r v e d f o r m a t r i x s L u r a g e and m a n i p u l a t i o n s o f t h e m a t r i c e s 8 , C , and D.


r

Hence f o r c a s e s 1, 2

+ cite p r i m a r y m a t r i x A ( o r s u b m a t r i x f o r c a s e 4 ) must f i t i n t o h a l f o f CPI.

There is i~o restriction for cases 3 or 5 since, with two matrix blocks fitting into CM for the LU decomposition, half of CM is available during the solution when blocks are used one at a time.
T h e r e are ruur ]nodes for storing 8, C, and D in the NGF solution.

These

are associated with the integer ICASX as follows:

AF

matrix A factored Into L and U


AF for ICASE = 1 or 2

*K

one

lock of AF for ICASE = 3

one submatrlx for ICASE = 4 for ICASE = 1 or 2 F notl~ingotherwise

one block of submatrix for ICASE = 5 A

ICASX -

NGF Matrix Storage An, B, C, and D fit into CM B, C, and D fit into CM but not with A K (ICASE = 3, 4, 5 ) A K and B must also fit into CM together

1
2

B, C , and D do not fit into CM, but AX and F = D

- CA-'B

fit into CM for the L U

decomposition of F
4

Same as 3 but D

- C A - ~ Brequires

file

storage for LU decomposition When a NGF file (TAPEZO) is written with ICASE = 3 or 5, files 13 and 14 are both written to TAPEPO. When the NGF file is read these data are written

on the single file 13 with the blocks in ascending order first and then in descending order. If is stored on file 13 then space for

Ik

In CM is
'

needed only when AR is used in a solution in CM. definition of A

This accounts for the

X' File usage for ICASX = 2, 3, and 4 is outlined in Figures 13 and 14.
The number oE blocks into which matrices B, C , and D are divided is

The value for ICASX is chosen in subroutine FBNGF as the smallest value possible.

also c h o s r i v in FBNCF.

F i g u r e 14.

NGF F i l e Usage f o r ICASX = 3 o r 4 .

Section VlII NEC Subroutine Linkage


F i g u r e s 1 5 a n d 16 show t h e o r g a n i z a t i o n o f s u b r o u t i n e s i n t h e NEC-2 proeram. All possible subroutine c a l l s a r e traced, although i n a particular Routines t h a t a r e c a l l e d a t

run only c e r t a i n o f the t r a c e s w i l l be followed.

m o r e t h a n o n e p o i n t i n t h e p r o g r a m a r e shown a s s e p a r a t e b l o c k s For e a c h c a l l

MAIN

MAIN

I
SECOND

1
FBNGF

I
GFOUT CMNGF

I
I
Ftle 110

/
TBF

Figure 15.

NEC Subroutine Linkage Chart.

For Block Definitions, see Figure 16

Section IX

SOMNEC
1. SOMNEC CODE DESCRIPTION

SOMNEC i s a n i n d e p e n d e n t c o d e t h a t g e n e r a t e s t h e i n t e r p o l a t i o n t a b l e s f o r t h e SommerEeld/Norton ground o p t i o n Eor N E C . f i l e TAPE21 w h i c h becomes a n i n p u t f i l e t o NEC. SOMNEC i s d e s c r i b e d i n t h i s s e c t i o n . The t a b l e s a r e w r i t t e n o n Coding oE t h e r o u t i n e s i n

SOMNEC SOMNEC (main program)

PURPOSE 'To generate interpolation tables for the Sommerfeld/Norton ground option and write them on file TAPE21. METHOD The code from SN17 to SN51 reads the input data and sets parameters in COMMON/EVLCOM/. Since all equations are scaled to a free-space wavelength of one meter the results depend only on the complex dielectric constant

In the routines that evaluate the Sommerfeld integrals the time dependence is exp(-jwt) rather than exp(+jwt) which is used in the remainder of NEC.
E C

Hence

the conjugate of COMMON/EVLCOM/.

(EPSCF) is taken before computing the parameters in

The conjugate of the results is taken at the end of EVLUA, so

the results returned to SOMNEC and written on TAPE21 are for exp(+j~). Three interpolation tables, as shown in Figure 12 of Part I, are generated in the code Erom SN55 to SN123. For each Rl,
I pair

in the tables

the values of p and z + z' are computed and stored in COMMON/EVLCOM/. Subroutine EVLUA is then called and returns the quantities

ERV = EZV

a2 2 a p a z k1V22 a2
2
+

= (-

2 2 1 k2) klV22

1 EPH = - ( - -

p dp

2 k V 2 22

kzU1

2 22

These are multiplied by C

R exp(jkR to form the quantities in 1 1 1 eqt.13tion(156) through (159) in Pdrt I. When R I is zero the limiting forms in equations (169) through (172) of Part I are used. The expressions from

SOMNEC S N l l 6 t o S N 1 1 8 a r e o b t a i n e d by l e t t i n g R l = 0.

I
go t o z e r o i n t h e e x p r e s s i o n s f o r which i s i d e n t i c a l t o t h e common F i l e 2 1 i s w r i t t e n a t S N 1 2 7 and i n c l u d e s c o o r d i n a t e s o f t h e

The d a t a a r e s t o r e d i n COMMON/GGRIU/ b l o c k i n NEC.

and 0 . Hence t h o s e 1 g r i d p a r a m e t e r s c a n be changed i n SOMNEC w i t h o u t c h a n g i n g NEC. I f t h e number g r i d b o u n d a r i e s , number o f p o i n t s , and i n c r e m e n t s f o r R o f g r i d p o i n t s i s i n c r e a s e d , however, t h e a r r a y s i n COMMON/GGRIU/ i n c r e a s e d i n b o t h SOMNEC and NEC. s u b r o u t i n e I N T K P must be changed. must be

A l s o , t h e p a r a m e t e r s NDA and N D P A i n

SYMBOL D I C T I O N A R Y AR1 AR2 AR3 CK1 CKlK CKlSQ CK2 CKZSQ


= array for grid 1 = array for grid 2 = array for grid 3 = kl = r e a l p a r t o f kl = kl = k =

2
( 5

3 k2

2i7 s i n c e

= 1)

CKSM

2 2 2 = k 2 / ( k l + k2)
2 k C C (see Part 1 for C C 2 , and C g ) 2 1 3 1'

CL1

CON

= C R

exp(jkRl) 1 1

DR
DTH

An1

=
=

Ae
DRl f o r e a c h g r i d

DXA

SOMNEC
DYA
= A0 f o r e a c h g r i d ( r a d i a n s ) = EPH =
E

EPH
EP K

1 c

E PSCF

= E

ERH
E RV ELV

= ERH

= ERV = ELV = f r e q u e n c y i n MHz = f l a g t o c o n t r o l p r i n t i n g of g r i d = i n d e x Eor K l v a l u e s = s t a r t i n g value f o r I R


= index f o r

E MHz
I P'C
LR

IKS
IT H

0 values
values

LCOMP
NK

= l a b e l s f o r output
= number o f R1

NTH
NXA NYA

= number o f 6 v a l u e s
= number o f R1 v a l u e s f o r e a c h g r i d = number o f

0 values f o r each g r i d

KK
S IG TFACl 'CFAC2 THET TIM
TKlYAG

= k2R = U

= (1 = ( 1 = b

sin

~ ) / C O S

2 s i n tl)/cos 6

= time co f i l l a r r a y s

= 100. l k l l
= 100. 1 k1 1

TSMAG 'TST
LAM

= s t a r t i n g time = wavelength i n f r e e space = s t a r t i n g v a l u e o f K1

XSA YSA

i n each g r i d

= s t a r t i n g value o f 8 i n each g r i d

CONS'CAN'rS 299.8 59.96 6.283185308


=

t i m e s v e l o c i t y o f l i g h t i n m/s light

= 1 / ( 2 n c ~ ~c ) ,= v e l o c i t y of = 2n

SOMNEC

PROGRAM S O M N E C ( I N P U T . O U T P U T . T A P E 2 1 ) PROGRAM TO GENERATE NEC I N T E R P O L A T I O N G R I D S FOR F I E L D S DUE TO GROUNO. F I E L D COMPONENTS ARE COMPUTED BY N U M E R I C A L E V A L U A T I O N OF M O D I F I E D SOMMERFELD I N T E G R A L S .

SN SN SN SN SN

1 2 3 4 5

. . . D I M E N S I O N LCOMP(4) DATA N X A / ~ 1 1 7 . ~ / . N Y A / ~ 0 . ~ . ~ / . X S A / O . . . 2 . . 2 / , YSA/O. . O . , . 3 4 9 0 6 5 8 5 0 4 / DATA D ~ ~ / . 0 2 . . 0 5 . . 1 / . D Y A / . 1 7 4 5 3 2 9 2 5 2 , . 0 8 7 2 6 6 4 6 2 6 . . 1 7 4 5 3 2 9 2 5 2 / DATA LCOMP/3HERV,3HEZV,3HERHJHEPH/

EPR = R E L A T I V E D I E L E C T R I C CONSTANT S I G = C O N D U C T I V I T Y (MHOS/M) FMHZ = FREQUENCY (MHZ) I P T = I TO P R I N T G R I D S . =O OTHERWISE. JOSIG I F S I G . L T 0 . THEN COMPLEX D I E L E C T R I C CONSTANT = EPR AND FMHZ I S NOT USED READ GROUND PARAMETERS

READ 1 5 . E P R . S I G . F M H Z . I P T I F (SIG.LT.0.) GO TO 1 WLAM=299,8/FMHZ

EPSCF=CMPLX(EPR.-SIG*WLAM.59.96)
GO TO 2

EPSCF=CMPLX(EPR.SIG)
C A L L SECOND ( T S T ) CK2=6.283185308 CKZSQ=CKZ.CKZ

SN SN SN SN SN SN SN SN SN SN SN SN SN SN SN SN SN SN

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

SOMMERFELO INTEGRAL EVALUATION USES E X P ( - J W T ) . NEC USES E X P ( + J W T ) . SN HENCE NEED C O N J G ( E P S C F ) . CONJUGATE OF F I E L D S OCCURS I N SUBROUTINE SN EVLUA. SN SN

CK~SQ=CK~SQ'CONJG(EPSCF)
CKI=CSQRT(CKISQ) CKIR=REAL(CKI) TKMAG=IOO:CABS(CK~) T~MAG=~OO:CKI*CONJG(CK~) CKSM=CK2SQ/(CKl SQ+CKZSQ) CTI=.~.(CKISQ-CK~SQ) ERV=CKISO.CKlSQ EZV=CK25Q*CKZSQ CT2=.125.(ERV-EZV) ERV=ERV.CKISQ EZV=EZV.CK2SQ CT3=.0625.(ERV-EZV) LOOP OVCR 3 G R I D REGIONS

SN SN
SN SN SN

SN SN SN SN SN SN SN SN SN SN SN

5\
52 53 54

SOMNEC

LOOP OVER THETA.

(THETA=ATAN((Z+H)/RHO))

AR3(IR.ITH,1)=ERVmC0N AR3(IR.ITH.Z)=EZV*CON AR3(IR,ITH,3)=ERH*CON AR3(IR,ITH.4)=EPH*CON CONTINUE F I L L G R I D 1 FOR R EQUAL TO ZERO.

CL2=-(0.,188.370)*(EPSCF-l.)/(EPSCF+l.) CLI=CLZ/(EPSCF+I .)
EZV=EPSCF0CL1 THET=-DTH NTH=NYA(l) 0 0 9 I T H = 1 .NTH THET=THET+DTH I F ( 1 T H . E O . N T H ) GO TO 7 TFACZ=COS(THET)

TFACl=(l.-SIN(THET))/TFACZ
TFACZ=TFACI/TFACZ ERV=EPSCF.CLIoTFAC1 ERH=CLI.(TFAC2-1.)+CL2 EPH=CLl.TFACZ-CL2 GO TO 8 ERV=O. ERH=CL2-.5*CL1 EPH=-ERH ARl(1 .ITH.l)=ERV A R l ( 1 .ITH.Z)=EZV ARl(I.ITH,J)=ERH ARI(I.ITH.4)=EPH C A L L SECOND ( T I M )

W R I T E G R I D ON T A P E 2 1 WRITE ( 2 1 )
AR1.ARZ.AR3.EPSCF.DXA.DYAAXSA,YSAANXAANYA

SOMNEC
REWIND 2 1 I F (IPT.EQ.O) PRINT GRID P R I N T 1 7 . EPSCF DO 1 3 K 3 1 . 3 NR=NXA(K) NTH=NYAiKI
-

GO TO 1 4

..

..

P R I N T 1 9 . LCOMP(L) DO 1 3 I R = l .NR GO TO ( 1 0 . 1 1 , 1 2 ) . K P R I N T 2 0 . IR,(ARl(IR.ITH.L).ITH=l,NTH) GO TO 1 3 P R I N T 2 0 . IR,(AR2(IR.ITH.L).ITH=l,NTH) GO TO 1 3 P R I N T 2 0 . IR.(AR3(IR.ITH.L).ITH=l,NTH) CONTINUE TIM=TIM-TST PRINT 16.TIM STOP FORMAT ( 3 E 1 0 . 3 . 1 5 ) FORMAT ( 6 H T I M E = . E 1 2 . 5 ) FORMAT ( J O H l N E C GROUND I N T E R P O L A T I O N G R I D . / . Z I H D I E L E C T R I C CONSTAN SN 1 5 4 1T=.2E12.5) SN 1 5 5 FORMAT ( / / / . 5 ~ G R I O , I 2 . / . 4 X , 5 H R ( l )=.F7.4,4XX3H0R=,F7 . 4 , H N R I SN 1 5 6 1./.9H THET(1)=.F7.4.3X.4HDTH=.F7.4,3X.4HNTH=.I3.//) SN 1 5 7 SN 1 5 8 FORMAT ( / / / . A S ) FORMAT ( 4 H 1 ~ = . 1 3 . / . ( 1 O E l 2 . 5 ) ) END

RESSEL
UESSEL

PUKPOS li

To compute t h e b e s s e l f u n c t i o n o f o r d e r z e r o a n d i t s d e r i v a t i v e f o r a
coinplex a r g u m e n t .

AETHOO

s the functions a r e e v a l u a t e d by t h e a s c e n d i n g s e r i e s a n d f o r l a r g e r m a g n i t u d e s by H a n k e l ' s


asymptotic expansion ( r e f . 5 ) . The a s c e n d i n g s e r i e s a r e

For argument magnitudes l e s s t h a n a l i m i t L

T h e number o f t e r m s u s e d w i t h a n argument Z i s M(IZ) where I Z = 1. + IZI

The a r r a y bl i s f i l l e d f o r IZ from 1 t o 1 0 1 o n t h e f i r s t c a l l t o BESSEL by d e t e r m i n i n g t h e v a l u e o f k a t which t h e t e r m i n c h e s e r i e s f o r JO i s l e s s than

LO-^.
Wnen IZI i s g r e a t e r t h a n L

~ a n k e l ' sa s y m p r o t i c e x p a n s i o n s a r e

u s e d w i t h two o r t h r e e t e r m s .

These a r e

BESSEI,

where p = 4v When Z

< I Z I < Z s + A b o t h t h e s e r i e s and a s y m p t o t i c s f o r m s a r e e v a l u a t e d and a r e combined a s

where C = c o s ( - ( I Z I

TI

zS))

J ( 2 ) = r e s u l t of s e r i e s e v a l u a t i o n
S

J (L) = r e s u l t o f asymptotic e v a l u a t i o n a T h i s c o m b i n a t i o n e n s u r e s a smooth t r a n s i t i o n between t h e two r e g i o n s . code Z


S

I n the

i s 6 and A i s 0.1.

SYMBOL UICTLONAKY A1
A2

= -1./(4k

= l . / ( k + 1) = dm
= cos = 0.7978845608

C3

CZ
FJ FJX IB

Fi.

= FJ
= 1 t o i n d i c a t e t h a t b o t h t h e s e r i e s and a s y m p t o t i c f o r m s w i l l be

e v a l u a t e d and combined INIT


= f l a g t o i n d i c a t e t h a t i n i t i a l i z a t i o n of c o n s t a n t s h a s been

completed IL
Jo = 1. + 1 L l 2 t r u n c a t e d t o a n i n c e g e r
= Jo(Z)

JOPX

J O ( Z ) f r o m s e r i e s t o be combined w i t h a s y m p t o t i c r e s u l t

JOX
K

J U ( Z ) , same a s JOPX

= summation i n d e x k , summed from 1 t o

limit

RESSEL
M MI2
= =

array of upper limits for k upper limit for k

POZ P10 P1 1 P1Z P20 P21

= ~(0,z)
=

coefficient in PO2

= coefficient in P1Z = P(1,Z)


=

9/(2 x 82) 4 4

1 ) ( 4

- 9)/(2 -

82)

coefficient in POZ = 9 x 25 x 49/(4:8 4) = coefficient in PlZ = ( 4 - 1 ) ( 4 9 ) ( 4 - 2 5 ) ( 4

49)/(4:8 4)

PI
POF

= n/4
= Q(0,Z)
=

Qoz
QlO

coefficient in Q(0.Z)

= 1/8
318 9
x

Qll
QlZ Q20 Q21 Sz
TEST

= coefficient in Q(1,Z) = Q(l,Z) = coefficient in Q(0,Z) = coefficient in Q(~,Z) = sin

25/(3!8

(4

1 ) ( 4

9 ) ( 4

~5)/(3!8~)

= magnitude of the term in the series =

z zI
Z12

z
2 or 1/Z 2 14)k/(k!) 2 for series. Also temporary storage for

= Z

= l/zL or exp(-jx) = (-2

ZK
Z MS

asymptotic method 2 I Z I or temporary storage

SUBROUTINE BESSEL ( Z . J O . J O P ) B E S S E L EVALUATES THE ZERO-ORDER FOR COMPLEX ARGUMENT 7 .

BE BE BESSEL F U N C T I O N AND I T S D E R I V A T I V E BE

BE BE COMPLEX JO.JOP.POZ.PlZ.QOZ.Q1ZZZ.ZI.ZI2.ZK.FJ.CZ,SZ,JOX,JOPX BE DIMENSION M ( 1 O l ) . ~ l ( 2 5 ) . A 2 ( 2 5 ) . FJX(2) BE EOUIVALENCE ( F J . ~ J x ) BE DATA PI.C3.P10.P20.010.020/3.141592654, .7978845608..0703125,.11215 BE 120996..125..0732421875/ BE DATA P11.P21.Qll.021/.1171875..1441955566..375,.1025390625/ BE DATA POf.INIT/.7853981635.O/.FJX/O.,l./ BE I F (INIT.EO.0) GO TO 5 BE ZMS=Z*CONJG(Z) BE I F (ZMS.GT.1.E-12) GO TO 2 BE JO=(l..O.) BE JOP=-.5*Z BE RETURN BE IB=O BE I F ( Z M S . G T . 3 7 . 2 1 ) GO TO 4 BE I F (ZMS.GT.36.) IB=l BE S E R I E S EXPANSION BE I Z = l . +ZMS BE MIZ=M(IZ) BE JO=(l ..O.) BE JOP=JO BE ZK=JO BE ZI=Z.Z BE DO 3 K = l . M I Z BE iK=ZK.Al(K).ZI BE JO=JO+ZK BE JOP=JOP+A2(K)*ZK BE JOP=-.5*Z*JOP BE BE I F ( I B . E O . 0 ) RETURN JOX=JO BE JOPX=JOP BE ASYMPTOTIC EXPANSION BE Z I = 1 ./Z BE ZI2=ZI*ZI BE POZ=l.+(P2O0ZIZ-PlO).ZI2 BE PlZ=l.+(Pll-P21'ZI2)'ZI2 BE QOZ=(O20*ZI2-Q10)~ZI BE olz=(ail-aei-zIz)*zI BE

CZ=.~*'(ZK+ZI~)
SZ=FJ*.5*(ZI2-ZK) ZK=CJ*CSORT(ZI) JO=ZK*(POZ.CZ-~0z.s~)

~o~=-z~*(~~~*s~+oiz'cz)
I F ( I B . E O . 0 ) RETURN ZMS=COS((SQRT(ZMS)-6.).31.41592654)

JO=.~*(JOX~(I.+ZMS)+JO*(I.-ZMS)) JOP=.~.(JOPX*(I.+ZMS)+JOP*(I.-ZMS))
RETURN I N I T I A L I Z A T I O N OF CONSTANTS

65 66 7 67 8 68 69

I F ( T E S T . L T . l .E-6) CONTINUE M ( I ) = I N I T GO TO 1 END

GO TO 8

lJUI{PUS I:

'To c o n t r o l t h e e v a l u a t i o n o f t h e Sommerfeld i n t e g r a l s

METHOD The i n t e g r a t i o n c o n t o u r o f e i t h e r F i g u r e s 13, 1 4 o r depending on t h e values

1 5 of Part I i s used
and

of p, Z + Z ' a n d k l .

Figures

1 3 , 14,

15

s h o u l d be i n v e r t e d , however, s i n c e t h e y a r e f o r a time d e p e n d e n c e of e x p ( j w t ) a n d t h e c o d i n g f o r t h e Sommerfeld i n t e g r a l s i s f o r e x p ( - j u t ) . Thus t h e The

c o n t o u r s a n d b r a n c h c u t s i n EVALUA a r e t h e c o n j u g a t e o f t h o s e shown.

c o n j u g a t e o f t h e r e s u l t s i s t a k e n a t t h e e n d o f EVLUA t o c o n f o r m t o t h e NEC t i m e dependence of e x p ( j w t ) . T h e c o d e f r o m E V 1 9 t o E V 34 e v a l u a t e s t h e U e s s e l f u n c t i o n f o r m o f t h e Sommerfeld i n t e g r a l s u s i n g t h e c o n t o u r o f F i g u r e 1 3 o f P a r t I . t o i n t e g r a t e from

ROMl i s c a l l e d

= 0 to (p

( p - j p ) t o i n f i n i t y where p

j p ) a n d GSHANK i s c a l l e d f o r t h e p a t h from

i s t h e maximum o f p a n d Z

Z'

( p = DEL).

I f p i s g r e a t e r t h a n 1 0 0 . l k I t h e n HOMl i s c a l l e d f o r t h e i n t e r v a l 0 t o (pl T h i s i s done t o avoid exceeding t h e j p l ) where p 1 = 101kll. l i m i t by w h i c h ROMl c a n c u t t h e i n t e r v a l w i d t h . L a r g e r s t e p s c a n t h e n be u s e d from ( p l

jpl)

to (P

jp) since

yl =: y Z z A.
A t EV 50 S U M is the

T h e c o d e Erom EV 39 t o E V 8 6 e v a l u a t e s t h e H a n k e l f u n c t i o n f o r m o f t h e i n t e g r a l s u s i n g e i t h e r t h e c o n t o u r o f F i g u r e 1 4 o r 15. n e g a t i v e o f t h e i n t e g r a l from a* t o c*. f r o m a* t o

GSHANK i s t h e n c a l l e d t o i n t e g r a t e

-=.
and

The d e c i s i o n w h e t h e r t o u s e t h e c o n t o u r o f F i g u r e s 1 4 o r 1 5 F i g u r e 1 5 i s used i f t h e r e a l p a r t of v ( k l

i s made f r o m E V 5 8 t o E V 64.
e x c e e d s 2k

k2)

4p ---u > -Ivl L+Z'

wttere u + j v = 1-(2 + 2 ' ) + j p l l d *

c * j i s t h e argument of t h e e x p o n e n t i a l

F u n c t i o n a p p r o x i m a t i n g t h e Sommerfeld i n t e g r a n d f o r l a r g e h w i t h A = d*

The l e f t s i d e o f t h e i n e q u a l i t y i s p r o p o r t i o n a l t o t h e decay p e r c y c l e
ch-

i s t h e same f o r t h e v e r t i c a l p a t h . T h i s c o n d i t i o n was c h o s e n a r b i t r a r ~ l yb u r g i v e s s o m r i n d i c a c i o - a
a l o n g t h e c t o d p a t h and p / ( Z + Z ' ) c o ! k t o u r o i 1:igure 1 6 (nay b e a d v a n t a g e o u s .

EVLUA
F o r t h e c o n t o u r o f F i g u r e 1 5 GSHANK i s c a l l e d t o i n t e g r a t e f r o m e* t o i n t i ~ l i t y . HUM1 i s t h e n c a l l e d f r o m e* t o f*. The s i g n o f t h e c o ~ l t r i b u t i o n

froin o t h e r p a r t s o f t h e p a t h i s s w i t c h e d s i n c e t h e y w e r e i n t e g r a t e d i n r e v e r s e direction. to infinity. F o r tlre c o n t o u r o f F i g u r e 1 4 (GS 79 t o GS 8 6 ) GSHANK i s c a l l e d t o i n t e g r a t e t r o m c * t o d* a n d o n t o i n f i n i t y . T h e i n c r e m e n t c h a n g e s f r o m DELTA F i n a l l y , GSHANK i s c a l l e d f o r t h e p a t h s f r o m c * t o i n f i n i t y a n d f"

t o I)EL'CA:! i f d* i s r e a c h e d b e f o r e t h e i n t e g r a l c o n v e r g e s . From E V 8 9 t o E V 9 2 t h e i n t e g r a l s a r e c o m b i n e d t o f o r m t h e f i e l d components and t h e c o n j u g a t e s a r e taken.

SYMBOL DZC'I'IONARY

= s t a r t of

integration interval

ANS
N
NK

= temporary s t o r a g e = end of i n t e g r a t i o n i n t e r v a l
= break point (d*)

i n p a t h f o r GSHANK

CKZSQ CP1 CPZ CP3


U EL

U E L'TA

= increment along patn = a l t e r n a t e increment = ( s e e SUMNEC) = ( s e e SOMNEC) = ( s e e SOMNEC)


=

ULLTA2
E PH

ERH
ICKV

EL V
J Il

( s e e SOMNEC) [ u n c t i o n form, 1 f o r Hankel f u n c t i o n form

= O i o r Nessel = O. LTi = P

P'r P

KHO

EVI.LIA

tMLS
SLOPE
S Ui'l

= temporary s t o r a g e = s l o p e of p a t h s t o i n f i n i t y = telnporary s t o r a g e = 1001kll

'CXMAC; L PH

= L

2'

S U B R O U T I N E EVLUA ( E R V . E Z V . E R H . E P H ) EVALUA CONTROLS THE I N T E G R A T I O N CONTOUR I N THE COMPLEX LAMBDA PLANE FOR E V A L U A T I O N OF THE SOMMERFELO I N T E G R A L S . COMPLEX E R V . E Z V . E R H . E P H . A . B . C K I . C K 1 S Q . B K . S U M , D E L T A , A N S S D E L T A 2 . C P 1 .

lCP2.CP3.CKSM.CTI.CT2.CT3
COMMON /CNTOUR/ A.B COMMON /EVLCOM/ CKSM.CT1.CT2.CT3.CKI.CKlSOQCK2.CK2SQ.TKMAG,TSMAG,C 1KlR.ZPH.RHO.JH OIMENSION SUM(6). ANS(6) OATA P T P / . 6 2 8 3 1 8 5 3 0 8 / OEL=ZPH F I ( R H O . G T . O E L ) OEL=RHO I F (ZPH.LT.2.*RHO) GO TO 4 B E S S E L F U N C T I O N FORM OF SOMMERFELD I N T E G R A L S JH=O A=(o. .O.) DEL=l./DEL I F (DEL.LE.TKMAG)

GO TO 2

B=CMPLX(.loTKMAG.-.IwTKMAG)
C A L L ROMl ( 6 . S U M . 2 ) A=B B=CMPLX(OEL.-DEL) C A L L ROMl ( 6 . A N S . 2 ) DO 1 1 = 1 - 6 SUM(I)=SUM(I)+ANS(I) GO TO 3 B=CMPLX(OEL.-DEL) C A L L ROMl ( 6 . S U M . 2 ) OELTA=PTP.DEL C A L L GSHANK ( B . D E L T A . A N S . 6 . S U M . O . B . B ) GO TO 1 0 HANKEL F U N C T I O N FORM OF SOMMERFELO I N T E G R A L S JH=l CPI=CMPLX(O

. . . 4.CK2)

CP2=CMPLX(.6*CK2.-.2.CK2) CP3=CMPLX(1.02'CK2.-.2*CK2)
A=CP 1 B=cPz C A L L ROMl ( 6 . S U M . 2 ) A=CP2 B=CP3 C A L L ROMl ( 6 . A N S . 2 ) DO 5 I = l . 6 SUM(I)=-(SUM(I)+ANS(I)) P A T H FROM I M A G I N A R Y A X I S TO - I N F I N I T Y SLOPE=1000. I F ( Z P H . G T . . O O ~ . R H O ) SLOPE=RHO/ZPH OEL=PTP/OEL

OELTA=CMPLX(-l..SLOPE)*DEL/SQRT(I.+SLOPE*SLOPE)
DELTA2=-CONJG(0ELTA) C A L L GSHANK (CPl.DELTA.ANS.6,SUM.O.BK.BK)

RMIS=RHO*(REAL(CKI)-CKZ)
I F (RMIS.LT.2.*CKZ) GO TO 8 I F (RHO.LT.1.E-10) GO TO 8

I N T E G R A T E UP BETWEEN BRANCH C U T S . THEN TO + I N F I N I T Y CPl=CKl-(.I . . 2 ) CPZ=CP1+.2 BK=CMPLX(O..DEL) C A L L GSHANK (CPl.BK.SUM.6.ANS.O.BK.BK) A=CPl B=CP2 C A L L ROMI ( 6 . A N S . l ) DO 7 1 = 1 . 6 ANS(I)=ANS(I)-SUM(1) C A L L GSHANK ( C P 3 . B K . S U M . 6 . A N S . O . B K , B K ) C A L L GSHANK ( C P 2 . D E L T A 2 . A N 5 . 6 . S U M . O . B K . B K ) cn T .O - ~n .I N T E G R A T E BELOW BRANCH P O I N T S . THEN TO + I N F I N I T Y DO 9 1 = 1 . 6 S u M ( I ) = - A N S ( I)

--

RMIS=REAL(CKI)*I.OI
I F (CK2+1..GT,RMIS) RMIS=CK2+1.

BK=CMPLX(RMIS..99.AIMAC(CKI))
DELTA=BK-CP3 DELTA=DELTA-DEL/CABS(DELTA) C A L L GSHANK ( C P 3 . D E L T A . A N S . 6 . S U M , 1 . B K K D E L T A 2 ) ANS(6)=ANS(6).CKl CONJUGATE S I N C E NEC USES E X P ( + J W T ) ERV=CONJC(CKlSO'ANS(3))

EZV=CONJG(CKtSQ'(ANS(2)+CK2SQ*ANS(5)))
ERH=CONJC(CK~SQ'(ANS(~)+ANS(~))) EPH=-CONJG(CKZSQ*(ANS(4)+ANS(6))) RETURN END

GSHANK
;SHANK

'URPOSE To a p p l y the Shanks transformation (ref. 6 ) to accelerate the onvergence of a semi-infinite integral. IE'PHOD Six integrals (NANS = 6 ) are evaluated simultaneously in this routine. 'he integrals over semi-infinite sections of the contours (Figures 13, 1 4 and

5 of Part I ) are evaluated by using the Romberg variable interval width


ntegration method on subsections to obtain a converging sequence of partial
l

ulns

here A

is the start of the semi-infinite path, S

is the contribution

rom other parts of the contour and

is a complex increment with

jo. 2nlp
I A I = minimum of

(0.2n/(z + arg(A)
=

z*)

direction of integration path in A-plane

he Shanks interated first order transformation is applied to S. to


1

ccelerate convergence. i,O


= S.
I'

Starting with the sequence of M elements


. the j th iteratid transform is the sequence of

1,

... M

- 2j elements

T h e s e c o n d f o r m f o r Q.

t h e sequence converges.

l.J

i s u s e d s i n c e i t s u f f e r s less n u m e r i c a l e r r o r a s
Each i t e r a t i o n o f t h e t r a n s f o r m s h o u l d p r o d u c e a

s e q u e n c e t h a t c o n v e r g e s more r a p i d l y t o t h e l i m i t of t h e o r i g i n a l s e q u e n c e . I n t h i s s u b r o u t i n e t h e s t a r t i n g v a l u e So comes i n a s SEED. With e a c h

p a s s t n r o u g h t h e l o o p o v e r INT, s t a r t i n g a t GS 21, two new v a l u e s a r e added t o t h e s e q u e n c e by c a l l i n g K O M l t o e v a l u a t e t h e i n t e g r a l s

w h e r e N = INT.

The ( N

l ) t h i n t e r a t e d Shanks t r a n s f o r m a t i o n , c o n s i s t i n g o f and Q N + l , N - l ,

i s t h e n computed. At t h e end o f e a c h p a s s t h r o u g h t h e l o o p o v e r INT t h e a r r a y s Ql and Q2 c o n t a i n t h e l a s t two


t h e two e l e m e n t s QN , N - l elements i n e a c h sequence. For f u n c t i o n I ,

F o r t h e p a t h from c t o i n f i n i t y i n F i g u r e 1 4 o f P a r t I t h e p o i n t d i s a b r e a k p o i n t a t which A may change. I f d is reached before convergence t h e


1

Shanks t r a n s f o r m a t i o n i s s t a r t e d o v e r w i t h t h e f i n a l v a l u e o f S . becoming SO f o r t h e new s e q u e n c e .

G S H A N K C o n v e r g e n c e i s t e s t e d from GS 7 8 t o GS 89 by c o m p a r i n g t h e l a s t two v a l u e s i n t h e transformed sequences. Although t h e l a s t sequence, c o n s i s t i n g

o f two e l e m e n t s , s h o u l d have t h e h i g h e s t c o n v e r g e n c e t h e l a s t f o u r s e q u e n c e s a r e c r s t e d t o avoid a f a l s e i n d i c a t i o n of convergence. The r e l a t i v e

d i f f e r e n c e i s computed f o r e a c h o f t n e s i x f u n c t i o n s and compared w i t h CKIT. I f c o n v e r g e n c e d o e s n o t o c c u r by INT = M X H a m e s s a g e i s p r i n t e d a n d t h e a v e r a g e ok t h e two v a l u e s i n t h e l a s t s e q u e n c e i s u s e d f o r e a c n i n t e g r a l . computing t h e r e l a t i v e d i f f e r e n c e f o r e a c h f u n c t i o n t h e denominator i s n o t a l l o w e d t o be l e s s t h a n 1 0 In

-3 tu .n e s t h e m a g n i t u d e o f t h e l a r g e s t o f t h e s i x

E u n c t i o n s t o a v o i d c o n v e r g e n c e p r o b l e m s when o n e f u n c t i o n g o e s t o z e r o .

SYMBOL DICTIONARY

A A1 A2
AA

= beginning of i n t e g r a t i o n s u b i n t e r v a l
= new v a l u e f o r

Q1 a r r a y

= new v a l u e f o r Q2 a r r a y
= temporary s t o r a g e = approximate magnitude o f

A M G ANSl ANS2 AS1 AS2

function

= S . f o r i odd
1 1

= S . f o r i even

= S i f o r i odd

S. f o r i even
1

n
BK
CKIT DEL DELA
D EL5

= end o f i n t e g r a t i o n s u b i n t e r v a l
= break point

i n integration contour

= l i m i t f o r r e l a t i v e e r r o r i n convergence t e s t =

= b before break point = A a f t e r break point


= approximate magnitude o f t h e Largest o f t h e s i x f u n c t i o n s

DEN

(GS 76)
DENM
= minimum d e n o m i n a t o r f o r r e l a t i v e e r r o r t e s t = 1 i f path contains break point = 0 i f p a t h c o n t a i n s b r e a k p o i n t and i t h a s n o t b e e n p a s s e d
= N

IBK

I MX
INT

GSHANK
[NX

= IN'C

JM

= J - l
= maximum f o r i n d e x J i n

i4AXH

Q1 and Q2

NANS

= number o f f u n c t i o n s ( 6 )

Q1, Q 2 = ( s e e d e s c r i p t i o n oE method)
RBK

= r e a l p a r t o f BK
= So

SEED

START SUM

= A" = increment t o i n t e g r a l

GSHANK

GSHANK I N T E G R A T E S THE 6 SOMMERFELD I N T E G R A L S FROM START TO I N F I N I T Y ( U N T I L CONVERGENCE) I N LAMBDA. AT THE BREAK P O I N T . B K . THE S T E P INCREMENT MAY BE CHANGED FROM OELA TO D E L E . SHANK S A L G O R I T H M TO ACCELERATE CONVERGENCE OF A SLOWLY CONVERGING S E R I E S I S USED COMPLEX START.DELA.SUM.SEEO.BK.DELB,AAE.Q1.O2.ANSl,ANS2.Al.A2.ASI. 1ASZ.OEL.AA COMMON /CNTOUR/ A.8 DIMENSION Q l ( 6 . 2 0 ) . Q2(6,20). A N S l ( 6 ) . ANSZ(6). SUM(6). SEEO(6) DATA C R I T / l . E - 4 / . M A X H / 2 0 /

RBK=REAL(EK) OEL=OELA IBX=o I F (IBK.EO.0) IBX=l DO 1 Id .NANS ANSZ(I)=SEEO(I) B=START DO 2 0 I N T = l .MAXH INX=INT A=8 B=E+OEL I F (IBX.EO.O.ANO.REAL(B).GE.RBK) GO TO 5 CALL ROMI (NANS.SUM.Z) 00 3 1=1 .NANS ANSI(I)=AN~~(I)+~UM(I) A=B B=B+OEL I F (IEX.EO.O.ANO.REAL(B).GEEREK) GO TO 6 CALL ROMI (NANS.SUM.Z) DO 4 1 = 1 .NANS ANS2(I)=ANSl(I)+SUM(I) GO TO 1 I H I T BREAK P O I N T . RESET SEED AND START OVER. IBX=l GO TO 7 IEX=2 8=BK DEL=OELE CALL ROMI (NANS.SUM.Z) I F ( I B X . E 0 . 2 ) GO TO 9 DO 8 1 = 1 .NANS ANS2(I)=ANS2(I)+SUM(I) GO TO 2 DO 1 0 1 = 1 .NANS ANS2(I)=ANSl(I)+SUM(Ih GO TO 2 OEN=O . DO 1 8 I = I . N A N S ASl=ANSl(I) ASZ=ANSZ(I) I F ( I N T . L T . 2 ) GO TO 1 7 00 1 6 J = 2 , 1 N T JM=J-I A A = 0 2 ( I . JM) Al=Ql(I.JM)+ASl-2:AA I F (REAL(AI).EO.O..ANO.AIMAG(AI).EO.O.) GO TO 1 2 A2=AA-Ol(I.JM) Al=Ol(I.JM)-At*AZ/Al GO TO 1 3 Al=OI(I.JM) A2=AA+AS2-2.*ASl

GSHANK
I F ( R E A L ( A ~ ) . E O . O . . A N D . A I M A G ( A ~ ) . E Q ~ O . ) GO TO 1 4
A2=AA-(ASl-AA)'(ASl-AA)/A~

GO TO 1 5 A2=AA OI(I.JM)=ASI 02(I,JM)=AS2 ASI=Al AS2=A2 OI(I.INT)=ASI 02(I,INT)=AS2 AMG=ABS(REAL(AS~))+ABS(AS~)) I F (AMC.GT.DEN) OEN=AMG CONTINUE DENM=l . E - 3 * 0 E N o C R I T JM=INT-3 I F ( J M . L T . 1 ) JM=l DO 1 9 J = J M . I N T 00 1 9 1=1 .NANS A1=02(I.J)

DEN=(AB~(REAL(A~))+ABS(AIMAG(AI)))*CRIT
I F ( D E N . L T . 0 E N M ) OEN=DENM AI=OI(I, J)-AI AMG=ABS(REAL(A~))+ABS(AIMAG(A~)) F I ( A M G . G T . O E N ) GO TO 2 0 CONTINUE GO TO 2 2 CONTINUE PRINT 2 4 DO 2 1 1=1 .NANS PRINT 2 5 . O l ( I . I N X ) . Q 2 ( I . I N X ) 00 2 3 1=1 .NANS

SUM(I)=.5*(Ql(I.INX)+02(I.INX))
RETURN FORMAT ( 4 6 H * * * * NO CONVERGENCE I N SUBROUTINE GSHANK FORMAT ( l O E 1 2 . 5 )

*.**)

HANKEL
ItANKEL

PURPOSE
To compute t h e Hankel f u n c t i o n o f t h e f i r s t k i n d , z e r o t h o r d e r , and i t s d e r i v a t i v e f o r a complex argument.

METHOD F o r argument m a g n i t u d e s l e s s t h a n a l i m i t Z asymptotic expansion ( r e f . 5 ) .


S

the functions a r e

e v a l u a t e d by t h e a s c e n d i n g s e r i e s and f o r l a r g e r m a g n i t u d e s by ~ a n k e l ' s The s e r i e s a r e

k=0

where $ ( k + l ) M l ) = -Y,

-Y

j=1

y = E u l e r ' s c o n s t a n t = 0.5772156649
The Hankel f u n c t i o n s a r e

T h e s e r i e s f o r J ( Z ) and J ( 2 ) a r e g i v e n i n t h e d e s c r i p t i o n o f s u b r o u t i n e 0 0 2 BESSEL. The number o f t e r m s u s e d w i t h a n argument Z i s M(1Z) where IZ = 1. + 121 The a r r a y M i s f i l l e d f o r I Z from 1 t o 1 0 1 o n t h e f i r s t c a l l t o HANKEL by d e t e r m i n i n g t h e v a l u e o f k a t which t h e t e r m i n t h e s e r i e s o f Y than 0

i s less

HANKEL
When I Z i is greater than Z used with two or three terms. s Hankel's asymptotic expansions are These are

z - (-lv + 2

1 ) a
4

P(v,L) and Q(v,Z) are given in the description of subroutine BESSEL. When Zs < I Z I < Z s + A both the series and asymptotic forms are evaluated and are combined as in BESSEL to eliminate any discontinity.
HANKEL Zs is 4 and A is 0.1.

In

SYMBOL DICTIONARY A1
A2 = -1./(4k = I./(k+l)
=

2)

A3
A4

2~(k+l)
+ V(k+Z)l/(k+l)

= Iv(k+l) = i~(1) = zy/a


+

c1
C2

~(2)1/(2n)

C3
CLOGZ FJ FJX G M W HO

=m
= ln(Z) =

Fi Y

= F J

HOP

= Ho

(Uttz)

IB
INIT

= 1 to indicate that both the series and asymptotic forms will be

evaluated and combined = flag to indicate that initialization of constants has been completed = 1. + I Z I 2
=

LL
JO

Jo(z)

JOP

= JO(Z)

HANKEL

K
M M IZ

= = =

summation index k , summed From 1 to limit array OF upper limits for k upper limit Eor k see B E S S E L

POL, PlO, ell, PlZ, P20, P21:

PI
POF
PSI

TI

= n/4 =

'4
see B E S S E L magnitude of term in the series Yo(Z) YO(Z)

(PZ, Q10, Q11, 912, 420, Q21:


TEST
=

YO

YOP

= %
=

ZI
ZI2 ZK
LMS

Z 2 or LIZ
2

= 1/Z = =

(-2 214)k /(k:) 2 ; also temporary storage


IZ

2 I or temporary storage

CONSTANTS 16. 16.81 31.41592654


=
= =

42
4.12
10.n

HANKEL
I 2 C 3 c 4 C 5 C 6 7 8 S U B R O U T I N E HANKEL (Z.HO.HOP) H A N K E L EVALUATES HANKEL F U N C T I O N OF THE F I R S T K I N D . AND I T S D E R I V A T I V E FOR COMPLEX ARGUMENT Z . ORDER ZERO. HA HA HA HA

9
10 I 1 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

HA HA F~ COMPLEX C L O G Z . H O . H O P . J O . J O P , P O Z Z P 1 Z Z Q O Z Z O 1 Z Z Y O , Y O P , Z , Z I , Z I 2 , Z K , DIMENSION ~ ( 1 0 1 ) A1 ( 2 5 ) . A Z ( 2 5 ) . A 3 ( 2 5 ) . A 4 ( 2 5 ) . FJX(2) HA EQUIVALENCE ( F J . F J X ) HA DATA P I . G A M M A . C 1 . C 2 . C 3 . P 1 O , P 2 O / 3 O 1 4 ~ 5 ~ Z 6 5 4 . . 5 7 7 2 1 5 6 6 4 9 , - , O 2 4 5 7 8 5 O 9 HA 15..3674669052..7978845608..0703125,.1121520996/ HA DATA QIO.Q20.Pll.P21.Qll.Q21/.125..0732421875,.1171875..1441955566 HA 1..375..1025390625/ HA HA OATA POF,INIT/.7853981635.O/.FJX/O..I./ I F ( I N I T . E O . 0 ) GO TO 5 HA ZMS=Z*CONJG(Z) HA

I F (ZMS.NE.0.) GO TO 2 PRINT 9 STOP IB=O I F ( Z M S . G T . 1 6 . 8 1 ) GO TO 4 I F (ZMS.GT.16.) IB=1 S E R I E S EXPANSION I Z = l .+ZMS

HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA

MIZ=M(IZ)
JO=(l..O.) JOP=JO YO=(O..O.) YOP=YO ZK=JO ZI=ZaZ DO 3 K = I . M I 2 ZK=ZK"Al(K)*ZI JO=JO+ZK JOP=JOP+A2(K).ZK YO=YO+A3(K)*ZK YOP=YOP+A4(K)*ZK JOP=-.5*Z0JOP CLOGZ=CLOG(.S*Z)

YO=(2.*JO*CLOCZ-YO)/PI+C2 YOP=(2./Z+2.*JOP*CLO~Z+f55YOPPZ)/PI+C11Z
HO=JO+FJ*YO HOP=JOP+FJ*YOP I F ( I B . E Q . 0 ) RETURN YO=HO YOP=HOP ASYMPTOTIC EXPANSION Z I = l ./Z

C 4

P I Z = I .+(PI ~ - P ~ I * z I ~ ~ - z I ~ QOZ=(O20~ZI2-Q10)~ZI QlZ=(Qll-O21*ZI2).ZI ZK=CEXP(FJ'(Z-POF))'cSPRT(ZI)*C3 HO=ZK'(POZ+FJ*QOZ) HOP=FJoZK.(PIZ+FJ*OIZ) I F ( I B . E Q . 0 ) RETURN

ZMS=COS((SQRT(ZMS)-4.)*31.41592654)

HO=.~*(YO-(I.+ZMS)+HO-(I.-ZMS))
HOP=.5*(YOP*(1.+ZMS)+HOP*(l.-ZMS)) RETURN I N I T I A L I Z A T I O N OF CONSTANTS PSI=-GAMMA DO 6 K=1 . 2 5 Al(K)=-.25/(KeK)

HANKEL.

TEST=%. DO 7 K = l . 2 4 INIT=K TEST=-TESToI.A1(K) I F (TEST*AJ(K).LT.l.E-6) CONTINUE M(I)=INIT GO TO 1 FORMAT ( 3 4 H ERROR END

GO TO 8

HANKEL NOT V A L I D FOR Z = O . )

LAMBDA

LANBDA -PUKPOS E To compute t h e complex v a l u e o f A From t h e r e a l i n t e g r a t i o n parameter i n KOM1.

HETHOD

For i n t e g r a t i o n a l o n g a s t r a i g h t p a t h b e t w e e n t h e p o i n t s a and b i n t h e
A p l a n e , A and d h a r e

SYMBOL DLCTIONAKY
A = a = b = b = t =

B
DXLAM
T

XLM

LAMBDA

COMPUTE I N T E G R A T I O N PARAMETER XLAM=LAMBDA C W P L E X A.B.XLAM.OXLAM CMIklON /CNTOUR/ A.B DXLAM=B-A XLAM=A+DXLAM*T RETURN END

FROM PARAMETER

T.

ROMl

KOMl -PURPOSE To integrate the Sommerfeld integrands between two points in X by the method of variable interval-width Komberg integration. METHOD A and B in common block /CNTOUK/ are the ends of the integration path and are set before KOMl is called. at zero and ends at one. subroutine LAMBDA as The integration parameter Z in KOMl starts

he

corresponding value of A is determined by

Subroutine SAOA returns six integrand values which are handled simultaneously in loops throughout the code. The Komberg variable interval-width integration method will not be described in detail since i t is the same as that used in subroutine INTX in the main NEC program. simultaneously. The convergence test in KOMl requires that all six components satisfy the relative error tests

ROMl
RO RO RO ROMl I N T E G R A T E S THE 6 SOMMERFELD I N T E G R A L S FROM A TO B I N LAMBDA. THE METHOD OF V A R I A B L E I N T E R V A L W I D T H ROMBERG I N T E G R A T I O N I S USED. RO RO RO COMPLEX A.B.SUM.Gl.G2.G3.G4,G5.TO0,TOl,T10,T022T11,T20 COMMON /CNTOUR/ A.8 RO O I M E N S I O N S U M ( & ) . G l ( 6 ) . G 2 ( 6 ) . G 3 ( 6 ) , G 4 ( 6 ) . G 5 ( 6 ) . TO1 ( 6 ) . T l D ( 6 RO 1 ) . TZO(6) RO OATA N M . N T S . R X / 1 3 1 0 7 2 . 4 . 1 . E - 4 / RO LSTEP=O RO Z=O RO ZE=l . RO S=l. RO EP=S/(l.E4*NM) RO ZEND=ZE-EP RO DO 1 I = l . N RO SUM(I)=(O.,O.) RO NS=NX RO NT=O RO C A L L SAOA ( Z . G l ) RO DZ=S/NS RO I F ( Z + D Z . L E . Z E ) GO TO 3 RO OZ=ZE-Z RO I F ( 0 Z . L E . E P ) GO TO 1 7 RO OZOT=OZ..S RO C A L L SAOA ( Z + O Z O T . G 3 ) RO RO C A L L SAOA ( Z + D Z . G 5 ) NOGO=O RO 00 5 1=1 . N RO TOO=(Gl(I)+G5(I)).DZOT RO TOl(I)=(TOO+DZ*G3(1))*.5 RO Tl0(1)=(4:TOl(I)-TOO)/3. RO TEST CONVERGENCE OF 3 P O I N T ROMBERG R E S U L T RO C A L L TEST (REAL(TO~(I)).REAL(T~D(I)).TR,AIMAG(TOI(I)),AIMAG(T~O(I) RO l).TI.O.) RO NOGO=l RO I F (TR.GT.RX.OR.TI.GT.RX) CONTINUE RO F I ( N O G O . N E . O ) GO TO 7 RO DO 6 I = l . N RO SUM(I)=SUM(I)+TlO(I) RO NT=NT+2 RO GO TO 1 1 C A L L SAOA ( Z + D Z * . 2 5 . G 2 ) C A L L SAOA ( Z + D Z ' . 7 5 . G 4 ) NOGO=O SUBROUTINE ROMl (N.SUM.NX)

...
RO RO RO RO
49 50 51 52

~ t i = ~ 4 . * i o i - ~ o ~ ( 1 j ~ / ~ . ' T20(1)=(16:T11-T10(1))/15. TEST CONVERGENCE OF 5 P O I N T ROMBERG RESULT C A L L TEST ( R E A L ( T ~ ~ ) . R E A L ( T Z O ( I ) ) . T R , A I M A G ( T ~ ~ ) . A I M A G ( T ~ O ( I ) ) , T I O

CONTINUE I F (NOGO.NE.0) OD 1 0 I = l . N SUM(I)=SUM(I)+T~O(I) NT=NT+l Z=Z+DZ

GO TO 1 3

N5=NS/2 NT=l GO TO 2 NT=O I F ( N S . L T . N M ) GO TO 1 5 F I (LSTEP.EP.I) GO TO 9 LSTEP=l C A L L LAMBDA ( Z . T O O . T l 1 ) P R I N T 1 8 . TOO PRINT 1 9 . Z.0Z.A.B DO 1 4 1 = 1 . N P R I N T 1 9 . G~(I).G~(I).G~(I).G~(~).cs(I) GO TO 9 NS=NSm2 OZ=S/NS DZOT=DZ0.5 DO 1 6 I = l . N GS(I)=G3(1) C3(I)=G2(1) GO TO 4 CONTINUE RETURN FORMAT ( 3 8 H ROMl FORMAT ( 1 0 E 1 2 . 5 ) END

--

STEP S I Z E L I M I T E D AT LAMBDA = . 2 E 1 2 . 5 )

:UI< IJLJSb. '1,)

ct~rnpute tile i n t c g r a n d s i o r t h e Sormnerfeld i n t e g r a l s .

>ll.;'l'tluu
I

input t o 5AOA

LS

i n e i n t e g r a t i o n parameter T and c o n s t a n t s i n common

" l o c k /EVLCI)H/.

The i n t e g r a t i o n v a r i a b l e h c o r r e s p o n d i n g t o T i s o b t a i n e d
The v a l u e s r e t u r n e d i n a r r a y ANS a r e

by c a l l i n g s u b r o u t i n e LAHdDA.

T h e i n t e g r a n d s g i v e n a b o v e a r e c o m p u t e d when J H >O. H ; ' ) ( A ~ ) i s r e p l a c e d by 2 J o ( A p ) .

When J H 5 0 , a r e c o m p u t e d Prom 2 This is not necessary

The f u n c t i o n s yL a n d y

S A 2 4 t o SA 2 9 s o t h a t t h e b r a n c h c u t s a r e v e r t i c a l .

Erom S A 1 7 t o S A 2 0 s i n c e f o r t h e B e s s e l f u n c t i o n f o r m t h e i n t e g r a t i o n c o n t o u r

is confined t o a d i f f e r e n t quadrant than t h e branch c u t s .


To a v o i d l o s s o f a c c u r a c y d u e t o c a n c e l l a t i o n when c o m p u t e d f r o m The a p p r o x i m a t i o n f o r y 2
- y

A is

large, D2 is

-.

when l AI"

> -

100. l k L l

The s i g n is: - f o r A
R R < k

Z8

, A

for A

< -k > -k
28

, AI

> -

< 0

+ f o r XR > k l R , AI + f o r A,
A

AL < 0.

T h e r e i s n o c a n c e l l a t i o n a n d t h i s a p p r o x i m a t i o n i s n o t v a l i d when

D l a n d D 2 a r e c o m p u t e d Erom SA 30 t o S A 4 4 .

SAOA

SYMBOL DIC'CIONAKY

ANS

= integrand values = 2J (Ap) o r H ; ' ) ( A ~ ) = 2Jo(Ap)/p

B0
BOP CGAM 1 CGAM2 CK1
CKlK

or ~bl)'(hp)lp

- Y2
= kl
= r e a l p a r t of

YI

CKlSQ

2 = kl

CKSM

2 2 2 = k2/( kl+k2)

COM

= exp

[ - ~ ~ ( Z + Z ' ) l h d h / da T t SA 45 2

CTI

= (kL-k2)/2

CT3
DEN1 DEN2
L lG A M
D XL

JH
K HO SIGN T

= f l a g t o s e l e c t B e s s e l o r Hankel f u n c t i o n form = P

= s i g n i n approximation f o r y
= inregracion parameter

Y1

' T <MAG
TSsYAG XL XLK
=

X
h
Z + 2'

= real part of =

Z PH

SAOA COMPUTES THE I N T E G R A N D FOR EACH OF THE 6 SOMMERFELD I N T E G R A L S FOR SOURCE AND OBSERVER ABOVE GROUND COMPLEX ANS.XL.DXL.CGAMl.CGAM2.B0.BOP.COM.CK1.CKlSO.CKSM.CTl.CT2.C 1T3.DGAM.DENl.DEN2 COMMON /EVLCOM/ CKSM.CTl,CT2.CT3.CK11CK1SO,CK2.CK25P.TKMAG,TSMAG,C 1KlR.ZPH.RHO.JH DIMENSION ANS(6) C A L L LAMBDA ( T . X L . D X L ) I F ( J H . C T . 0 ) GO TO 1 B E S S E L F U N C T I O N FORM CALL BESSEL (XL*RHO.BO.BOP) B0=2. - 8 0 BOP=Z:BOP

SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA
SA

CGAMl=CSORT(XL*XL-CKlSO)
CCAM2=CSORT(XL*XL-CK2SO) IF ( R E A L ( C G A M I ) . E P . O . ) CGAM~=CMPLX(O..-ABS(AIMAG(CGAMI))) I F (REAL(CGAMZ).EO.O.) CGAMZ=CMPLX(O..-ABS(AIMAG(CGAM2))) GO TO 2 HANKEL F U N C T I O N FORM C A L L HANKEL (XL.RHO.BO.BOP) COM=XL-CK1 CCAM~=C~~RT(XL+CKI)~CSORT(COM) I F (REAL(COM).LT.O..AND.AIMAG(COM).GE.O.) CGAMI=-CGAMI COM=XL-CK2 CCAM2=CSORT(XL+CK2)*CSORT(COM) I F (REAL(COM).LT.O..AND.AIMAG(COM).GE.O.) CCAMZ=-CGAMZ XLR=XL.CONJG(XL) I F ( X L R . L T . T S M A G ) GO TO 3 GO TO 4 I F (AIMAG(XL).LT.O.) XLR=REAL(XL) I F ( X L R . L T . C K 2 ) GO TO 5 I F ( X L R . G T . C K l R ) GO TO 4 DGAM=CGAM2-CGAM1 GO TO 7 SIGN=!. GO TO 6 SIGN=-! DGAM=I./(XL.XL) DGAM=SIGN*((CT3*DGAM+CT2)*DGAM+CTl)/XL DEN2=CKSM*DGAM/(CGAM2*(CK1SOCGAM2+CK2SO*CGAM1)) D E N l = l ./(CGAMl+CGAM2)-CKSM/CCAM2 COM=DXL'XL*CEXP(-CGAM22ZPH) ANS(6)=COM~BO*OENl/CKl COM=COM0DEN2 I F ( R H O . E O . 0 . ) GO TO 8 B.P=BOP/RHO
ANS(l)=-COM'XL'(BOP+BO*XL) ANS(4)=COM.XL.BOP GO TO 9 ANS(I)=-COM*XL.XL..~ ANS(4)=ANS(l) ANS(2)=COM*CGAM2.CGAM22B0 ANS(3)=-ANS(4)*CGAM2*RHO

SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA SA

ANS(S)=COM.BO RETURN END

SA SA SA

SECOND S ECO N D - see S E C O N D in m a i n N E C program. ~-TEST

' I '

see ' T E S T i n m a i n NEC program.

2.

CUMMON tlLOCliS IN SOMNEC

R o u t i n e s Using /CNTOUR/ EVLUA, GSHANK, LAMBDA, R O M l

Parameters
A = s t a r t of

integration ~ n t e r v a l

ti = e n d o f i n t e g r a t i o n i n t e r v a l A a n d 6 a r e u s e d by s u b r o u t i n e LAMBDA t o c o m p u t e t h e c o m p l e x v a l u e o f A From t h e r e a l p a r a m e t e r s u p p l i e d b y KOML.

COMMON/EVLCOM/ CI<SH, CTL, CT2, CT3, CKL, CKlSQ, C K 2 , C K ~ S Q TKMAG, , TS,~C, C i l K , LPH, R H O , JH

R o u t i n e s U s i n g /EVLCOM/ SOMNEC, E V L U A , SAOA

P a r a m e t e rs S e e symbol d i c t i o n a r i e s f o r s u b r o u t i n e s

COI$I\LON/GGKID/ APl ( 1 1 ,

10, 4 ) , Ad2 ( 1 7 ,

5 , 4 ) , AP3 ( 9 ,

8 , 4 ) , EPSCF, D X A ( ~ ) ,

UYA( A ) , XSA( 3 ) , YSA(j), NU( A)

, NYA(3 )

K o u c i n e s U s i n g / G G R I O /SUL~NEC ( m a i n prograai)

P a r a m e t e rs A KI A K2 AK3 EPSCP
= a r r a y f o r g r i d 1 ( s e e Figure 12, P a r t I ) = array f o r grid 2 = array lor grid 3
= E
C

For grid i, ARi(j, k, m) is the value of I IZ, I p s or I$ for P' M = 1, 4 respectively at the point

...

R~/X = Si + (j-l)aRi tl where S.


1

T. + (k-1)Atl.
1

j = 1, k = 1,

... N. ... M.
1

XSA(i)

Ani
Ni

DXA(i)

NU( i)

XSA and DXA are in units of wavelength. (YSA(3))

YSA and DYA are in units of radians. and the upper limit of grid 2

The upper limit of grid 1 (XSA(Z) = XSA(3))

may be changed and the densities of points may be changed. The three grids must cover the region O < R /A < 1 and - 1

Boundaries that are zero should not be changed without modifying subroutine INTRP in NEC.
O

< tl < n/2. -

Nu-~ ~ ~ b of rP oints G r i ds -e --- -i -n interpolation Arrays:


COi.lMUtV/CGKIU/AUL
L

( N L , M L , 4 ) , AK2 ( N 2 .
1

M2,

4 ) , A U 3 (Ng,

M3,

4)

w h e r e N . > NXA( 1 ) a n d M . > N Y A (

1)

T h e d i m e n s i o n s i n common

IGGKIUI in

S O M N E C m u s t be t h e same a s t h e d i m e n s i o n o f

/GWID/ i n NEC.

Arrays; S u b r o u t i n e GS.HANK.:

Ql ( 6 , M X H ) ,

Q2 ( 6 , MAXH)

w n e r e # A X H = maximum v a l u e o f LNT i n G S H A N K s e t a t G S 1 3 .

b.

SOMNEC SUBKOU'I'LNL< LINI(AGI:

F ~ p u r r 1 7 silous t h e o r p a n ~ z n t ~ ooE n subroutines i n SOdNEC.

5T'
SOMNEC

I
I
TEST

ROMl

I
I
LAMBDA

I
I
I
TEST

GSHANK

ROMl

I
HANKEL

SAOA

n
I
BESSEL

SAOA

I
LAMBDA

a
BESSEL

Figure 1 7 .

SOVNEC S u b r o u t i n e Linkage C h a r t .

References

1.

Kalston, A., _A First Course in Numerical Analysis, - McGraw-Hill, New york, 1965.

2 .

Norton, K. A., "The Propagarion of Radio Naves Over the Surface of the Earth and in the Upper Atmosphere," Proceedings of the Institute of -Radio Engineers, Vol. 25, No. 9 , Sept. 1937.

3.

Miller, E. K., "A Variable Interval Width Quadrature Technique Based o n Komberg's Wethod," Journal of Compucational Physics, Vol. 5, No. 2, April --1970.

4.

Miller, E . K., and G. J. Burke, "Numerical Integration Methods," IEEE Transactions, Vol. Ap-17, No. 5, Sept. 1969.

5.

Handbook of Mathematical -

Functions, edited by M. Abramowitz, National Applied Mathematics Series 55, 1964.

Liureau of Standards (U.S.), 6.

Shanks, D., "Non-Linear Transformations of Divergent and Slowly Convergent Sequences," J. Math. Phys. 24, 1, 1955.

Potrebbero piacerti anche