HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
126 stars 50 forks source link

HalfSpaceLDOS example doesn't run? #86

Closed odmiller closed 8 years ago

odmiller commented 8 years ago

Hi Homer,

I've tried the HalfSpaceLDOS example with a few recent versions of the scuff-em code. In the simplest code I just cd into the HalfSpaceLDOS example directory and run ./RunScript, and I get the error:

error: (null):15866208: Bloch wavevector must be specified for PBC geometries (aborting)

I get this error even though the OmegakBlochFile flag is specified?

HomerReid commented 8 years ago

Thanks for the bug report. This was probably a versioning issue on my side, i.e. I fixed it in a different branch but never merged the fix to master.

I just merged the development branch (Overhaul201512) into master (this is in c5500ca), so when you get a chance please pull and try again. I verified that the HalfSpaceLDOS example runs correctly.

odmiller commented 8 years ago

Thanks, fixed!

odmiller commented 8 years ago

I closed this issue, but perhaps prematurely. I made sure RunScript didn't emit the same error, but now it gives a new one: "out of memory (aborting)." It does this after maybe 5 or 10 seconds of running. I've tried it on different nodes on ab-initio and with "ulimit -m unlimited" and "ulimit -v unlimited." Can you run it successfully on ab-initio?

HomerReid commented 8 years ago

This is related to the ongoing question of how to configure the SCUFF_INTERPOLATION_TOLERANCE environment variable used for periodic geometries. The default setting seems to be too stringent in some cases, causing the code to attempt to allocate a huge lookup table and causing the out-of-memory barf.

I have found that setting SCUFF_INTERPOLATION_TOLERANCE to 1.0e-3 yields good results. Please try this value (i.e. do an %export SCUFF_INTERPOLATION_TOLERANCE=1.0e-3 before running SCUFF_LDOS).

One thing: The unit-cell geometry in the Examples/HalfSpaceLDOS folder is currently a square with side length 1 micron. There is nothing wrong with this, but for the aluminum half-space the most interesting points at which to study LDOS are probably on the order of 1--10 nanometers from the surface, which means they will be very close to the triangular mesh panels compared to the triangle side length, so the default meshing will be too coarse.

I have had good success using a unit-cell mesh of side length 10 nanometers. With this, SCUFF-LDOS seems to have no problem computing LDOS at distances of 10 nanometers, yielding agreement with the results of Joulain et al. I will try to update the example documentation about this later today.