I am trying to do a granule calculation with the following command
adda -size 1 -dpl 2000 -lambda 4 -granul 0.5 0.005 -m 1.4627 6.54E-04 4.2 0
The problem I am having is that the convergence is extremely slow and the reported convergence parameter seem to asymptote at ~1e-3 even after >200 iterations.
Vlad Liberman
Staff Member, Active Optical Systems Group
MIT Lincoln Laboratory E-mail: vl...@ll.mit.edu
Room S3-357 Phone: 781 981 3706
Cell: 339 368 9811
244 Wood St.
Lexington, MA 02421-6426
--
You received this message because you are subscribed to the Google Groups "ADDA questions and answers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adda-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adda-discuss/PH2P110MB08905392955E12D135B86194E1BC9%40PH2P110MB0890.NAMP110.PROD.OUTLOOK.COM.
Partially good news. Both formulations converge much faster than the default method. However, the give very different SCATTERING cross section results for otherwise the same parameters.
IGT formulation reports
Cext = 0.4089851739
Cabs = 0.0007480331024
While FCD formulation reports
Cext = 0.480852603
Cabs = 0.0007178603914
Vlad Liberman
Staff Member, Active Optical Systems Group
MIT Lincoln Laboratory E-mail: vl...@ll.mit.edu
Room S3-357 Phone: 781 981 3706
Cell: 339 368 9811
244 Wood St.
Lexington, MA 02421-6426
Thanks for your detailed reply. I studied it carefully and I have a few follow on questions.
1. You say : “ your case is additionally complicated by the fact that granule diameter is only 2.5 larger than the dipoles, so one cannot hope to well reproduce each granule”
I was under the impression that DDA could do some local interpolation since it is a semi-analytical method. Is that what the “-jagged” option is supposed to do? If so, I am not understanding the workflow (workaround?) for using the “jagged” option with the granule generator.
2. For a deterministic shape construction, rather than using auxiliary packages, couldn’t I just use a Matlab script and generate a lattice set and write it to file? And then, couldn’t I just use ‘-read’ option on that file?
3. For debugging the shape construction, what is the recommended current way of visualizing the constructed geometry “just as ADDA would see it”. There was a package LiteBil mentioned on the Wiki, but that seems old. Is that still the best/only way?
Vlad Liberman
Staff Member, Active Optical Systems Group
MIT Lincoln Laboratory E-mail: vl...@ll.mit.edu
Room S3-357 Phone: 781 981 3706
Cell: 339 368 9811
244 Wood St.
Lexington, MA 02421-6426
To view this discussion on the web visit https://groups.google.com/d/msgid/adda-discuss/fbf3b1bd-5a0a-d3a9-2647-5488d5595ec1%40gmail.com.
Thanks for your detailed reply. I studied it carefully and I have a few follow on questions.
1. You say : “ your case is additionally complicated by the fact that granule diameter is only 2.5 larger than the dipoles, so one cannot hope to well reproduce each granule”
I was under the impression that DDA could do some local interpolation since it is a semi-analytical method. Is that what the “-jagged” option is supposed to do? If so, I am not understanding the workflow (workaround?) for using the “jagged” option with the granule generator.
That is a very deep question. By itself, the DDA is the stupidest
(lowest order) method with maximum staircasing effect. The dipole
(cube) is either fully in or fully out of the particle, i.e. no
smoothing or interpolation is employed (although see
https://github.com/adda-team/adda/issues/12 related to the
weighted discretization). Thus, the DDA is best suitable (or at
least best understood, see below) for particles with relatively
large domains (exactly as I wrote before about the FCD
formulation). More specifically, only in this case the DDA is
known to be a numerically exact method. If we fix the scatterer
(even the complicated one with a lot of small domains) and then
refine discretization, the DDA will converge to the exact
solution. And in doing so it will definitely reach the regime of
"many dipoles per each domain", i.e. when staircasing at the
boundaries is small. And this argument holds even if the
refractive index varies smoothly inside each domain, i.e. the
discontinuities of the refractive index are fixed, while the
values at specific dipoles may slightly vary with refining
discretization. Moreover, the convergence may be significantly
different for various DDA formulations, but the limiting value
should be the same.
That is exactly the regime, where you can rigorously investigate the DDA accuracy and refining discretization (generating multiple shape files) is the straightforward way for that. -jagged option is not recommended. While it is more convenient, as you use a single shape file and refine it automatically by ADDA itself, it reduces only the discretization effect, but not the shape (staircasing) error. I.e. it also does not include any interpolation. Even if you decide to try it, you still need a shape files to avoid randomness of granule placement at each ADDA run (as I explained previously).
However, there is another possible mode of the DDA, that can be
called "effective-medium" one. Suppose, each dipole in the DDA has
a random polarizability chosen from some distribution (or chosen
deterministically based on some rule) such that most of the
neighboring dipoles have largely different polarizability. In this
way, one effectively samples the random distribution of refractive
index (discontinuous everywhere), which invalidates the above
convergence results for the DDA. Still, one expects that a medium
consisting of a lot of (random) dipoles should have some
properties of that of the homogeneous medium. Here one may expect
some effective interpolation arising from the large number of
dipoles. But this correspondence is the most direct when
Clausius-Mossotti (CM) polarizability is used, corresponding to
point dipoles. By contrast, modern formulations of the DDA (FCD
and IGT) are designed specifically for finite-size dipoles, i.e.
they try to model a tightly packed collection of cubes, which is
very different from the picture of effective medium. Thus, I
foresee that each DDA formulation may lead to different limiting
values (of effective refractive index and other optical
properties) when the number of dipoles is increased. In other
words, here the choice of the DDA formulations becomes critical
for interpretation of the results (in addition to numerical
performance).
And the intermediate case (of a few dipoles per granule diameter)
is probably the most complicated in terms of interpretation of the
results, i.e. how to choose a proper reference result. Still, you
can steer it towards one of the two limiting cases described above
depending on your goals.
All this discussion becomes even more complicated with regard to your specific problem. First, you seem to be testing some effective-medium approximation (based on the scatterer). Then you probably want to use the DDA as a reference, but then it should not be too similar to the effective-medium approach itself. Second, you're probably not that interested in the comparison for a single realization of your random scatterer, but rather for a large set of such scatterers. Then the detailed error control for each scatterer may be an overkill - still, it seems a viable strategy to tune the DDA parameters.
2. For a deterministic shape construction, rather than using auxiliary packages, couldn’t I just use a Matlab script and generate a lattice set and write it to file? And then, couldn’t I just use ‘-read’ option on that file?
Yes, that is a perfectly viable option. And that is what I meant by "write a dedicated script in your favorite language".
3. For debugging the shape construction, what is the recommended current way of visualizing the constructed geometry “just as ADDA would see it”. There was a package LiteBil mentioned on the Wiki, but that seems old. Is that still the best/only way?
Indeed, LiteBil is old (and looks outdated), but other researchers and I use it almost every day and I haven't heard of any significant limitations. And it is very efficient, which becomes important with a huge number of dipoles, compared to, e.g., some simple visualizations you can make in Matlab, Mathematica, etc.
However, you should get yourself familiar with LiteBil by
pressing all possible buttons inside, which affect the final
visualization (like change the box to be visualized and show
caps).
Maxim.
To view this discussion on the web visit https://groups.google.com/d/msgid/adda-discuss/PH2P110MB089087E9233D90EECB92B3F8E1BE9%40PH2P110MB0890.NAMP110.PROD.OUTLOOK.COM.
A couple more simpler questions
1. Cross section x and Cross section Y yield very similar results, at least for larger fill fractions that I have tested. Is it possible to just calculate one of the above quantities and not the other to save on computation time, short of exiting the program prematurely?
2. Sometimes, ADDA reports that it will use the algorithm “For small granules.” However, sometimes, after a small parameter tweak, it reports that it is using an algorithm for “large granules.” What does that mean?
To view this discussion on the web visit https://groups.google.com/d/msgid/adda-discuss/d8ee1d22-060d-c741-9fa1-f78765b0d10c%40gmail.com.
A couple more simpler questions
1. Cross section x and Cross section Y yield very similar results, at least for larger fill fractions that I have tested. Is it possible to just calculate one of the above quantities and not the other to save on computation time, short of exiting the program prematurely?
Try '-sym enf', which tells ADDA to treat the particle as symmetric with respect to 90-degree rotation around the propagation direction.
2. Sometimes, ADDA reports that it will use the algorithm “For small granules.” However, sometimes, after a small parameter tweak, it reports that it is using an algorithm for “large granules.” What does that mean?
That's the internals of the granule placement. Brief comments are given here - https://github.com/adda-team/adda/blob/6c1931a76e78b7fae9c4555a7a6ba54893f6b8e6/src/make_particle.c#L514-L524 . You can then look through this function for definition of sm_gr, which is used to distinguish the two cases. Unfortunately, I do not remember exactly, how the threshold is defined.
Maxim.