HalimBishoyHalimBishoy Member Posts: 21


If I designed a metalens for the ultraviolet region from 270um to 380 um, and I would like to determine the normalized intensity distribution at different wavelengths in this region (for example at 270nm, 298 nm, 334 nm, and 380 nm). note the metalens designed at 290 nm.

so what can I do to do that? can I design the metalens at 290nm and set the plane wave source at each wavelength I would like( start wavelength =stop wavelength =270nm, 298 nm, 334 nm, and 334 nm respectively). or I have to set the plane wave source at (start wavelength=270 and stop wavelength=380nm) but in this situation how I can calculate the normalized intensity and different wavelength in this region (270 nm to 380 nm)

please see attached photo.

please give me an answer if only you make sure.



  • gsungsun Posts: 583Ansys Employee
    edited May 21

    FDTD is a time-domain broadband technique, so you can set "start wavelength=270 and stop wavelength=380nm".

    You can use monitors to record the fields at the specific wavelength, for example each DFT monitor can precisely record fields at two specific wavelengths;

    if the "normalized intensity" is relative to the source amplitude, it is already done by default, see CW normalization:

    It seems you just want to have max(abs(E)^2) to be 1. this is relatively easy: once you get the abs(E(x,z,f))^2, simply use the script as

    E2_norm=abs(E(x,z,f))^2/max(abs(E(x,z,f))^2).# this is symbolic, in practice you use the matrix, eg


    ":" means all the data in that dimension.

    provided that the field E has been simplified to be 3 dimensions be pinching out y. You can follow this idea for your actual script. This will normalize the intensity with the maximum of all frequencies, so you can compare their relative intensity.

  • HalimBishoyHalimBishoy Posts: 43Member

    can I get the normalized intensity at any respective wavelength for example(270nm)? from that range (270nm-380nm) using DFT monitor?

  • gsungsun Posts: 583Ansys Employee

    yes, you can do a loop for frequency:

    define E2_norm:





  • HalimBishoyHalimBishoy Posts: 43Member

    Could I ask where I can set the respective wavelength in that code script?

  • gsungsun Posts: 583Ansys Employee

    In general, E components from a DFT is 4 dimensional:





    if it is perpendicular to y axis, then length(y) is one, so it will be for example Ex(1:length(x),1,1:length(z),1:length(f)). Similarly for E2=abs(Ex)^2+abs(Ey)^2+abs(Ez)^2. you can use

    ?size(Ex) in the "prompt" to check its dimension.

  • HalimBishoyHalimBishoy Posts: 43Member

    so, can I set the respective wavelenght in thre DFT monitor for example (270nm) to check the normalized intensity distribution of it without using script commands?

  • gsungsun Posts: 583Ansys Employee

    Unfortunately it cannot be normalized to be max==1 in the DFT monitor without post processing with Script. The DFT monitor automatically normalizes with respect to the source pulse only by default. Please refer this any other processing will need to extract the data from the DFT monitor, except the power transmission.

  • HalimBishoyHalimBishoy Posts: 43Member

    so can I set it on the DFT monitor (270nm ) and then I have to normalize it in the script by dividing the magnitude of E^2 by the maximum value?

    as the attached photo?

    please also note the last comment script? is it right?

    # farfield along z axis

    E2_z = farfieldexact3d('field',0,0,z);

    E2_z = pinch(sum(abs(E2_z)^2,4));

    plot(z*1e6,E2_z,'z (um)','|E|^2 (V^2/m^2)','Farfield along z-axis','linewidth=2');


    ind = find(E2_z,max(E2_z));

    zm = z(ind);

    # farfield in x diirection at the focal point (x=0,y=0,z=zm)

    E2_x = farfieldexact3d('field',x,0,zm);

    E2_x = pinch(sum(abs(E2_x)^2,4));

    plot(x*1e6,E2_x,'x (um)','Normalized Intensity','','linewidth=2'); ?>>>>>>>>>>>>>>>>>>>> divide E2_x/ (maximum value )

Sign In or Register to comment.