Fix farfield rE dimensionalization - #936
Merged
Merged
Conversation
hughcars
force-pushed
the
hughcars/fix-farfield-units
branch
from
September 16, 2026 23:21
48e9a55 to
ebfd5ea
Compare
The radiation-zone field r E_inf written to farfield-rE.csv is a field times a distance, i.e. a voltage, but Measurement::Dimensionalize converted it with Nondimensionalize<FIELD_E> (and the reload path applied the same conversion again). The written values were rE / E_c instead of rE * V_c, off by the factor L_c / Z_0 and hence dependent on the internal characteristic length: for the dipole antenna example (L_c = 12 m) the reported far field was ~31x too small, while a run of the same model with L_c = 1 m gave values 12x larger with every other output unchanged. The radiated power integrated from the written far field was (L_c / Z_0)^2 of the accepted port power; with the correct voltage scale it agrees to 0.3 %. Normalized radiation patterns and the Stratton-Chu kernel (tested against the analytic dipole with the voltage scale) were unaffected. Use the VOLTAGE scale in both conversion directions. The idempotent PostOperator measurement test now carries far-field samples and checks that the conversion round-trips and that |rE| dimensionalizes as the probe field (V/m) times the length scale (m); both checks fail on the previous code.
Multiply the six r*E columns of the five farfield-rE.csv references by Z_0 / L_c, the exact factor of the unit fix in the previous commit (L_c = 12 m for the antenna cases, x31.394193; L_c = 4.5 mm for the CPW lumped cases, x83717.847), leaving all other columns byte-identical. Regenerating the files with the fixed code reproduces the transformed values to <= 6e-6 (MPI partition noise), and the five cases pass the regression suite against them.
hughcars
force-pushed
the
hughcars/fix-farfield-units
branch
from
September 17, 2026 13:00
ebfd5ea to
1167e1a
Compare
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.
Fixes #935