Home > atmlab > mie > mierayleighxscan1.m

mierayleighxscan1

PURPOSE ^

Computation and plot of Mie Efficiencies

SYNOPSIS ^

function result = mierayleighxscan1(m, nsteps, dx, xmax, nmax)

DESCRIPTION ^

 Computation and plot of Mie Efficiencies 
 and comparison with Rayleigh Approximation for given 
 complex refractive-index ratio m=m'+im" 
 and range of size parameters x=k0*a, 
 starting at x=0 with nsteps increments of dx
 a=sphere radius, using complex Mie coefficients an and bn 
 according to Bohren and Huffman (1983) BEWI:TDD122
 result: m', m", x, efficiencies for extinction (qext), 
 scattering (qsca), absorption (qabs), backscattering (qb), 
 qratio=qb/qsca and asymmetry parameter (asy=<costeta>).
 nmax is a maximum order of spherical functions used only if
 d is to be computed (line 22)
 C. M�zler, May 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mierayleighxscan1.m

SOURCE CODE ^

0001 function result = mierayleighxscan1(m, nsteps, dx, xmax, nmax)
0002 
0003 % Computation and plot of Mie Efficiencies
0004 % and comparison with Rayleigh Approximation for given
0005 % complex refractive-index ratio m=m'+im"
0006 % and range of size parameters x=k0*a,
0007 % starting at x=0 with nsteps increments of dx
0008 % a=sphere radius, using complex Mie coefficients an and bn
0009 % according to Bohren and Huffman (1983) BEWI:TDD122
0010 % result: m', m", x, efficiencies for extinction (qext),
0011 % scattering (qsca), absorption (qabs), backscattering (qb),
0012 % qratio=qb/qsca and asymmetry parameter (asy=<costeta>).
0013 % nmax is a maximum order of spherical functions used only if
0014 % d is to be computed (line 22)
0015 % C. M�zler, May 2003.
0016 
0017 nx=(1:nsteps)';
0018 x=0.1+(nx-1)*dx;
0019 for j = 1:nsteps,
0020     a(j,:)=mie(m,x(j));        % Full Mie Solution
0021     b(j,:)=mie_1(m,x(j),xmax); % Rayleigh Approximation (1st order)
0022  %   c(j,:)=mie_2(m,x(j),xmax); % Second Order Approximation
0023  %   d(j,:)=mie_nmax(m,x(j),nmax); % nmax Order of Approximation
0024 end;
0025 m1=real(m); m2=imag(m);
0026 %plot(x,a(:,param),'k-',x,b(:,param),'r-',x,c(:,param),'r-.',x,d(:,param),'k:')
0027 %legend('Mie','Rayleigh','2nd Order','n<=nmax')
0028 %title(sprintf('m = %g + %gi,  nmax = %g',m1,m2,nmax))
0029 param=3;
0030 subplot(1,2,1);
0031 loglog(x,a(:,param),'r-',x,b(:,param),'k--')
0032 title(sprintf('n = %g + %gi',m1,m2))
0033 xlabel('x'), ylabel('Qabs');
0034 param=5;
0035 subplot(1,2,2);
0036 semilogx(x,a(:,param),'r-',x,b(:,param),'k--')
0037 legend('Mie','Rayleigh')
0038 title(sprintf('n = %g + %gi',m1,m2))
0039 xlabel('x'), ylabel('<costeta>');
0040 
0041 %result=a;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005