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

Control variables with Matlab LiveLink

$
0
0

Hello, I am currently working in a topology (2D) optimization problem, and my goal is to get the optimum distribution of a material parameter (magnetic permeability). Basically, i have a vector of permeabilities (actually it is a vector of values between 0 and 1 and a function that link each value to a permeability) and I need to generate this vector in MATLAB, simulate in COMSOL to get a integral objective function and the correspondent gradient. I am using a gradient-based algorithm for the optimization in MATLAB. I have 2 doubts: What is the best way to create and pass this vector? Ideally, I would have a vector that associates every element of the model to a value, how can I do that? One way would be generate a function (x,y)-> u that corresponds and interpolates every space location to a value, but how can i do this 2D interpolation? The other doubt is about the gradient: how to calculate the gradient of this objective in function to every value of the control vector? Do Sensitivity analysis study have a way to return this gradient vector?


Viewing all articles
Browse latest Browse all 5773

Trending Articles



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