Repository navigation
Add near-to-far-field transform and half-wave dipole validation - #81
xtalax-droid wants to merge 12 commits into
Conversation
far_field, radiated_power and directivity transform a MaxwellSolution on a closed interior facet set (Love's currents J = n x H, M = -n x E, outward side away from a centre, H averaged over both cells), validated against the exact radiation of a small current ball. examples/dipole meshes a strip dipole with a lumped-port gap, a Huygens sphere and an absorbing sphere through Gmsh physical groups and finds its resonance, impedance, directivity and pattern; a coarse case runs in the Maxwell group and the full one with FEM_MAXWELL_DIPOLE=1. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-opus-5-5 Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5 Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Measured: togrid takes about 17 s at 1.8e5 cells, not hours. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-opus-5-5 Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5 Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.319 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1c8d1-aeb2-7ac1-b5f4-a4c02df735db, reviewed head a6d4f66
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. Riskmedium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independently assessed from the diff without reading an author rating. Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyJulia 1.10/1.12 or prerelease compatibility, the other test groups including QA, documentation build, and the opt-in full dipole run ( 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…errite API Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
|
Review feedback on this PR has been addressed on head Stacked on #79. Items deliberately left as they are: reaction coefficients that are subnormal but representable are still rejected (conservative); coefficients that cancel to zero only up to roundoff are rejected rather than compared with a tolerance; the absorbing-boundary adjoint derivative uses 0 for the sigma term at omega = 0 although the true limit is finite and nonzero. 🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1ceeb-7c45-77d1-a275-167668d79684, reviewed head 353da16
This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers. CI: green Riskmedium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independent risk recorded before any author rating; verification is in progress. Blocking findingsVerification in progress. Non-blocking findingsVerification in progress. What I ranVerification in progress. What I did not verifyVerification in progress. 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
|
Follow-up to the latest review on head Codex review of the branch approved with no open findings, and all named CI checks are green on this head. Merge commits only; no rebase or force-push. 🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
Depends on #79 (this PR targets its branch, so the diff shows only this layer; it will be retargeted once the layers below merge).
Adds a near-to-far-field transform for
MaxwellModelsolutions and validates it on a Hertzian source and on a strip dipole fed by a lumped port, meshed with Gmsh physical groups.API
far_field(sol, surface, directions; center)returnsE_theta,E_phiofr e^{ikr} E(exp(+iωt)), from Love's equivalent currentsJ = n × HandM = −n × Eon a closed interior facet set (the Huygens surface).radiated_power(sol, surface; method = :flux | :far_field)integrates the Poynting flux through the surface or the radiation intensity over the sphere.directivity(sol, surface, directions)returns4πU / P_far.The surface must be closed, in vacuum, clear of PEC and star-shaped about
center; each condition is checked with a clear error. H is the curl of E averaged over the two cells next to each facet.Validation
Hertzian source (uniform current ball of radius 0.05λ, ABC sphere at 0.75λ, Huygens sphere at 0.3λ, 2.1e4 dofs, Maxwell group): complex E_theta (phase included) within 1% of the exact radiation integral over three φ-cuts and 10–170°, E_phi below 0.5% of the peak, D = 1.505 (exact 1.5), P_far within 1.2% of exact. The flux exceeds the far-field power by 5%: that is the first-order ABC's reflection (about 1/(kR)²), which the outgoing far field does not see.
Strip dipole (
examples/dipole: PEC strip of width 4a with a = 0.005λ, 50 Ω lumped port in the gap, resonance found by a frequency sweep):FEM_MAXWELL_DIPOLE=1)The pattern, directivity and beamwidth agree closely. The resonant length (−2.2% against induced EMF) is still rising as the mesh at the strip is refined (0.437, 0.451, 0.454, 0.456λ), so it is mesh-limited at order 1. R at resonance is 16% above the induced-EMF value; induced EMF is known to under-estimate R for a wire this thick, so treat that reference as soft. The gated full test asserts D within ±0.1 dB, the pattern within 0.2 dB and power balance within 2%, not the impedance bands.
Maxwell group 222/222, QA 21/21.
Docs: a far-field and dipole section in
docs/src/maxwell.md.Review pointers
_far_fieldinsrc/maxwell/farfield.jl: signs and scale (E_θ = −ik/4π (L_φ + η N_θ),E_φ = +ik/4π (L_θ − η N_φ)), checked in complex form by the Hertzian test.examples/dipole/mesh.jlbuilds the grid from Gmsh directly (gmsh_grid) with a node-hash facet lookup:FerriteGmsh.togridmatches facets in O(facets × cells) (about 17 s at 1.8e5 cells, against 0.2 s here), and building a grid by hand fromtonodesassumes node tags are ingetNodesorder.🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-opus-5-5
Review: unreviewed
Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5