Repository navigation
Conversation
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.bem, a boundary element solver for the sound radiated by a vibrating closed body into free field. It solves the surface equationby collocation with constant triangular elements, n pointing into the fluid and q = ∂p/∂n = -jωρ v_n (Ciskowski and Brebbia, Boundary Element Methods in Acoustics, 1991; Marburg and Nolte, Computational Acoustics of Noise Propagation in Fluids, 2008).
icosphere(radius, level): a triangulated sphere with outward normals.surface_pressure(nodes, tris, freq, velocity, chief=None, c, rho): the pressure on each element for a normal velocity per element. CHIEF points inside the body (Schenck, J. Acoust. Soc. Am. 44, 1968), ten by default, are added by least squares and remove the irregular frequencies of the surface equation.field(nodes, tris, freq, pressure, velocity, points): the pressure at points in the fluid.The regular integrals use the seven-point rule of Dunavant (1985). On its own element, the 1/r part of G is integrated exactly in polar coordinates around the collocation point, and ∂G/∂n vanishes for a flat element. The ITA-Toolbox has no BEM of its own, only interfaces to external solvers, so this is a new implementation.
The tests in
tests/test_bem.pyuse a sphere of 0.1 m radius with 1280 elements and print 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