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.

COMSOL MATLAB link Optimization

Please login with a confirmed email address before reporting spam

Hi There

I'm running a optimization routine linking Comsol simulation and MATLAB uisng optimization function fmincon to fit some of the parameters in a Comsol model which solves some heat and mass transfer euqations for a 2D geometry. The porblem is that the optimization fails in MATLAB and I get the the convergence error for Comsol apparently hitting singularity , while I can converge the case with the same parameters in Comsol also I can run the model inside MATALB as well and get correct results. But when the model function evaluation is done inside fmincon it seems that the Comsol model simulation diverges at a start of the simulation. I played with initial guess and tightening the parameters range or fixing their values but problem persists. Any suggstion? Is there a difference between Comsol solver and MATLAB version? It is a bit puzzling.

Thanks, Al


0 Replies Last Post 5 août 2018, 17:00 UTC−4
COMSOL Moderator

Hello alnjy

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.

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.