Hi,
I am trying to figure out how to set and enclosure to simulate wave propagation in a rectangular room.
Any one have an idea?
Best regards
Adrian
Hi,
I am trying to figure out how to set and enclosure to simulate wave propagation in a rectangular room.
Any one have an idea?
Best regards
Adrian
Hi Adrian,
Unfortunately, there is no easy way to do this using the functionality of the current release of the code (V1.0). The closest would be to set a region around the outside of your domain with a much higher density than the interior.
However, there are some things you could try if you are happy doing some code edits of the simulation functions. For Dirichlet-type boundaries (sound-soft), set the pressure at the edges of the domain to zero, immediately after the pressure is calculated, i.e., in 2D
p(1, :) = 0;
p(end, :) = 0;
p(:, 1) = 0;
p(:, end) = 0;
Similarly, for Neumann-type boundaries (sound-hard), set the normal velocity at the edges of the domain to zero, immediately after the velocity is updated, i.e., in 2D
ux_sgx(1, :) = 0;
ux_sgx(end, :) = 0;
uy_sgy(:, 1) = 0;
uy_sgy(:, end) = 0;
Keep in mind I haven't properly tested this, so it's probably best to do some testing to make sure it's behaving as expected. You may need to use a layer more than one-grid point thick, i.e.,
ux_sgx(1:2, :) = 0;
ux_sgx(end-1:end, :) = 0;
uy_sgy(:, 1:2) = 0;
uy_sgy(:, end-1:end) = 0;
Let me know if you run into any problems.
Brad.
You must log in to post.