Let lambda_true = true wavelength (in vacuo) at the frequency of interest,

m_true = true complex refractive index of the target material at that frequency,

m_mediumtrue = true (real) refractive index of the medium at that frequency,

aeff_true = true aeff of the target in physical units.

The "true" problem is equivalent to scattering in vacuo by a target of size

aeff=aeff_true,

wavelength lambda=lambda_true/m_mediumtrue,

target material refractive index m=m_true/m_mediumtrue

So if you set ddscat.par to have

m_medium=1

aeff=aeff_true

wavelength=lambda_true/m_mediumtrue

and change your dielectric function table so that it is a table of

lambda_true/m_mediumtrue and m_true/m_mediumtrue

DDSCAT will solve a problem equivalent to the problem of interest.

The dimensionless Q values returned by DDSCAT will be

Q= (physical cross sections for absorption or scattering)/(pi*aeff_true^2)

You should confirm this for yourself with some simple test calculation (e.g., for a sphere in water) where you have an independent method for getting the exact result.

I've got one last question. What frame does DDSCAT return results for the Q_pr and Q_gamma?

For some context, I'm studying the effects of Q_torque when rotating a cylinder relative to the direction of plane wave propagation, such that it sits in the x-y plane. To do this, I'm varying the target rotation by sweeping theta in the ddscat.par file from 0 to 180 degrees. I'm trying to figure out if a positive torque in z pushes the "top" of the cylinder toward positive x or negative x.

Thanks for the help!

]]>If you are considering two spheres of silica, that is easily handled by the SPHERES_N target option.

If you want each of the spheres to consist of a core of one material with a coating of silica, then you will have to generate the list of target dipoles and compositions yourself, and read it in using the FROM_FILE target option — see the UserGuide for how to use the FROM_FILE option. ]]>

I would like to surround two interacting spherical nanoparticles, each of a layer of silica; can i do this using the function ''CONELLIPS'', if it is possible how can i do that, if not which function can i use.

Thanks for your help! ]]>

give the real and imaginary parts of the 4 complex scattering matrix elements f_{ml} defined in Eq. (68) of the UserGuide. See, for example, file w000r000k000.fml for the RCTGLPRSM example problem. For arbitrary incident polarization you can calculate the full scattered wave using Eq. (68). ]]>

Please i need to know if it is possible to have the imaginary part of the scattered wave with DDSCAT. Please if it is possible how can i have it.

thanks for your help ]]>

I understand—thank you for the help. I should add thank you for creating and updating DDSCAT! It was a huge part of my PhD work and I've continue to use it in my postdoc.

Thanks,

Matt

If you only want fields *between* spheres in the SPHERES_N option, then you do not need to extend the circumscribing volume, e.g., you can use option

2 = NRFLD (to calculate both E and B)

with

0.0 0.0 0.0 0.0 0.0 0.0

on the line in ddscat.par specifying the fractional extension of the calc. vol.

2. The Q_pr and Q_Gamma vectors are printed out in the files wxxxryyykzzz.sca

See the example SPHERES_N_DOTORQ, where the output file w000r000k000.sca

includes the lines

Qsca*g(1) Qsca*g(2) Qsca*g(3) iter mxiter Nsca

JO=1: 6.3826E-01 -5.1775E-03 1.1536E-02 3 300 769

JO=2: 6.5400E-01 6.4557E-03 -2.7960E-03 3 300 769

mean: 6.4613E-01 6.3907E-04 4.3700E-03

Qtrqinc(1) Qtrqinc(2) Qtrqinc(3) Qtrqsca(1) Qtrqsca(2) Qtrqsca(3) Qtrq(1) Qtrq(2) Qtrq(3)

JO=1: -1.168E-02 2.601E-02 1.089E-01 1.698E-02 -3.945E-02 -4.500E-02 5.304E-03 -1.344E-02 6.395E-02

JO=2: 1.600E-02 -8.209E-02 5.072E-02 1.906E-02 -2.139E-02 -3.471E-02 3.506E-02 -1.035E-01 1.601E-02

mean: 2.158E-03 -2.804E-02 7.983E-02 1.802E-02 -3.042E-02 -3.985E-02 2.018E-02 -5.846E-02 3.998E-02

The net radiative torque is given by the last three columns labeled Qtrq(1-3).

The ddscat.par file in this directory is set up to do the torque calculation.

I have two questions:

