Skip to main content

Converge H5 Reader

Converge CFD post-file reader: the files of a run found and ordered by the output time each records, and per file its boundary table, streams, polyhedral face topology, cell-centered variables and parcels, read from HDF5 only when asked

Overview

Converge writes its results as one HDF5 post file per output step. Each file records the step in its root attributes, holds a boundary table, and one or more streams: a polyhedral mesh whose faces are polygons, each face naming the two cells it separates or, on a boundary, the one cell it bounds and the boundary it lies on. A stream carries cell-centered variables, one value per cell, with vectors stored as _X, _Y and _Z components, and parcels: points with variables of their own, their position among them.

This package does two things. It finds the files of a run from a path, a list of paths or a glob pattern, checks they belong to the same run, and orders them by the output time each file records, never by its name. And it opens one file and exposes its structure as it is: the step attributes, the boundaries, the streams and their variables, with every array read from the file only when a caller asks for it, whole or by rows. It does not build a cell connectivity, extract surfaces, average values or convert anything; those are the jobs of whatever consumes it.

Installation

pip install vcti-reader-converge-h5

In requirements.txt

vcti-reader-converge-h5>=0.1.0

In pyproject.toml dependencies

dependencies = [
    "vcti-reader-converge-h5>=0.1.0",
]

Quick Start

The snippets below use the synthetic post file the package ships, written with the same layout as a real one. Replace the paths with real files and nothing else changes.

Find the files of a run

from vcti.reader.converge.h5 import open_series, write_synthetic

for step, time in ((1, 0.0), (2, 0.5), (3, 1.0)):
    write_synthetic(f"post{step:06d}.h5", output_time=time)

series = open_series("post*.h5")  # a path, several paths, or a pattern
print(series.abscissa, series.version, series.stream_ids)  # time (3, 0, 1) ('00', '01')
print([s.output_time for s in series.sources])  # [0.0, 0.5, 1.0]

The files are ordered by the OUTPUT_TIME each records, which is a time or, when the run's CRANK_FLAG is set, a crank angle; series.abscissa says which. Every file must agree on the Converge version, the crank flag, the stream ids and the boundary table, or open_series raises naming the file that does not.

Open a step

from vcti.reader.converge.h5 import ConvergeH5Reader

with ConvergeH5Reader(series.paths[-1]) as post:
    print(post.output_time, post.crank_flag, post.version)  # 1.0 False (3, 0, 1)
    print(post.stream_ids)  # ['00', '01']
    for boundary in post.boundaries:
        print(boundary.id, boundary.name, boundary.stream_id, boundary.num_elements)

Stream ids are kept exactly as the file spells them. post.attributes holds every root attribute, each unwrapped from its one-element array.

Read a stream's mesh

with ConvergeH5Reader(series.paths[-1]) as post:
    stream = post.stream("00")
    print(stream.num_vertices, stream.num_faces, stream.num_cells)  # 12 11 2

    offsets = stream.face_offsets()  # num_faces + 1 offsets into face_vertices
    first_face = stream.face_vertices(slice(offsets[0], offsets[1]))
    print(first_face, stream.vertices(first_face[:1]))

Every array accessor takes rows: a slice or an increasing index array over the first axis, or nothing for the whole array. Only those rows are read.

Find the faces on each boundary

with ConvergeH5Reader(series.paths[-1]) as post:
    stream = post.stream("00")
    ids = stream.face_boundary_ids()  # one read: boundary id per face, -1 inside
    print(ids.tolist())  # [0, 1, -1, 2, 2, 2, 2, 2, 2, 2, 2]
    walls = stream.boundary("walls (ID = 1)")
    print(len(stream.boundary_faces(walls)), walls.num_elements)  # 8 8

A boundary face has the boundary's face_marker, -(id + 1), in one of its two face_cells entries; the other entry is the cell it bounds. A boundary the table lists with no faces is kept, and has none.

Read cell-centered variables

with ConvergeH5Reader(series.paths[-1]) as post:
    stream = post.stream("00")
    print(stream.cell_scalars, stream.cell_vectors)  # ['IDREG', 'PRESSURE'] ['VELOCITY']
    pressure = stream.cell_values("PRESSURE")  # one value per cell
    velocity = stream.cell_vector("VELOCITY", slice(0, 1))  # (1, 3), components stacked
    print(pressure, velocity)

Read parcels

with ConvergeH5Reader(series.paths[-1]) as post:
    stream = post.stream("00")
    if stream.has_parcels:
        print(stream.num_parcels, stream.parcel_scalars, stream.parcel_vectors)
        print(stream.parcel_positions(slice(0, 1)), stream.parcel_values("RADIUS")[0])

A stream that wrote no parcels at a step still lists the parcel variables and holds empty datasets; has_parcels is then False.


Key API

Name What it does
open_series(sources) Find, validate and order the files of one run; a Series with sources, paths, abscissa, version, stream_ids, boundaries
find_sources(sources), probe(path) The same without the same-run check; one Source per file
ConvergeH5Reader(path) Open a post file; a context manager with output_time, crank_flag, version, attributes, boundaries, streams, stream(id)
Stream One stream: vertices(), face_offsets(), face_vertices(), face_cells(), face_boundary_ids(), boundary_faces(), cell_values(), cell_vector(), parcel_positions(), parcel_values()
Boundary One row of the boundary table: id, name, stream_id, num_elements, face_marker
split_variables(names) The scalar/vector split a name list implies
write_synthetic(path) A small post file in the same layout, for tests and examples

Dependencies

  • numpy
  • h5py, which opens the file and reads the rows an accessor asks for.

Documentation

If you want to… Read
Get started using the package Quick Start above
Understand the file model, what is lazy and why docs/design.md
Navigate and understand the source docs/source-guide.md

Metadata

Release files for vcti-reader-converge-h5 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcti-reader-converge-h5 0.1.0
File Size Uploaded Provenance Actions
vcti_reader_converge_h5-0.1.0.tar.gz 31.5 kB With provenance Details for vcti_reader_converge_h5-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vcti-reader-converge-h5 0.1.0
File Interpreter ABI Platform Actions
vcti_reader_converge_h5-0.1.0-py3-none-any.whl Python 3 none any Details for vcti_reader_converge_h5-0.1.0-py3-none-any.whl

Total release size: 51.0 kB

Release files / vcti_reader_converge_h5-0.1.0.tar.gz

Download URL vcti_reader_converge_h5-0.1.0.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1ec3ccdb2f9a9e81cfa046fd6b1b4dc82df10dbffd207e75b6b025dde9a3a9ca
BLAKE2b-256 checksum
How to use checksums
fbedc2e4aa9d3eaeefb360d10a221a66be528c49f37ccdbb344404a38e946b59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / vcti_reader_converge_h5-0.1.0-py3-none-any.whl

Download URL vcti_reader_converge_h5-0.1.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aae4caca53b97bda2b1f2a3ded3f76aaa0108daea476d997b472fbe4509e1187
BLAKE2b-256 checksum
How to use checksums
6c7cc584fd0a398fa5e0654877accab274f79c7f6f57e2cb610b70478b9ea36b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for vcti-reader-converge-h5 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vcti_reader_converge_h5-0.1.0.tar.gz

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 Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page