Dear all,
I am new with k-wave. I started with the ultrasound b-mode example which calls "kspaceFirstOrder3D" and feeds the properties of the heterogeneous medium via fields of "medium", specially: medium.density. But when opened kspaceFirstOrder3D, I did not find anywhere in the code, reading the density of medium. Am I making a mistake? If not, so how does it account for non-homogeneous mediums?
k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
kspacesFirstOrder3D code seems not to get medium density
(3 posts) (2 voices)-
Posted 4 years ago #
-
From a user's perspective, according to the k-Wave Manual v.1.1, section 3.3:
Except for the power law absorption exponent (which must be a scalar), each of the material properties can be defined as either a scalar (if the medium property is homogeneous), or a matrix (if the medium property is heterogeneous). If the parameters are heterogeneous, the input matrix must be the same size as the computational grid, for example:
% create a heterogeneous sound speed for a layered medium in 3D
medium.sound_speed = 1500*ones(kgrid.Nx, kgrid.Ny, kgrid.Nz);
medium.sound_speed(1:layer_size, :, :) = 1600;
The manual is, in my opinion, the most solid way to get started with k-Wave, and the examples greatly complement it. If you really want to start off by inspecting the code directly, please bear in mind that many k-Wave functions make calls to hidden routines (functions and scripts) in the
private/
folder. These calls can be easy to miss if you read the code without knowing what to look for.Posted 4 years ago # -
I am really thankful of your hint.
Posted 4 years ago #
Reply
You must log in to post.