Input_args = ) Īfter digging a bit deeper into this, it seems the error comes from the way that k-Wave calculates the acoustic intensity. Medium.sound_speed = smooth(kgrid, medium.sound_speed, true) Source.p = filterTimeSeries(kgrid, medium, source.p, 'PlotSpectrums', false, 'PPW', 2) = makeTime(kgrid, 1510, 0.3, tmax) % time sampling intervals % define a time varying sinusoidal source Source.p = source_mag*sin(2*pi*source_freq.*kgrid.t_array) įrequency = 4 % transducer frequency % define properties of the background medium Kgrid = makeGrid(Nx, dx, Ny, dy) % make computational grid Ny = 333 + 40 % number of pixels in y-direction Nx = 391 % number of pixels in x-direction I was hoping you could help show me where my mistake is, either in the code shown below or my understanding of your previous responses. However, when I run the simulation, the mean acoustic intensity recorded by both detector elements is 1.532e-6 W/m^2, more than an 80% error with respect to the theoretical mean intensity. This way, the mean intensity computed would have a relatively small error if I happened to sample only a fraction of a complete cycle.Īs you mentioned in your previous response, for the speed of sound, mass density, and the source acoustic pressure amplitude I defined in the simulation (1510 m/s, 1020 kg/m^3, and 5 Pa, respectively), I should expect a mean measured acoustic intensity very nearly equal to However, since I did not discretize the time step to ensure sampling of the wave over exactly one cycle, I chose to average over a large number of cycles. As you mentioned in your previous response, computing the average acoustic intensity over exactly one acoustic cycle would yield the correct average intensity I am looking for. I defined two sensor points within the simulation grid, and I computed the mean intensity measured at these sensor points over approximately 2000 acoustic cycles. As a simple test case, I simulated the passage of an acoustic plane wave through a uniform, inviscid medium. Regarding my previous question about simulating plane waves of different frequencies but still having the same time-averaged incident intensities, I wanted to show you some simple code I have been working with that seems to be yielding results that differ from what we would expect. If this is the problem, would you suggest that I just make sure to average over the same number of cycles for both frequencies, or should it not really matter as long as I am averaging over a sufficiently large number of cycles for both? In theory, it appears that averaging over exactly one cycle for each frequency will lead to agreement between the mean measured intensities.Īny information would be very much appreciated. I averaged the intensity for same amount of time in both simulations, so I was thinking the difference might have to do with averaging over more cycles for the higher-frequency source than for the lower-frequency source. As you mentioned, mean intensity should be independent of frequency, so I was hoping you could provide some insight into why I was observing this discrepancy. In particular, I ran two simulations keeping everything the same except the source frequency, but I still measured two different mean acoustic intensities at the sensor positions. Before you responded to my question, I noticed that even the mean acoustic intensity measured during the simulation appeared sensitive to changes in the source frequency. Source.p = source_strength*sin(2*pi*source_freq*kgrid.t_array) Source_strength = sqrt(2*source_intensity*1e4*rho0*c0) % You can use this relationship to define the strength of your source based on the desired time-averaged intensity, irrespective of the frequency. In this case, there is no dependency on the source frequency. For a plane wave, the acoustic pressure and particle velocity are related by p = rho0 * c0 * u, so the time averaged intensity can be computed by I = P^2 / 2 * rho0 * c0, where P is the amplitude of the acoustic pressure. However, if you instead consider the time average acoustic intensity, this only depends on the amplitude of the acoustic pressure and particle velocity. Because of this, it is not possible to define two sources with different frequencies to have the same instantaneous acoustic intensity over time. For a single frequency plane wave, both p and u will be modulated at the source frequency, and thus so will I. The instantaneous acoustic intensity can be defined by I = p * u, where p is the acoustic pressure and u is the particle velocity vector.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |