Skip to content

Fix Flat-Ground TM Receiver Sampling in 2D Forward Solver - #52

Merged
pankajkmishra merged 1 commit into
mainfrom
fix/2D-TM-response-receiver-sampling
Oct 11, 2026
Merged

pankajkmishra merged 1 commit into
mainfrom
fix/2D-TM-response-receiver-sampling

Conversation

@pankajkmishra

Copy link
Copy Markdown
Member

Fix flat-ground TM receiver sampling in the 2D forward solver

What was wrong

On flat ground, TM Ey at a station was interpolated between the cell-centre Ey values of the neighbouring cells. Those values leave out the lateral ∂Ez/∂y term. Ey is also discontinuous at a vertical resistivity contact, so interpolating it across a contact mixes the two resistivities. The computed TM field was correct; only the value read at the station was wrong. 1D models are unaffected, which is why half-space and layered checks never caught it. Near lateral contrasts the TM impedance error was large and depended on the mesh: up to 218% on a coarse mesh and 12.6% on a fine mesh for a surface conductor.

What was fixed

  • TM Ey at a station is now the nodal normal current Jy, which is continuous across a contact, interpolated to the station and multiplied by the station cell's own ρ. The nodal Jy comes from the complete surface Ey reconstruction, including ∂Ez/∂y.
  • The rule lives in one helper, _mt2d_tm_receiver_ey, used by both _mt2d_station_impedance and compute_fields_at_receivers_tm.
  • TE responses and the step-dipole treatment next to topography are unchanged.
  • The Fréchet derivatives differentiate the same station function, so they stay consistent.

Validation

  • New test in test/TestForward2D.jl: the exact field at a 10/100 Ωm contact, on uniform and nonuniform cells, with stations on the contact and on nodes. The old code was off by 225% and 327%; the new code matches to 1e-10 relative.
  • The existing forward, Fréchet, topography and inversion tests pass.
  • Against an independent 2D finite-difference reference, TM impedance now agrees within 0.000006% across 5 models, 3 mesh refinements and 2 station layouts. TE output is unchanged.

Note

Stored TM responses near lateral contrasts that were generated with the old sampling will change.

@pankajkmishra pankajkmishra self-assigned this Oct 11, 2026
@pankajkmishra pankajkmishra added the bug Something isn't working label Oct 11, 2026
@pankajkmishra
pankajkmishra merged commit b814e40 into main Oct 11, 2026
4 checks passed
@pankajkmishra
pankajkmishra deleted the fix/2D-TM-response-receiver-sampling branch October 11, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant