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
125 stars 50 forks source link

The 'multi-material junctions' cannot be used in scuff-neq, is it right? #96

Open ZhihaoJia16 opened 8 years ago

ZhihaoJia16 commented 8 years ago

Hi, I want to calculate heat transfer between Au-Si slab and Au slab using 'multi-material junctions' in Fig. 1. In order to verify the results, I calculate the case in Fig.2. BUt the results is obviously wrong. I think the value of 41 should equal value of 42. image

.NEQPFT scuff-neq completed at jia-Precision-Tower-7810 (05/13/16::15:17:52) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +0.00000000e+00 +0.00000000e+00 DEFAULT 31 -nan +nan DEFAULT 41 +1.68097909e-08 +8.40489546e-09 DEFAULT 01 -nan nan DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +0.00000000e+00 +0.00000000e+00 DEFAULT 32 +0.00000000e+00 +0.00000000e+00 DEFAULT 42 -5.68539391e-11 +2.84269695e-11 DEFAULT 02 -5.685394e-11 2.842697e-11 DEFAULT 13 +0.00000000e+00 +0.00000000e+00 DEFAULT 23 +0.00000000e+00 +0.00000000e+00 DEFAULT 33 +0.00000000e+00 +0.00000000e+00 DEFAULT 43 +5.90601245e-11 +2.95300623e-11 DEFAULT 03 5.906012e-11 2.953006e-11 DEFAULT 14 +0.00000000e+00 +0.00000000e+00 DEFAULT 24 +0.00000000e+00 +0.00000000e+00 DEFAULT 34 +0.00000000e+00 +0.00000000e+00 DEFAULT 44 -5.18465930e-14 +2.17172364e-14 DEFAULT 04 -5.184659e-14 2.171724e-14

.scuffgeo

MATERIAL Gold
    wp = 1.37e16;
    gamma = 5.32e13;
    Eps(w) = 1 - wp^2 / (w * (w + i*gamma));
ENDMATERIAL

MATERIAL SILICON
    epsf = 1.035;      # \epsilon_infinity
    eps0 = 11.87;      # \epsilon_0 
    wp = 6.6e15;       # \plasmon frequency
    Eps(w) = epsf + (eps0-epsf)/(1-(w/wp)^2);
ENDMATERIAL

REGION Exterior  MATERIAL VACUUM
REGION LeftSlab  MATERIAL SILICON
REGION RightSlab MATERIAL SILICON

SURFACE LeftSurface
    MESHFILE upper1_1571.msh
        MESHTAG 1
    REGIONS Exterior LeftSlab 
ENDSURFACE

SURFACE RightSurface
    MESHFILE upper3_1571.msh
        MESHTAG 1
        DISPLACED 0.2 0 0 
        REGIONS Exterior RightSlab
ENDSURFACE

SURFACE MiddleSurface
    MESHFILE upper2_131.msh
        MESHTAG 1
        DISPLACED 0.1 0 0 
    REGIONS LeftSlab RightSlab
ENDSURFACE

OBJECT LowerSubstrate
    MESHFILE substrate_3099.msh
    MATERIAL Gold
        DISPLACED 0 0 -0.10
ENDOBJECT

.RunScript

#!/bin/bash

ARGS=""
ARGS="${ARGS} --geometry substrateupper.scuffgeo"
ARGS="${ARGS} --OmegaMin 0.001"
ARGS="${ARGS} --OmegaMax 5.00"
ARGS="${ARGS} --Temperature LowerSubstrate 300"
ARGS="${ARGS} --OPFT"
ARGS="${ARGS} --Power"

scuff-neq ${ARGS}

Please gIve me answer. Thank you.

HomerReid commented 8 years ago

Thanks for the bug report. I haven't tested OPFT with multi-material junctions (but the NaN result is clearly a bug either way). Do you get better results with --DSIPFT and/or --EMTPFT?

ZhihaoJia16 commented 8 years ago

I have tested EMTPFT, the values are 41 +5.59251956e-06 42 +5.59250301e-06. I think it's wrong. Because the heat transfer is 1.06392520e-08 , not using multi-material junctions.

.NEQPFT file by EMTPFT scuff-neq completed at jia-Precision-Tower-7810 (05/21/16::05:45:55) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +0.00000000e+00 +0.00000000e+00 DEFAULT 31 -nan +nan DEFAULT 41 +5.59251956e-06 +1.87816961e-06 DEFAULT 01 -nan nan DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +0.00000000e+00 +0.00000000e+00 DEFAULT 32 +0.00000000e+00 +0.00000000e+00 DEFAULT 42 +5.59250301e-06 +1.87815998e-06 DEFAULT 02 5.592503e-06 1.878160e-06 DEFAULT 13 +0.00000000e+00 +0.00000000e+00 DEFAULT 23 +0.00000000e+00 +0.00000000e+00 DEFAULT 33 +0.00000000e+00 +0.00000000e+00 DEFAULT 43 -2.04632393e-19 +4.08310283e-20 DEFAULT 03 -2.046324e-19 4.083103e-20 DEFAULT 14 +0.00000000e+00 +0.00000000e+00 DEFAULT 24 +0.00000000e+00 +0.00000000e+00 DEFAULT 34 +0.00000000e+00 +0.00000000e+00 DEFAULT 44 +3.85472618e-10 +2.00346917e-10 DEFAULT 04 3.854726e-10 2.003469e-10

