Particle-subset area conservation for ZDEM — Delaunay / matplotlib triangulation, color# filtering, paper figure scripts, sample-first CI.
Batch analysis of ZDEM .dat frames: select particles by color group, build a triangular mesh, track area statistics under deformation. Automates what used to be ad-hoc MATLAB leftovers.
Area_Conservation.py (getopt CLI):
- Reads ZDEM dumps through
zdemio/ plots viazdemplot - Builds triangulation (
matplotlib.tri.Triangulation/scipy.spatial.Delaunay) - Filters by color# / group conventions used in lab packs
- Writes mesh figures + area trend stats
- Uses
Aggbackend for headless figure export - Auto-detects Chinese fonts for paper labels when available
Supporting figure scripts: fig1_*.py … fig8_areatrend.py for algorithm flow, benchmarks, complex models, filtering, area trends.
| Path | Purpose |
|---|---|
samples/*.dat |
Tiny frames for CI (all_0000001000.dat, …) |
data/, data1/, full figures/ |
Local only — do not force-push multi-GB dumps |
git clone https://github.com/Phoenix0531-sudo/ZDEM_Area_Conservation.git
cd ZDEM_Area_Conservation
pip install -r requirements.txt
# or uv syncPython >= 3.10. Deps: numpy, scipy, matplotlib.
python Area_Conservation.py --help
pytest tests/Point CLI flags at samples/ first; keep personal campaign data outside git.
ParticleTracker · Salt Kinematics · Bond Fracture · DFN · Model Editor · Archiver
- In: color-subset meshes, area conservation stats, paper figure generators, sample CI
- Out: interactive VisPy viewer (ParticleTracker), cloud storage of full simulations
MIT. See LICENSE.
