RFC: BlochReducer — a Bloch-Floquet periodic boundary-condition operator + phononic crystals examples (band structure, transmission) #31
Replies: 1 comment 1 reply
-
|
Hi Nicolas, First, sorry for my late reply. I was overwhelmed by the teaching and research duties at the end of the semester. Yes! This is something we'd want in TensorMesh! I'd be happy to take the PR and invite you as the core contributor for TensorMesh! A Bloch-Floquet reducer is a clean periodic counterpart to Condenser in the same operator/ family, and it lands right on our roadmap: complex-valued FEM was recently unblocked end-to-end (Helmholtz already validated), and acoustic/metamaterial problems are exactly the follow-up direction we named there. Your reduced operator is complex-Hermitian, so it also exercises the complex assembly + complex LDL^H solve path nicely. Your proposed placement and scope match our conventions almost exactly, so please go ahead. A few small steers so the PR lands smoothly:
One scoping suggestion: keep this first PR to the 2D operator + the three examples + tests + docs (You don't need to translate, just focus on the English version), and do 3D / elastic-wave extensions as follow-ups — easier to review, and we can add a gallery page once it's in. Looking forward to the PR, and great to have you contributing! Best, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I use COMSOL (via
mph) for Python scripting in my research, and TensorMesh isgoing to save me a lot of time — I'll be sure to cite the paper.
Following work on 2D phononic-crystal band-structure and transmission examples, I
would like to discuss whether TensorMesh should gain a small public operator for
Bloch-Floquet periodic boundary conditions for reasearch on metamaterials.
Motivation
Band structures and other Bloch-periodic eigenproblems (phononic/photonic
crystals, lattice dynamics, periodic acoustics) all need the same primitive:
reduce an assembled operator to the independent DOFs of a unit cell with a
wavevector-dependent Floquet phase,
A_r(k) = T(k)ᴴ A T(k),u(r + R) = exp(i k·R) u(r).TensorMesh has no primitive for this today, so every periodic study hand-rolls
the node pairing and the phase reduction (I did this across the phononic examples
before factoring it out). A small operator removes that duplication and is the
natural periodic counterpart of
Condenser(which eliminates Dirichlet DOFs).Proposed scope
A single operator module in the existing operator family:
exported as
tensormesh.BlochReducer, documented indocs/source/api/operator.rstnext toCondenser, plus tests and examples(below). I would not introduce a top-level
tensormesh.blochpackage.Proposed API
An
nn.ModulelikeCondenser(pairing buffers move with.to(device)).Design:
non-orthogonal (e.g. triangular) lattices work;
Tᴴ A Twithout forming T: remap A's COO indices onto the masters,weight by
conj(φ_i) φ_j, coalesce — one pass over the non-zeros;dofs_per_node); partial periodicity (1–3 latticevectors, e.g. a waveguide);
SparseMatrix(→SparseMatrix) or a densetorch.Tensor(→ dense)for hand-assembled beam/truss systems;
setPeriodic) — same spirit asCondenserneeding a boundary mask.I am not attached to the exact name (
BlochReducer/FloquetReducer/ …) or tothe
reduce/expandsurface; I would prefer to match TensorMesh's existingoperator conventions.
Validation plan
tests/operator/test_bloch.py(13 cases): node pairing (square, corner,non-orthogonal), reduction equals an explicit dense
Tᴴ A T, Hermiticity ofthe reduced operator, k=0 (real, phase 1), partial periodicity, vector DOFs,
dense/sparse equivalence;
api/operator.rst);Pressure-Acoustics: square band structure (rigid, ~0.1%), triangular
band structure (penetrable two-medium, non-orthogonal, ~0.5%), finite-slab
transmission (mean |ΔT| 0.007).
Examples
Example-only (no extra public API), depending only on
BlochReducer+ the existing assemblers.Square-lattice band structure — rigid cylinders in water, M-Γ-X-M (~0.1 % vs COMSOL):
Triangular-lattice band structure — penetrable steel in water, non-orthogonal lattice, M-Γ-K-M (~0.5 % vs COMSOL):
Transmission through a finite slab — 10 rigid cylinders, first-order radiation BC (mean |ΔT| 0.007 vs COMSOL):
Working code (operator + tests + examples + docs) is ready on a branch in my fork:
https://github.com/NicolasCayuela/TensorMesh/tree/bloch-floquet%2Bphononic_crystal
Feedback welcome
Mainly I'd like to know whether a Bloch-Floquet periodic operator is something
you'd want in TensorMesh proper. I'm happy to match your conventions — the name,
the file placement, and whether the surface should be
reduce/expandor aCondenser-style__call__are all open. If it's of interest I'll send a PR.Beyond this, I'd like to keep contributing — 3D examples and further work on
metamaterials for elastic and acoustic waves.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions