Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On entry to ZGEBAL parameter number 3 had an illegal value #88

Closed
KappaGO opened this issue Oct 13, 2019 · 2 comments
Closed

On entry to ZGEBAL parameter number 3 had an illegal value #88

KappaGO opened this issue Oct 13, 2019 · 2 comments

Comments

@KappaGO
Copy link

KappaGO commented Oct 13, 2019

Hi! I am running S4 on Centos7, but the program can not completely run and signals an error :
"On entry to ZGEBAL parameter number 3 had an illegal value". For example, when I want to simulate transmission of 400 different wavelength points, it may stop at the 200th point. And the point of stopping each time is not the same.
I am confused about this issue and look forward to your help. The code is attached below.

---- main program ----

um = 1; -- unit um
nm = um*1e-3;

a = 270;
nSiO2 = 1.45;
lattice = anm;
d = 80
nm;
dSiO2 = 115nm;
R = 240
nm/2;

dofile("data.lua");

io.output("Blue.txt")

for wLi = 1, #wLength, 1 do
wi = wLength[wLi];
wavelength = wi*nm;
npolySi = n_polySi[wLi];
kpolySi = k_polySi[wLi];
naSi = n_aSi[wLi];
kaSi = k_aSi[wLi];
ncSi = n_cSi[wLi];
kcSi = k_cSi[wLi];

S = S4.NewSimulation()
S:SetLattice({lattice*1,0}, {lattice*0.5,lattice*0.5*math.sqrt(3)})
S:SetNumG(70)

S:AddMaterial("Vacuum", {1,0})
S:AddMaterial("SiO2", {nSiO2*nSiO2,0})
S:AddMaterial("polySi", {npolySi*npolySi-kpolySi*kpolySi, 2*npolySi*kpolySi})
S:AddMaterial("aSi", {naSi*naSi-kaSi*kaSi, 2*naSi*kaSi})
S:AddMaterial("cSi", {ncSi*ncSi-kcSi*kcSi, 2*ncSi*kcSi})

S:AddLayer('Layer_Above',0,'Vacuum')
S:AddLayer('Slab', d, 'polySi')
S:SetLayerPatternCircle('Slab','Vacuum',{0,0},R)
S:AddLayer('Quartz',dSiO2, 'SiO2')
S:AddLayer('Layer_Below',0, 'polySi')

S:SetExcitationPlanewave({0,0},{1,0},{0,0})    
S:SetFrequency(1/wavelength)

incidence_flux, reflection_flux = S:GetPoyntingFlux('Layer_Above', 0);
transmission_flux = S:GetPoyntingFlux('Layer_Below', 0);
transmission = transmission_flux / incidence_flux;

io.write(wi .. '\t' .. transmission .. '\n')

end
io.output():close()


data.txt

@jmllorens
Copy link

Hi!, You can try to set the Simulation:UseDiscretizedEpsilon() It is more stable than the analytical FT.

@KappaGO
Copy link
Author

KappaGO commented Oct 13, 2019

Thank you very much @jmllorens! It can completely run now.

@KappaGO KappaGO closed this as completed Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants