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.

How to calculate (grouped) boundary surface area and perimeter

Please login with a confirmed email address before reporting spam

Hi,
I am using Comsol 4.2a for convective heat transfer calculations and have a problem w/ area and perimeter calculation. The two are input parameters for the semi-empirical convective cooling model (horizontally oriented bdry.) that is available for boundary heat transfer calculation.

At the moment I estimate the area and the perimeter of the contributing boundary surfaces. That's sufficient for simple surface shapes but for the more complex ones I tried to calculate them for specific grouped boundaries.

The Integration operator works for result parameters but I failed to set it up for surface area calculation and I have no idea how to calculate the perimeter.

The problem sounds quite simple to solve since the two values are only geometric functions and the result should be calculated in Comsol at least internally.. Any ideas how to?

Thanks in advance!

Ralf.

7 Replies Last Post 19 gen 2012, 08:20 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 gen 2012, 07:59 GMT-5
I am not sure if you asked this simple: Select surface integration, and insert 1 in the integration variable box. Perimeter is calculated in the same way with the line integration.

Sorry if this is not what you meant.
I am not sure if you asked this simple: Select surface integration, and insert 1 in the integration variable box. Perimeter is calculated in the same way with the line integration. Sorry if this is not what you meant.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 gen 2012, 15:28 GMT-5
Hello Lasse,

IT IS THAT SIMPLE :) , thanks a lot!

I assumed that it's that simple but I couldn't find any hint in the docs. Now there is no more need to ask my CAD colleagues or to use my thumb.

Best regards
Ralf.
Hello Lasse, IT IS THAT SIMPLE :) , thanks a lot! I assumed that it's that simple but I couldn't find any hint in the docs. Now there is no more need to ask my CAD colleagues or to use my thumb. Best regards Ralf.

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 6 gen 2012, 01:26 GMT-5
Hi

you know the intop1 stands for

SUM_over_selected_elements of INTegration_over_each_element_type Your_EXPression *dx*dy*dz

so if you select domains in 3D and use Your_EXPression = 1 you get a volume, for boundaries the Area etc

Just as if you repalce Your_EXPression = solid.rho you get the total mass (assuming you are in Solid Physics

If you replace the Your_EXPression by solid.rho*(X^2+Y^2) you get one of the Inertial Tensor elements (Izz if I got it right ;)

etc.

The only thing you should be aware about is that you can select the "Frame" you are integrating over, and in "Solid" physics, now that COMSOL (in V4) has set by default the "spatial frame" is driven by the deformation (more an Euler fluid approach) you should distinguish if you want to integrate on the deformed (solution dependent) or the original (static ) "Material frame". Note that if you choose a variable depending on the spatial frame, and use this variable in your solver sequence, you are looping your system and COMSOL mostly detects this (correctly) as a non-linear study and changes the solver settings accordingly.

Last thing, in 2D-axi you should decide if you 2D domain integration is a surface or a volume integration (the latter multiplies the operand by 2*pi*r, and normally changes also the units accordingly. There is a thick check mark for that, or you do it by hand

--
Good luck
Ivar
Hi you know the intop1 stands for SUM_over_selected_elements of INTegration_over_each_element_type Your_EXPression *dx*dy*dz so if you select domains in 3D and use Your_EXPression = 1 you get a volume, for boundaries the Area etc Just as if you repalce Your_EXPression = solid.rho you get the total mass (assuming you are in Solid Physics If you replace the Your_EXPression by solid.rho*(X^2+Y^2) you get one of the Inertial Tensor elements (Izz if I got it right ;) etc. The only thing you should be aware about is that you can select the "Frame" you are integrating over, and in "Solid" physics, now that COMSOL (in V4) has set by default the "spatial frame" is driven by the deformation (more an Euler fluid approach) you should distinguish if you want to integrate on the deformed (solution dependent) or the original (static ) "Material frame". Note that if you choose a variable depending on the spatial frame, and use this variable in your solver sequence, you are looping your system and COMSOL mostly detects this (correctly) as a non-linear study and changes the solver settings accordingly. Last thing, in 2D-axi you should decide if you 2D domain integration is a surface or a volume integration (the latter multiplies the operand by 2*pi*r, and normally changes also the units accordingly. There is a thick check mark for that, or you do it by hand -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 gen 2012, 03:38 GMT-5
May I add that the accuracy of the integration depends on meshing, because the integral is calculated over the elements. You see that by drawing a, say, cylinder, the volume and area of which are easily calculated analytically. Try different meshes and you'll see how much Comsol integration deviates from those.
May I add that the accuracy of the integration depends on meshing, because the integral is calculated over the elements. You see that by drawing a, say, cylinder, the volume and area of which are easily calculated analytically. Try different meshes and you'll see how much Comsol integration deviates from those.

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 6 gen 2012, 06:11 GMT-5
Hi

And it depends on the shape function, not only the mesh alone !

With COMSOL one must always consider the pair { mesh & shape function } , particularly when comparing to "older" FEM programme results

--
Good luck
Ivar
Hi And it depends on the shape function, not only the mesh alone ! With COMSOL one must always consider the pair { mesh & shape function } , particularly when comparing to "older" FEM programme results -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 gen 2012, 07:39 GMT-5
Thank you for this explanation.
I was trying to compute the deformed surface and volume, too, but without success.
To ease the setup, activate the check box: Study-> Study Steps -> Include geometric nonlinearity
This and the spatial frame gave me the deformed volume and surface.
Thank you for this explanation. I was trying to compute the deformed surface and volume, too, but without success. To ease the setup, activate the check box: Study-> Study Steps -> Include geometric nonlinearity This and the spatial frame gave me the deformed volume and surface.

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 gen 2012, 08:20 GMT-5
Hi

indeed COMSOL in V4 has changed the defaults, now solid behaves almost like fluids with the spatial frame "on" by default and you can integrate on it or on the initial material frame. But be avare if you link avatiable to the spatial "defomed" frame, in solid you are making your model non linear (easy to forget ;)

--
Good luck
Ivar
Hi indeed COMSOL in V4 has changed the defaults, now solid behaves almost like fluids with the spatial frame "on" by default and you can integrate on it or on the initial material frame. But be avare if you link avatiable to the spatial "defomed" frame, in solid you are making your model non linear (easy to forget ;) -- Good luck Ivar

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.