cocoaNEC Downloads



Example NC Files

Examples.zip

Use Open NC Model... in the cocoaNEC File Menu to open the files.

The download includes the following models:
  • 6 element Yagi
  • dipole
  • ground mounted vertical
  • Gull
    A 1.5λ Vee Beam with a bend in the two legs to reduce side lobes. The W7AY Gull can also be viewed as a piecewise-linear version of the driven element of the Landstorfer-Sacher antenna.
  • Hentenna
  • LPDA
    The Log Periodic Dipole Array example by Doug, K4DSP, is an example of how recursion can be used in NC to describe self-similar antenna structures.
  • N4IS Waller
    The Waller receiving antenna example includes the use of a resistive load.
  • OCF sweep
  • optimization example
    This example shows how the length of a dipole is automatically adjusted to produce the minimum VSWR.
  • simple Yagi-Uda
  • sterba
  • Vee Beam optimization
    Another optimization example; changing the apex angle of a Vee Beam to optimize the directivity of the antenna.
  • vertical dipole phased array
    Current fed phased array of two vertical dipoles.
  • vertical with raised radials
  • W1ZR Sleeve Dipole
    NC model of the two-band W1ZR sleeve dipole, written by Bill, K1GQ, which shows how insulated wires (a windowed line) and finite wire conductivity are handled. Please note that due to the proximity of insulated wires of the windowed line, NEC-2 will yield poor accuracy compared to the output from NEC-4.

Application

cocoaNEC 3.0 (273)

Change Log

3.0 ()
  • [Doc] Visit all of the pages in NC Reference for formatting, errors and outdated images.
  • [Doc] Visit all of the pages in NC Tutorial for formatting, errors and outdated images. I'm learning more sophisticated ways to format things for readability, which ultimately means I should revisit other pages.
3.0 (212)
  • Many UI cosmetic adjustments.
  • Fix: Wire Currents window did not appear when left-clicking on geometry.
  • Removed GN2 option; GN3 is always better and fast enough.
  • Always enable 3D pattern plot; fast enough on modern hardware.
  • Show polarization annotation on 2D pattern plots.
  • [Doc] Add links to embedded LLNL User Guide and Theory documents on the Using NEC 4.2 page.
  • [Doc] Updated Introduction, Manual and NEC-4. Manual/Input has TODOs, Manual/Output reorganized, all images updated, text lightly edited.
3.0 (162)
  • [Doc] Added documentation for keepDataBetweenModelRuns() to the Extensions page.
  • [Doc] Corrected documentation for longTransmissionLine..., third argument is physical length in meters for a line with 1.0 velocity factor, not electrical length in degrees.
  • [Doc] Editing corrections, improved explanation of thin-wire kernel usage; thanks W2RU.
  • [Doc] Broken link corrections; thanks W2RU and AI6W.
  • Changed Documentation menu name to Help and revamped items to link to pages in this document.
  • Built a version of the nec42 engine that is included as part of the notarized cocoaNEC 3 app. The version in /Applications can be trashed, and there is no longer a need to install gfortran if you want to run cocoaNEC 3 on another Silicon mac.
3.0 (129)
  • Saving a NC program file was setting extension to .deck instead of .nc. Thanks W2RU.
  • Quit with alert at startup when cocoaNEC 3 is already running.
3.0 (123)
  • Increased the font size in the Summary tab.
  • Enabled use of the Font Chooser for the NC program window and the Summary tab. Right-click to open the chooser.
  • Made the Summary tab text editable, so it can be cleared by Select All and Cut.
3.0 (272)
  • Fixed a crash when interpolating data in a scalar view for a run that had more than three identical frequencies in a row.
  • Revamped the Input window. New more powerful yet familiar editor with fewer editing quirks. Error reporting built into the editor instead of a separate tab. "Console" output from printf() built into the editor instead of another separate tab.
  • Fixed more cosmetic errors in the Output window, including Smith Chart view sizing and Dark Mode bugs in Scalar views.
  • Removed vestigial printing code.
  • No changes to modeling functionality.
3.0 (273)

Items marked Check existing models can make an existing NC model or card deck fail to run, or give results that differ from earlier versions of cocoaNEC.

Requirements

  • cocoaNEC now requires macOS 26 or later.

