Skip to main content

pyFracAggregate

CI PyPI version Python versions Docs License: MIT

A Python library for generating synthetic fractal aggregates — clusters of spherical primary particles with a tunable morphology, such as soot and other aerosols — behind one coordinate-system API: method × scaling × placement select among the classical generation algorithms (particle-cluster and cluster-cluster aggregation, count- or mass-weighted scaling, three contact-placement strategies), with built-in morphological analysis and export to common scientific formats.

Features

  • Three orthogonal axes, one API — method ('pca' | 'cca') × scaling ('count' | 'mass') × placement ('solved' | 'sampled' | 'constructed'); every classical algorithm is a coordinate in this system.
  • Three placement strategies — closed-form tangency solving (default), Monte Carlo sampling, or FracVAL-style contact construction.
  • Reproducible generation — pass seed= for bit-identical reruns of any legal coordinate.
  • Monodisperse and lognormal primary particles — Monodisperse and LognormalDistribution size distributions feed any generator.
  • Built-in morphology analysis — radius of gyration, center of mass, pair correlation function, and fractal-dimension estimation with fit quality (pfa.analyze).
  • Rich exports — YAML snapshot, VTK point cloud and VTM multiblock (via pyvista, ready for ParaView), off-screen static render, and rotation video.
  • Fully typed library with tests — type hints throughout the source, and a pytest suite mirroring the package layout.

Installation

$ pip install pyFracAggregate

Requires Python ≥ 3.13. The 3D math dependency mathutils only has usable wheels for the 3.13 ABI on several platforms; older interpreters can fail at compile time. See the installation guide for details and platform notes.

To install from source for development:

$ pip install -e ".[dev]"

Quick start

import pyFracAggregate as pfa

agg = pfa.generate(200, 1.8, 1.9, method='pca', seed=0)  # N=200, Df=1.8, kf=1.9

summary = pfa.analyze(agg)              # MorphologyReport (sandbox default)
print(agg.current_size, summary.df_num_est, summary.df_mass_est)   # 200 1.8206754358246036 1.8206754358246036

pfa.export_yaml(agg, 'aggregate.yaml')
pfa.export_vtk(agg, 'aggregate.vtk')

Generation is stochastic; pass seed= for reproducible aggregates (generation never consults the global numpy.random state). The single-realization df_num_est (and df_mass_est) scatter around the requested df; average over realizations for ensemble statements.

The coordinate system

Every classical aggregate algorithm is a coordinate in a three-axis system (method, scaling, placement):

Literature method pyFracAggregate coordinate
DLA-style PCA (pca, count, solved)
Filippov CCA (2000) (cca, count, sampled)
FLAGE-style CCA (Skorupski 2014) (cca, count, solved)
FracVAL (Morán 2019) (cca, mass, constructed)

The two method families — pca (particle-cluster) and cca (cluster-cluster) — are introduced in the background chapter on the documentation site, which derives each algorithm's principle, guarantees, and limits. 'fracval' remains a deprecated alias for (cca, mass, constructed) until 1.0; 'tdcca' was removed in v0.4.

Documentation

Full documentation — background theory, user guide, tutorial, API reference, architecture notes, and contributing instructions — is hosted at:

Documentation

License

MIT

Metadata

Release files for pyFracAggregate 0.7.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 pyFracAggregate 0.7.0
File Size Uploaded
pyfracaggregate-0.7.0.tar.gz 809.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyFracAggregate 0.7.0
File Interpreter ABI Platform
pyfracaggregate-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 849.6 kB

Release files / pyfracaggregate-0.7.0.tar.gz

Download URL pyfracaggregate-0.7.0.tar.gz
Size 809.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d7c2e43d7231f1bd4dcb1758dcd2ebc658f952ef26b3e15290426a2c4379447
BLAKE2b-256 checksum
How to use checksums
d8b9c29aa233b8fb90eb6c7f3aeae5ef1196b3a84ca7b55fa3bf7e1008558ff5
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 7, 2026.

Transparency log

Release files / pyfracaggregate-0.7.0-py3-none-any.whl

Download URL pyfracaggregate-0.7.0-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79142f3a17f6893adcd14e0eeb3c727cf2873901d52c9449e4c7652092052139
BLAKE2b-256 checksum
How to use checksums
42ea31be182da07305094011d5be37ec60e4c423b19e50bb49fbc2d2595a465a
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

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