pynec-utilities Examples

The following are some examples of how to use this utility

Simple Dipole 3D Simulation

The following code will plot a simple vertical dipole

# Import the package
import pynec_utilities
# Create a PyNECWrapper class object
dipole_sim = pynec_utilities.PyNECWrapper()
# Create the antenna
w_id = dipole_sim.add_wire([0, 0, -1], [0, 0, 1], 0.03, 36)
# This command MUST be ran after creating the antenna's geometry
# Add an excitation in the dipole wire at the 18th segment, which is half-way
dipole_sim.add_excitation(w_id, 18)
# Set the frequency to simulate at a 144Mhz
# Calculate the antenna radiation pattern with 36 segments for theta and phi
# Plot the 3D radiation pattern