When modeling the effect of charge distribution on the refractive index of a material for FDTD simulation, we can perform an electrical simulation in CHARGE to get the charge profile and import this profile into FDTD using the np Density grid attribute. Next we can use an index perturbation material to perturb the index of a base material according to the imported charge profile.
Often it is possible to perform a 2D simulation in CHARGE using the uniformity of the structure along one dimension. The charge profile that is calculated by the electrical solver in such a case is also 2D. However, it is possible to import this 2D charge profile into FDTD solutions and extrude it in the third dimension to get a 3D charge profile for a 3D optical simulation.
The np Density grid attribute object gives the user the option to define a finite length in the third dimension when a 2D charge profile is imported from CHARGE. The grid attribute then copies the 2D charge data into the third dimension to create a 3D charge profile for the optical simulation. In the screenshot below, the CHARGE simulation was performed in the XZ plane and after loading the data into the np Density object, the length of the charge profile along the third (Y) dimension can be set.