Obtaining Control Variables in MATLAB

Please login with a confirmed email address before reporting spam

Hello, I am a master's student currently conducting research on topology optimization, and I have a question regarding the acquisition of control variables.

For the topology optimization of a cantilever beam, I used COMSOL with MATLAB. In COMSOL, I conducted the forward analysis and obtained the sensitivity information. Then, using MATLAB's MMA code, I calculated a new control variable based on the control variable and sensitivity obtained earlier. I updated this new control variable in the solution (sol) using "setU()" and "createsolution," thus completing the topology optimization.

Currently, I am working on an optimization project based on Frequency Domain analysis. I followed a similar process to the cantilever beam topology optimization; however, after model analysis, the variable obtained through "mphgetU()" did not contain the initial control variable. Upon checking in the COMSOL GUI result tab, I found that the initial control variable could be seen by selecting "static solution" under the "expression evaluated for" tab instead of "harmonic perturbation."

In summary, although the control variable is retained after the analysis, why does the variable obtained with "mphgetU()" in MATLAB not contain the control variable?


1 Reply Last Post 2024年11月8日 GMT+1 10:57
Kristian Ejlebjærg Jensen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 2024年11月8日 GMT+1 10:57
Updated: 2 weeks ago 2024年11月8日 GMT+1 10:58

Hi sang uk park

You might be able to use the interpolation functionality, see the documentation.

Best regards,

Kristian E. Jensen, Technical Product Manager, Optimization

Hi sang uk park You might be able to use the interpolation functionality, see [the documentation](https://doc.comsol.com/6.2/docserver/#!/com.comsol.help.comsol/comsol_api_results.50.074.html). Best regards, Kristian E. Jensen, Technical Product Manager, Optimization

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.

Baidu
map