[Back to B.T. Draine's home page.]
[Last updated 2009.03.09]
Scattering and Absorption of Light by Small Particles
The Discrete Dipole Approximation for Scattering and Absorption of Light
by Irregular Particles
DDSCAT 7.0
DDSCAT, a Fortran code for calculating scattering and absorption
of light by irregular particles, has been jointly developed by
Bruce T. Draine (Dept. of Astrophysical Sciences, Princeton University)
and Piotr J. Flatau (Scripps Institution of Oceanography, UCSD).
The current version is DDSCAT 7.0, which
supersedes previous versions. DDSCAT 7.0 can calculate scattering and
absorption by isolated particles (e.g., dust grains) but can also calculate
scattering and absorption by one- and two-dimensional arrays of "target unit
cells" that may have complex geometries
(Draine & Flatau 2008);
this has obvious applications to
photonics and studies of arrays of nanostructures.
DDSCAT 7.0 is publicly available (see below), and is now considered to be
the standard version of DDSCAT.
If you choose to use it, please send email
to
<draine@astro.princeton.edu>
"registering" as a user; registered
users of DDSCAT will be notified when updates to the code are made.
If you publish results obtained with DDSCAT 7.0, please cite the following references:
Draine, B.T., & Flatau, P.J., "Discrete dipole approximation for
scattering calculations", J. Opt. Soc. Am. A, 11, 1491-1499 (1994)
(pdf)
Draine, B.T., & Flatau, P.J., "User Guide to the Discrete Dipole
Approximation Code DDSCAT 7.0", http://arXiv.org/abs/0809.0337v5 (2008)
and, if you carried out calculations for periodic structures:
Draine, B.T., & Flatau, P.J., "Discrete-dipole approximation for
periodic targets: theory and tests", J. Opt. Soc. Am. A, 25, 2593-2703 (2008)
(pdf)
User Guide for DDSCAT.7.0
An extensive User Guide is available: "User Guide to the Discrete
Dipole Approximation Code DDSCAT.7.0", by B.T. Draine and
Piotr J. Flatau. A copy of this document (postscript or pdf)
can be obtained from
arXiv/0809.0337v5
and can be cited as
Draine, B.T., and Flatau, P.J. 2008, "User Guide to the Discrete
Dipole Approximation Code DDSCAT 7.0",
http://arxiv.org/abs/0809.0337v5.
Downloading the DDSCAT 7.0 Code
A single distribution is provided for DDSCAT 7.0 -- by appropriate
editing of the Makefile, this distribution can be used to generate
executables using either single- or double-precision arithmetic;
either without or with MPI capability; either without or with OPENMPI
support; and either without or with the Intel MKL library.
To download, click here:
ddscat7.0.7.tgz to obtain a gzipped tarfile containing complete source
code and documentation for DDSCAT 7.0, including the programs DDfield and
CALLTARGET..
DDSCAT Wikidot
Additional information about using DDSCAT can be found at the
DDSCAT Wikidot.
Downloading executables for Windows Vista
Pre-compiled DDSCAT binaries for Windows Vista may be available at
http://ddscat.wikidot.com/download, together with some information regarding using the binaries under
Windows Vista.
History of recent releases:
DDSCAT 7.0 was first released 2008 September 3.
The latest version is dated 2008.10.28
- DDSCAT 7.0 can calculate scattering by isolated targets,
just like DDSCAT 6.1, but has the additional capability of calculating scattering and absorption
from targets that are periodic in one or two dimensions.
- DDSCAT 7.0 is written in Fortran 90, and uses dynamic memory allocation.
- DDSCAT 7.0 includes support for MPI, OpenMP, and FFT calculations using
the Intel Math Kernel Library (MKL).
- DDSCAT 7.0 is distributed with a simple post-processiong
program DDpol.f90 to easily
read out dipole polarizations after the scattering problem has been
solved by DDSCAT.
- DDSCAT 7.0 is distributed with a post-processing program DDfield.f90 for
near-field calculation of E and B at points within or near the target
after the scattering problem has been solved by DDSCAT.
- Bug fixes:
- 2008.09.12: removed extraneous dummy READ statement in reashp.f90 for
CSHAPE=FROM_FILE .
Thanks to Stefan Kniefel (University of Cologne) for reporting this bug
on 2008.09.08
- 2008.09.12: target option name DSKRCTNGL was mistyped as DSKRCTGNL
in several places, including the UserGuide.
Fixed: the correct spelling DSKRCTNGL is now used everywhere.
Thanks to Georges Levi (Universite-Paris-Diderot) for reporting this bug
on 2008.09.12.
- 2008.09.17: target option name SPHRN_PBC was mistyped in routine REASHP,
causing variable JPBC to be set incorrectly, and scattering results to be
computed incorrectly for this option
.
Fixed.
Thanks to Wang Lin (Nankai University) for reporting this error on 2008.09.16
- 2008.09.17: the target centroid X0(1-3) was being evaluated incorrectly for
target options SPHERES_N, SPHRN_PBC and SPH_ANI_N
.
This error did not affect calculations of scattering and absorption.
Fixed.
Thanks to Wang Lin (Nankai University) for reporting this problem on 2008.09.16
- 2008.09.23: target option DSKBLYPBC was mistyped as DSBLYRBC in one place
in routine REAPAR.
Fixed.
Thanks to Georges Levi (Universite-Paris-Diderot) for reporting this bug
on 2008.09.23.
- 2008.10.28: target option MLTBLOCKS had missing argument in call to
subroutine TARBLOCKS from routine TARGET.
Fixed.
Thanks to Michel Devel for reporting this bug
on 2008.10.28.
- 2008.10.30: postprocessing program DDpol: errors in memory allocation.
Fixed.
Thanks to Michel Devel for reporting this bug
on 2008.10.30.
- 2008.11.05: postprocessing program DDfield: minor syntax error causing compilation to fail for some compilers.
Fixed.
Thanks to Souraya Goumri-Said
(Lab. de Physique de Solide, Univ. Notre-Dame de la Paix, Namur)
for reporting this bug on 2008.11.05.
DDSCAT 6.1 was released 2004 September 10.
[NOTE: as of 2008.09.02,
DDSCAT 6.1 is no longer supported.]
- DDSCAT 6.1 introduced two versions of DDSCAT:
- the "plain" version
for new users or users who do not require MPI, FFTW, or netCDF
- the "full" version, with support for MPI, FFTW, and netCDF for users who require one or more of these features.
- DDSCAT 6.1 implements an automatic procedure for calculating
angular averages for the scattered radiation. User now specifies a
parameter ETASCA. The number of scattered directions is proportional
to [(3+x)/ETASCA]^2 , where x=2*pi*aeff/lambda is the scattering parameter.
The number of scattering angles used therefore depends on the ratio of
target size to wavelength.
- DDSCAT 6.1 includes new target options: ANIREC, for calculating
scattering by anisotropic rectangular prisms;
CYLCAP, for calculaing scattering by cylinders with hemispherical endcaps.
- DDSCAT 6.1 now calculates the second moment
in addition to the first moment of cos(theta) for the scattered
radiation, where theta is the scattering angle.
- Bug fixes:
- 2004.12.29: An error in routine writesca.f was found and corrected.
The error affected output to the files waarbbkccc.sca
(written when IWRKSC=1 is specified in ddscat.par),
causing incorrect values of the Muller matrix elements S_ij to be
written for the individual orientations when doing an orientational
average over more than one target orientation.
The bug did not affect any of the other calculated results. In
particular, the orientationally-averaged Muller matrix elements
(written to the output files waarbbori.avg) were correct, and the
total and scattering cross sections for the individual target
orientations were also correct.
The bug was in the output routine WRITESCA (file writesca.f ), and
consisted simply in printing the wrong variable. Users
can download new
versions of the complete "plain" distribution
ddscat6.1_plain.tgz
or the "full" distribution
ddscat6.1_full.tgz
of DDSCAT
6.1 .
The new versions of version.f and writesca.f can be extracted from the gzipped tarfile with the command
"tar xvfz ddscat6.1_plain.tgz src/version.f src/writesca.f"
or
"tar xvfz ddscat6.1_full.tgz src/version.f src/writesca.f"
(quotation marks not included).
- 2005.01.17: The files mpi_bcast_char.f, mpi_bcast_int.f, mpi_bcast_real.f,
mpi_bcast_cplx.f, and mpi_bcast_int2.f
,
which had been inadvertently omitted from
ddscat6.1_full.tgz, are now included in
ddscat6.1_full.tgz
- 2006.09.13: Error in tarcyl.f fixed
.
NAT was inadvertently not initialized to zero at the beginning of the calculation (most compilers set it to zero anyway).
- 2006.11.28: An error in routine writesca.f was found and corrected.
The error resulted in incorrect
values for linear polarization P to be written to files waaarbbkccc.sca waaarbbori.avg .
All cross sections and Mueller matrix elements S_{ij} were evaluated and printed correctly.
If the average being taken was over random orientations,
you can recalculate the linear polarization from
S_{11} and S_{12} in existing output files by simply taking P= - S_{12}/S_{11}.
- 2008.06.23: An error in routine tarcylcap.f was corrected.
The array ICOMP had inadvertently
not been set for lattice sites in the cylinder "caps". All calculations
carried out for target option CYLCAP were unfortunately incorrect.
Thanks to Stuart Prescott and Paul Mulvaney for reporting this bug on
2008.06.23.
DDSCAT.6.0 was released 2003 September 2.
[NOTE: as of 2004.09.10,
DDSCAT 6.0 is no longer supported.]
- DDSCAT.6.0 provides support for MPI (Message Passing Interface),
enabling parallel calculations for different target orientations;
- DDSCAT.6.0 provides support for FFTW (Fastest Fourier Transform in the West), as an
alternative
to the GPFA (Generalized Prime Factor Algorithm) code in DDSCAT.5a;
- DDSCAT.6.0 allows the user to select which elements of the Mueller scattering
matrix are to be printed out;
- DDSCAT.6.0 provides a new target option -- LYRSLB -- to generate a layered
slab.
- Bug fixes:
-
2003.10.30: Corrected typo in routine writenet.f
(used for writing netCDF output file dd.cdf)
-
2004.02.25: Corrected typo in routine tarprsm.f (Note: version of tarprsm.f
in DDSCAT.5a10 release was correct).
DDSCAT.5a10 was released 2000 August 9.
[NOTE: as of 2003.09.02,
DDSCAT.5a10 is no longer supported.]
- It provides a new target option --
NSPHER -- to create targets consisting of the unions of N spheres (possibly
overlapping) of
arbitrary sizes and locations. It also uses a more recent version of the
LAPACK code used by subroutine PRINAXIS.
- A new target option -- PRISM3 -- to generate a triangular prism
was added to DDSCAT.5a10 on 2002.02.12
- Bug fixes:
-
2001.04.21: Bug in subroutine tarnsp.f (used by NSPHER option) has been
fixed. This
bug would not have affected most prior calculations with option NSPHER except
in special case where first sphere extends further in +y direction in target
coordinates than any of the other N-1 spheres.
-
2003.06.06: Bug in routine rotate.f has been fixed.
Prior to this fix, the routine miscalculated the initial target orientation
when target axis A1 in the "Target Frame" had A1(3) < 0 and/or
(A1(2)*A2(3)-A1(3)*A2(2)) < 0 . Under these circumstances, the routine
rotated the target to orientation angles (PHI + constant) and (BETA + constant)
instead of PHI and BETA. This should not have had any effect on orientational
averaging if the user specified appropriate ranges for the angles PHI and
BETA. Note also that many of the target options (e.g., ELLIPS) provide
axes A1 and A2 for which this bug did not apply.
DDSCAT.5a9 was released 1998 December 23. It fixes a bug in DDSCAT.5a8,
which resulted in incorrect evaluation of elements of the Mueller scattering
matrix (other than S_11, which was correct) for scattering planes other
than phi=0.
-
A new version of orient.f was released 1999 March 16. Orientational
averages are now evaluated as described in the UserGuide; prior to this
date averaging over cos(Theta) was evaluated by dividing the range of
cos(Theta) into NTHETA equal intervals, evaluating the scattering
at the midpoint of each interval, and taking the mean. With the new
version of orient.f, Simpson's rule is now used for the quadrature when
an odd value of NTHETA is specified by the user.
Benchmark Calculations
Draine (2000) has published benchmark calculations for scattering
by tetrahedral targets.
Two target refractive indices have been considered:
m=1.33+0.01i and m=1.70+0.10i .
Scattering was calculated for one target orientation and two incident
polarizations.
In each case solutions were iterated until the DDA equations were satisfied
with a fractional error < 1.e-5 .
CPU times are reported below for a 600 MHz Pentium III system running
Red Hat Linux 6.2, using the Portland Group pgf77 compiler.
CPU time (s) on 600 MHz Pentium III System
m=1.33+0.01i tetrahedron
| N |
x=5 |
x=10 |
x=15 |
| 4030 |
31. |
-- |
-- |
| 13426 |
141. |
267. |
-- |
| 31598 |
356. |
639. |
1106. |
| 61432 |
792. |
1480. |
2476. |
| 105832 |
1298. |
2292. |
4226. |
m=1.7+0.1i tetrahedron
| N |
x=5 |
x=10 |
| 13426 |
377. |
-- |
| 31598 |
939. |
2104. |
| 61432 |
2115. |
4429. |
| 105832 |
3585. |
7335. |
For users wishing to repeat one or more of
these calculations using DDSCAT.5a10
(which may be useful to reassure you that DDSCAT.5a10 is
working properly on your computer), sample ddscat.par files are available
for downloading:
-
ddscat.par file for m = 1.33+0.01i, N = 4030 dipole tetrahedron, x = 5.
-
ddscat.par file for m = 1.33+0.01i, N = 13426 dipole tetrahedron, x = 5, 10
-
ddscat.par file for m = 1.33+0.01i, N = 31598 dipole tetrahedron, x = 5, 10, 15
-
ddscat.par file for m = 1.33+0.01i, N = 61432 dipole tetrahedron, x = 5, 10, 15
-
ddscat.par file for m = 1.33+0.01i, N = 105832 dipole tetrahedron, x = 5, 10, 15
-
m1.33_0.01 refractive index table for m = 1.33+0.01i
-
ddscat.par file for m = 1.70+0.10i, N = 13426 dipole tetrahedron, x = 5
-
ddscat.par file for m = 1.70+0.01i, N = 31598 dipole tetrahedron, x = 5, 10
-
ddscat.par file for m = 1.70+0.10i, N = 61432 dipole tetrahedron, x = 5, 10
-
ddscat.par file for m = 1.70+0.10i, N = 105832 dipole tetrahedron, x = 5, 10
-
m1.70_0.10 refractive index table for m = 1.70+0.10i
Please consult the DDSCAT UserGuide (see above) for an explanation of the
parameters in the ddscat.par file.
For additional information on other techniques for
numerical calculation of electromagnetic scattering by finite targets,
see also the
SCATTERLIB library of light scattering codes maintained by Piotr Flatau.
Downloading DDSCAT 6.1
Please note that DDSCAT 6.1 is no longer considered to be "supported" -- please
switch to using DDSCAT 7.0 . However, we continue to make
available two distributions of DDSCAT 6.1.
Both include bug fixes (see below) up to
and including 2008.06.23 (at this time
we are not aware of any bugs in the DDSCAT 6.1 code):
- The "plain" distribution. This is easiest to install. It does
not include support for MPI, FFTW, or netCDF, but many users do not require
these.
To download, click here:
ddscat6.1_plain.tgz: gzipped tarfile containing complete source code and
documentation for the plain distribution of DDSCAT 6.1
- The "full" distribution. This includes support for MPI, FFTW, and netCDF.
To download, click here:
ddscat6.1_full.tgz: gzipped tarfile containing the complete source
code and documentation for the full distribution of DDSCAT 6.1
User Guide for DDSCAT.6.1
We continue to make available the UserGuide to the previous version of DDSCAT:
"User Guide to the Discrete
Dipole Approximation Code DDSCAT.6.1", by B.T. Draine and
Piotr J. Flatau. A copy of this document (postscript or pdf)
can be obtained from
astro-ph/0409262 (gzipped postscript) or
astro-ph/0409262 (pdf)
and can be cited as
Draine, B.T., and Flatau, P.J. 2004, "User Guide to the Discrete
Dipole Approximation Code DDSCAT 6.1",
http://arxiv.org/abs/astro-ph/0409262v2.
Back to B.T. Draine's home page.