Robert Koslover
Certified Consultant
Please login with a confirmed email address before reporting spam
Posted:
3 years ago
Aug 10, 2021, 9:01 p.m. EDT
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.