-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed documentation and tests for polarisability functions
- Loading branch information
Showing
7 changed files
with
20 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
function alpha_CM = polarizability_CM(d, index) | ||
function alpha_CM = CM(spacing, index) | ||
% Clausius-Mossoti Polarizability | ||
% | ||
% Usage | ||
% alpha = polarizability_LDR(spacing, index) | ||
% alpha = CM(spacing, index) | ||
% Calculates a Nx1 element vector containing the isotropic | ||
% polarisabilities for N dipoles. | ||
% | ||
% alpha = polarizability_LDR(spacing, index, kvec, E0) | ||
% As above but specifies the polarisability information for use | ||
% with plane wave illumination. | ||
% | ||
% Parameters | ||
% - spacing (numeric scalar) -- lattice spacing parameter | ||
% - index (Nx1 numeric) -- Relative refractive indices for N dipoles. | ||
% - kvec (1x3 numeric) -- Wave vector [kx, ky, kz] | ||
% - E0 (1x3 numeric) -- E-field polarisation [Ex, Ey, Ez] | ||
|
||
% Based on the script by Vincent Loke. | ||
% This file is part of the optical tweezers toolbox. | ||
% See LICENSE.md for information about using/distributing this file. | ||
|
||
msqr = index(:).^2; | ||
dcube = d^3; | ||
dcube = spacing^3; | ||
|
||
alpha_CM = 3*dcube/(4*pi)*(msqr - 1)./(msqr + 2); % Clausius-Mossotti | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
% +OTT/+UTILS/+POLARIZABILITY Polarizability calculation methods for DDA | ||
% | ||
% polarizability_CM - Clausius-Mossoti Polarizability | ||
% polarizability_FCD - Filtered coupled dipole polarizability | ||
% polarizability_LDR - Lattice dispersion relation polarizablity | ||
% CM - Clausius-Mossoti Polarizability | ||
% FCD - Filtered coupled dipole polarizability | ||
% LDR - Lattice dispersion relation polarizablity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters