Box simulation domain with circular dielectric disc inside

Jan Schuette-Engel

Please login with a confirmed email address before reporting spam

Hi all,

I am using the equation based modeling to solve a coefficient form pde.

I want to have a simulation domain with a box shape and inside the box I want to place a cylinder with radius r and height h. The cylinder has dielectric constant epsilonr=3. All other space is Air.

Under the point geometry I now added a Box and also I add the cylinder inside the box domain.

I think I now have to define the disjoint domain of the cylinder with the Box. This domain I will call D in the following.

In the following I have to give the domain D the dielectric constant epsilonr=1 and the cylinder epsilonr=3.

Is this strategy correct?

To get the domain D I did

right click on Geometry > Booleans and Partitions > Difference

And then I select the two domains which I want to subtract.

My question is: How do I tell COMSOL that the two different domains have different epsilonr? I have created two materials, one with epsilonr=1 and the other one with epsilonr=3. But how do I assign the two domains (D and Cylinder ) to these two meterials?

In the end I will write the constant epsilonr into the pde.

Many thanks in advance.


4 Replies Last Post 2018年5月17日 GMT-0400上午6:49
Jan Schuette-Engel

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 2018年5月11日 GMT-0400下午1:21

Hi,

In the meanwhile I have made some progress, but I think my solution is still not very elegant. Therefore I will post now how I did it. It would be nice if you could maybe give me advice how to do it in a better way.

1) I defined a Box with dimensions (1,1,1)m. Afterwards I generated a Cylinder of height H and radius R. The cylinder is inside the Box. 2) I define two global rectangular functions. The first rectangular function (rec_radius) has its minimum at 0 and maximum at R. The second rectangular (rec_plate1) function has its minimum at 0 and maximum at H. 3) I now combine the two rectangular functions of point 2 to write down a function which defines my refractive index. I want to have a refractive index of 3 inside the cylinder. Outside of the cylinder the refractive index should be 1. The definition of the function is as follows rec_radius(x^2+y^2)rec_plate1(z+0.51)2+1*. I call the function epsilon_mat 4) In the coefficient form pde interface I now for example set the parameter a to root.epsilonmat(x,y,z) . With this choice I have now the correct model.

The results look reasonable, but I am asking myself if there is a better way to do this? Actually I wouldn't have to define the cylinder geometry. I could simply just define the function as I did and run the simulation? Maybe I am doing it to complicated. Isn't there a way to just assign the materials to the objects ( for example each material has a material property called epsilonr) and then write the material quantity directly into the constants of the coeffcient form pde?

I will attach my working file to this post

Hi, In the meanwhile I have made some progress, but I think my solution is still not very elegant. Therefore I will post now how I did it. It would be nice if you could maybe give me advice how to do it in a better way. 1) I defined a Box with dimensions (1,1,1)m. Afterwards I generated a Cylinder of height H and radius R. The cylinder is inside the Box. 2) I define two global rectangular functions. The first rectangular function (*rec_radius*) has its minimum at 0 and maximum at R. The second rectangular (*rec_plate1*) function has its minimum at 0 and maximum at H. 3) I now combine the two rectangular functions of point 2 to write down a function which defines my refractive index. I want to have a refractive index of 3 inside the cylinder. Outside of the cylinder the refractive index should be 1. The definition of the function is as follows *rec_radius(x^2+y^2)*rec_plate1(z+0.51)2+1*. I call the function *epsilon_mat* 4) In the coefficient form pde interface I now for example set the parameter a to *root.epsilonmat(x,y,z)* . With this choice I have now the correct model. The results look reasonable, but I am asking myself if there is a better way to do this? Actually I wouldn't have to define the cylinder geometry. I could simply just define the function as I did and run the simulation? Maybe I am doing it to complicated. Isn't there a way to just assign the materials to the objects ( for example each material has a material property called epsilonr) and then write the material quantity directly into the constants of the coeffcient form pde? I will attach my working file to this post


Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 2018年5月11日 GMT-0400下午1:37

Hm, you can simply assign different materials to different domains. Probably any of the application library examples demonstrates this. Your way is typically used in case you need spatially distributed material properties.

Or maybe I just don't understand what the issue is.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hm, you can simply assign different materials to different domains. Probably any of the application library examples demonstrates this. Your way is typically used in case you need spatially distributed material properties. Or maybe I just don't understand what the issue is. Cheers Edgar

Jan Schuette-Engel

Please login with a confirmed email address before reporting spam

Posted: 6 days ago 2018年5月17日 GMT-0400上午6:14
Updated: 6 days ago 2018年5月17日 GMT-0400上午6:14

Hi Edgar,

I think I know how to assign different materials to different objects. The point ist how to include the material properties into the eqation? root.materials.epsilonr does not work.

Cheers

Hi Edgar, I think I know how to assign different materials to different objects. The point ist how to include the material properties into the eqation? root.materials.epsilonr does not work. Cheers

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 days ago 2018年5月17日 GMT-0400上午6:49

Hi Jan,

oh yes, I see, it is not that trivial, and I don't know the answer. Would be nice if an expert from Comsol could contribute to this. Of course you could submit it to support, but this is of general interest, so would be nice to keep it in the forum.

Btw. your file attachment in the earlier post seems to be broken.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Jan, oh yes, I see, it is not that trivial, and I don't know the answer. Would be nice if an expert from Comsol could contribute to this. Of course you could submit it to support, but this is of general interest, so would be nice to keep it in the forum. Btw. your file attachment in the earlier post seems to be broken. Cheers Edgar

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.