.NEQPFT file, not using multi-material junctions scuff-neq completed at jia-Precision-Tower-7810 (05/21/16::10:41:29) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +1.06392520e-08 +5.31962602e-09 DEFAULT 01 1.063925e-08 5.319626e-09 DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +1.06392518e-08 +5.31962602e-09 DEFAULT 02 1.063925e-08 5.319626e-09

Best.

ZhihaoJia16 commented 8 years ago

For symmetric structure(Si-Si-Au structure), the heat transfer power calculated by --OPFTand --EMTPFT is wrong.

image

.NEQPFT , by --OPFT


scuff-neq completed at jia-Precision-Tower-7810 (05/24/16::09:52:05) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +0.00000000e+00 +0.00000000e+00 DEFAULT 31 +4.61615270e-09 +2.30807635e-09 DEFAULT 01 4.616153e-09 2.308076e-09 DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +0.00000000e+00 +0.00000000e+00 DEFAULT 32 -3.54643520e-09 +1.77321760e-09 DEFAULT 02 -3.546435e-09 1.773218e-09 DEFAULT 13 +0.00000000e+00 +0.00000000e+00 DEFAULT 23 +0.00000000e+00 +0.00000000e+00 DEFAULT 33 +2.34681235e-14 +1.61852135e-14 DEFAULT 03 2.346812e-14 1.618521e-14


.NEQPFT , by --EMTPFT


scuff-neq completed at jia-Precision-Tower-7810 (05/24/16::10:18:35) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +0.00000000e+00 +0.00000000e+00 DEFAULT 31 +1.46862773e-08 +6.88659735e-09 DEFAULT 01 1.468628e-08 6.886597e-09 DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +0.00000000e+00 +0.00000000e+00 DEFAULT 32 +1.46811361e-08 +6.88228181e-09 DEFAULT 02 1.468114e-08 6.882282e-09 DEFAULT 13 +0.00000000e+00 +0.00000000e+00 DEFAULT 23 +0.00000000e+00 +0.00000000e+00 DEFAULT 33 -5.53386738e-12 +4.12783825e-12 DEFAULT 03 -5.533867e-12 4.127838e-12


.scuffgeo

MATERIAL Gold
    wp = 1.37e16;
    gamma = 5.32e13;
    Eps(w) = 1 - wp^2 / (w * (w + i*gamma));
ENDMATERIAL

MATERIAL SILICON
    epsf = 1.035;      # \epsilon_infinity
    eps0 = 11.87;      # \epsilon_0 
    wp = 6.6e15;       # \plasmon frequency
    Eps(w) = epsf + (eps0-epsf)/(1-(w/wp)^2);
ENDMATERIAL

MATERIAL SiliconCarbide
   EpsInf = 6.7;
   a0     = -3.32377e28;
   a1     = +8.93329e11; 
   b0     = -2.21677e28;
   b1     = 8.93329e11;
   Eps(w) = EpsInf * (a0 + i*a1*w + w*w) / ( b0 + i*b1*w + w*w);
ENDMATERIAL

OBJECT LeftSlab
    MESHFILE upper1_306.msh
    MATERIAL SiliconCarbide
        DISPLACED -0.05 0 0
ENDOBJECT

OBJECT RightSlab
    MESHFILE upper3_306.msh
    MATERIAL SiliconCarbide
        DISPLACED 0.25 0 0
ENDOBJECT

OBJECT LowerSubstrate
    MESHFILE substrate_537.msh
    MATERIAL Gold
        DISPLACED 0 0 -0.10
ENDOBJECT

RunScript

#!/bin/bash

ARGS=""
ARGS="${ARGS} --geometry substrateupper.scuffgeo"
ARGS="${ARGS} --OmegaMin 0.0001"
ARGS="${ARGS} --OmegaMax 10.00"
ARGS="${ARGS} --Temperature LowerSubstrate 300"
ARGS="${ARGS} --OPFT"
#ARGS="${ARGS} --EMTPFT"
ARGS="${ARGS} --Power"

scuff-neq ${ARGS}

image

.NEQPFT , by --EMTPFT


scuff-neq completed at jia-Precision-Tower-7810 (05/24/16::10:54:10) data file columns: 1 transform tag 2 (sourceObject, destObject) (3,4) PAbs (value,error in frequency quadrature) DEFAULT 11 +0.00000000e+00 +0.00000000e+00 DEFAULT 21 +0.00000000e+00 +0.00000000e+00 DEFAULT 31 -6.96439335e-09 +6.85274109e-09 DEFAULT 01 -6.964393e-09 6.852741e-09 DEFAULT 12 +0.00000000e+00 +0.00000000e+00 DEFAULT 22 +0.00000000e+00 +0.00000000e+00 DEFAULT 32 -6.95313806e-09 +6.85536553e-09 DEFAULT 02 -6.953138e-09 6.855366e-09 DEFAULT 13 +0.00000000e+00 +0.00000000e+00 DEFAULT 23 +0.00000000e+00 +0.00000000e+00 DEFAULT 33 -1.59476155e-13 +1.92637941e-12 DEFAULT 03 -1.594762e-13 1.926379e-12


Please give me some comments, Best.