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.
Obtaining Control Variables in MATLAB
Posted 8 nov 2024, 01:21 GMT-5 LiveLink for MATLAB, Optimization, Studies & Solvers Version 6.2 1 Reply
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?