Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

zutil

PyPI version fury.io

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:

Support

License

zutil is released under the MIT License. See LICENSE file for details.


Developed by Zenotech Ltd

Download files

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

Source Distribution

zutil-2026.8.14861.dev21702.tar.gz (315.9 kB view details)

Uploaded Source

Built Distribution

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

zutil-2026.8.14861.dev21702-py3-none-any.whl (349.9 kB view details)

Uploaded Python 3

File details

Details for the file zutil-2026.8.14861.dev21702.tar.gz.

File metadata

  • Download URL: zutil-2026.8.14861.dev21702.tar.gz
  • Upload date:
  • Size: 315.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zutil-2026.8.14861.dev21702.tar.gz
Algorithm Hash digest
SHA256 69391fd1bbe99122250afd58daea5608998545a7932c918fdfd911de703caebd
MD5 b1b069a1ab9e2b78f6b6514238db57e9
BLAKE2b-256 4268a5df4e0410789dcf840a58dd3c48c74832948aa0efa5569231e9e3f1679b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zutil-2026.8.14861.dev21702.tar.gz:

Publisher: zutil_dev_release.yml on zenotech/zCFD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zutil-2026.8.14861.dev21702-py3-none-any.whl.

File metadata

File hashes

Hashes for zutil-2026.8.14861.dev21702-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e97c2672c1371adccfa69cd44b452f49133956e4f37f8de8cdf5ad32e235a7
MD5 058b1e1af1c8f9b4bed6d02a5670920a
BLAKE2b-256 f65a2ab14bf1b2d59b1b6f43f23a3a9b39de9ce1b588f85bce9be6749b00b65b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zutil-2026.8.14861.dev21702-py3-none-any.whl:

Publisher: zutil_dev_release.yml on zenotech/zCFD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.8.14861.dev21702 This release

2 files

2026.8.14860

2 files

2026.7.14548

2 files

2025.9.12915

2 files

2025.7.11873

2 files

2025.6.11605

2 files

2025.3.10415

2 files

1.6.0

2 files

1.5.1

2 files

1.5

2 files

1.0.4

2 files

1.0.2

1 file

1.0.0

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1

1 file

Supported by

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