- **Main CFD Forum**
(*http://www.cfd-online.com/Forums/main/*)

- - **Compute volume
**
(*http://www.cfd-online.com/Forums/main/3963-compute-volume.html*)

Compute volume
Hi there,
I have an object represented by triangle surface mesh. I am wondering how I can compute the volume for mass conservation monitoring? Thanks in advance. Tony |

Re: Compute volume
With only the vertex points of the triangles known, determine the sidelengths then the surface area of each triangle using Heron's law: -------------------------------------------------------
A^2 = s(s-a)(s-b)(s-c) A=area a,b,c = side lengths s=0.5*(a+b+c) ------------------------------------------------------- you will also need to find a normal vector. Define a plane somewhere and then determine the volume of the projected triangle to the plane and multiply it with the normal vector. Do the same for all surface triangles and sum. or... If you have a simple shape then take a point near the middle of the shape and determine the volume of all the 3-d triangles (surface area of the little triangles with the height being the distance from the center of the triangle to the point selected in the middle of the shape).. repeat and sum. Well, its pretty hard for me to explain properly but I hope I pointed you in the right direction. :) |

All times are GMT -4. The time now is 05:14. |