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.

Creating a small cylinder with changing refractive index

Please login with a confirmed email address before reporting spam

Hey there! How do you create creating a small cylinder with changing refractive index? For example, I would like to the refractive index to be with a Gaussian profile.

Thanks, Ivan


1 Reply Last Post 2021年8月10日 GMT-4 21:01
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 2021年8月10日 GMT-4 21:01

One possible way: 1. Create a user-defined function for your Gaussian, under Component 1 --> Definitions --> Functions --> Analytic. For example, it would have the Arguments: x, y, z and could have an expression something like (just an example) 1+exp(-x^2-y^2-z^2) . That would be a Gaussian with a base of 1 and peak of 2, around zero, in a sphere. You'll decide what function you want for your cylinder, but to keep it simple, I suggest you put it in terms of x, y, and z. Give the function a name, e.g., myname. 2. Now go to Materials, and find the place where you specify either dielectric constant or index of refraction (which is related, but not the same thing, so be sure you understand that) and put your function in there, i.e., myname(x,y,z). That is, the software will allow you to put a function of x, y, and z under the material properties, rather than just a simple scalar! And that makes solving your kind of problem a lot easier!

I hope that helps.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
One possible way: 1. Create a user-defined function for your Gaussian, under Component 1 --> Definitions --> Functions --> Analytic. For example, it would have the Arguments: x, y, z and could have an expression something like (just an example) 1+exp(-x^2-y^2-z^2) . That would be a Gaussian with a base of 1 and peak of 2, around zero, in a sphere. You'll decide what function you want for your cylinder, but to keep it simple, I suggest you put it in terms of x, y, and z. Give the function a name, e.g., *myname*. 2. Now go to Materials, and find the place where you specify either dielectric constant or index of refraction (which is *related*, but not the same thing, so be sure you understand that) and put your function in there, i.e., *myname(x,y,z)*. That is, the software will allow you to put a *function* of x, y, and z under the material properties, rather than just a simple scalar! And that makes solving your kind of problem a lot easier! I hope that helps.

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.