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.fem, a finite element solver for the Helmholtz equation in air with linear tetrahedra, the counterpart of the fluid FEM application of the ITA-Toolbox:with K and M the stiffness and mass matrices of the fluid, M_s the mass matrix of a boundary surface of normalized admittance β_s = ρc / Z_s, and N_s u_s the load of a surface vibrating with normal velocity u_s into the fluid, for exp(jωt).
box_mesh(Lx, Ly, Lz, nx, ny, nz): a tetrahedral mesh of a box, six tetrahedra per hexahedron, with the boundary triangles of each side.assemble(nodes, tets)andsurface_mass(nodes, triangles): the sparse matrices.modes(nodes, tets, num, c): eigenfrequencies and mode shapes of the rigid-walled cavity.harmonic(nodes, tets, freq, velocity, admittance, faces, c, rho): the pressure at the nodes with vibrating and absorbing surfaces.The formulation is the standard one (Ihlenburg, Finite Element Analysis of Acoustic Scattering, 1998; Zienkiewicz, Taylor and Zhu, The Finite Element Method). The ITA FluidFEM application belongs to a part of the ITA-Toolbox whose license is "all rights reserved", so nothing was taken from it. Other meshes can be passed as node and tetrahedron arrays, e.g. from a mesh generator.
The tests in
tests/test_fem.pycompare with analytic fields 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