Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Iteration solver, RF module, 4.2a

Stefan Jovanovic
Dear Comsol Users,

I have issue concerning iteration solver in RF Module,

I want to follow during the simulations linear residual and linear error, because as you know, these values change for every wavelength during the simulation (in my case wavelength is parameter).

My question is how to plot linear residual and linear error (I want to have wavelength on x axis and linear residual or linear error on y axis), and is that possible to plot it during the simulation, or just after it?


And my second question, by your experience, what is good iteration number in these simulations (is 10 000 good enough)?


Thank you very much on every help.



9 Replies Last Post 11/12/2012, 07:13 GMT-05:00
Posted: 5 years ago 10/12/2012, 01:49 GMT-05:00
Hi

the solver normally show a few conversion plots, these are labelled per step index, you must take a look at the plot tab to see at which wavelength it is at a given time. What is often more intersting is to see how the solution evolves, for this turn on the plot while solving in the solver tab

Solver settings are very model dependent, I usually leave the default, and adapt only once it solves and that I believe I need more precision

--
Good luck
Ivar
Hi the solver normally show a few conversion plots, these are labelled per step index, you must take a look at the plot tab to see at which wavelength it is at a given time. What is often more intersting is to see how the solution evolves, for this turn on the plot while solving in the solver tab Solver settings are very model dependent, I usually leave the default, and adapt only once it solves and that I believe I need more precision -- Good luck Ivar

Stefan Jovanovic
Posted: 5 years ago 10/12/2012, 04:18 GMT-05:00

Hi

the solver normally show a few conversion plots, these are labelled per step index, you must take a look at the plot tab to see at which wavelength it is at a given time. What is often more intersting is to see how the solution evolves, for this turn on the plot while solving in the solver tab

Solver settings are very model dependent, I usually leave the default, and adapt only once it solves and that I believe I need more precision

--
Good luck
Ivar


Thank you very much Ivar on your response Ivar, but can you help about few things?

Do you know how to follow evolving of solution? I also check "Generally default plots" and "Generally convergence plots" in "Study settings", but after end of simulation I don't know which commands to use to put all linear residuals and linear errors in some table, and I also don't know how to turn on plot in solver tab during the solving.


Can you give me some short instruction?

Thanks in advanced,

Stefan.
[QUOTE] Hi the solver normally show a few conversion plots, these are labelled per step index, you must take a look at the plot tab to see at which wavelength it is at a given time. What is often more intersting is to see how the solution evolves, for this turn on the plot while solving in the solver tab Solver settings are very model dependent, I usually leave the default, and adapt only once it solves and that I believe I need more precision -- Good luck Ivar [/QUOTE] Thank you very much Ivar on your response Ivar, but can you help about few things? Do you know how to follow evolving of solution? I also check "Generally default plots" and "Generally convergence plots" in "Study settings", but after end of simulation I don't know which commands to use to put all linear residuals and linear errors in some table, and I also don't know how to turn on plot in solver tab during the solving. Can you give me some short instruction? Thanks in advanced, Stefan.

Posted: 5 years ago 10/12/2012, 04:38 GMT-05:00
Hi

check the Definition probe plots, and the solver nodes, "plot while solving" , for "all solver steps"

--
Good luck
Ivar
Hi check the Definition probe plots, and the solver nodes, "plot while solving" , for "all solver steps" -- Good luck Ivar

Stefan Jovanovic
Posted: 5 years ago 11/12/2012, 04:32 GMT-05:00

Hi

check the Definition probe plots, and the solver nodes, "plot while solving" , for "all solver steps"

--
Good luck
Ivar


Thank Ivar, you helped me ;-).

Can you give me some information from your experience?

When you do simulation, probably you also have dilemma "go to finer meshing or go to bigger number of iterations".

By your experience, when you get better results, with finer mesh or with many many iterations??

I use RF module, mostly just plane wave which radiate on glass - air interface (gold particles are on the glass).


Thanks in advanced.


Cheers,

Stefan.
[QUOTE] Hi check the Definition probe plots, and the solver nodes, "plot while solving" , for "all solver steps" -- Good luck Ivar [/QUOTE] Thank Ivar, you helped me ;-). Can you give me some information from your experience? When you do simulation, probably you also have dilemma "go to finer meshing or go to bigger number of iterations". By your experience, when you get better results, with finer mesh or with many many iterations?? I use RF module, mostly just plane wave which radiate on glass - air interface (gold particles are on the glass). Thanks in advanced. Cheers, Stefan.

Posted: 5 years ago 11/12/2012, 05:35 GMT-05:00
Hi

you need reasonably both, first fine enough mesh to resolve the fields variations, in RF its at least 5 (ideally 10) elements per wavelength IN THE MATERIAL (do not forget "n")

Now iterations for me depends on the solver and its settings

RF requires a lot of RAM and time to wait (time to take a look at the Forum ;)

