pyFracAggregate
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 —
MonodisperseandLognormalDistributionsize 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
mathutilsonly 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:
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfracaggregate-0.6.0.tar.gz.
File metadata
- Download URL: pyfracaggregate-0.6.0.tar.gz
- Upload date:
- Size: 745.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
980294d33966e8f0bb727c1a159e9f6b60f3764f1c97cb92431093b3a112e4a4
|
|
| MD5 |
7754e35278e1a4c43ddff4c55189c29e
|
|
| BLAKE2b-256 |
a03ff161625c4b0a76d0fb441419d5a50bc31a708b393219681b004db17e5465
|
Provenance
The following attestation bundles were made for pyfracaggregate-0.6.0.tar.gz:
Publisher:
publish.yml on VANvonZHANG/pyFracAggregate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfracaggregate-0.6.0.tar.gz -
Subject digest:
980294d33966e8f0bb727c1a159e9f6b60f3764f1c97cb92431093b3a112e4a4 - Sigstore transparency entry: 2733356538
- Sigstore integration time:
-
Permalink:
VANvonZHANG/pyFracAggregate@cb71f4fc53d47738fa30d5f805adf9ab01d05808 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/VANvonZHANG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb71f4fc53d47738fa30d5f805adf9ab01d05808 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyfracaggregate-0.6.0-py3-none-any.whl.
File metadata
- Download URL: pyfracaggregate-0.6.0-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13bd743f3e98079f4c7a6d53f38e79e82f69b1098e7560673319d5660f5b8c7e
|
|
| MD5 |
64c782cbc2cc61604829e50ee325dc47
|
|
| BLAKE2b-256 |
371e5a470b479104e5867275b79fe284464de4bee8f38ed7ee7b56dcccd4df71
|
Provenance
The following attestation bundles were made for pyfracaggregate-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on VANvonZHANG/pyFracAggregate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfracaggregate-0.6.0-py3-none-any.whl -
Subject digest:
13bd743f3e98079f4c7a6d53f38e79e82f69b1098e7560673319d5660f5b8c7e - Sigstore transparency entry: 2733356561
- Sigstore integration time:
-
Permalink:
VANvonZHANG/pyFracAggregate@cb71f4fc53d47738fa30d5f805adf9ab01d05808 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/VANvonZHANG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb71f4fc53d47738fa30d5f805adf9ab01d05808 -
Trigger Event:
release
-
Statement type: