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.

Calculating volume from postprocessed data

Constantinos Katevatis

Please login with a confirmed email address before reporting spam

I have a compound diffusing through my model. Once the Comsol processes the diffusion/convection physics, is there a way to calculate the volume for which the concentration of the compound is higher that a given threshold? I tried exporting the postprocessed data as a coordinates and then using Matlab to count the number of points above the threshold, but the points were unevenly distributed. It appeared that the density of the points corresponded with the density of the tetrahedrons from the mesh (finer tetrahedrons = more dense points).

Is there a way to calculate the volume at which the concentration is above a give threshold?
Thanks for the advice,
Constantinos

1 Reply Last Post 26 gen 2010, 03:14 GMT-5
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 26 gen 2010, 03:14 GMT-5
Hi

yes indeed, there should be a rather easy way.

The volume is obtained by integrating "1" over the sub-domain of interest.

If you replace the "1" by a bolean expression i.e. (c<1.5) where c is your concentration this should do, no ?

if you want the fraction of your volume you must make two variables and then take their ratio

Check it out carefully, there are many "easy" tricks like that in COMSOL once you catch the correct way

Good luck
Ivar
Hi yes indeed, there should be a rather easy way. The volume is obtained by integrating "1" over the sub-domain of interest. If you replace the "1" by a bolean expression i.e. (c

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.