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.

Simple optimization in comsol 5.0

Please login with a confirmed email address before reporting spam

Hey Everyone I'm trying to do A simple optimization in Comsol 5.0

However it keeps giving me an error.

In the attached image you can se how I set it up.

A quick summary:
under definitions I have variables, domain 1, 2, 3 and 4.
In variables I have a variable called ratio1 which is basically domain 1 divided by domain 2.

Now in the optimization I try to maximize this variable ratio1
as parameters I have set 3 parameters which have a upper and lower constrain.

When I run this I get an errror saying:
Error in sweep. Failed to evaluate expression

Or it doesn't change the values I've set under Global->definitions->parameters


1 Reply Last Post 27 lug 2016, 09:31 GMT-4
COMSOL Moderator

Hello Bob van de Voort

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: 8 years ago 27 lug 2016, 09:31 GMT-4
Hi, Bob

I met the same question with you, and now it is solved.

Instead of writing a express of "ratio1" in the objective function directly, you could try to click the "+" which is on the top right corner of objective function, then add the express of "ratio1" in variables.

Hope that it can help you.

Ze.
Hi, Bob I met the same question with you, and now it is solved. Instead of writing a express of "ratio1" in the objective function directly, you could try to click the "+" which is on the top right corner of objective function, then add the express of "ratio1" in variables. Hope that it can help you. Ze.

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.