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 data

Please login with a confirmed email address before reporting spam

hi
anyone can tell me how to get volume of each elements in comsol?, is it possible to get element numbers in comsol?, I hope 'dvol' give the element volume scale factor, from manual I understood its value of Jacobian not the volume of element.From previous forums I understood that we can export mesh data. since I am new to comsol not able to locate it in comsol GUI.
******improtant****
Can anyone give me the step by step procedure to get the volume of each elements in comsol?











9 Replies Last Post 23.08.2012, 03:26 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16.01.2012, 01:43 GMT-5
Hi

You can get the volume, area, length number of items respectively of the geometrical ENTITIES by integrating with operand "1".
But from the GUI I do not know how to access each mesh elements. Probably via API or Matlab code, anyhow I'm interested in the physical results that can all be accessed via the GUI, and not the sampling of the mesh, outside "h" or dvol

--
Good luck
Ivar
Hi You can get the volume, area, length number of items respectively of the geometrical ENTITIES by integrating with operand "1". But from the GUI I do not know how to access each mesh elements. Probably via API or Matlab code, anyhow I'm interested in the physical results that can all be accessed via the GUI, and not the sampling of the mesh, outside "h" or dvol -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16.01.2012, 04:48 GMT-5
hi ivar
thanks for your reply. Actually, I have to calculate mass over elements (=density*volume of element). Can I multiply density directly with dvol (i.e. = density*dvol) to get element mass. Is it correct approach?.

hi ivar thanks for your reply. Actually, I have to calculate mass over elements (=density*volume of element). Can I multiply density directly with dvol (i.e. = density*dvol) to get element mass. Is it correct approach?.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16.01.2012, 10:36 GMT-5
Hi

I do not think you have an direct access to the mesh "elements" from the GUI, its normally not needed.

The overall area or volume is obtained by integrating the operand 1, the mass by integrating rho and an integration is equivalent to a sum over the elements of the "operand * dx*dy*dz" and the "dx*dy*dz" is the element volume, but that is not directly the "dvol" (I suspect that the number of Dofs and hence shape function also interacts here).

Only "support" can give you the full image I believe

Anyhow, to resolve the physics I have never needed the mesh volume details, I can concentrate on the (my) essential, that obviously is not your essential today ;) Sorry I do not know more on that chapter I have given up exchanging COMSOL data with other FEM tools too, that annoys me more as I interact with other clients and subcontracts using other tools and here I loose time and $$. FEM is missing an accepted interface exchange format unfortunately

--
Good luck
Ivar
Hi I do not think you have an direct access to the mesh "elements" from the GUI, its normally not needed. The overall area or volume is obtained by integrating the operand 1, the mass by integrating rho and an integration is equivalent to a sum over the elements of the "operand * dx*dy*dz" and the "dx*dy*dz" is the element volume, but that is not directly the "dvol" (I suspect that the number of Dofs and hence shape function also interacts here). Only "support" can give you the full image I believe Anyhow, to resolve the physics I have never needed the mesh volume details, I can concentrate on the (my) essential, that obviously is not your essential today ;) Sorry I do not know more on that chapter I have given up exchanging COMSOL data with other FEM tools too, that annoys me more as I interact with other clients and subcontracts using other tools and here I loose time and $$. FEM is missing an accepted interface exchange format unfortunately -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.01.2012, 01:58 GMT-5
Hi Ivar
1.I modelled a cube of 12 m , and meshed it with 8 Hex elements. So, volume of each element is 12*12*12/8=216 which is equal to volume of the scale factor 'dvol'. Now you tell me in which way it differs from the actual volume of elements?. I totally confused with this.
2. Also, I don't know how to use the integration to evaluate volume. There are two integrations, one is in model definitions and another one is in derived variables.I think, by using the integration one can get the total volume of a domain not the element volume.
3. Some people did using Matlab. But I am not familiar with that.
4. Some people using Gauss evaluation of points while exporting the data. I don't know how to do it?

I think lot of questions. Please explain one by one.
Thank you for spending your valuable time.


regards
viswesh.......
Hi Ivar 1.I modelled a cube of 12 m , and meshed it with 8 Hex elements. So, volume of each element is 12*12*12/8=216 which is equal to volume of the scale factor 'dvol'. Now you tell me in which way it differs from the actual volume of elements?. I totally confused with this. 2. Also, I don't know how to use the integration to evaluate volume. There are two integrations, one is in model definitions and another one is in derived variables.I think, by using the integration one can get the total volume of a domain not the element volume. 3. Some people did using Matlab. But I am not familiar with that. 4. Some people using Gauss evaluation of points while exporting the data. I don't know how to do it? I think lot of questions. Please explain one by one. Thank you for spending your valuable time. regards viswesh.......

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.01.2012, 04:22 GMT-5
Hi

