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.

Passing nodal values to a Matlab function

Please login with a confirmed email address before reporting spam

Hello,

I am doing topology optimization of a heat transfer problem, and I am trying to use a Matlab function to calculate one of the objective functions that requires the nodal values of rho_design and the mesh connectivity matrix.

I tested this function by evaluating mpheval(model,'rho_design') in Matlab, but when I tried defining a global Matlab function in Comsol and passing rho_design as an argument it didn't work. It seems that Comsol is passing scaler values to Matlab instead of the whole field.

Is there a way to pass rho_design entire nodal values and its mesh to Matlab? or a way to access the nodal values and the mesh connectivity matrix using Comsol Application Builder?

Thanks


0 Replies Last Post Oct 13, 2019, 9:33 a.m. EDT
COMSOL Moderator

Hello A S

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.

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.