Range of values for a variable gives different results than single value

Please login with a confirmed email address before reporting spam

In the frequency study step of my model, I noticed when I specify a range of values for a variable (in this case, the frequency of the incident wave), I get a different solution than if I pick one value and simulate only that value. I have no idea why this is the case?


2 Replies Last Post May 24, 2020, 1:07 PM EDT
Robert Koslover Antennas, Waveguides, Electromagnetics

Please login with a confirmed email address before reporting spam

Posted: 2 months ago May 23, 2020, 7:20 PM EDT
Updated: 2 months ago May 23, 2020, 7:21 PM EDT

I presume that you are comparing a frequency that was one of the ones in the range with the same one specified invidividually.

If the differences are fairly small, it is probably the mesh that is causing this. I would bet that you have it presently configured to mesh automatically depending on the physics, and the software is probably meshing it in accordance with what it thinks is a good fit to your first frequency in the list in the range? Instead, try meshing your problem based on user-specified conditions instead. Take charge of the mesh yourself. I'm guessing that once you have identical meshes, you will get identical answers. If not, then there is something else that is different (or also different) between the two cases.

I presume that you are comparing a frequency that was one of the ones in the range with the same one specified invidividually. If the differences are fairly small, it is probably the mesh that is causing this. I would bet that you have it presently configured to mesh automatically depending on the physics, and the software is probably meshing it in accordance with what it thinks is a good fit to your first frequency in the list in the range? Instead, try meshing your problem based on user-specified conditions instead. Take charge of the mesh yourself. I'm guessing that once you have identical meshes, you will get identical answers. If not, then there is something else that is different (or also different) between the two cases.

Please login with a confirmed email address before reporting spam

Posted: 2 months ago May 24, 2020, 1:07 PM EDT

Yes, that seems to have solved it! It is correct that I first calculate the background field from a range of values, then rerun over the same range of values to get the near field solution. The closer I make the ending value of the range to the starting value, the solution converges on the correct solution, so your explanation makes sense. I changed the mesh to user-controlled, and this seems to give much more reasonable results. Thanks!

Yes, that seems to have solved it! It is correct that I first calculate the background field from a range of values, then rerun over the same range of values to get the near field solution. The closer I make the ending value of the range to the starting value, the solution converges on the correct solution, so your explanation makes sense. I changed the mesh to user-controlled, and this seems to give much more reasonable results. Thanks!

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.