Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Working with Geometric measurements tool

Please login with a confirmed email address before reporting spam

Hello,

I'm trying to get the area of a boundary, unfortunately without success.

Reading the help for measurement tool in the API document (P.151), I can conclude to the following code lines:

ie: to measure a face on a single block
__________________________________________________________________

model.geom('geom1').measure.selection.init(2);
model.geom('geom1').measure.selection.set('blk1', [4]); % Measure face #4
model.geom('geom1').measure.getArea(4);
__________________________________________________________________
This code sequence generate error : No appropriate method, property, or field getArea

The only line on which help document is passing quickly over is the last one: I don't know how to correctly write this line. getBoundaryArea, getArea ?



Regards,


2 Replies Last Post 11.07.2014, 01:50 GMT-4
COMSOL Moderator

Hello Gabriel Caron

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.09.2011, 13:14 GMT-4
Finally, to get the area :

model.geom('geom1').measureFinal.selection.geom('geom1', 2);
model.geom('geom1').measureFinal.selection.set([4]);
model.geom('geom1').measureFinal.getVolume
Finally, to get the area : model.geom('geom1').measureFinal.selection.geom('geom1', 2); model.geom('geom1').measureFinal.selection.set([4]); model.geom('geom1').measureFinal.getVolume

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.07.2014, 01:50 GMT-4
Hello Gabriel,

I know its been so long since your post but I am posting here since I couldn't find any relavant post about this.

I want to measure the length of an edge, area of a boundary etc. using the measurement tool in COMSOL. I found out that using the following syntax:

model.geom(<geomtag>).measure.selection.named(<edgeselectiontag>)

in Matlab Livelink does not actually return the edge length. It just returns the following but not the actual length of the edge.

Dimension 1: Geometry Geometry; Domain 31

Is there a way to get the value of actual dimension into the matlab workspace?

Thanks!
Hello Gabriel, I know its been so long since your post but I am posting here since I couldn't find any relavant post about this. I want to measure the length of an edge, area of a boundary etc. using the measurement tool in COMSOL. I found out that using the following syntax: model.geom().measure.selection.named() in Matlab Livelink does not actually return the edge length. It just returns the following but not the actual length of the edge. Dimension 1: Geometry Geometry; Domain 31 Is there a way to get the value of actual dimension into the matlab workspace? Thanks!

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.