Iteration solver, RF module, 4.2a

Topics: RF Module, 4.2a

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   9 Replies   Last post: December 11, 2012 12:13pm UTC
Stefan Jovanovic

Stefan Jovanovic

December 9, 2012 1:52pm UTC

Iteration solver, RF module, 4.2a

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.


Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 10, 2012 6:49am UTC in response to Stefan Jovanovic

Re: Iteration solver, RF module, 4.2a

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Stefan Jovanovic

Stefan Jovanovic

December 10, 2012 9:18am UTC in response to Ivar Kjelberg

Re: Iteration solver, RF module, 4.2a


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.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 10, 2012 9:38am UTC in response to Stefan Jovanovic

Re: Iteration solver, RF module, 4.2a

Hi

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

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Stefan Jovanovic

Stefan Jovanovic

December 11, 2012 9:32am UTC in response to Ivar Kjelberg

Re: Iteration solver, RF module, 4.2a


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.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 11, 2012 10:35am UTC in response to Stefan Jovanovic

Re: Iteration solver, RF module, 4.2a

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Stefan Jovanovic

Stefan Jovanovic

December 11, 2012 10:53am UTC in response to Ivar Kjelberg

Re: Iteration solver, RF module, 4.2a

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 11, 2012 11:04am UTC in response to Stefan Jovanovic

Re: Iteration solver, RF module, 4.2a

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Stefan Jovanovic

Stefan Jovanovic

December 11, 2012 11:19am UTC in response to Ivar Kjelberg

Re: Iteration solver, RF module, 4.2a


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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

December 11, 2012 12:13pm UTC in response to Stefan Jovanovic

Re: Iteration solver, RF module, 4.2a

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines