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 Ffd, Beam, Plane, hfss_design

# Initialize HFSS design and export FFD files
hd = hfss_design()
folder = "path_to_ffd_folder"
hd.export_ffds(folder, 'Setup1 : Sweep', '30.0GHz')

# Load FFD files
ffds = get_ffds(folder)

# Create a Beam object and optimize gain
beam = Beam({ffd_obj: (1, 0) for ffd_obj in ffds.values()})
optimized_beam = beam.optimize_gain(40, 60)

# Visualize the gain contour plot
optimized_beam.plot_realized_gain_contour()

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()

Contact

If you have any questions or feedback, feel free to reach out:

License

This project is licensed under the MIT License. For more details, see the LICENSE file.

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.4.tar.gz (10.3 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.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyemfield-0.1.4.tar.gz
  • Upload date:
  • Size: 10.3 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.4.tar.gz
Algorithm Hash digest
SHA256 56e2b268c585414c7c06138425e73eebeac43e0e3ac24b21dbe5c5ec25c5353c
MD5 8e1b5ec6fb5c822d9acfa08447303aaf
BLAKE2b-256 900aead7fc6de3882a0fc2a34dd4759753ef6771cc16b93ac7a3eb9de53d9b2e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyemfield-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 382a75f718501cdc98849f558735451daf4f91b6fbd993737360cf3869f1c45c
MD5 9d7e0b6ddc2f78c289261b7485aa3b10
BLAKE2b-256 34dcf988f72bef2d82c57fe6fc0f904ac6de7fa253ccf0482da87b42f0a9a17e

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