Home > atmlab > mie > miecoated_ab2.m

miecoated_ab2

PURPOSE ^

Basic computation of Mie Coefficients, a_n, b_n,

SYNOPSIS ^

function result = miecoated_ab2(m1,m2,x,y)

DESCRIPTION ^

 Basic computation of Mie Coefficients, a_n, b_n, 
 of orders n=1 to nmax, complex refractive index m=m'+im", 
 and size parameters x=k0*a, y=k0*b where k0= wave number 
 in the ambient medium for coated spheres, a=inner radius,
 b=outer radius m1,m2=inner,outer refractive index; 
 p. 183 in Bohren and Huffman (1983) BEWI:TDD122
 C. M�zler, July 2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

miecoated_ab2.m

SOURCE CODE ^

0001 function result = miecoated_ab2(m1,m2,x,y)
0002 
0003 % Basic computation of Mie Coefficients, a_n, b_n,
0004 % of orders n=1 to nmax, complex refractive index m=m'+im",
0005 % and size parameters x=k0*a, y=k0*b where k0= wave number
0006 % in the ambient medium for coated spheres, a=inner radius,
0007 % b=outer radius m1,m2=inner,outer refractive index;
0008 % p. 183 in Bohren and Huffman (1983) BEWI:TDD122
0009 % C. M�zler, July 2002
0010 
0011 m=m2/m1;
0012 nmax=round(2+y+4*y.^(1/3));
0013 n=(1:nmax); nu = (n+0.5); 
0014 u=m1*x; v=m2*x; w=m2*y;
0015 su=sqrt(0.5*pi*u);sv=sqrt(0.5*pi*v);sw=sqrt(0.5*pi*w);sy=sqrt(0.5*pi*y);
0016 pu=su.*besselj(nu,u); py=sy.*besselj(nu,y);
0017 pv=sv.*besselj(nu,v); pw=sw.*besselj(nu,w);
0018 p1u=[sin(u), pu(1:nmax-1)]; p1y=[sin(y), py(1:nmax-1)];
0019 p1v=[sin(v), pv(1:nmax-1)]; p1w=[sin(w), pw(1:nmax-1)];
0020 ppv=p1v-n.*pv./v; ppw=p1w-n.*pw./w; ppy=p1y-n.*py./y;
0021 chv=-sv.*bessely(nu,v); 
0022 chw=-sw.*bessely(nu,w);
0023 chy=-sy.*bessely(nu,y);
0024 ch1v=[cos(v), chv(1:nmax-1)]; ch1w=[cos(w), chw(1:nmax-1)];
0025 ch1y=[cos(y), chy(1:nmax-1)]; 
0026 gsy=py-i*chy;
0027 gs1y=p1y-i*ch1y; gspy=gs1y-n.*gsy./y;
0028 du=p1u./pu-n./u; dv=p1v./pv-n./v; dw=p1w./pw-n./w;
0029 chpv=ch1v-n.*chv./v; chpw=ch1w-n.*chw./w; 
0030 
0031 aan=pv.*(m.*du-dv)./(m.*du.*chv-chpv);
0032 bbn=pv.*(m.*dv-du)./(m.*chpv-du.*chv);
0033 
0034 a1=ppw-aan.*chpw;
0035 a2=pw-aan.*chw;
0036 b1=ppw-bbn.*chpw; b2=pw-bbn.*chw; 
0037 an=(py.*a1-m2.*ppy.*a2)./(gsy.*a1-m2.*gspy.*a2);
0038 bn=(m2.*py.*b1-ppy.*b2)./(m2.*gsy.*b1-gspy.*b2);
0039 
0040 result=[an; bn];

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