Re: Solving for the dielectric constant that yields a certain gap width

Mark Patterson <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
Hi Ian,

You have the right idea. Rather than writing you own binary search,  
I'd recommend using one of the goal seeking functions such as find- 
root or minimize that are included in libctl. See http://ab-initio.mit.edu/wiki/index.php/Libctl_User_Reference#Miscellaneous_utilities 
  for more information on these functions. I assume you've already  
figured out how to access the bandgap in the ctl file (see http://ab-initio.mit.edu/wiki/index.php/MPB_User_Reference#Output_Variables 
  if not).

I was recently asked to fit some structure parameters to provided  
bandstructure data. I've attached the ctl file I developed in the hope  
that you may find it useful. Since I was fitting to the multiple  
points on the band structure, I used the minimize function to reduce  
the sum of the squares of the difference. I am new to Scheme  
programming so I can't vouch for the quality of the attached script  
other than to say that it worked for me.

-Mark Patterson
Department of Physics
Queen's University at Kingston




On 2008-09-09, at 22:52 , Ian D. Hosein wrote:

> MPB Users & Steven,
>
>    I'm trying to solve a reverse problem of sort. I want set the  
> bandgap of
> my 3D dielectric structure to a certain width, say 1%, and then  
> solve for
> the high index material dielectric value that will yield it, within a
> certain tolerance ofcourse.  For example, an inverted opal would be  
> one of
> my structures.
>    My first guess on how to approach this is to give the the program  
> a min
> and max dielectric value in its search, and I start with the median  
> of the
> two. In a loop, I calculate the band structure and if the gap is  
> greater
> that 1% I need to change the dielectric value to between the min and  
> the
> median, in other words the median becomes the new max. If the gaps  
> is less
> that 1%, then I need to work with a dielectric value between the  
> median and
> the max.  It's sorta like a binary search. I would have to put in some
> conditions so that the program doesn't search forever for a complete  
> gap if
> there isn't ever one.
>    Does this sound right? Anyone have any thoughts on this, I would
> appreciate any suggestions.
>
> Thanks,
>
> Ian
>
>
>
>
> _______________________________________________
> mpb-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss

_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
fitBands.ctl (application/octet-stream, 5.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.