Is it possible to mix nonlinear and linear materials in the same phantom? Thanks.
kWave
A MATLAB toolbox for the timedomain
simulation of acoustic wave fields
heterogeneous medium with nonlinear and linear materials
(3 posts) (3 voices)
Posted 10 years ago #

Hi,
I am only a kwave user (it is therefore not an "official response") but I would say that it is possible by using an heterogeneous "medium.BonA" parameter with 0 in the linear material. However, the calculation will probably be done by kwave with the nonlinear set of equations, even in the linear part of the phantom, what should slow down the calculation compared to a linear simulation.
Once again, my answer is only based on my personal experience of kwave, the development team will probably give you a more precise answer :)
Anthony
Posted 10 years ago # 
Hi Bo,
If you define
medium.BonA
, the nonlinear equations will be used (as Anthony mentions above). However, even if you set medium.BonA to zero in some regions of the domain, the model will still include convective nonlinearity as explained here. It's implemented this way as this makes the most sense physically.Having said that, if you are using the MATLAB code and want to switch off the nonlinearity in regions where BonA is 0, open up the simulation functions and find where rhox, rhoy and rhoz are calculated at the next time step (around line 900 for kspaceFirstOrder3D in V1.0). Then for each line in the nonlinear case, replace
rhox = bsxfun(@times, pml_x, ( bsxfun(@times, pml_x, rhox)  dt.*rho0 .* duxdx ) ./ (1 + 2*dt.*duxdx));
with something like
rhox = bsxfun(@times, pml_x, ( bsxfun(@times, pml_x, rhox)  dt.*rho0 .* duxdx ) ./ (1 + (medium.BonA ~= 0) .* 2*dt.*duxdx));
This will force the convective term to be zero whenever BonA is zero.
Hope that helps,
Brad.
Posted 10 years ago #
Reply
You must log in to post.