Home > atmlab > mie > miecoated_ab3.m

miecoated_ab3

PURPOSE ^

Computation of Mie Coefficients, a_n, b_n,

SYNOPSIS ^

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

DESCRIPTION ^

 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
 but using the bottom equation on p. 483 for chi_prime
 C. M�zler, August 2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

miecoated_ab3.m

SOURCE CODE ^

0001 function result = miecoated_ab3(m1,m2,x,y)
0002 
0003 % 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 % but using the bottom equation on p. 483 for chi_prime
0010 % C. M�zler, August 2002
0011 
0012 m=m2/m1;
0013 nmax=round(2+y+4*y.^(1/3));
0014 n=(1:nmax); nu = (n+0.5); 
0015 u=m1*x; v=m2*x; w=m2*y;
0016 su=sqrt(0.5*pi*u);sv=sqrt(0.5*pi*v);sw=sqrt(0.5*pi*w);sy=sqrt(0.5*pi*y);
0017 pu=su.*besselj(nu,u); py=sy.*besselj(nu,y);
0018 pv=sv.*besselj(nu,v); pw=sw.*besselj(nu,w);
0019 p1u=[sin(u), pu(1:nmax-1)]; p1y=[sin(y), py(1:nmax-1)];
0020 p1v=[sin(v), pv(1:nmax-1)]; p1w=[sin(w), pw(1:nmax-1)];
0021 ppv=p1v-n.*pv./v; ppw=p1w-n.*pw./w; ppy=p1y-n.*py./y;
0022 chv=-sv.*bessely(nu,v); 
0023 chw=-sw.*bessely(nu,w);
0024 chy=-sy.*bessely(nu,y); 
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; 
0029 dv=p1v./pv-n./v; 
0030 dw=p1w./pw-n./w;
0031 chpw=chw.*dw-1./pw;
0032 uu=m.*du-dv;
0033 vv=du./m-dv;
0034 pvi=1./pv;
0035 aaa=pv.*uu./(chv.*uu+pvi);
0036 bbb=pv.*vv./(chv.*vv+pvi);
0037 aa1=ppw-aaa.*chpw; aa2=pw-aaa.*chw;
0038 bb1=ppw-bbb.*chpw; bb2=pw-bbb.*chw; 
0039 aa=(py.*aa1-m2.*ppy.*aa2)./(gsy.*aa1-m2.*gspy.*aa2);
0040 bb=(m2.*py.*bb1-ppy.*bb2)./(m2.*gsy.*bb1-gspy.*bb2);
0041 
0042 result=[aa; bb];

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