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.
mesh element areas from fem structure
Posted 19.05.2011, 05:40 GMT-4 Mesh Version 3.5a 8 Replies
Please login with a confirmed email address before reporting spam
I am working on a project in COMSOL 3.5a, and I have retrieved the fem structure from COMSOL to MATLAB. My mathematical operations require the knowledge of not only solutions for each mesh at each time instant, but the knowledge of the area of the mesh element that the solution is valid as well. So far all I could find from commands is how to extract the edge sizes of triangular mesh elements, but not the total areas. Is it possible to find areas as well?
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Under the menu 'Mesh' there is the item 'Mesh statistics' whici will give you some information.
Cheers
Please login with a confirmed email address before reporting spam
the statistics are not as specific as i need (i need the physical sizes of all mesh elements in my model).
i am using the mesh size 'h' for now, which is the length of the longest edge of the triangular mesh elements. although this parameter is an indicator of the physical size, what i need is the area (or volume), specifically.
any other ideas?
Please login with a confirmed email address before reporting spam
In 4.1 you can extract several specific infos about your mesh about area and volume, but for 3.5 I could not find much, sorry.
I am not sure I understand when you say you need all the physical sizes of all the mesh elements, do you actually need to associate a value to each element? I am curious, even if it were possible, how would you handle such an amount of data? How would you use it?
Cheers
Please login with a confirmed email address before reporting spam
ok then, let me explain myself more clearly.
what i need to do mathematically is to is to integrate each solution along each mesh element. thus, i need the so called "gramian" of the mesh elements, which is nothing but a diagonal matrix whose elements are the areas (or volumes in 3D) of the mesh elements. this is indeed associating a value to each element, but not any value does the job. i need either sizes, or some value that is (directly) related to the size of the elements.
second, i do not think the physical size data is not too hard to handle. given a mesh consisting of N elements (in my case, 87), solved for T time instants, the solution data is an NxT matrix where the data I need is just an N-dim vector (a vector of areas for each element). so it is not a big amount of data (again, in my case, just 87 values) and not even comparable in size to the size of the solution data. so i think the amount of data would not be a problem in any case.
Hi,
In 4.1 you can extract several specific infos about your mesh about area and volume, but for 3.5 I could not find much, sorry.
I am not sure I understand when you say you need all the physical sizes of all the mesh elements, do you actually need to associate a value to each element? I am curious, even if it were possible, how would you handle such an amount of data? How would you use it?
Cheers
Please login with a confirmed email address before reporting spam
Oook! now I understand what you want to do, sorry I didn't think of the Gram matrix before but I work with well above 1M elements so that option is definetely out of my field.
Honestly I am not sure you can extract such a detailed information either 3.5 or 4.1 because if you can extract it for 87 elements the same command should yield a result for my 1+ M elements and that means Comsol must have been built to handle huge amount of data (I work in 3D so I would suppose both area and volume to be available).
You'd better ask support and please report back because it is one of those generic issues that may come in handy.
Cheers
Please login with a confirmed email address before reporting spam
A = sqrt(p*(p-a)*(p-b)*(p-c))
Where A is the Area, a, b, c are the lengths of each side, and p is the semipermieter (p=0.5*(a+b+c) ).
It's an easy script to implement in Matlab
Please login with a confirmed email address before reporting spam
If anybody can help me on this, I will appreciate a lot. I am really stuck with getting the mesh element area. Thanks in advance..
Have you solved the problem? How to extract the element area from comsol? 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.