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 APImethod ('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 particlesMonodisperse 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
print(agg.current_size, summary.df_est)   # 200 1.6126416651056448

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_est scatters 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

Download files

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

Source Distribution

pyfracaggregate-0.4.0.tar.gz (516.7 kB view details)

Uploaded Source

Built Distribution

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

pyfracaggregate-0.4.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file pyfracaggregate-0.4.0.tar.gz.

File metadata

  • Download URL: pyfracaggregate-0.4.0.tar.gz
  • Upload date:
  • Size: 516.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyfracaggregate-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9c69b0655a6b522c9e15ebad845b20f2f75e6012f8c982169278c4bc408634b4
MD5 5a7a6f8a99b706424a9e0d7fac9df33b
BLAKE2b-256 2c4b3a9587cf6fd6b0c25edf8f1ab3044f7557f8fe319464d62d1b802feb78ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfracaggregate-0.4.0.tar.gz:

Publisher: publish.yml on VANvonZHANG/pyFracAggregate

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

File details

Details for the file pyfracaggregate-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyfracaggregate-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd1dfca1cb87df62352aebbfb2f371163d9e2e148906cfcae9c3129b31e81b0
MD5 10ac47966062cd5db402bf6e83f00928
BLAKE2b-256 7e9416ec6d70c5cd44be64c7d20a95902227e6fe3f121d588310fb837296e354

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfracaggregate-0.4.0-py3-none-any.whl:

Publisher: publish.yml on VANvonZHANG/pyFracAggregate

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

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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