Repository navigation
Conversation
…a sphere pytta.analytic gives analytic sound fields, as the Monopole tools of the ITA-Toolbox: the free-field Green's function, a point source over an impedance plane (image source with the plane-wave reflection factor), a plane wave, and a plane wave scattered by a sphere of given surface admittance (series of Mechel, Formulas of Acoustics). Tests check the form and reciprocity of the Green's function, the rigid and pressure-release limits of the impedance plane and its reflection at normal incidence, and that the field around the sphere meets its boundary condition for a rigid and an absorbing sphere. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Adds
pytta.analytic, analytic sound fields as the Monopole tools of the ITA-Toolbox (ita_analytic_green_function,ita_analytic_plane_waveandita_analytic_plane_wave_on_sphere):green(f, source, points): the free-field Green's function exp(-jkr) / (4πr).green_impedance_plane(f, source, points, Z): a point source over the plane z = 0 of surface impedance Z. It is the free field plus the image source weighted by the plane-wave reflection factor at the specular angle, R = (Z cos θ - ρc) / (Z cos θ + ρc). This is the usual approximation. It is exact for a rigid or a pressure-release plane, and it leaves out the ground wave of the exact solution. The docstring states this.plane_wave(f, direction, points, origin): exp(-jk u·(r - r0)).plane_wave_on_sphere(f, radius, points, admittance=0, max_order=80): the field scattered by a sphere of normalized surface admittance β, with the incident field. It uses the series of Mechel (Formulas of Acoustics), whichita_analytic_plane_wave_on_spherealso uses: p_scat = Σ (2m + 1)(-j)^m D_m P_m(cos θ) h_m(kr), with D_m set by the boundary condition dp/dr = jkβp at r = a.The time dependence is exp(jωt), so outgoing waves go as exp(-jkr) and use the spherical Hankel function h_m = j_m - j y_m.
The tests in
tests/test_analytic.pyprint the measured differences:Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of
development(3 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com