Bug Fixes in the NC Modeling Code

  • Check existing models: Coax models with a shield now include the Yurkov approximation for the cable jacket. This applies to the coaxWithShield and endFed coax functions whenever the overall diameter of the coax type is larger than its shield diameter. Before, the jacket was ignored because the code read a jacket radius that was never set. The shield wire now has the jacket radius, and the deck has one more LD card for the jacket. The results of these models change.
  • Check existing models: coaxModel and twinleadModel no longer halve the jacket or insulation permittivity that you give them. The permittivity is used by the jacket approximation described above.
  • Check existing models: The overall diameters of three built-in coax types are corrected. RG-6 HDTV and RG-6 CATV are now 7.0 mm instead of 0.7 mm, and RG-58 Foam is now 4.9 mm instead of the 10.3 mm RG-8 size. Shielded models that use these types give different results.
  • Check existing models: transmissionLineAtSegments now takes the five arguments that the NC Reference documents: element1, seg1, element2, seg2 and z0. Before, it required a sixth argument that it ignored. A model that passes the sixth argument now reports a compile error. Remove the last argument to fix it.
  • Check existing models: currentFeedWithPhasor and currentFeedWithPhasord now create a current source, given as a magnitude and a phase in radians or degrees. Before, they did nothing, and a model that called them ran without that source.
  • A user function can now return a string. Before, running a model that called such a function crashed cocoaNEC.
  • printf no longer crashes when it is given a string variable that holds no text.

NC Window

  • The console pane under the NC Source editor now has a border that matches the editor. Its edges are now visible in Dark Mode.

Settings

  • The Settings panel is replaced by a standard Settings window with Patterns, Display and Engine tabs. Your existing settings carry over.
  • The Patterns tab has a Restore Default Colors button.
  • Changes to the pattern scale, polarization, Smith chart Z0, SWR circle and geometry options now update open Output windows immediately.

Error Messages

  • The Errors and Warnings panel is removed.
  • Messages from a card deck run now appear in a console pane in the Hollerith window.
  • Other errors, such as a recent file that has moved, now appear in an alert. Errors that occur together are shown in one alert.

Hollerith Card Deck Window

  • The card deck window is now a standard document window. It shows the deck's file icon in the title bar and marks unsaved changes in the close button.
  • A toolbar holds the Console and Run buttons. Add and remove buttons sit under the card table.
  • Cards are shown in a monospaced font, and the Card Image column holds exactly 80 characters.
  • The edit field is lined up with the Card Image column, so each character sits directly above the same column in the table. The card being edited stays visible in the table.
  • The ruler above the edit field numbers every tenth column and marks the insertion point. A label beside the field shows the current column.
  • The column label and the ruler marker now follow the insertion point. Before, neither one appeared.
  • The * column is now a Skip checkbox. Skipped cards are left out of runs and out of the cards in the saved file.
  • The Notes column fills the remaining width of the window.
  • cocoaNEC now keeps skipped cards and notes when you save a deck. The file holds only the active cards, so other programs read an ordinary NEC deck. The complete card list is stored as an extended attribute of the file and comes back when cocoaNEC reopens the deck. Before, saving deleted skipped cards and notes.
  • Undo and Redo work in the card deck window for adding, deleting and editing cards, for Skip, and for notes.
  • Ending a card edit without changing the card now clears the edit field. Before, the card's text stayed in the field.
  • The window and its table now resize correctly, and Dark Mode is supported.
  • When a deck is saved, comment (CM) cards keep the upper and lower case of their text. All other cards are still written in upper case.

Unsaved Changes

  • Closing a card deck with unsaved changes, or quitting the app, now asks whether to save it. Before, card decks closed without asking.
  • NC models and card decks use the same prompt, with Save, Cancel and Don’t Save.
  • Choosing Save while quitting with several unsaved NC models now saves the model named in the prompt. Before, it could save a different model.
  • If you cancel the save, the window stays open.

Running Card Decks

  • A card deck with no RP cards now produces the same pattern plots as an NC model: an azimuth plot at 20° elevation (0° in free space), an elevation plot at 0° azimuth, and the 3D pattern. The RP cards are added only to the run and not to the saved deck. Decks that contain their own RP cards run as written.
  • Check existing models: The Output Control sheet is removed. Its pattern settings had no effect, and card decks now run at double precision. A deck that you ran at quad precision before can give slightly different results.
  • Check existing models: Decks written by EZNEC that use a current source now report the correct feedpoint impedance. Before, the Output window showed the reciprocal of the impedance, a value close to zero.

Geometry View

  • The Geometry view now scales to fit the antenna and ignores wires that lie far from it. EZNEC places one such wire far from the antenna for its current sources, and it used to shrink the antenna to a few dots.
  • The wire that EZNEC adds for a current source is no longer drawn.

Documentation

  • [Doc] The Manual describes the new NC editor, the console pane, error reporting in the editor, the card deck window and the Settings window, with new screenshots.
  • [Doc] The NC Reference has new entries for currentFeedWithPhasor, currentFeedWithPhasord, setAzimuthPlotDistance, setElevationPlotDistance, setAzimuthPlotRotation, rand, norm, seed and the efficiency variable, with index entries.
  • [Doc] The lists of NC types and function return types now include float, string, coaxtype, vector, transform and void.
  • [Doc] The Vectors page now describes the order of concatenated transforms as cocoaNEC applies it: the leftmost transform acts first.
  • [Doc] Corrected errors throughout the guide, including the half of the impedance plane that the Smith chart covers, the polarization of leftPolarizedIncidentPlaneWave, the helixCard arguments, several code examples, broken links and broken page markup.