Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Plot electric field for a grating structure with finite periods

Please login with a confirmed email address before reporting spam

Hi all,

I am new to COMSOL and just studied the Plasmonic Wire Grating tutorial using Wave Optics model.

I want to generate a figure with many periodic cells instead of just one, but can't find information about it.

One last question, if I want to plot other physical entities (like the x-component of the electric field as a function of x) do I have to code it or is there some library with functions already written?

Thank you in advance. Jorge


3 Replies Last Post 09.04.2019, 10:26 GMT-4
Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 01.04.2019, 15:18 GMT-4

Jorge,

To plot many periodic cells, create Array data set and the reference to this set in a Plot Group, as shown in the attached image.

There a lot of predefined variables - you can use Equation View or Replace Expression option to see the list of predefined variables.

Regards,

Sergei

Jorge, To plot many periodic cells, create Array data set and the reference to this set in a Plot Group, as shown in the attached image. There a lot of predefined variables - you can use Equation View or Replace Expression option to see the list of predefined variables. Regards, Sergei


Please login with a confirmed email address before reporting spam

Posted: 5 years ago 02.04.2019, 10:43 GMT-4

Thank you Sergei!

Thank you Sergei!

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 09.04.2019, 10:26 GMT-4

I did manage to create an Array data set and plot it, thank you.

On the other hand, I did not find the "Replace Expression" feature. I enabled "Equation View" where it shows variables like "Surface current density, x component" (see figure eq_view.png) but don't know how to plot it as a function of x for example.

How can one see all functions COMSOL had by default and is there a tutorial about the syntax used by COMSOL to insert new functions?

Regards, Jorge

I did manage to create an Array data set and plot it, thank you. On the other hand, I did not find the "Replace Expression" feature. I enabled "Equation View" where it shows variables like "Surface current density, x component" (see figure eq_view.png) but don't know how to plot it as a function of x for example. How can one see all functions COMSOL had by default and is there a tutorial about the syntax used by COMSOL to insert new functions? Regards, Jorge

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.