# Calculate the porosity and surface roughness of the powder layer

**URL:** https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362
**Category:** ParaView Support
**Created:** [November 28, 2023, 8:43am UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362 "2023-11-28T08:43:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![MuWeihao](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muweihao/32/12207_2.png) [@MuWeihao](https://discourse.paraview.org/u/MuWeihao)
#### Post date: [November 28, 2023, 8:43am UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362/1 "2023-11-28T08:43:33Z")

</div>

Hello!  
I want to analyze the porosity and the surface roughness of the powder layer.  
The critical step is to **calculate the volume of powders in the extract region** and **export the powder information (including the location of each powder and the radius of each powder)**, but I have no idea how to implement it. Can anyone give me some advice?  
Moreover, the version of Paraview is 5.12.0-RC1-Windows, and the DEM simulation result is calculated by Yade. The vtk files are uploaded in depo.zip.  
Thank you!

 ![depo](https://discourse.paraview.org/uploads/default/original/2X/e/edbdc7f24330f245f34433315e5a15f38ee11ce3.jpeg)  
[depo.zip](https://discourse.paraview.org/uploads/short-url/juI474GFX5L2k5sZrLnfV4cgt6m.zip) (54.0 KB)

---

<div class="post-metadata">

### Author: ![MuWeihao](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muweihao/32/12207_2.png) [@MuWeihao](https://discourse.paraview.org/u/MuWeihao)
#### Post date: [November 28, 2023, 1:46pm UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362/2 "2023-11-28T13:46:26Z")

</div>

Hello everyone. I can obtain the data of the particles (including position and radius) by opening the depo-sphere.vtk file in the Notepad but calculating the volume of the particles in the extract region by this method is relatively complicated, I would like to ask you if there is a convenient method that can address this problem in Paraview.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/spyridon97/32/11569_2.png) [@spyridon97](https://discourse.paraview.org/u/spyridon97)
#### Post date: [November 28, 2023, 4:18pm UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362/3 "2023-11-28T16:18:44Z")

</div>

Maybe you should check if `Compute Connected Surface Properties` filter.

Its description is:

```auto
       Given a PolyData, computed the volume, area and centroid of one or more polygonal objects.
       An optional object IDs cell data array that maps a polygon to a specific object may be provided,
       or the objects will be identified as connected components in the input data.

```

But since you probably have a volume mesh, use `Extract Surface` and then `Compute Connected Surface Properties`.

---

<div class="post-metadata">

### Author: ![MuWeihao](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muweihao/32/12207_2.png) [@MuWeihao](https://discourse.paraview.org/u/MuWeihao)
#### Post date: [November 30, 2023, 3:04am UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362/4 "2023-11-30T03:04:35Z")

</div>

Thank you for your advice, that really helped me.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/spyridon97/32/11569_2.png) [@spyridon97](https://discourse.paraview.org/u/spyridon97)
#### Post date: [November 30, 2023, 4:55am UTC](https://discourse.paraview.org/t/calculate-the-porosity-and-surface-roughness-of-the-powder-layer/13362/5 "2023-11-30T04:55:42Z")

</div>

I am glad i could be of help!
