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
pyaedtand ANSYS HFSS are installed to fully utilize all functionalities in this package.
Dependencies
This package requires the following libraries:
numpyscipymatplotlibpyaedt
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:
- Email: mingchih.lin8@gmail.com
- GitHub: pyemfield Repository
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e2b268c585414c7c06138425e73eebeac43e0e3ac24b21dbe5c5ec25c5353c
|
|
| MD5 |
8e1b5ec6fb5c822d9acfa08447303aaf
|
|
| BLAKE2b-256 |
900aead7fc6de3882a0fc2a34dd4759753ef6771cc16b93ac7a3eb9de53d9b2e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
382a75f718501cdc98849f558735451daf4f91b6fbd993737360cf3869f1c45c
|
|
| MD5 |
9d7e0b6ddc2f78c289261b7485aa3b10
|
|
| BLAKE2b-256 |
34dcf988f72bef2d82c57fe6fc0f904ac6de7fa253ccf0482da87b42f0a9a17e
|