Skip to main content

A Python library for HFSS antenna radiation pattern analysis and gain optimization

Project description

pyemfield: Python Antenna Radiation Analysis and Optimization Library

pyemfield is a Python library designed for antenna radiation pattern analysis and gain optimization. The package leverages SciPy, NumPy, Matplotlib, and ANSYS HFSS (via pyaedt) to automate high-frequency structure simulations, process electromagnetic data, and visualize results.

Key Features

  • Gain Calculation and Optimization: Provides methods to calculate antenna gain with multiple optimization options, including exhaustive, heuristic, and SciPy-based optimizations.
  • Radiated Power Density and Cumulative Distribution: Calculates and visualizes cumulative distribution functions (CDFs) for radiation characteristics.
  • Custom Radiation Pattern and Gain Distribution Plots: Offers multiple plotting functions to visualize radiated power density, gain, and other related data.
  • Integration with HFSS: Automates the export of far-field data from HFSS simulations for further analysis and optimization.

Installation

You can install the package using pip:

pip install pyemfield

Note: Ensure that pyaedt and ANSYS HFSS are installed to fully utilize all functionalities in this package.

Dependencies

This package requires the following libraries:

  • numpy
  • scipy
  • matplotlib
  • pyaedt

Quick Start

1. Basic Usage Example

The following example demonstrates how to use pyemfield to calculate and visualize antenna gain:

from pyemfield import hfss_design, get_ffds, Beam

folder = r'D:\OneDrive - ANSYS, Inc\GitHub\pyemfield\tests\ffds'
ffds = get_ffds(folder)

ffds.keys()

x = {j:(1,0) for i, j in ffds.items()}
b1 = Beam(x)

b1.ffd_excitation
b2 = b1.optimize_gain(60, 60)
b2.plot_realized_gain_contour()
b2.ffd_excitation

hd.update_excitation(b2.ffd_excitation)

2024-11-03_09-12-52

2. Create a Custom Plane and Plot Cumulative Distribution

# Set up multiple beams and create a Plane
plane = create_plane("MyPlane", beam, [(0, 0), (90, 90)], fast=True)
plane.plot_rGain_cdf()
plane.plot_eirp_cdf()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyemfield-0.1.6.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyemfield-0.1.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pyemfield-0.1.6.tar.gz.

File metadata

  • Download URL: pyemfield-0.1.6.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for pyemfield-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e4d12004a804ded7514485265e29a2242294ee665346cbbf2132c9049f812b62
MD5 32f9aeb39c8a530a873fd098ccdb270f
BLAKE2b-256 8aac6c45bc5b5dafd357d3f5aa83c04db476317ead7979809b49571f8c5d9f72

See more details on using hashes here.

File details

Details for the file pyemfield-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pyemfield-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for pyemfield-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6819399789b2901d11db16a514dd05f6ce820a2e04c4949df2ab91f00d5c3a
MD5 e4992ee22f20859339b7d1ab0b2aabd6
BLAKE2b-256 229eaf961a4e34c52648a0a1b495ef2da05554a8e86ffbd5037c5170c696a51d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page