1. I'm using the "nSphere" target generation to produce a target without overlapping spheres. I'd like to include nearfield calculations to examine if there's any nearfield interaction between the spheres. For a single sphere, such as the ellipsoid nearfield example, the nearfield calculation extends the computational volume beyond an individual sphere, as specified in the ddscat.par file. However, I'm confused how this works for nSpheres, where dipoles are only placed at sphere locations. Would a nearfield calculation with fractional extensions of 0.5 in all directions expand the computational volume around each sphere or would it somehow expand the computational volume around the entire TUC? Assuming its the former, if I wanted to include sphere-sphere nearfield interactions, should I specify the fractional extension to include nearest neighbor spheres? Or, am I misinterpreting these things?

2. I've been trying to extract the Qrad and Qtorque from calculations. When I include everything (i.e. "DOTORQUE"), the qtable still doesn't include those values. What setting should I double check to make ddscat write the Qrad and Qtorque?

Thank you for the help!

-Matt

I am trying to calculate the Qabs of a target immersed in water with wavelength ranged from 300 nm to 700 nm. Since the refractive index will change with the wavelength frequency, how should I set the refractive index in DDSCAT.par? It seems I could only set a special number instead of variables changing with wavelength. Thanks very much! ]]>

If you want multiple shells of anisotropic materials, you will need to write your own code to create a "target file" specifying dipole locations and principal axes of the local dielectric tensor, and read it in using option ANIFRMFIL (see UserGuide sectin 21.2).

For isotropic materials, the option CONELLIPS can be used for two zones (e.g., ellipsoidal shell with vacuum interior), but for three layers you will need to write your own target generator and read the file in with option FROM_FILE (see UserGuide section 21.1). ]]>

I want to investigate the properties using shape parameter ONIONSHEL for three layers with the spherical shape.

So, as given in DDSCAT manual on page no. 21, if SHPAR1 =1, then we have to define NCOMP = 3.

Now, problem is that how to set the thickness or radius of first, second and third layers with shape parameter SHPAR1, SHPAR2, and SHPAR3?

Please give the example with setting the values SHPAR1, SHPAR2, and SHPAR3 to run the ddscat.par file.

I wish you will reply soon and explain it with depth.

Thanking You

Your Sincerely

Bhatia P. ]]>

For two contacting spheres, it is easy to use the built-in target option SPHROID_2 (see the UserGuide for details). Or you could use SPHERES_N. ]]>

Hello, I am new and learning to use DDSCAT 7.3. I am at first trying to reproduce results from Dr. Flatauâ€™s 2-spheres model that are in contact with each other (APPLIED OPTICS / Vol. 32, No. 18 / 20 June 1993 ). I have tried to reproduce the data, but with no luck. First of all, my S11 and S22 values are the same. Also, when I plot and compare the points to the literature values, the forward scattering looks like it reproduces S11, whereas the backscattering looks more like S22 character. Please let me know if you have suggestions for me.

Here is my input file, and header of my shape.dat file.

Thank you,

Yohanna White

*

shape.dat:

>TARELL ellipsoidal grain; AX,AY,AZ= 32.0000 32.0000 32.0000

34512 = NAT

1.000000 0.000000 0.000000 = A_1 vector

0.000000 1.000000 0.000000 = A_2 vector

1.000000 1.000000 1.000000 = lattice spacings (d_x,d_y,d_z)/d

-15.50000 0.50000 0.50000 = lattice offset x0(1-3) = (x_TF,y_TF,z_TF)/d for dipole 0 0 0

JA IX IY IZ ICOMP(x,y,z)

1 -2 -4 -16 1 1 1

2 -1 -4 -16 1 1 1

3 0 -4 -16 1 1 1

4 1 -4 -16 1 1 1

5 -3 -3 -16 1 1 1

ddscat.par:

' ========== Parameter file for v7.3 ==================='

' Preliminaries '

'NOTORQ' = CMTORQ*6 (DOTORQ, NOTORQ) — either do or skip torque calculations

'PBCGS2' = CMDSOL*6 (PBCGS2, PBCGST, GPBICG, QMRCCG, PETRKP) — CCG method

'FFTMKL' = CMETHD*6 (GPFAFT, FFTMKL) — FFT method

'GKDLDR' = CALPHA*6 (GKDLDR, LATTDR, FLTRCD) — DDA method

'NOTBIN' = CBINFLAG (ALLBIN, ORIBIN, NOTBIN)

' Initial Memory Allocation '

100 100 100 = dimensioning allowance for target generation

' Target Geometry and Composition '

'FROM_FILE' = CSHAPE*9 shape directive

no SHPAR parameters needed

