This release is a pre-release and may not be stable for production use.
zutil
Python utilities for zCFD users
zutil is a comprehensive Python toolkit designed to work with zCFD CFD simulation results and provide powerful pre- and post-processing capabilities. This library offers streamlined workflows for data analysis, visualization, wind energy modeling, acoustic analysis, and geometric transformations.
Installation
Install zutil from PyPI:
pip install zutil
Note: This library is compatible with Paraview 6.0+
Package Structure
zutil is organized into several specialized modules:
- plot - Advanced plotting and visualization tools for zCFD results
- post - Post-processing utilities using Paraview integration
- fileutils - File I/O operations and result data access
- analysis - Analysis tools including acoustic analysis
- transform - Geometric transformation utilities
- zWind - Wind energy modeling and turbine analysis
Quick Start
Loading zCFD Results
The fundamental function for accessing zCFD simulation data:
from zutil.fileutils import get_zcfd_result
# Load a zCFD case result
result = get_zcfd_result('my_case.py')
# Access case parameters
params = result.parameters
# Get report data
report = result.report
print(report.header_list) # Available data columns
Plotting Report Files
Create professional plots from zCFD report files:
from zutil.plot import Report
import matplotlib.pyplot as plt
# Load and plot residuals
report = Report('my_case.py')
report.plot_residuals()
plt.show()
# Plot specific variables
report.plot_report_array('Cd')
plt.show()
Module Documentation
Plotting
The zutil.plot module provides comprehensive plotting capabilities:
from zutil.plot import Report, zCFD_Plots
# Individual case plotting
report = Report('case.py')
report.plot_residuals()
report.plot_forces()
report.plot_linear_solve_performance()
# Multi-case plotting (handles overset cases automatically)
plots = zCFD_Plots('case.py')
plots.plot_residuals()
plots.plot_forces()
Key Features:
- Residual convergence plots
- Force and moment coefficient plotting
- Linear solver performance analysis
- Acoustic analysis visualization
- Professional styling with zCFD branding
Post-Processing
The zutil.post module integrates with Paraview for advanced post-processing:
Note: This module requires pvpython to be installed. The easiest way to get this is to use a distribution of zCFD.
from zutil import post
# Access case parameters
params = post.get_case_parameters('case.py')
# Calculate forces on walls
force = post.calc_force_wall('wall_name', 'case.py')
# Extract surface pressure profiles
cp_data = post.cp_profile_wall_from_file('wall_name', 'case.py')
# Generate Paraview visualizations with zCFD branding
post.vtk_logo_stamp()
Key Features:
- Force and moment calculations
- Surface pressure and friction analysis
- Paraview visualization utilities
- Progress tracking for batch operations
File Utilities
The zutil.fileutils module handles all file I/O operations:
from zutil.fileutils import get_zcfd_result, zCFD_Result
# Load case data
result = get_zcfd_result('case.py')
# Access report data directly
report_data = result.report.get_array('Cd')
# Get case status
success = result.report.get_case_success()
Key Features:
- Seamless access to zCFD case data
- Report file parsing and analysis
- Parameter extraction from control files
- CSV data handling utilities
Analysis Tools
The zutil.analysis module includes acoustic and other analysis capabilities:
from zutil.analysis.acoustic import calculate_PSD
from zutil.plot import plot_PSD, plot_thirdoctave
# Perform acoustic analysis
psd_data = calculate_PSD(time_series_data, sample_rate)
# Create acoustic plots
plot_PSD(psd_data, frequencies)
plot_thirdoctave(psd_data, frequencies)
Key Features:
- Power spectral density (PSD) analysis
- Third-octave band analysis
- Acoustic visualization tools
- Signal processing utilities
Geometric Transformations
The zutil.transform module provides coordinate and geometric operations:
from zutil.transform import transform
from zutil import vector_from_angle, rotate_vector
# Coordinate transformations
transformed_points = transform.apply_rotation(points, rotation_matrix)
# Vector operations
wind_vector = vector_from_angle(wind_direction, wind_speed)
rotated_vector = rotate_vector(vector, axis, angle)
Key Features:
- Coordinate system transformations
- Vector mathematics utilities
- Rotation and translation operations
- Unit conversions
Wind Energy Modeling
The zutil.zWind module provides specialized wind energy tools:
from zutil.zWind import zTurbine
# Define wind turbine properties
turbine = zTurbine(name='NREL_5MW', centre=[0, 0, 90])
Key Features:
- Wind turbine modeling (zTurbine)
- Actuator disc implementations (zActuatorDisc)
- Blade element momentum theory (zBem)
- Turbine controllers (zController)
Requirements
- Python 3.9+
- NumPy
- Pandas
- Matplotlib
- IPython/Jupyter support
- PyYAML
- Paraview (for post-processing features)
Documentation
For comprehensive documentation, tutorials, and examples:
- Full Documentation: https://docs.zenotech.com/
- zCFD Solver: Download a free trial at https://zcfd.zenotech.com
Support
- Issues: Report bugs and feature requests via the Issues tab
- Email: For technical support contact admin@zenotech.com
License
zutil is released under the MIT License. See LICENSE file for details.
Developed by Zenotech Ltd
Metadata
Release files for zutil 2026.8.14861.dev21802
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zutil-2026.8.14861.dev21802.tar.gz | 346.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zutil-2026.8.14861.dev21802-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 727.9 kB
Release files / zutil-2026.8.14861.dev21802.tar.gz
| Download URL | zutil-2026.8.14861.dev21802.tar.gz |
|---|---|
| Size | 346.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d9f2de750790e29942e968df4ec7a1a96920f81d1dc754de9556f4414635210
|
|
BLAKE2b-256 checksum How to use checksums |
050059abd4f454a77ab3abf9e7ff62b4465850ae6b62a04151e09feb8f55bc29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / zutil-2026.8.14861.dev21802-py3-none-any.whl
| Download URL | zutil-2026.8.14861.dev21802-py3-none-any.whl |
|---|---|
| Size | 381.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d699e5abd77a18e0b04f191a67c0799b63c7009592c134237f463e46afe1578
|
|
BLAKE2b-256 checksum How to use checksums |
9cebe59fcb5c2548b23284af01f53f8dee9ecf60ac3e4726af69599741f49101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log