I need an analysis where a point vibration source is placed inside a three-dimensional object, and the resulting frequency and sound level (in decibels) are measured at another point using a virtual microphone. Is there anyone who can help with this?
Have you considered:
combined with:
Thanks. do you have any existing work related to this project or something similar?
The two examples here are fairly basic, therefore I do not have any published papers on this topic.
Maybe @bay_swiss has some work that relates to this?![]()
You need to be more specific. The material that @dokken shared with you is exactly what you need to compute a point source propagating into a 3D domain and retrieve the SPL at a specific point (mic).
Do you need more than this? If yes, what?
thanks. I am working on a vibro-acoustic project that aims to identify the vibration sources in a ship’s engine room as point sources and measure the frequency and sound pressure level (dB) generated by these sources at another specific location.
Then you can follow the 1st link shared by Jorgen, substituting the velocity BC with the point source (the 2nd link).
thank you sir. I had completed code but there is a problem about Complex values.
*import numpy as np*
*from mpi4py import MPI*
*from petsc4py import PETSc*
*from dolfinx import geometry, fem*
*from dolfinx.io import gmshio, XDMFFile*
*from dolfinx.fem import functionspace, Function, Constant*
*from dolfinx.fem.petsc import LinearProblem*
*import ufl*
*from ufl import dx, grad, inner, ds, Measure*
*#msh, cell, facet_tags = gmshio.read_from_msh("air_mesh.msh", MPI.COMM_WORLD, 0, gdim=3)*
*msh, cell, facet_tags = gmshio.read_from_msh("/home/muhammet/Desktop/air_mesh.msh", MPI.COMM_WORLD, 0, gdim=3)*
*#creating frequency axis*
*f_axis = np.arange(50, 1000, 5)*
*#define trial and test funciton*
*V = functionspace(msh,("CG", 2))*
*u = ufl.TrialFunction(V)*
*v = ufl.TestFunction(V)*
*#microphone location*
*mic = np.array([0.05,0.06,0.2])*
*#Defining air characterictis*
*c0 = 340 *
*rho_0 = 1.225*
*omega = Constant(msh, PETSc.ScalarType(0))*
*k0 = Constant(msh, PETSc.ScalarType(0))*
*#normal velocity boundary condition*
*v_n = 0.01*
*#surface impedance*
*Z_s = rho_0*c0*
*#defining bilinear and linear forms*
*ds = Measure("ds", domain=msh, subdomain_data=facet_tags)*
*a = inner(grad(u), grad(v)) * dx - k0**2 * inner(u,v) * dx *
*L = inner(1j*(omega)*(rho_0)*(v_n), v)*ds(2)*
*uh = Function(V)*
*uh.name = "pressure"*
*solver = LinearProblem(a, L, u=uh, petsc_options={"ksp_type" : "preonly" , "pc_type" : "lu" , "pc_factor_mat_solver_type" : "mumps"}) bu kodda hata şu File "/home/muhammet/Desktop/komplex.py", line 49, in <module>*
* solver = LinearProblem(a, L, u=uh, petsc_options={"ksp_type" : "preonly" , "pc_type" : "lu" , "pc_factor_mat_solver_type" : "mumps"})*
in this code error is that:
ValueError: Unexpected complex value in real expression.
Can you help me @dokken @bay_swiss
You need to have the complex version of fenics installed. If you use conda for the install, use the following command:
conda create -n fenics-env-complex-0.9.0 -c conda-forge fenics-dolfinx petsc=*=complex* mpich
to install it.
If instead you used docker, you will need to run:
source /usr/local/bin/dolfinx-complex-mode
to switch to complex mode.
Thank you so much sir, I’m grateful