In any case do not forget that numerical FEM has at best around 6 digits precision, due to the representation of the number in double precision, and mostly the solver are set by default to some 3-4 digits relative precision

--
Good luck
Ivar
Hi you need reasonably both, first fine enough mesh to resolve the fields variations, in RF its at least 5 (ideally 10) elements per wavelength IN THE MATERIAL (do not forget "n") Now iterations for me depends on the solver and its settings RF requires a lot of RAM and time to wait (time to take a look at the Forum ;) In any case do not forget that numerical FEM has at best around 6 digits precision, due to the representation of the number in double precision, and mostly the solver are set by default to some 3-4 digits relative precision -- Good luck Ivar

Stefan Jovanovic
Posted: 5 years ago 11/12/2012, 05:53 GMT-05:00
Thank you on fast response.

But for example, when I follow iterations in log tab, can I conclude something if in some iteration I have for example
linear error 0.00078 and linear residual 2e-5.

Can I know something about quality of my simulation from these values?

Thank you very much in any case.

Cheers,

Stefan

Thank you on fast response. But for example, when I follow iterations in log tab, can I conclude something if in some iteration I have for example linear error 0.00078 and linear residual 2e-5. Can I know something about quality of my simulation from these values? Thank you very much in any case. Cheers, Stefan

Posted: 5 years ago 11/12/2012, 06:04 GMT-05:00
Hi

that looks rather good, you your solver is getting a low value from the way the model is set up. But the results could still be wring by 10% or more if the mesh is not fine enough, often I double the mesh to test the mesh independence, as you need both good dolver convergence and mesh resolution.

You can make a similarity between music sampling and compression, that is today often well understood: if you sample poorly your waves, your error (difference from the digitized points and the true signal AT these digitized points) will be small, but the sound would not be nice as you will miss the high frequencies and the modulation will be spiky, so you need both

--
Good luck
Ivar
Hi that looks rather good, you your solver is getting a low value from the way the model is set up. But the results could still be wring by 10% or more if the mesh is not fine enough, often I double the mesh to test the mesh independence, as you need both good dolver convergence and mesh resolution. You can make a similarity between music sampling and compression, that is today often well understood: if you sample poorly your waves, your error (difference from the digitized points and the true signal AT these digitized points) will be small, but the sound would not be nice as you will miss the high frequencies and the modulation will be spiky, so you need both -- Good luck Ivar

Stefan Jovanovic
Posted: 5 years ago 11/12/2012, 06:19 GMT-05:00

Hi

that looks rather good, you your solver is getting a low value from the way the model is set up. But the results could still be wring by 10% or more if the mesh is not fine enough, often I double the mesh to test the mesh independence, as you need both good dolver convergence and mesh resolution.

You can make a similarity between music sampling and compression, that is today often well understood: if you sample poorly your waves, your error (difference from the digitized points and the true signal AT these digitized points) will be small, but the sound would not be nice as you will miss the high frequencies and the modulation will be spiky, so you need both

--
Good luck
Ivar


Thank you very much Ivar on answers and especially on quick answers.

I didn't think about on that way. I just compared few simulations for iterative solver (number of iterations 10 000) and for direct solver, and I thought that is OK because almost perfectly fit.

Now I get it. My mesh is maximum lambda/5 (so 5 elements per wavelength) and my PML is lambda/2.

So I have to check same model and put for example maximum lambda/7 or lambda/8.


Thank you very much Ivar, you helped me lot, yesterday and today.


Cheers ,


Stefan

[QUOTE] Hi that looks rather good, you your solver is getting a low value from the way the model is set up. But the results could still be wring by 10% or more if the mesh is not fine enough, often I double the mesh to test the mesh independence, as you need both good dolver convergence and mesh resolution. You can make a similarity between music sampling and compression, that is today often well understood: if you sample poorly your waves, your error (difference from the digitized points and the true signal AT these digitized points) will be small, but the sound would not be nice as you will miss the high frequencies and the modulation will be spiky, so you need both -- Good luck Ivar [/QUOTE] Thank you very much Ivar on answers and especially on quick answers. I didn't think about on that way. I just compared few simulations for iterative solver (number of iterations 10 000) and for direct solver, and I thought that is OK because almost perfectly fit. Now I get it. My mesh is maximum lambda/5 (so 5 elements per wavelength) and my PML is lambda/2. So I have to check same model and put for example maximum lambda/7 or lambda/8. Thank you very much Ivar, you helped me lot, yesterday and today. Cheers , Stefan

Posted: 5 years ago 11/12/2012, 07:13 GMT-05:00
Hi

just to make it clear, I happened to answer quick today, as I was waiting for COMSOL to finish an animation ;)
I'm not always in this situation

--
Good luck
Ivar
Hi just to make it clear, I happened to answer quick today, as I was waiting for COMSOL to finish an animation ;) I'm not always in this situation -- Good luck Ivar

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.