Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 5773

Passing nodal values to a Matlab function

$
0
0

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


Viewing all articles
Browse latest Browse all 5773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>