Helmholtz open-arc Dirichlet solver via Bruno-Lintner formulation#178
Open
danfortunato wants to merge 2 commits into
Open
Helmholtz open-arc Dirichlet solver via Bruno-Lintner formulation#178danfortunato wants to merge 2 commits into
danfortunato wants to merge 2 commits into
Conversation
Builds on PRs #172, #174, #175, #176, #177. Adds support for the Bruno-Lintner integral representation of the Helmholtz Dirichlet problem on open curves (or chunkgraphs with corners). The formulation uses a 2x2 block kernel K = [ 0 c*S ; c*T 0 ] solved as (K + I) sigma = [u_bdry; 0]. The system is solved via chunkermat with opts.rcip=true, opts.open_arc_eye=true, and field evaluation via chunkerkerneval with opts.rcipsav and opts.forcewlchs in struct/layout form (selecting the S column of K_eval = [0 c*S] against the recovered fine-mesh density). What's included: * New 'sc' (= c1*S' + c2*S) Helmholtz kernel mode in: chnk.helm2d.kern -- evaluation chnk.helm2d.fmm -- FMM dispatch @kernel.helm2d -- kernel constructor The 'sc' kernel is used for impedance / Neumann boundaries (e.g. photonics K_imp = 2*S' + 2*eta*S). * chunkermat opts.open_arc_eye = true + opts.open_arc_eye_subdim override the (1,1) sub-block of each per-chunker diagonal block with -I before RCIP, so that (sysmat + eye(N)) yields the [0, c*S; c*T, I] system Bruno-Lintner requires. Default subdim=1 (helmos opdims=[2,2]); subdim=2 reserved for the open-arc Stokes mobility (4x4 block kernel) extension. Test: devtools/test/chunkermat_helmopensurface_dirichletTest.m solves the Dirichlet open-arc Helmholtz problem on a chunkgraph with two corner vertices and a smooth boundary data, then evaluates the field at an interior target via the rcipsav + forcewlchs (struct form) path. Relative error vs an adaptive-quadrature reference is ~4e-13. Original implementation contributed by sj90101 <sj90101@gmail.com>. Co-authored-by: sj90101 <sj90101@gmail.com>
Adds the helmos() user-facing open-arc Helmholtz solver and supporting
geometry/planewave/fieldplot helpers, plus a demo, in chunkie/demo/;
plus three test scripts under devtools/test/.
chunkie/demo/:
helmos.m -- geometry-agnostic open-arc Helmholtz solver.
Caller passes a chunkgraph (with all corners/
junctions as vertices), boundary data, and
targets; helmos sets up RCIP with
opts.open_arc_eye + rcipsav field eval.
Dirichlet ('d') is full-accuracy; Neumann ('n')
is formulation-complete but limited by
chunkie's hypersingular 'dp' quadrature.
helmos_planewave_rhs -- Bruno-Lintner-compatible Dirichlet/Neumann
RHS for an incident planewave.
helmos_fieldplot -- regular-grid abs/real/log10err plot.
geo_linesegment -- single open segment chunkgraph builder.
geo_spiral -- log spiral with one free endpoint.
geo_corners -- polygonal chunkgraph with N corner vertices.
helmos_demo -- end-to-end demo: build geometry, solve,
plot scattered field.
devtools/test/:
helmos_smoke.m -- lo/hi self-convergence on 4 geometries
(linesegment, spiral, corners1, corners3);
reports far+near max diffs ~1e-12.
helmos_self_convergence.m -- self-convergence on polygonal corner
+ planewave cases (~1e-14 lo-hi diffs).
forcewlchs_userapi_test.m -- bare chunker + chunkgraph (rcipsav)
forcewlchs API smoke tests, asserts
expected accuracy at d=1e-6 from a corner.
Tests that need helmos.m / geo_* from chunkie/demo/ add that to the
MATLAB path at the top via mfilename('fullpath').
Co-authored-by: sj90101 <sj90101@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on #172, #174, #175, #176, #177. Adds support for the Bruno-Lintner integral representation of the Helmholtz Dirichlet problem on open curves (or chunkgraphs with corners).
The formulation uses a 2x2 block kernel
solved as
(K + I) sigma = [u_bdry; 0]. The system is solved viachunkermatwithopts.rcip=true+opts.open_arc_eye=true; field evaluation useschunkerkernevalwithopts.rcipsav+opts.forcewlchsin struct/layout form.What's included
sc(= c1·S' + c2·S) Helmholtz kernel mode in:chnk.helm2d.kern(evaluation)chnk.helm2d.fmm(FMM dispatch)@kernel.helm2d(kernel constructor)Used for impedance / Neumann boundaries (e.g. photonics
K_imp = 2*S' + 2*eta*S).chunkermatopen-arc options:opts.open_arc_eye = true— overwrite the (1,1) sub-block of each per-chunker diagonal block with-Ibefore RCIP, so thatsysmat + eye(N)yields the[0, c*S; c*T, I]system Bruno-Lintner requires.opts.open_arc_eye_subdim— default 1 (helmos opdims=[2,2]); 2 reserved for the open-arc Stokes mobility 4x4 block kernel extension.Test plan
devtools/test/chunkermat_helmopensurface_dirichletTest.m(new) — solves the Dirichlet open-arc Helmholtz problem on a chunkgraph with two corner vertices, evaluates the field at an interior target via the rcipsav + forcewlchs (struct form) path. Relative error vs adaptive-quadrature reference is ~4e-13.Notes