Home > atmlab > mie > mie_nmax.m

mie_nmax

PURPOSE ^

Computation of Mie Efficiencies for given

SYNOPSIS ^

function result = mie_nmax(m, x, nmax)

DESCRIPTION ^

 Computation of Mie Efficiencies for given 
 complex refractive-index ratio m=m'+im", 
 size parameter x=k0*a, where k0= wave number in ambient 
 medium, a=sphere radius, using complex Mie Coefficients
 an and bn for n=1 to freely given value of nmax>=1.
 Bohren and Huffman (1983) BEWI:TDD122, p. 103,119-122,477.
 Result: m', m", x, efficiencies for extinction (qext), 
 scattering (qsca), absorption (qabs), backscattering (qb), 
 asymmetry parameter (asy=<costeta>) and (qratio=qb/qsca).
 Uses the function "Mie_ab" for an and bn, for n=1 to nmax.
 C. M�zler, May 2002, revised July 2002.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mie_nmax.m

SOURCE CODE ^

0001 function result = mie_nmax(m, x, nmax)
0002 % Computation of Mie Efficiencies for given
0003 % complex refractive-index ratio m=m'+im",
0004 % size parameter x=k0*a, where k0= wave number in ambient
0005 % medium, a=sphere radius, using complex Mie Coefficients
0006 % an and bn for n=1 to freely given value of nmax>=1.
0007 % Bohren and Huffman (1983) BEWI:TDD122, p. 103,119-122,477.
0008 % Result: m', m", x, efficiencies for extinction (qext),
0009 % scattering (qsca), absorption (qabs), backscattering (qb),
0010 % asymmetry parameter (asy=<costeta>) and (qratio=qb/qsca).
0011 % Uses the function "Mie_ab" for an and bn, for n=1 to nmax.
0012 % C. M�zler, May 2002, revised July 2002.
0013 
0014 if x==0                 % To avoid a singularity at x=0
0015     result=[0 0 0 0 0 1.5];
0016 elseif x>0              % This is the normal situation
0017     n1=nmax-1;
0018     n=(1:nmax);cn=2*n+1; c1n=n.*(n+2)./(n+1); c2n=cn./n./(n+1);
0019     x2=x.*x;
0020     f=mie_ab(m,x);
0021     anp=(real(f(1,1:nmax))); anpp=(imag(f(1,1:nmax)));
0022     bnp=(real(f(2,1:nmax))); bnpp=(imag(f(2,1:nmax)));
0023     g1(1:4,nmax)=[0; 0; 0; 0]; % displaced numbers used for
0024     g1(1,1:n1)=anp(2:nmax);    % asymmetry parameter, p. 120
0025     g1(2,1:n1)=anpp(2:nmax);
0026     g1(3,1:n1)=bnp(2:nmax);
0027     g1(4,1:n1)=bnpp(2:nmax);   
0028     dn=cn.*(anp+bnp);
0029     q=sum(dn);
0030     qext=2*q/x2;
0031     en=cn.*(anp.*anp+anpp.*anpp+bnp.*bnp+bnpp.*bnpp);
0032     q=sum(en);
0033     qsca=2*q/x2;
0034     qabs=qext-qsca;
0035     fn=(f(1,1:nmax)-f(2,1:nmax)).*cn;
0036     gn=(-1).^n;
0037     f(3,1:nmax)=fn.*gn;
0038     q=sum(f(3,1:nmax));
0039     qb=q*q'/x2;
0040     asy1=c1n.*(anp.*g1(1,:)+anpp.*g1(2,:)+bnp.*g1(3,:)+bnpp.*g1(4,:));
0041     asy2=c2n.*(anp.*bnp+anpp.*bnpp);
0042     asy=4/x2*sum(asy1+asy2)/qsca;
0043     qratio=qb/qsca;
0044     result=[qext qsca qabs qb asy qratio];
0045 end;

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