sorry to confuse you, I'm confused myself I see ;)

one of the things is that dvol is dependent on meshtype, hence its value differs in edge, surface respectively volume plots, and if I use it in a global or local integration.
And I notice I got further "summation over nodes" and "summation over elements" mixed up (the latter is missing we have only "integration" that can be tweaked with different integration orders)

Also with a nice structural mesh its easier to see
And it looks directly mesh dependent and not linked to the shape function as I though earlier, which then is more compliant with the help info determinant of the Jacobian of the mapping

I see I need myself to dig into the theory again, to get some order on this ;) anyhow so far I have not used "dvol" as COMSOL treats it internally for me

Just to be curious, what do you want to use the element info for ?

--
Good luck
Ivar
Hi sorry to confuse you, I'm confused myself I see ;) one of the things is that dvol is dependent on meshtype, hence its value differs in edge, surface respectively volume plots, and if I use it in a global or local integration. And I notice I got further "summation over nodes" and "summation over elements" mixed up (the latter is missing we have only "integration" that can be tweaked with different integration orders) Also with a nice structural mesh its easier to see And it looks directly mesh dependent and not linked to the shape function as I though earlier, which then is more compliant with the help info determinant of the Jacobian of the mapping I see I need myself to dig into the theory again, to get some order on this ;) anyhow so far I have not used "dvol" as COMSOL treats it internally for me Just to be curious, what do you want to use the element info for ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.01.2012, 04:49 GMT-5
hi
Actually, I want to know the mass distribution of a liquid over a domain.The content of liquid is not same over the domain.i.e. some regions have more liquid and some regions have less liquid with in a domain. So, I thought it is easy to calculate using the element volume. Is there any other way?
hi Actually, I want to know the mass distribution of a liquid over a domain.The content of liquid is not same over the domain.i.e. some regions have more liquid and some regions have less liquid with in a domain. So, I thought it is easy to calculate using the element volume. Is there any other way?

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.01.2012, 05:02 GMT-5
Hi

then if you integrate simply rho over a region (domain) or a domain*bolean_volume_limit or you cut your domain into smaller parts to make selection easier (it does not matter if you have a few internal boundaries)

--
Good luck
Ivar
Hi then if you integrate simply rho over a region (domain) or a domain*bolean_volume_limit or you cut your domain into smaller parts to make selection easier (it does not matter if you have a few internal boundaries) -- Good luck Ivar

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19.01.2012, 02:08 GMT-5
Hi

One way to get a better feeling for the field variable Volume scale factor "dvol" (note without units !) is to
make a fresh new model, take a 1m^3 block geometry in 3D solid physics, mesh it in 3 variants:

extremely coarse: a) default tet, , b) tri on one face + sweep, and c) mapped on one face and sweep

then you take the average over the volume of "meshtype" to check the type of elements (=number of edges): 6,9,12 respectively,

you check the mesh statistics to see the number of elements per case,

and you integrate with a Derived value the field variable "1/dvol", you will see that it corresponds to 1:1 for the element volume with hex elements, 1/2 with prism, and 1/6 with tets which corresponds also to the ratio you can "pack" the different elements to get the same volume shape

So take care with the generality: dvol is not necessarily equal to the mesh volume it is what it says: a scale factor (hence no units) related to the volume

--
Good luck
Ivar
Hi One way to get a better feeling for the field variable Volume scale factor "dvol" (note without units !) is to make a fresh new model, take a 1m^3 block geometry in 3D solid physics, mesh it in 3 variants: extremely coarse: a) default tet, , b) tri on one face + sweep, and c) mapped on one face and sweep then you take the average over the volume of "meshtype" to check the type of elements (=number of edges): 6,9,12 respectively, you check the mesh statistics to see the number of elements per case, and you integrate with a Derived value the field variable "1/dvol", you will see that it corresponds to 1:1 for the element volume with hex elements, 1/2 with prism, and 1/6 with tets which corresponds also to the ratio you can "pack" the different elements to get the same volume shape So take care with the generality: dvol is not necessarily equal to the mesh volume it is what it says: a scale factor (hence no units) related to the volume -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23.08.2012, 03:26 GMT-4
In GUI, the elementary information about the mesh can be seen by right clicking the Mesh node in COMSOL's Model builder window, and then selecting 'statistics' .
Regards,
RK
In GUI, the elementary information about the mesh can be seen by right clicking the Mesh node in COMSOL's Model builder window, and then selecting 'statistics' . Regards, RK

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.