Collection of sphere packing and meshing algorithms.
Installation
pip3 install bola
The c++ code requires the math library Eigen3 to be installed and a dependency of the python gmsh package is libglu. So, you may need to run (debian/ubuntu-based):
sudo apt update
sudo apt -y install libeigen3-dev libglu1
Alternatively, you can follow the steps of the CI.
Examples
Particle size according to bola.psd.GradingCurve (sieve lines):
gc = bola.psd.GradingCurves.fuller(d_min=4., d_max=16)
box = (32.0, 32.0, 32.0)
radii = psd.sample_grading_curve(gc, V=0.5 * np.prod(box))
Initial packing using bola.packing.rsa (random sequential addition)
spheres = bola.packing.rsa(radii, box)
Maximize particle distance using bola.packing.edmd (event-driven molecular-dynamics)
sim = bola.packing.edmd(box, spheres, growth_rate=0.1)
while sim.t() < 10.0:
sim.process(100 * len(radii))
sim.synchronize(True)
print(packing.stats_string(sim))
distant_spheres = sim.spheres()
distant_spheres[:, 3] = radii # new centers, old radii
Mesh via gmsh using bola.mesh
bola.mesh.create(
box, new_spheres, bola.mesh.GmshOptions(
mesh_size_matrix=2.0, mesh_size_aggregates=2.0, out="mesh.xdmf")
)
Metadata
Release files for bola 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bola-0.2.0.tar.gz | 960.9 kB | Without provenance | Details for bola-0.2.0.tar.gz |
Release files / bola-0.2.0.tar.gz
| Download URL | bola-0.2.0.tar.gz |
|---|---|
| Size | 960.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0836f4a3ac909c3a1e44f03087fbd1c50c129ebb9645989f2841a66285c7ee25
|
|
BLAKE2b-256 checksum How to use checksums |
1f40185b25f6be3fb0f888bfc4476004a2647bb07ecf18e66df4ad48fb4bb764
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for bola 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.