Home > atmlab > mie > miecoated.m

miecoated

PURPOSE ^

Mie Efficiencies of coated spheres for given complex refractive-index

SYNOPSIS ^

function result = miecoated(m1,m2,x,y,opt)

DESCRIPTION ^

 Mie Efficiencies of coated spheres for given complex refractive-index
 ratios m1=m1'+im1", m2= m2'+im2" of kernel and coating, resp.,
 and size parameters x=k0*a, y=k0*b where k0= wave number in ambient 
 medium, a,b= inner,outer sphere radius, using complex Mie Coefficients
 an and bn for n=1 to nmax,
 s. Bohren and Huffman (1983) BEWI:TDD122, p. 181-185,483.
 Result: m1',m1", m2',m2", x,y, efficiencies for extinction (qext), 
 scattering (qsca), absorption (qabs), backscattering (qb), 
 asymmetry parameter (asy=<costeta>) and (qratio=qb/qsca).
 opt selects the function "miecoated_ab.." for an and bn, n=1 to nmax.
 Note that 0<=x<=y;   C. M�zler, August 2002.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

miecoated.m

SOURCE CODE ^

0001 function result = miecoated(m1,m2,x,y,opt)
0002 
0003 % Mie Efficiencies of coated spheres for given complex refractive-index
0004 % ratios m1=m1'+im1", m2= m2'+im2" of kernel and coating, resp.,
0005 % and size parameters x=k0*a, y=k0*b where k0= wave number in ambient
0006 % medium, a,b= inner,outer sphere radius, using complex Mie Coefficients
0007 % an and bn for n=1 to nmax,
0008 % s. Bohren and Huffman (1983) BEWI:TDD122, p. 181-185,483.
0009 % Result: m1',m1", m2',m2", x,y, efficiencies for extinction (qext),
0010 % scattering (qsca), absorption (qabs), backscattering (qb),
0011 % asymmetry parameter (asy=<costeta>) and (qratio=qb/qsca).
0012 % opt selects the function "miecoated_ab.." for an and bn, n=1 to nmax.
0013 % Note that 0<=x<=y;   C. M�zler, August 2002.
0014 
0015 if x==y                     % To reduce computing time
0016     result=mie(m1,y);
0017 elseif x==0                 % To avoid a singularity at x=0
0018     result=mie(m2,y);
0019 elseif m1==m2
0020     result=mie(m1,y);       % To reduce computing time
0021 elseif x>0                  % This is the normal situation
0022     nmax=round(2+y+4*y.^(1/3));
0023     n1=nmax-1;
0024     n=(1:nmax);cn=2*n+1; c1n=n.*(n+2)./(n+1); c2n=cn./n./(n+1);
0025     y2=y.*y;
0026 if opt==1
0027     f=miecoated_ab1(m1,m2,x,y);
0028 elseif opt==2
0029     f=miecoated_ab2(m1,m2,x,y);
0030 elseif opt==3
0031     f=miecoated_ab3(m1,m2,x,y);
0032 end;
0033     anp=(real(f(1,:))); anpp=(imag(f(1,:)));
0034     bnp=(real(f(2,:))); bnpp=(imag(f(2,:)));
0035     g1(1:4,nmax)=[0; 0; 0; 0]; % displaced numbers used for
0036     g1(1,1:n1)=anp(2:nmax);    % asymmetry parameter, p. 120
0037     g1(2,1:n1)=anpp(2:nmax);
0038     g1(3,1:n1)=bnp(2:nmax);
0039     g1(4,1:n1)=bnpp(2:nmax);   
0040     dn=cn.*(anp+bnp);
0041     q=sum(dn);
0042     qext=2*q./y2;
0043     en=cn.*(anp.*anp+anpp.*anpp+bnp.*bnp+bnpp.*bnpp);
0044     q=sum(en);
0045     qsca=2*q./y2;
0046     qabs=qext-qsca;
0047     fn=(f(1,:)-f(2,:)).*cn;
0048     gn=(-1).^n;
0049     f(3,:)=fn.*gn;
0050     q=sum(f(3,:));
0051     qb=q*q'./y2;
0052     asy1=c1n.*(anp.*g1(1,:)+anpp.*g1(2,:)+bnp.*g1(3,:)+bnpp.*g1(4,:));
0053     asy2=c2n.*(anp.*bnp+anpp.*bnpp);
0054     asy=4/y2*sum(asy1+asy2)/qsca;
0055     qratio=qb/qsca;
0056     result=[qext qsca qabs qb asy qratio];
0057 end;

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