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

bringing B-spline surfaces into COMSOL

$
0
0
I have used MATLAB to define a series of B-spline parametric surfaces that I wish to knit together to a solid object in COMSOL. My current approach for bringing these into COMSOL is to create a Parametric Surface feature for each one, and then define their X Y and Z coordinates using functions of s1 and s2. I make a MATLAB function node, and then I have .m files that give the X,Y, and Z coordinates for given values of s1 and s2, using the splines I have previously defined. COMSOL spends some time evaluating these external MATLAB B-spline functions, and evenually approximates these surfaces with B-splines of its own. Unfortunately, it takes so long to do the approximation that this approach is not really practical.

The optimal thing would be to take the knot vectors and control points found in MATLAB and give them directly to COMSOL, to use to define its surface. (I defined my B-spline surfaces using "The NURBS book," which was the reference I was given by a COMSOL technician, so I believe my splines to be defined in a way just about identical to COMSOL's. There is thus little reason to believe that COMSOL's parametric surface would be significantly different from the one I start with, if I could just pass on the same information). I have not found a way to do this though. Does anyone have any experience with bringing B-spline surfaces into COMSOL or suggestions on how to make this process more efficient?

Thanks in advance,
Martin

Viewing all articles
Browse latest Browse all 26527

Trending Articles