Home > SPlaC v1_0 > Mie > MUL > MulSuscepGDAB.m

MulSuscepGDAB

PURPOSE ^

calculates the Mie susceptibilities for a multilayer sphere problem

SYNOPSIS ^

function CstMulSuscep=MulSuscepGDAB(nNmax,Cs,Cx)

DESCRIPTION ^

 calculates the Mie susceptibilities for a multilayer sphere problem
 i.e. Gamma^k_n, Delta^k_n, A^k_n, and B^k_n for n=1:nNmax and k=1..nK.
 See Section H.5.2 for more details.

 Parameters:
 - nNmax:  integer scalar
 - Cs:     cell K column vectors [L x 1]
           wavelength-dependent relative refractive index for each
           interface s_k = k_{k-1}/k_k (see p. 623)
 - x:      cell of K column vectors [L x 1]
           wavelength-dependent x_k=k_k*a_k (see p. 623)

 Returns: a cell of K structures, each with 4 fields 
          with susceptibilities
          defined in Eqs. H.108 and H.117
 CstMulSuscep{k}.Gamma: Gamma^k_n [L x nNmax]
 CstMulSuscep{k}.Delta: Delta^k_n [L x nNmax]
 CstMulSuscep{k}.A: A^k_n [L x nNmax]
 CstMulSuscep{k}.B: B^k_n [L x nNmax]

 This file is part of the SPlaC v1.0 package (copyright 2008)
 Check the README file for further information

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Extract number of interfaces nK
0002 nK=length(Cx);
0003 nNbLambda=length(Cx{1});
0004 
0005 disp(['Calculating susceptibilities for ' int2str(nK) ' spherical layers'])
0006 
0007 % Calculate the necessary Riccati-Bessel functions
0008 CstRBz=cell(1,nK);
0009 CstRBx=cell(1,nK);
0010 for kk=1:nK
0011     zk=Cs{kk}.*Cx{kk}; % [L x 1]
0012     xk=Cx{kk};  % [L x 1]
0013 
0014     % get psi_n(sk*xk), xi_n(sk*xk) and derivatives
0015     CstRBz{kk}=GenRBall(nNmax,zk);
0016 
0017     % get psi_n(xk), xi_n(xk) and derivatives
0018     CstRBx{kk}=GenRBall(nNmax,xk);
0019 end
0020 
0021 CstMulSuscep=cell(1,nK);
0022 % upward recurrence (see page 623) for Gamma and Delta
0023 % A and B can be calculated at the same time
0024 for kk=1:nK
0025     if kk==1 % implement initial condition inside loop for convenience
0026         Gamkm1=zeros(nNbLambda,nNmax); % [L x N]
0027         Delkm1=Gamkm1; % [L x N]
0028     else
0029         % Get Gamma^{k-1} and Delta^{k-1}
0030         Gamkm1=CstMulSuscep{kk-1}.Gamma; % [L x N]
0031         Delkm1=CstMulSuscep{kk-1}.Delta; % [L x N]
0032     end
0033     
0034     smat=repmat(Cs{kk},1,nNmax);
0035 
0036     % auxialiary functions for Gamma and A
0037     PP1 = GenCheckSum2Mat(CstRBz{kk}.psi, Gamkm1.*CstRBz{kk}.xi,'PP1_1','MulSuscepGDAB');
0038     PP2 = GenCheckSum2Mat(CstRBz{kk}.Dpsi, Gamkm1.*CstRBz{kk}.Dxi,'PP2_1','MulSuscepGDAB');
0039     % Eq. H.112
0040     Dnk=GenCheckSum2Mat(smat .* CstRBx{kk}.xi .* PP2, - PP1 .* CstRBx{kk}.Dxi,'Dnk_1','MulSuscepGDAB');
0041     % Eqs. H.110 and H.111 for Gamma
0042     CstMulSuscep{kk}.Gamma= GenCheckSum2Mat(PP1 .* CstRBx{kk}.Dpsi, ...
0043         - smat .* CstRBx{kk}.psi .* PP2, ...
0044         'Gamma','MulSuscepGDAB') ./ Dnk;
0045     % Eqs. H.118, H.119, H.120 for A
0046     CstMulSuscep{kk}.A= -i*smat./ Dnk;
0047     
0048     % Same method for Delta and B
0049     PP1 = GenCheckSum2Mat(CstRBz{kk}.psi, Delkm1.*CstRBz{kk}.xi,'PP1_2','MulSuscepGDAB');
0050     PP2 = GenCheckSum2Mat(CstRBz{kk}.Dpsi, Delkm1.*CstRBz{kk}.Dxi,'PP2_2','MulSuscepGDAB');
0051     % Eq. H.115
0052     Dnk=GenCheckSum2Mat(smat .* CstRBx{kk}.Dxi .* PP1, - PP2 .* CstRBx{kk}.xi,'Dnk_2','MulSuscepGDAB');
0053     % Eqs. H.113 and H.114
0054     CstMulSuscep{kk}.Delta= GenCheckSum2Mat(PP2 .* CstRBx{kk}.psi, ...
0055         - smat .* CstRBx{kk}.Dpsi .* PP1, ...
0056         'Delta','MulSuscepGDAB') ./ Dnk;
0057     % Eqs. H.121, H.122, H.123 for B
0058     CstMulSuscep{kk}.B= i*smat./ Dnk;
0059 
0060 end

This web page is part of the SPlaC package © 2008. Contact: Eric Le Ru
Generated on Wed 03-Dec-2008 11:10:14 by m2html © 2003 (adapted)