Acoustic simulation with high frequency (ex. 1 MHz)
-
wrote on 23 Sept 2020, 07:28 last edited by
Hi,
using a high fundamental frequency (1 MHz for example) leads to a heavy acoustic simulation and running it on GPU fails. How can I face this issue? There is a strategy to cope it?
Thanks -
wrote on 7 Oct 2020, 10:24 last edited by
Dear Annalisa,
it probably doesn't fit in the GPU RAM (typically 4 GB or something like that). You can either go for the slower solver (OpenMP in solver settings which is CPU parrallelized, if you have enough RAM) or if you have multiple GPUs in your machine you can use that.
A good rule of thumb for GPU Acoustic computation is that 1 GB of GPU RAM translated to around 50 MCells.
-
wrote on 8 Oct 2020, 06:41 last edited by
Hi Montanaro! Thank you for your reply.
Could I reduce the computational size by adding a wire block around the focal region voxelized with max cell size suitable for 1MHz (0.15 mm) and the rest of the domain coarser (0.3 mm) ? Does it provide sufficiently accurate results according to your experience? -
wrote on 8 Oct 2020, 07:33 last edited by
Hi Annalisa, you should definitely have at least the minimum suitable grid size everywhere in your simulation (should correspond to default grid setting if I remember correctly).
This corresponds to the material with slowest speed of sound / frequency and then some multiple of this (number of grid points per minimum wavelength) ... Do you by any chance have air in your simulation? maybe replace this with water if that's ok?
Unfortunately, high frequency acoustic simulations require large grid sizes and there aren't many ways around that..
-
wrote on 8 Oct 2020, 07:35 last edited by montanaro 10 Aug 2020, 07:35
Or is there some symmetry in your problem that could be used to cut the domain size in half by using some kind of symmetric boundary condition? I can maybe help with that if that's the case
-
wrote on 8 Oct 2020, 14:26 last edited by
Unfortunately, I am working with a asymmetrical transducer and also Duke is not really symmetrical !
Transducer and Duke are embedded in water. The only air in my computational domain is represented by the internal air in Duke head.
So no chance for the moment.
Thank you in any case -
wrote on 8 Oct 2020, 14:34 last edited by
I'd recommend at least getting rid of the internal air in Duke head and replacing it with water (change the air material properties to that of water). Simulation results shouldn't really change and you should have a grid that is courser.
-
wrote on 9 Oct 2020, 07:54 last edited by
Actually, I use to remove the Duke head from the grid settings in order to effectively restrict the computational domain to the area of interest, as suggested in the acoustic tutorial. Is this correct or I should consider the whole head in the gridding?
-
wrote on 9 Oct 2020, 08:17 last edited by
This is correct but if there is any air in that area you should remove it. The maximum grid step is calculated by looking at all the materials in the simulation and finding the one with the lowest speed of sound (air, around 300 m/s, everything else should be around 1500 m/s except for bone which is higher), and then dividing that by the simulation frequency (and some factor indicating minimum number of grid points per wavelength).
-
wrote on 9 Oct 2020, 08:30 last edited by
But when I remove the head from the grid settings, the material considered for automatic calculation of the max cell step is water (in my case, f=500 kHz, so max step = 0.3 mm). So, I suppose that in voxeling the module takes into account this cell size as the maximum. Correct?
I also tried to include the head in my simulation in order to see the difference in the grid. In this case, the automatic setting for the whole head becomes 2 mm, but in both cases I have the same total number of cells. It seems that the module considers a fixed voxelization of Duke head. That could be possible? -
wrote on 9 Oct 2020, 08:36 last edited by
I'm not sure, but the elements in the grid settings define the size of the grid and also where some grid lines should definitely be (the red lines in the grid). The actual resolution should be calculated based on the materials in the whole simulation domain within the total grid.
Did you mean to say that your default grid settings went from 0.3 mm to 2 mm?
-
wrote on 9 Oct 2020, 09:01 last edited by
I usually change the automatic settings in manual (by including the transducer and the water background and removing Duke): max step 0.3, resolution 0.45 and priority 0. In that way, all the objects in my manual settings (transducer and water background) are set at 0.3 mm. Then in voxeling I include also Duke, but in this way I don't know what is the step used for voxelizing the head.
If I include the head object also in gridding automatically S4L set its cells at 2 mm as maximum size, and the rest of the domain at 0.3 mm.
Both cases result in the same total number of cells in the whole computational domain.
For answering your question: when I include also the head as a grid object, the automatic grid settings of the ONLY head are automatically set at 2 mm (with no action by myself). -
wrote on 9 Oct 2020, 09:19 last edited by
Oh I see, but if you use manual grid settings then you should really be careful that the resolution is fine enough. I would suggest making some tests: make your resolution finer and see how much your results change. Hopefully they don't change much (maybe within a few percent).
-
wrote on 9 Oct 2020, 09:32 last edited by
Moving to manual settings, I kept the same step and resolution as the default automatic values. I only changed the priority from 50 to 0 in order to remove the red lines and reduce the number of cells I had. (that was a suggestion from a colleague of mine). Anyway, I will make some tests. Thank you for your suggestions.
-
wrote on 17 Dec 2020, 23:11 last edited by
For the Acoustic Simulation, only the LAPWE model can use the GPU?
-
wrote on 18 Dec 2020, 16:28 last edited by
Yes, that is correct
-
wrote on 14 Oct 2021, 10:58 last edited by Hank_H
@montanaro It is possible to do the modeling HIFU brain tumor ablation in Sim4Life.
If setting the operating frequency over 1 MHz, the computational size will be much bigger. -
wrote on 14 Oct 2021, 11:29 last edited by
Yes, unfortunately there are no real work arounds for that.. You need to simulate at least 10 points per wavelength (speed of sound of medium / frequency), - this is what your minimum spatial resolution should be to have results that make sense.
-
Yes, unfortunately there are no real work arounds for that.. You need to simulate at least 10 points per wavelength (speed of sound of medium / frequency), - this is what your minimum spatial resolution should be to have results that make sense.
wrote on 14 Oct 2021, 12:19 last edited by@montanaro Thanks for your clarification.