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.

Problems solving Maxwell equation in Wave Optics module

Please login with a confirmed email address before reporting spam

Hi everyone! I am trying to solve the retarded Green tensor as a solution of the Full Maxwell equation in a certain dielectric environment. ∇x∇xG(r,r',w) - k^2eG(r,r',w) = -1/c^2 d(r-r') is the equation I want to solve, but the wave optics module in frequency domain doesn't have the point charge on the right side of the equation. I tried (plan) to add an external current subnode in the physics with a unit current at position r' on direction z to immitate the point charge oscillating at frequency w (optical frequency), and solve for Gzz at position r in term of Ez from the COMSOL result. The problem is that the solver always give the following error:

Undefined value found. - Detail: NaN or Inf found when solving linear system using SOR.

I think maybe I did something wrong when setting up the external current subnode, because in the dependent variable in the study setup, there is only electric field, so I don't know how the external current involves in the study, and whether it actually has an effect. Also I am not sure if I set the boundry of the current correct, but since it's frequency domain study, it shouldn't matter (I guess COMSOL doesn't solve for charge accumulation in this model)? I attached the model as well.

I also looked at e.g. RF module or AC/DC modules, they either doesn't have the field retardation effect, or doesn't have the option to add charges.

Also if there is a direct way to add the point like charge in weak expression, it would be better! But I couldn't find much information online on e.g. what COMSOL actually solves and which weak expressions are supported for different modules. If would be nice if someoone could also help me with it. Or if there is an already established model for solving the Green tensor for a full Maxwell equation set, please let me know!



3 Replies Last Post 04.12.2021, 10:46 GMT-5
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 03.12.2021, 12:22 GMT-5
Updated: 3 years ago 03.12.2021, 12:29 GMT-5

I don't have the wave optics module but I have the RF module. So I took a look at your model. I noticed you have a short and isolated cylinder with a specified unidirectional and spatially-uniform volume current density in it. I don't recommend doing that, since this corresponds to an unphysical condition (even if/when it oscillates). You have also assigned that cylinder's material to be what you called "perfect vacuum." That also sounds unphysical to me, since a perfect vacuum (if that is what you really intended/specified) is also an insulator and thus doesn't support any current (and that includes the current density you tried to impose on it) unless you somehow introduce some charges into that vacuum, to carry the current. Finally, I'll leave any detailed discussion about the utility (or not) of using Comsol Multiphysics to address the use of Green functions to the experts at Comsol. Good luck.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I don't have the wave optics module but I have the RF module. So I took a look at your model. I noticed you have a short and isolated cylinder with a specified unidirectional and spatially-uniform volume current density in it. I don't recommend doing that, since this corresponds to an *unphysical* condition (even if/when it oscillates). You have also assigned that cylinder's material to be what you called "perfect vacuum." That also sounds unphysical to me, since a perfect vacuum (if that is what you really intended/specified) is also an insulator and thus doesn't support any current (and that includes the current density you tried to impose on it) *unless* you somehow introduce some charges into that vacuum, to carry the current. Finally, I'll leave any detailed discussion about the utility (or not) of using Comsol Multiphysics to address the use of Green functions to the experts at Comsol. Good luck.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 04.12.2021, 10:28 GMT-5

Thanks Robert! Thanks for the comment! I changed the "perfect vacuum" to e.g. Aluminum, but it looks like it gives the same error, and the physics node doesn't seem to take e.g. conductivity properties as a material input. I guess at least for wave optics module the charge and conduction is not taken into account, such that the external current is actually just a fixed current (my understanding could be wrong) in the equation.

So I also tried the RF module, which seems to take in the conductivity. And the error went away. But the frequency domain study (at 2e14Hz) doesn't really converge to anything meaningful, and the error starts from 400 and only goes down until 50. But at least now there is no error. Maybe it's that the mesh is not good enough?

Thanks Robert! Thanks for the comment! I changed the "perfect vacuum" to e.g. Aluminum, but it looks like it gives the same error, and the physics node doesn't seem to take e.g. conductivity properties as a material input. I guess at least for wave optics module the charge and conduction is not taken into account, such that the external current is actually just a fixed current (my understanding could be wrong) in the equation. So I also tried the RF module, which seems to take in the conductivity. And the error went away. But the frequency domain study (at 2e14Hz) doesn't really converge to anything meaningful, and the error starts from 400 and only goes down until 50. But at least now there is no error. Maybe it's that the mesh is not good enough?


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 04.12.2021, 10:46 GMT-5

Well, I'm glad it is getting closer to working. Your model is still unphysical, however. At 2x10^14 Hz, one can't easily impose a bulk volume current inside aluminum in the real world. Consider specifying a surface current on your aluminum part, not a volume current. And I wouldn't even bother to mesh (or do computations within) the aluminum's volume. Its internal fields are all zero, for any practical purpose. So, I would mesh only its surface, and treat the aluminum as a material boundary condition, but with an imposed surface current density (an equivalent to replace your volume current density). Note that I don't think that making this one change will necessarily solve all your problems, but it should help.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Well, I'm glad it is getting closer to working. Your model is still unphysical, however. At 2x10^14 Hz, one can't easily impose a bulk volume current inside aluminum in the real world. Consider specifying a surface current on your aluminum part, not a volume current. And I wouldn't even bother to mesh (or do computations within) the aluminum's volume. Its internal fields are all zero, for any practical purpose. So, I would mesh only its surface, and treat the aluminum as a material boundary condition, but with an imposed surface current density (an equivalent to replace your volume current density). Note that I don't think that making this one change will necessarily solve all your problems, but it should help.

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.