Charge and current density
This page describes how to calculate the charge and current density inside metals. The associated simulation files use the current charge density analysis object for calculating these quantities. This analysis object can be found in the object library in the Advanced analysis section.
Example
The associated files section provide a 2D and 3D example simulation using the current charge density analysis groups. You can copy and paste these groups into your simulations or insert them directly from the object library.
Note: Mesh size and mesh refinement setting It is often necessary to use a small mesh size for simulation involving metals, particularly when the metals have rounded edges. The Conformal meshing algorithm feature can provide improved accuracy at interfaces, but it can also introduce additional errors into the simulation when applied to metal interfaces. Therefore, the default settings in FDTD is to apply the Conformal mesh to dielectric interfaces, but not to metal interfaces. In these particular example files, the mesh refinement option has been set to 'Conformal Variant 1' (CV1), rather than the default setting of 'Conformal Variant 0' (CV0), meaning that the conformal meshing algorithm will be applied at the metal-dielectric interfaces. This change should only be made to your simulation file after careful convergence testing to confirm that the CV1 option gives better (i.e. more converged) results than CV0. Until you do this type of convergence testing, we recommend using the default CV0 option in your simulation. The factors that make CV1 appropriate for this simulation include:
For more information on the mesh refinement options, see Mesh refinement options. |
To reproduce the following figures, open and run usr_current_density_2D.fsp. After the simulation is complete, you can reproduce the following figures by visualizing the object data. The following results show the current and electric field data for lambda = 340nm. Also note that the image colorbar scales have been adjusted.
The same analysis group also calculates the divergence of the electric field, which gives the total charge density. This is shown in the plot below, we can see that the charges are confined to the edge of the metal, as expected. The free charge density is calculated using rho = eps0*|div(E)|. This assumes that the material is metal with no bound charges, hence eps0 is used instead of eps_material.
Note: Using symmetric/anti-symmetric boundary condition If symmetric/anti-symmetric boundary condition, make sure the symmetry condition (Analysis tab->Script tab) is specified in the analysis group to avoid matrix size mismatch between parameters used. |