Parallel Vibro-Acoustic Solver#240
Conversation
|
Dear @Andiiiiiii. Thank you for your contribution. Could you write a commit message that explains a bit the target of this software? What does it do and accomplish as well as provide some context. Furthermore, you seem to have committed over 500+ .vtu files. We do not archives results with the code gallery software, but just the software itself. Could you please remove those from your pull request? Cheers |
|
Dear @blaisb , thank you very much for reviewing my contribution! As requested, I removed the vtu files and added a short commit message describing what this code does. In addition, all of the equations and the problem solved is extensively described in the readme file. Thanks again for reviewing! |
bangerth
left a comment
There was a problem hiding this comment.
Very cool -- I love these sorts of applications!
I have a couple of comments, but nothing big. If you have addressed everything, please squash all your commits into one and let us know!
| Elastodynamic equations | ||
| ----------------------- | ||
|
|
||
| The behavior of the structure \f$ \Omega_S \f$ is modelled by means of the linear elastodynamic equations, which are given in strong form as |
There was a problem hiding this comment.
Here and below, would you mind turning \f$ into just $? We have scripts that make this translation automatically.
There was a problem hiding this comment.
Thanks, I implemented the changes
| In the figure below, the STL obtained in the present work is compared with measurement data from [3], with results from a commercial FEM software reported in [1] for a single random seed in the diffuse sound field, and with the corresponding average STL over multiple random seeds as presented in [2]. Overall, the STL calculations are sensitive to the choice of random seeds for the diffuse sound field. | ||
|
|
||
|  |
There was a problem hiding this comment.
This is not necessary for the code gallery program, but if you'd like to expand on this for my own education because I'm not an acoustical engineer (and likely neither are the other potential readers of this program): The STL is in the range of 30-60 dB. What does that actually means? Is that the attenuation? So 30 dB = 3 Bel attenuation = a factor of 1000 in energy = a factor of 30 in sound amplitude? That would be noticeable: a loud street at 100 dB down to a room with 70 dB (not quiet, but not loud either).
I imagine that some of the spikes are caused by resonances between the two volumes, right? If you happen to have png files that show the solution, that might be cool to add as well!
There was a problem hiding this comment.
Dear @bangerth thank you for your comment.
I added a png file showing the solution for the first resonance frequency of the concrete wall and the corresponding sound pressure. Moreover, I added the explanation in the Readme file, that "The STL ranges between 30 and 60 dB, which corresponds to the incident sound power being between
You are right that the sound pressure is proportional to the square root of sound power. However, one cannot derive sound pressure solely from sound power/sound transmission loss. The sound pressure in the receiving room depends also on other parameters such as the sound absorption behavior of the room.
Therefore, the STL indicates how much sound power is reduced by the wall, but it does not directly determine the sound pressure level in the receiving room.
| Ideas for extensions | ||
| -------------------- | ||
|
|
||
| * Implementation of a QuadratureCache class to store calculated data for single cells to be reused for different frequencies, similar to that in [step-62](https://dealii.org/current/doxygen/deal.II/step_62.html). |
There was a problem hiding this comment.
| * Implementation of a QuadratureCache class to store calculated data for single cells to be reused for different frequencies, similar to that in [step-62](https://dealii.org/current/doxygen/deal.II/step_62.html). | |
| * Implementation of a QuadratureCache class to store calculated data for single cells to be reused for different frequencies, similar to that in step-62. |
| @@ -0,0 +1,80 @@ | |||
| 50 51.4448 | |||
There was a problem hiding this comment.
I think it might not be worth including this file. It is generated by the program, right?
There was a problem hiding this comment.
yes, I removed it. Thanks for the hint.
760792c to
ac7b671
Compare
|
Dear @bangerth @blaisb @marcfehling thank you for your comments and review. |
marcfehling
left a comment
There was a problem hiding this comment.
Your code does not seem to compile on our testers. Can you have a second look about the following:
2026-04-25T14:01:34.2273751Z [ 50%] Building CXX object CMakeFiles/parallel_vibroacoustic_solver.dir/parallel_vibroacoustic_solver.cc.o
2026-04-25T14:01:42.9022527Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc: In instantiation of ‘void VibroAcousticProblem::HarmonicResponse<dim>::solve() [with int dim = 3]’:
2026-04-25T14:01:42.9025323Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1243:5: required from ‘void VibroAcousticProblem::HarmonicResponse<dim>::run(bool) [with int dim = 3]’
2026-04-25T14:01:42.9027180Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1328:30: required from here
2026-04-25T14:01:42.9029417Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1184:38: error: no matching function for call to ‘dealii::PETScWrappers::SparseDirectMUMPS::SparseDirectMUMPS(dealii::SolverControl&, ompi_communicator_t*&)’
2026-04-25T14:01:42.9030641Z 1184 | PETScWrappers::SparseDirectMUMPS solver(solver_control, mpi_communicator);
2026-04-25T14:01:42.9031097Z | ^~~~~~
2026-04-25T14:01:42.9031662Z In file included from /usr/local/include/deal.II/lac/generic_linear_algebra.h:28,
2026-04-25T14:01:42.9032287Z from /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:31:
2026-04-25T14:01:42.9033575Z /usr/local/include/deal.II/lac/petsc_solver.h:781:5: note: candidate: ‘dealii::PETScWrappers::SparseDirectMUMPS::SparseDirectMUMPS(dealii::SolverControl&, const dealii::PETScWrappers::SparseDirectMUMPS::AdditionalData&)’
2026-04-25T14:01:42.9034466Z 781 | SparseDirectMUMPS(SolverControl &cn,
2026-04-25T14:01:42.9034741Z | ^~~~~~~~~~~~~~~~~
2026-04-25T14:01:42.9035703Z /usr/local/include/deal.II/lac/petsc_solver.h:782:45: note: no known conversion for argument 2 from ‘MPI_Comm’ {aka ‘ompi_communicator_t*’} to ‘const dealii::PETScWrappers::SparseDirectMUMPS::AdditionalData&’
2026-04-25T14:01:42.9036575Z 782 | const AdditionalData &data = AdditionalData());
2026-04-25T14:01:42.9036919Z | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
2026-04-25T14:01:42.9037819Z /usr/local/include/deal.II/lac/petsc_solver.h:769:9: note: candidate: ‘dealii::PETScWrappers::SparseDirectMUMPS::SparseDirectMUMPS(const dealii::PETScWrappers::SparseDirectMUMPS&)’
2026-04-25T14:01:42.9038614Z 769 | class SparseDirectMUMPS : public SolverBase
2026-04-25T14:01:42.9038878Z | ^~~~~~~~~~~~~~~~~
2026-04-25T14:01:42.9039271Z /usr/local/include/deal.II/lac/petsc_solver.h:769:9: note: candidate expects 1 argument, 2 provided
2026-04-25T14:01:42.9040282Z /usr/local/include/deal.II/lac/petsc_solver.h:769:9: note: candidate: ‘dealii::PETScWrappers::SparseDirectMUMPS::SparseDirectMUMPS(dealii::PETScWrappers::SparseDirectMUMPS&&)’
2026-04-25T14:01:42.9041140Z /usr/local/include/deal.II/lac/petsc_solver.h:769:9: note: candidate expects 1 argument, 2 provided
2026-04-25T14:01:42.9042796Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc: In instantiation of ‘void VibroAcousticProblem::HarmonicResponse<dim>::calculate_magnitude() [with int dim = 3]’:
2026-04-25T14:01:42.9044340Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1247:5: required from ‘void VibroAcousticProblem::HarmonicResponse<dim>::run(bool) [with int dim = 3]’
2026-04-25T14:01:42.9045388Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1328:30: required from here
2026-04-25T14:01:42.9046758Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1196:36: error: conversion from ‘dealii::PETScWrappers::internal::VectorReference’ to non-scalar type ‘const std::complex<double>’ requested
2026-04-25T14:01:42.9047748Z 1196 | const std::complex<double> value = locally_relevant_solution[i];
2026-04-25T14:01:42.9048245Z | ^~~~~
2026-04-25T14:01:43.0747210Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc: In instantiation of ‘double VibroAcousticProblem::HarmonicResponse<dim>::cell_receiver_sound_power(const dealii::FEFaceValuesBase<dim>&, const dealii::FEFaceValuesBase<dim>&, const double&) [with int dim = 3]’:
2026-04-25T14:01:43.0750890Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1094:27: required from ‘double VibroAcousticProblem::HarmonicResponse<dim>::receiver_sound_power() [with int dim = 3]’
2026-04-25T14:01:43.0753059Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1249:50: required from ‘void VibroAcousticProblem::HarmonicResponse<dim>::run(bool) [with int dim = 3]’
2026-04-25T14:01:43.0754303Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1328:30: required from here
2026-04-25T14:01:43.0755778Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1155:54: error: cannot convert ‘std::vector<std::complex<double> >’ to ‘std::vector<double, std::allocator<double> >&’
2026-04-25T14:01:43.0756751Z 1155 | local_dof_values_pressure);
2026-04-25T14:01:43.0757131Z | ^~~~~~~~~~~~~~~~~~~~~~~~~
2026-04-25T14:01:43.0757457Z | |
2026-04-25T14:01:43.0757806Z | std::vector<std::complex<double> >
2026-04-25T14:01:43.0758252Z In file included from /usr/local/include/deal.II/fe/fe_values_base.h:33,
2026-04-25T14:01:43.0758674Z from /usr/local/include/deal.II/fe/fe_values.h:32,
2026-04-25T14:01:43.0759261Z from /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:23:
2026-04-25T14:01:43.0761546Z /usr/local/include/deal.II/fe/fe_values_views.h:339:67: note: initializing argument 2 of ‘void dealii::FEValuesViews::Scalar<dim, spacedim>::get_function_values(const dealii::ReadVector<Number>&, std::vector<typename dealii::ProductType<Number, double>::type>&) const [with Number = double; int dim = 3; int spacedim = 3; typename dealii::ProductType<Number, double>::type = double]’
2026-04-25T14:01:43.0763139Z 339 | std::vector<solution_value_type<Number>> &values) const;
2026-04-25T14:01:43.0763543Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
2026-04-25T14:01:43.0765134Z /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:1160:34: error: cannot convert ‘std::vector<dealii::Tensor<1, 3, std::complex<double> >, std::allocator<dealii::Tensor<1, 3, std::complex<double> > > >’ to ‘std::vector<dealii::Tensor<1, 3>, std::allocator<dealii::Tensor<1, 3> > >&’
2026-04-25T14:01:43.0766364Z 1160 | locally_relevant_solution, local_dof_values_displacement);
2026-04-25T14:01:43.0767053Z | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-04-25T14:01:43.0767327Z | |
2026-04-25T14:01:43.0767831Z | std::vector<dealii::Tensor<1, 3, std::complex<double> >, std::allocator<dealii::Tensor<1, 3, std::complex<double> > > >
2026-04-25T14:01:43.0768427Z In file included from /usr/local/include/deal.II/fe/fe_values_base.h:33,
2026-04-25T14:01:43.0768801Z from /usr/local/include/deal.II/fe/fe_values.h:32,
2026-04-25T14:01:43.0769330Z from /__w/code-gallery/code-gallery/Parallel_Vibro-Acoustic_Solver/parallel_vibroacoustic_solver.cc:23:
2026-04-25T14:01:43.0771531Z /usr/local/include/deal.II/fe/fe_values_views.h:948:67: note: initializing argument 2 of ‘void dealii::FEValuesViews::Vector<dim, spacedim>::get_function_values(const dealii::ReadVector<Number>&, std::vector<typename dealii::ProductType<Number, dealii::Tensor<1, spacedim> >::type>&) const [with Number = double; int dim = 3; int spacedim = 3; typename dealii::ProductType<Number, dealii::Tensor<1, spacedim> >::type = dealii::Tensor<1, 3>]’
2026-04-25T14:01:43.0773337Z 948 | std::vector<solution_value_type<Number>> &values) const;
2026-04-25T14:01:43.0773698Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
2026-04-25T14:01:44.3025897Z make[2]: *** [CMakeFiles/parallel_vibroacoustic_solver.dir/build.make:76: CMakeFiles/parallel_vibroacoustic_solver.dir/parallel_vibroacoustic_solver.cc.o] Error 1
2026-04-25T14:01:44.3027336Z make[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/parallel_vibroacoustic_solver.dir/all] Error 2
2026-04-25T14:01:44.3029041Z make: *** [Makefile:91: all] Error 2
8363893 to
628acdf
Compare
|
@marcfehling Thanks for your comment! The requested change is implemented. I tested the code with deal.ii 9.6.0 and on my machine it compiles and runs without errors. |
Thanks for clarifying! In that case, may I ask you to add a check into your You can actually use the configuration from step-62, but skip the HDF5 part. Our deal.II installation for continuous integration may not feature PETSc with complex support. We might need to skip your program for testing. Let's do this in a separate pull request if necessary. |
82092cb to
65f2282
Compare
|
Dear @marcfehling Thanks, the configuration check in CMakeLists.txt indeed makes sense! I implemented the configuration check according to step-62. |
|
@Andiiiiiii Do you mind rebasing? That should hopefully make the CI pass. |
|
@masterleinad I fetched and rebased onto origin/master, but the branch is already up to date, so no changes were applied. |
@masterleinad Our docker image does not come with a PETSc installation that features complex numbers. I suggest to manually exclude the test in our CI in a separate PR. |
Update Parallel_Vibro-Acoustic_Solver/CMakeLists.txt
b2a260f to
91388c4
Compare
Add Parallel_Vibro-Acoustic_Solver to code gallery