Users can define their own plugin material models written in C++. These material models can be compiled as a plugin and added to the materials database. The standard FDTD and MODE installation packages include a number of Advanced material models implemented with this framework. Additional information can be found in the Flexible Material Plugins whitepaper.
Note: Technical support for developing material models using the Flexible Material Plugin Framework Lumerical's technical support team can provide guidance on the capabilities and features of the Flexible Material Plugin Framework, but developing and debugging custom material models is beyond the scope of our technical support services. Lumerical's development team uses this feature to add support for new non-linear processes that are not built into the core FDTD solver. We make the feature available to our customers, but it's important to understand that developing custom models is a very advanced feature. Documentation on this feature may be incomplete. Writing plugins requires a deep understanding of the FDTD method as well as prior experience with C++ programming. This feature is best suited to scientists with prior experience writing FDTD solvers. |
Basic concept
To create a new material, you must write a method in C++ that solves the following equation for for En
$$U^n E^n + \frac{P^n}{\varepsilon _0} = V^n$$
where En is the electric field at time nDt, Pn is the desired polarization at time nDt and Un and Vn are input values that we provide. The polarization that is added will be in addition to the polarization of any base material that is selected. If no base material is selected, the polarization will be added to the vacuum (ie. the default relative permittivity or permeability is 1.)
The same approach is used to create new magnetic materials.
Simple example (an example of the stepindex plugin)
Suppose you want to implement a simple linear, non-dispersive polarization that is added to Lumerical's default multi-coeffiient model (MCM) for Silicon from Palik. The polarization that we want to add is simply
$$P = \varepsilon _0 \chi E$$
In FDTD, this means that for each component of E in this material, you want to have
$$P^n = \varepsilon _0 \chi E^n$$
and therefore you need to solve
$$U^n E^n + \chi E^n = V^n $$
for En by implementing a method that returns
$$E^n = \frac{V^n}{U^n + \chi}$$
Once this material plugin has been created, you simply add this material to the database and select Silicon as the base material. You will now have a material with a total permittivity of
$$\varepsilon (\omega) = \varepsilon _{MCM} (\omega) + \varepsilon _0 \chi$$
where \(\varepsilon _{MCM} (\omega)\) is the dispersive MCM model for Si from our database, and \(\chi\) is the additional non-dispersive susceptibility.
FAQ
Can I solve dispersive media that include auxilliary fields?
Yes, you can tell us how many storage fields you need and we will allocate the memory and allow you to update the storage fields.
Can I solve for non-linear media?
Yes, this is one of the examples we provide. In fact the \(\chi\)(2) medium that comes with the software is actually created as a plugin.
Can I solve advanced material models that might involve coupling to multi-level electron systems? Yes, as long as you can define a polarization in the manner described above, you can introduce materials that involve extremely complicated material models, including gain media.
Can I solve for anisotropic media?
Yes, the method is setup to handle diagonal anisotropic media. For non-diagonal anisotropy this can often be handled by applying local transformations of the reference frame using matrix transform grid attributes. In the future, we may implement additional plugin models that allow the user to see the other field components directly if that becomes important.
Overview
Material parameters
The end user can specify any number of parameters for the material. For example, the user might want to specify parameters χ(2) or χ(3). These parameters appear in the GUI user interface and can be easily modified by the end user.
Anisotropic materials
The user can provide different parameters for each component of the electric and magnetic field, or even different updates for each component. Therefore materials with diagonal anisotropy can be easily introduced.
Auxiliary fields
Many updates require a number of auxiliary fields that must be stored and updated from one time step to the next. For example, a multi-level, multi-electron model must store and update level populations. The user can indicate how many storage fields are required and can then update them, and can also monitor these fields in the GUI.
Interfaces between media
When a plugin material is on the interface of two media, the user has two options which can be set on a material by material basis:
The solver can revert to using the base material for Yee cells that contain an interface. This is appropriate when the polarization, P, introduced by the plugin can be seen as a small perturbation on the polarization of the base material.
The solver can revert to staircase meshing whenever the plugin material is encountered at an interface. This is appropriate when the polarization implemented by the plugin is not a small perturbation of the base material.
Limitations
We summarize some of the limitations of the current plugin implementation below. Lumerical is always interested in learning about use cases where these limitations make it impossible to achieve specific simulation goals.
Non-diagonal anisotropy
The current implementation of the Flexible Material Plugin does not provide the information on all field components that is necessary to directly handle off diagonal anisotropy. This is in fact a challenging aspect of FDTD simulations because, in the Yee cell the different field components are positioned at different spatial locations. An alternative solution however is provided by another feature of Lumerical’s software, which can be applied to the E field update only. The user can provide any spatial rotation, or even a more general unitary transformation, to rotate the E field into a different reference frame, and this transformation can also be spatially varying. While there is no general method to diagonalize the nonlinear susceptibilities, there are some situations where this transformation can be used.
Non-local effects
The current implementation does not allow for non-local effects. This would require knowledge of the neighboring field components, which is not currently available.
Compatibility with Conformal Mesh Technology
Conformal Mesh Technology can resolve interfaces with sub-mesh cell accuracy by specially treating the E and H fields at interfaces to solve an integral form of Maxwell’s equations. It is not possible to introduce plugin materials in the current version that can also be used with a conformal mesh update. However, as mentioned previously, the user can choose to revert to the base material for Yee cells containing an interface, and the base material can be used with the conformal mesh update.
How to use material plugins in the software
Once a plugin *.dll or *.so file has been created and is saved into the correct installation folder (ex. "C:\Program Files\Lumerical\FDTD\bin\plugins\materials" on a windows machine), the new material will appear automatically in the materials database, and can be added as shown below for the Chi2 material that was created as a plugin.
The input parameters that are specified as part of the plugin implementation will appear either in isotropic or diagonal anisotropic modes, as shown below:
Examples
A number of example materials implemented with this feature (including source code) can be found in the Advanced material models page.