I am using Surface patches as a ground plane to increase directivity in particular direction.
Hi kakar133
That is OK, though I think you may need to check that no part of the patches extends into the ground if you still have a default ground also present.
It has also been shown that one can get reasonably accurate results by making reflectors out of a grid, generated by using the GM transformation command to generate repeats. The rules about keeping track of tag numbers, and how to avoid generating repeats are quite strict, and also quite awkward to keep in the mind. The rules about connections to the center of patches are similarly quite strict.
The original NEC2 and NEC4 were written in FORTRAN, which is near-assembly language, and a compiled version on a modern PC is extremely fast. Even though it had some programming tricks we now avoid, (like unconditional GOTO), it was rigorously debugged (by the US military), and also extensively verified with real structures. The modern usage, such as by 4NEC2, NEC4WIN, NEC2C and XNEC2C add front-ends to make data entry input easier, and run from file input of structure descriptions. Some have also translated from FORTRAN to C, C++ and possibly others. Some front-ends still call a compiled FORTRAN binary engine.
All of these variants may have added in some constraints of their own which might be hindering your input description.
My point here is that the original rules still generally apply. You might be able to get away with free form input strings, and it may be more tolerant of where you sprinkle comment (CM) inputs, or using //, or %, whatever, but allowing bits to occupy the same space, or ends not to connect still causes hard-to-understand crashes. Note that like all integral Equation solvers, the number of structure parts affects the computation time in a non-linear way. Since each element affects every other, to many bits can quickly expand the computation unreasonably.
A clean PDF version of the original old NEC2 manual is available online. A quick read of the introduction chapter might give you some clues as to what might be upsetting the design.
Another trick is to divide and conquer. Try offering only parts of the design in stages, by commenting out some lines. Leave out the patches entirely, and see if the remainder is accepted. When you get to the bit that crashes it, you will have a better idea of what to fix. Make sure the sequence of entry generates the thing you want. It is very easy to end up with parts of the structure displaced very far away if one is not careful.