Code covered by the BSD License
 ...
 BHT_operators(r,z,K1,K2,P...Authored by Joshua Soneson 2007
 BHT_parameters(z,r,H)Authored by Joshua Soneson 2007
 BHT_plots(z,r,t,t_peak,Tp...Authored by Joshua Soneson 2007, updated 2010
 KZK_axial_plots(z,Ix,p5,H...Authored by Joshua Soneson 2007
 KZK_operators.mAuthored by Joshua Soneson 2007
 KZK_radial_plots(r,Ir,H,p...Authored by Joshua Soneson 2007
 TDNL(u,U,X,K,J,c,cutoff,P...Authored by Joshua Soneson 2007, updated 2010
 axisymmetricBHT(z,r,H)Authored by Joshua Soneson 2007, updated 2010
 axisymmetricKZK.mAuthored by Joshua Soneson 2008, updated 2010
 computational_grid.mAuthored by Joshua Soneson 2007
 equivalent_time.mAuthored by Joshua Soneson 2007
 initial_condition(J,K,G,r...Authored by Joshua Soneson 2007, updated 2010
 matrixize(v,A,J,K)Authored by Joshua Soneson 2007
 plot_waveform(p0,f,X,z,K)Authored by Joshua Soneson 2007
 timing(p1,p2,t_start,z,d)Authored by Joshua Soneson 2007
 vektorize(v,A,J,K)Authored by Joshua Soneson 2007

View all files
High intensity focused ultrasound simulator
by
Josh Soneson
29 Mar 2011
Simulates high intensity focused ultrasound beams and heating effects in layered media

initial_condition(J,K,G,r,ir,limit)

%% Authored by Joshua Soneson 2007, updated 2010
function[v] = initial_condition(J,K,G,r,ir,limit)
%% Determines the initial condition for the KZK equation. In this
%% case, it's a uniform pressure distribution with a phase shift
%% corresponding to a quadratic approximation of a spherical
%% converging wave, appropriate for above f/1.37.
v = zeros(2*J,K);
for j=1:J
if(abs(r(j))>=ir & abs(r(j))<=limit)
arg = G*r(j)*r(j);
v(j,1) = cos(arg);
v(J+j,1) = sin(arg);
end; end


Contact us