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.

Optimizing only a spectral band - Harmonic Problem

Vinicius Freitas dos Santos

Please login with a confirmed email address before reporting spam

Hi everyone, I'm doing a parametric optimization where I obtain the velocity response at a point in the solid, within a given frequency range (0-10kHz) through a point probe, but I want to minimize it only in 2-5kHz. I tried to define my objective function to be the average velocity in this shorter range of the spectrum, however, I can't find a way to get this vector of velocity response in the desired range to perform the average. Is there a way to define the objective function this way directly in COMSOL?

Im using a stepsize of 50Hz, so the vector will have about 60 points.


1 Reply Last Post May 2, 2023, 6:27 a.m. EDT
Kristian Ejlebjærg Jensen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 12 months ago May 2, 2023, 6:27 a.m. EDT
Updated: 12 months ago May 2, 2023, 6:37 a.m. EDT

By default the optimization sums the objective for all frequencies, so that will give you something proportional to the average. I see no reason to solve for frequencies outside the desired range, if they are not used in the optimization. If they are used in constraints, you can use if-statements to make different constraints/objectives for different frequencies.

In many cases, the parametric optimization has an equivalent shape optimization formulation, if one uses the Transformation feature. This is often significantly faster, because gradient based optimization can be used.

Best regards, Kristian E. Jensen Technical Product Manager, Optimization

By default the optimization sums the objective for all frequencies, so that will give you something proportional to the average. I see no reason to solve for frequencies outside the desired range, if they are not used in the optimization. If they are used in constraints, you can use if-statements to make different constraints/objectives for different frequencies. In many cases, the parametric optimization has an equivalent shape optimization formulation, if one uses the Transformation feature. This is often significantly faster, because gradient based optimization can be used. Best regards, Kristian E. Jensen Technical Product Manager, Optimization

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.