2 = NCOMP = number of dielectric materials

'm1.33_0.001' = name of file containing RI info

'm1.33_0.001' = name of file containing RI info

' Additional Nearfield calculation? '

0 = NRFLD (=0 to skip nearfield calc., =1 to calculate nearfield E)

0.0 0.0 0.0 0.0 0.0 0.0 (fract. extens. of calc. vol. in -x,+x,-y,+y,-z,+z)

' Error tolerance '

1.00e-5 = TOL = MAX ALLOWED (NORM OF |G>=AC|E>-ACA|X>)/(NORM OF AC|E>)

' maximum number of iterations allowed '

300 = MXITER

' Interaction cutoff parameter for PBC calculations '

1.00e-5 = GAMMA (1e-2 is normal, 3e-3 for greater accuracy)

' Angular resolution for calculation of <cos>, etc. '

0.5 = ETASCA (number of angles is proportional to [(3+x)/ETASCA]^2 )

' Wavelengths (micron) '

6.283 6.2833 1 'LIN' = wavelengths (first, last, how many, how=LIN,INV,LOG,TAB)

' Refractive index of ambient medium'

1.000 = NAMBIENT

' Effective Radii (micron) '

10.000 10.000 1 'LIN' = eff. radii (first, last, how many, how=LIN,INV,LOG)

' Define Incident Polarizations '

(0,0) (1.,0.) (0.,0.) = Polarization state e01 (k along x axis)

2 = IORTH (=1 to do only pol. state e01; =2 to also do orth. pol. state)

' Specify which output files to write '

0 = IWRKSC (=0 to suppress, =1 to write ".sca" file for each target orient.

' Specify Target Rotations '

0. 0. 1 = BETAMI, BETAMX, NBETA (beta=rotation around a1)

0. 0. 1 = THETMI, THET MX, NTHETA (theta=angle between a1 and k)

0. 0. 1 = PHIMIN, PHIMAX, NPHI (phi=rotation angle of a1 around k)

' Specify first IWAV, IRAD, IORI (normally 0 0 0) '

0 0 0 = first IWAV, first IRAD, first IORI (0 0 0 to begin fresh)

' Select Elements of S_ij Matrix to Print '

2 = NSMELTS = number of elements of S_ij to print (not more than 9)

11 22 = indices ij of elements to print

' Specify Scattered Directions '

'LFRAME' = CMDFRM (LFRAME, TFRAME for Lab Frame or Target Frame)

2 = NPLANES = number of scattering planes

0. 0. 180. 5 = phi, thetan_min, thetan_max, dtheta (in degrees) for plane 1

90. 0. 180. 5 = phi, thetan_min, thetan_max, dtheta (in degrees) for plane 2

Is there a way for ddpostprocess.exe to take the nearfield calculations from wxxxryyykzzz.E1 and wxxxryyykzzz.E2 at the same time?

I'm looking to plot a contour map of the nearfield for an asymmetric geometry where the polarization direction is important, and I can only seem to plot it for one polarization direction at a time from either .E1 or .E2

Any suggestions?

]]>I figured out the problem after looking through a bit of the code for ddpostprocess.f90 and thought I'd share for any future people encountering a similar error - I had accidentally assigned multiple compositions to the same lattice positions, which caused the ICOMP(k,x,y,z) function to return 0 for a few lattice positions and the J1 iterator to miscount the number of dipoles in the target geometry. ]]>

2. Because of a possible error involving sym links, the previous distribution of ddscat7.3.2 source code might have included an obsolete file. I just uploaded an up-to-date distribution, ddscat7.3.2_180829.tgz to this site.

If you continue to have trouble with ddpostprocess, I suggest going to Donwloads, download ddscat7.3.2_180829.tgz, and then recompile ddscat and ddpostprocess. ]]>

I've downloaded the latest DDSCAT 7.3.2 version, compiled it using gfortran/MINGW for windows (windows 10), and run ddscat.exe

This works, however ddpostprocess.exe, which was compiled at the same time as ddscat.exe (so same architecture), always throws the error "readnf sanity failure: inconsistent j1 = 86343 and nat0 = 87601"

readnf is clearly having an issue reading the wxxxryyykzzz.E1 file, and seems to be finding an incorrect number of dipoles in some iterative loop its running to do calculations, as j1 is a variable counting the iterations of a set of loops in readnf.

How would you recommend remedying this problem?

Could my wxxxryyykzzz.E1 file contain NAN values, which get skipped by readnf?

Thanks!

]]>