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.

Use a solution of a very similar problem as initial values...

Please login with a confirmed email address before reporting spam

Dear all,

I am generating a phononic band diagram of a photonic crystal (mechanics-analogy to photonic bands...) by sweeping the bloch-floquet k vector from Matlab (i.e. a boundary condition - but in general, the same should hole for all small changes to a model).
So in principle, for each k vector, just the boundary conditions change a little, the rest stays the same.
Yet apparently (computation times!), each step costs as much time as the first one.
For direct solvers, I kind of understand this, but at least for iterative solvers, I would like to benefit from my knowledge of the previous solution.
I tried to enforce this with the ...refine.mph-file by setting an iterative solver on the same problem with the initial values being the solutions already, but still, it takes forever to converge.

So now my question: How can I make, for this and similar problems, use of the fact that I almost know the solution already? In principle it would be sufficient even if I could just follow inly one eigenfrequency by its way through k-space...
And is the comsol internal sweep doing something different from what I tried (I would prefer not to use it since steering from Matlab is more comfortable...)?

Obviously either my understanding of iterative solvers or my try to use them is quite wrong - but why exactly?

Thanks for any help and/or comments...

Wolfgang


1 Reply Last Post 13 mar 2014, 12:39 GMT-4
COMSOL Moderator

Hello Wolfgang Noichl

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 mar 2014, 12:39 GMT-4
Hello,

this is a very interesting question. I was about, by the way to try such optimisation for a problem of plasmonics.

Imagine you have a parameter k, and you want to find a solution Y(k) with comsol.
As you suggested, it is tempting to restart from Y(k-1) to compute the new solution Y(k).

But the iterative method will not converge directly. It is a bit like the following situation :

Imagine you want to make a trip by car in a mountain region, between two cities.
The cities can seem to be very close in distance (by flight), but you will have to follow the valleys and it could take a long time by car.
Your iterative solver simply 'does not see' that Y(k) is in fact very close from Y(k-1). And after the first iteration, it can go very far from Y(k-1), and need a lot of time to go to Y(k)....

A solution may be not to start directly from Y(k-1), but to add some noise to this starting point (cf simulated annealing methods).

I could may be try to help you more, but, unfortunately, I don t have Comsol 4.3.
Could you transform me your .mph program to Comsol 4.2 ??
Or simply convert it to a *.m file for me ??

Thank you.

M . Perrin
Hello, this is a very interesting question. I was about, by the way to try such optimisation for a problem of plasmonics. Imagine you have a parameter k, and you want to find a solution Y(k) with comsol. As you suggested, it is tempting to restart from Y(k-1) to compute the new solution Y(k). But the iterative method will not converge directly. It is a bit like the following situation : Imagine you want to make a trip by car in a mountain region, between two cities. The cities can seem to be very close in distance (by flight), but you will have to follow the valleys and it could take a long time by car. Your iterative solver simply 'does not see' that Y(k) is in fact very close from Y(k-1). And after the first iteration, it can go very far from Y(k-1), and need a lot of time to go to Y(k).... A solution may be not to start directly from Y(k-1), but to add some noise to this starting point (cf simulated annealing methods). I could may be try to help you more, but, unfortunately, I don t have Comsol 4.3. Could you transform me your .mph program to Comsol 4.2 ?? Or simply convert it to a *.m file for me ?? Thank you. M . Perrin

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.