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.

Evaluating Objective function from only part of a parametric sweep

Please login with a confirmed email address before reporting spam

Dear all,

I am sweeping an electromagnetic problem in frequency domain. If I am investigating for example frequencies 1, 2, and 3, is there a way to create an objective function that is only evaluated for frequency 1, and another for frequency 2 and so on? I'm thinking something like the at() function but for general parametric sweep.


1 Reply Last Post 2019年6月27日 GMT-4 17:24

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2019年6月27日 GMT-4 17:24
Updated: 5 years ago 2019年6月27日 GMT-4 17:18

To answer my own question, its possible to use withsol() and setind() to achieve this.

For example: withsol('sol1',ewfd.Ttotal,setind(lambda0,2))

The transmission (for example like a plane wave on a periodic unit cell) is evaluated for the 2nd lambda value specified in wavelength domain.

To answer my own question, its possible to use withsol() and setind() to achieve this. For example: withsol('sol1',ewfd.Ttotal,setind(lambda0,2)) The transmission (for example like a plane wave on a periodic unit cell) is evaluated for the 2nd lambda value specified in wavelength domain.

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.