NEC-LIST: Apparent NEC-4 code limitation

From: <BURKE_at_email.domain.hidden>
Date: Tue, 19 Aug 1997 12:05:32 -0800 (PST)

Re: Apparent NEC-4 code limitation

The changes needed in NEC-2, 3 and 4 to run more than 10000 segments
were discused in the November 1996 ACES Newsletter. The information is
reproduced below. A number of constants of 10000 must be increased and also
two values of 10001. Failing to change the 10001 values should not affect
the results as long as the model does not involve segments connecting to
patches.

Jerry Burke
LLNL

-------------------------
>From the Applied Computational Electromagnetics Society Newsletter,
Vol. 11, No. 3, pp. 10-11, November 1996:

One issue that has come up several times lately is an error when
running more than 10000 wire segments in NEC-2, 3 or 4. Such large
models may give an error message "CONNECT: SEGMENT CONNECTION ERROR
FOR SEGMENT __.'' The reason is that the connection of a segment end
to a patch is indicated in the code by a connection number (ICON1 or
ICON2) of 10000 plus the number of the patch. Thus a connection
number of 10005 means that the segment end connects to patch number 5.
Obviously if the number of segments exceeds 10000 the code will
confuse a wire connection with a patch connection. This value of
10000 is embedded in several places in the code, since when NEC-2, 3
and even 4 were released we did not expect people to run more than
10000 segments. The rapidly increasing speed and capacity of
computers has change that.

The 10000 segment limit can be changed by editing the code to increase
the constants to some value larger than the maximum number of segments
that you expect ever to use. In NEC-2 there are 23 values of 10000
that must be changed and 2 values of 10001 that are changed to the new
value plus one. There are also 2 values of 10000 in subroutine INTRP
that are not changed and a decimal 10000. in subroutine PATCH that
does not need to be changed. NEC-3 is the same as NEC-2 but without
the two values in subroutine INTRP. In NEC-4 there are 20 values of
10000 and 2 values of 10001 that must be changed. There are 2 values
of 10000 in the LINPAK subroutine CQRSL and the 10000. in PATCH that
are not changed. NEC-4 also uses the value 20000 to indicate
connection of a segment to a ground plane, so if the number of
segments is expected to get this high the value should be increased.
There are 6 values of 20000 in statements and 4 in comment lines in
NEC-4.

Uno Lidval at Communicator CEC in Sweden has suggested using the
parameter value MAXSEG from the INCLUDE file in place of the fixed
value 10000. The values to replace 20000 could be computed from
MAXSEG by adding a "safe" number to allow for patch connections.
Another option would be to use a new parameter, since if you use
MAXSEG then a NGF file for a model with wires connecting to patches
may not work with a code compiled with a different value of MAXSEG
than when the NGF file was written. Using an even number like 10000
makes it easy to read the table of connection numbers and determine
the numbers of connected patches, but it is probably not often that
people read the geometry table for a large model.
Received on Fri Aug 29 1997 - 10:46:24 EDT

This archive was generated by hypermail 2.2.0 : Sat Oct 02 2010 - 00:10:38 EDT