define parameter

we'll run it at every 0.6 time units (about 10 times per period) via (at-every 0.6 output-efield-z).(run-until 200
(at-beginning output-epsilon)
(to-appended "ez" (at-every 0.6 output-efield-z)))

we often want to explore many different values of such parameters. For example, we may want to change the size of the cell, so we'll define it as:

(define-param sx 16) ; size of cell in X direction
(define-param sy 32) ; size of cell in Y direction
(set! geometry-lattice (make lattice (size sx sy no-size)))

define-param is a libctl feature to define variables that can be overridden from the command line. We could now do meep sx=17 tut-wvg-bend-trans.ctl to change the X size to 17, without editing the ctl file, for example. We'll also define a couple of parameters to set the width of the waveguide and the "padding" between it and the edge of the computational cell:

Comments

Popular posts from this blog

到德国开公司你必须要知道这些

[其他] 中国人如何在德国成立公司以及新公司经营

李鹏身世疑云