Home > SPlaC v1_0 > BookFigures > MakeFig4_2.m

MakeFig4_2

PURPOSE ^

Function to reproduce Fig. 4.2

SYNOPSIS ^

function MakeFig4_2()

DESCRIPTION ^

 Function to reproduce Fig. 4.2
 Example of local field intensity enhancement factor (LFIEF) on the
 surface (at d=1 nm) of a glass and silver sphere of radius 25 nm.
 Note that the third column (dimer) cannot be reproduced with these codes.

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

EXAMPLE OF OUTPUT ^

Example figure output

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%
0002 % Computations
0003 %%%%%%%%%%%%%%%%%%
0004 
0005 global noCheckSum;
0006 noCheckSum=true; % no check for numerical problems (much faster)
0007 % noCheckSum=false; % to check for numerical problems with Mie
0008 
0009 % N_{max} for Mie series
0010 nNmax=50; 
0011 
0012 % sphere radius in nm
0013 a=25;
0014 
0015 % wavelengths (column)
0016 lambda=transpose(300:1:600);
0017 
0018 % dielectric constant of outside medium (real positive)
0019 epsilonM=1.0; % air
0020 
0021 % create, position, and resize figure
0022 scrsz = get(0,'ScreenSize'); % scrsz(3) contains screen width
0023 figAspectRatio=3;
0024 figWidth=3/4*scrsz(3);
0025 figure('Name','Fig. 4.2', ...
0026     'Position',[(scrsz(3)-figWidth)/2 scrsz(4)-150-figWidth/figAspectRatio figWidth figWidth/figAspectRatio]);
0027 
0028 % distance of point from sphere in nm
0029 d=1;
0030 
0031 eGlass=2.25; % glass
0032 eAg=epsAg(lambda);
0033 
0034 % Solve problems using Mie theory
0035 stMGlass=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,eGlass,'noplot','coeff');
0036 stMAg=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,eAg,'noplot','coeff');
0037 % all necessary results are in structures stM
0038 % Note that this results in numerical problems for Q_{Ext}
0039 % for the glass (non-absorbing) sphere.
0040 % These are irrelevant since Q_{Ext}=Q_{Sca} in that case.
0041 
0042 
0043 % define point where LFIEF is calculated
0044 stPtA=struct('x',a+d,'y',0,'z',0);
0045 % Calculate LFIEF at pt A
0046 stEptGlass=PweEpts(lambda,epsilonM,stMGlass,stPtA,'Outside');
0047 stEptAg=PweEpts(lambda,epsilonM,stMAg,stPtA,'Outside');
0048  
0049 
0050 
0051 %%%%%%%%%%%%%%%%%%
0052 % Drawing
0053 %%%%%%%%%%%%%%%%%%
0054 
0055 % Glass sphere
0056 subplot(1,2,1);
0057 plot(lambda,stEptGlass.MLoc);
0058 axis([275 625 2.25 2.81]);
0059 title('Glass sphere in air - a=25nm');
0060 xlabel('Wavelength [nm]');
0061 ylabel('M_{Loc}(A)');
0062     
0063 % Glass sphere
0064 subplot(1,2,2);
0065 semilogy(lambda,stEptAg.MLoc);
0066 axis([275 625 0.5 4000]);
0067 title('Silver sphere in air - a=25nm');
0068 xlabel('Wavelength [nm]');
0069 ylabel('M_{Loc}(A)');

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)