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

Fields from the Diffraction Pattern example (holeyscreen) are constant #159

Closed Trave11er closed 6 years ago

Trave11er commented 6 years ago

Dear Homer and scuff-EM users,

I have been following the example "Diffraction patterns for discs, disc arrays, and hole arrays in metal screens" and failed to reproduce the field patterns at the very end. This happens on two different machines (running Ubuntu and Debian) and all the other meshes are as given on your website. The scuff-scatter exit is successful but each field component written to the .pp file is const. (some cpts are zero, others - aren't). Do you have any idea as to what could cause it? Below is the .log, .args and scuffgeo files and an example gmsh visualization of the .pp file. Thank you for your help.

the .scuffgeo file:

geometry        HoleyScreen_1228.scuffgeo                            
FVMesh          FVMesh.msh                           
Lambda          0.375                                    
pwDirection     0 0 1                           
pwPolarization  1 0 0             

the .args file:

LATTICE                                                                             
    VECTOR 1 0                                           
    VECTOR 0 1                                           
ENDLATTICE                                      

OBJECT HoleyScreen                                 
    MESHFILE HoleyScreenUnitCell_1228.msh                        
ENDOBJECT     

the .log file:

11/20/17::18:08:46: scuff-scatter-2 running on goldstone:19150 (11/20/17::18:08:46) 
11/20/17::18:08:46: Adding lattice basis vector (1,0,0). 
11/20/17::18:08:46: Adding lattice basis vector (0,1,0). 
11/20/17::18:08:46:  Mem before straddlers: 378 
11/20/17::18:08:46:  Surface HoleyScreen: 

11/20/17::18:08:46:   20 straddlers normal to lattice vector #0  
11/20/17::18:08:46:   20 straddlers normal to lattice vector #1  
11/20/17::18:08:46:   40 total straddlers                                                      
11/20/17::18:08:46: Surface HoleyScreen: {Straddlers, ExteriorEdges}={40,72} {open}            
11/20/17::18:08:46: Flipped 0 panel normals to comport with region definitions.                
11/20/17::18:08:46: FC::P could not open file HoleyScreenUnitCell_1228.scuffcache (skipping cache preload) 
11/20/17::18:08:46: Using a single (empty) geometrical transformation with label DEFAULT.      
11/20/17::18:08:47: Could not open FIPPI cache file HoleyScreen_1228.cache... 
11/20/17::18:08:47: Working at frequency 16.7552... 
11/20/17::18:08:47: Assembling BEM matrix at {Omega,kx,ky}={16.7552,0,0}                       
11/20/17::18:09:30: Creating interpolation grid with (98x98x2)=19208 grid points...            
11/20/17::18:10:58: Writing FIPPI cache to file HoleyScreen_1228.cache... 
11/20/17::18:10:58:  ...wrote 32850 FIPPI records. 
11/20/17::18:10:58:   LU-factorizing BEM matrix...                                             
11/20/17::18:10:58:   Assembling RHS vector... 
11/20/17::18:10:58:   Solving the BEM system...                                                
11/20/17::18:10:58: Using a single (empty) geometrical transformation with label DEFAULT.      
11/20/17::18:10:58: Creating flux plot for surface FVMesh.msh... 
11/20/17::18:10:58: Creating interpolation grid with (98x98x2)=19208 grid points...   

the visualization of the resulting HoleyScreen_1228.FVMesh.pp file: untitled

HomerReid commented 6 years ago

Thanks for the bug report. I can confirm the behavior you are seeing, and am working on a fix.

HomerReid commented 6 years ago

Fixed in 284b202. Please confirm and feel free to post further questions, or close the issue if resolved.

Trave11er commented 6 years ago

Thank you can confirm it works - suggest also updating the FVMesh.geo file in the online documentation for this example.