Hi Margot,
Both medium.alpha_coeff
and medium.BonA
can be defined as heterogeneous matrices. One thing to keep in mind is that if you set B/A to zero, this will turn off the material nonlinearity, but there will still be a convective nonlinearity. In other words, setting the nonlinear parameter B/A to zero is not the same as setting the coefficient of nonlinearity beta = 1 + B/2A to zero. If you want to do the latter and you are using the MATLAB code, you can modify the simulation functions to do this. For example, using V1.0 in 2D, open kspaceFirstOrder2D
and replace lines 808 and 809 with:
% force the convective nonlinearity term to be zero in regions of the domain where BonA is zero
rhox = bsxfun(@times, pml_x, ( bsxfun(@times, pml_x, rhox) - dt.*rho0 .* duxdx ) ./ (1 + (medium.BonA ~= 0) .* 2*dt.*duxdx));
rhoy = bsxfun(@times, pml_y, ( bsxfun(@times, pml_y, rhoy) - dt.*rho0 .* duydy ) ./ (1 + (medium.BonA ~= 0) .* 2*dt.*duydy));
Hope that helps,
Brad.