Re: Computing energy in multiple objects
Adam Klimont <[email protected]> Fri, 2 Sep 2016 15:32:26 +0100
| Newsgroups | gmane.comp.science.photonic-bands |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1461375346913869349== Content-Type: multipart/alternative; boundary="------------8150CF6BF06662486F0A2471" This is a multi-part message in MIME format. --------------8150CF6BF06662486F0A2471 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit It does seem to work this way. Thanks Hector. Adam On 01/09/16 21:45, Hector Perez wrote: > I believe it works like: > (output-dpwr-in-objects band-func min-energy object1 object2 object3 > ... objectn) > > So for example: > (output-dpwr-in-objects > (combine-band-functions fix-efield-phase output-tot-pwr) .25 > (make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 > infinity) (e2 1 1) (e1 1 -1)) > (make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 > infinity) (e2 (/ 2 (sqrt 3)) (/ -1 (sqrt 3))) (e1 0 1)) > (make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 > infinity) (e2 (/ -1 (sqrt 3)) (/ 2 (sqrt 3))) (e1 1 0))) > gives me the total power for bands which have >25% of their electric > field energy within a hexagonal region I specified using three > overlapping blocks. > > I hope this helps, > Hector > > On Wed, Aug 31, 2016 at 11:08 AM Adam Klimont <[email protected] > <mailto:[email protected]>> wrote: > > Hello, > > How to compute the energy of a field in a supercell? Take e.g. MPB's > tutorial script for triangular rods: > https://github.com/stevengj/mpb/blob/master/examples/tri-rods.ctl. > I can > calculate the energy in one rod by invoking: > > ((output-dpwr-in-objects output-dpwr 0.001 (make cylinder (center > 0 0 0) > (radius 0.2) (height infinity) > (material (make dielectric (epsilon 12))) > )) 4) > > But how to do it for all rods in the supercell? Making a list doesn't > work, as (output-dpwr-in-objects) doesn't work with this type of > argument: > > ERROR: wrong type for argument type (list . geometric-object) in > compute-energy-in-object-list > > Regards > Adam > > _______________________________________________ > mpb-discuss mailing list > [email protected] <mailto:[email protected]> > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss > --------------8150CF6BF06662486F0A2471 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <tt>It does seem to work this way. Thanks Hector.<br> Adam<br> </tt><br> <div class="moz-cite-prefix">On 01/09/16 21:45, Hector Perez wrote:<br> </div> <blockquote cite="mid:CAE41YT0n4jwfOaeyQSew2NRK0YVGr5QZuourZb0P=Uk_foZxZw@mail.gmail.com" type="cite"> <div dir="ltr">I believe it works like: <div>(output-dpwr-in-objects band-func min-energy object1 object2 object3 ... objectn)</div> <div><br> </div> <div>So for example:</div> <div> <div>(output-dpwr-in-objects </div> <div>(combine-band-functions fix-efield-phase output-tot-pwr) .25 </div> <div>(make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 infinity) (e2 1 1) (e1 1 -1)) </div> <div>(make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 infinity) (e2 (/ 2 (sqrt 3)) (/ -1 (sqrt 3))) (e1 0 1)) </div> <div>(make block (center 0 0 0) (material air) (size (* s4 (sqrt 3)) s4 infinity) (e2 (/ -1 (sqrt 3)) (/ 2 (sqrt 3))) (e1 1 0))<span style="line-height:1.5">)</span></div> </div> <div> </div> <div>gives me the total power for bands which have >25% of their electric field energy within a hexagonal region I specified using three overlapping blocks.</div> <div><br> </div> <div>I hope this helps,</div> <div>Hector</div> </div> <br> <div class="gmail_quote"> <div dir="ltr">On Wed, Aug 31, 2016 at 11:08 AM Adam Klimont <<a moz-do-not-send="true" href="mailto:[email protected]">[email protected]</a>> wrote:<br> </div> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br> <br> How to compute the energy of a field in a supercell? Take e.g. MPB's<br> tutorial script for triangular rods:<br> <a moz-do-not-send="true" href="https://github.com/stevengj/mpb/blob/master/examples/tri-rods.ctl" rel="noreferrer" target="_blank">https://github.com/stevengj/mpb/blob/master/examples/tri-rods.ctl</a>. I can<br> calculate the energy in one rod by invoking:<br> <br> ((output-dpwr-in-objects output-dpwr 0.001 (make cylinder (center 0 0 0)<br> (radius 0.2) (height infinity)<br> (material (make dielectric (epsilon 12)))<br> )) 4)<br> <br> But how to do it for all rods in the supercell? Making a list doesn't<br> work, as (output-dpwr-in-objects) doesn't work with this type of argument:<br> <br> ERROR: wrong type for argument type (list . geometric-object) in<br> compute-energy-in-object-list<br> <br> Regards<br> Adam<br> <br> _______________________________________________<br> mpb-discuss mailing list<br> <a moz-do-not-send="true" href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a moz-do-not-send="true" href="http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss" rel="noreferrer" target="_blank">http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss</a></blockquote> </div> </blockquote> <br> </body> </html> --------------8150CF6BF06662486F0A2471-- --===============1461375346913869349== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbXBiLWRpc2N1 c3MgbWFpbGluZyBsaXN0Cm1wYi1kaXNjdXNzQGFiLWluaXRpby5taXQuZWR1Cmh0dHA6Ly9hYi1p bml0aW8ubWl0LmVkdS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbXBiLWRpc2N1c3M= --===============1461375346913869349==--