Skip to content

JuliaRemoteSensing/ParticleModels.jl

Repository files navigation

ParticleModels.jl

CI Docs

ParticleModels.jl is a geometry and dielectric modeling toolkit for electromagnetic scattering simulations of hydrometeors and irregular particles. It provides analytic, stochastic, fractal, and aggregate particle models, dielectric and effective-medium models, voxelized inhomogeneous media, and adapters to scattering solvers such as TransitionMatrices.jl, FDTD, DDA, and geometrical-optics solvers.

This repository currently implements a working v0.1-alpha feature set:

  • Abstract particle, shape, medium, dielectric, and mixing interfaces.
  • Analytic shapes: Sphere, Spheroid, Ellipsoid, Cylinder, and HexagonalPrism.
  • ConstantPermittivity and HomogeneousMedium.
  • Shape and particle voxelization through VoxelGrid.
  • Basic surface sampling, mesh generation, and OBJ/STL/VTK mesh export.
  • Lightweight SVG visualization for shapes, particles, voxel grids, surface meshes, dielectric curves, and shaded 3D mesh renderings.
  • Macke-like KochIrregularParticle meshes for generation 0-3 irregular particles.
  • GaussianRandomSphere with reproducible seed, roughness, angular correlation length, spherical-harmonic truncation, and optional volume normalization.
  • Shape-medium composition examples covering core-shell, layered, radial gradient, and spherical-inclusion media.
  • Effective-medium mixing models: Maxwell-Garnett, Bruggeman, Looyenga, BMA, EMA, Wiener bounds, Polder-van Santen, Sihvola, Hanai, Rayleigh, and self-consistent ellipsoidal mixing.
  • Additional irregular hydrometeor shapes: random harmonic particles, rough spheroids, rough hexagonal prisms, snow aggregates, and melting snowflakes.
  • Snow-crystal and polyhedral particle models: square pyramids, square-pyramid stacks, bullet rosettes, sector snowflakes, dendritic snowflakes, and bounded Voronoi irregular aggregates.
  • Empirical melting-snow media: uniform multiphase melting particles, two-layer core-shell melting snow, and radial multiphase melting snow.
  • Tests for geometry, dielectric/media behavior, voxelization, and solver-input independence.
  • CPC-oriented validation helpers and reproducible benchmark scripts for mesh volume, Rayleigh-limit spheres, and effective-medium endpoint checks.
  • Optional package extension for direct TransitionMatrices.jl shape conversion of spheres, spheroids, cylinders, and hexagonal prisms.
using ParticleModels

shape = Spheroid(1.0e-3, 0.6e-3)
medium = HomogeneousMedium(ConstantPermittivity(ComplexF64(3.2 - 0.02im)))
p = Particle(shape, medium)

grid = voxelize(p; dx=0.1e-3, frequency=10e9, temperature=273.15)
tm_input = to_transition_matrices(p; frequency=10e9, temperature=273.15)

The package is designed as a preprocessing layer rather than a solver-specific wrapper. TransitionMatrices.jl integration is intentionally isolated in an adapter so the core package can still load without any scattering solver installed.

To enable concrete TransitionMatrices.jl shape objects:

using ParticleModels, TransitionMatrices

tm_shape = to_transition_matrices_shape(p; frequency=10e9, temperature=273.15)
input = transition_matrix_input(p; frequency=10e9, temperature=273.15)

Run validation benchmarks with:

julia --project=. benchmark/run_validation.jl

Registration

The package is prepared for registration in Julia's General registry as ParticleModels. After pushing the repository to https://github.com/JuliaRemoteSensing/ParticleModels.jl, trigger registration with:

@JuliaRegistrator register

See REGISTRATION.md for the full checklist.

About

Particle geometry and material models for electromagnetic scattering simulations in Julia.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages