# The issue of temperature at the cross-section of particles

**URL:** https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [April 14, 2024, 9:02am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398 "2024-04-14T09:02:56Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 14, 2024, 9:02am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/1 "2024-04-14T09:02:56Z")

</div>

Hello researchers, I have a group of VTK files about particle information here. I would like to obtain the temperature changes inside the particles, that is, the temperature changes at the particle cross-section. How should I do it? If this problem can be solved, I would be extremely grateful. I hope scholars can provide a detailed operation process, and thank you again.  
[Particles\_vtk.zip](https://discourse.paraview.org/uploads/short-url/rnCypOU8nILbj7dkGRCT5JqB5AJ.zip) (536.2 KB)

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 15, 2024, 11:27am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/2 "2024-04-15T11:27:12Z")

</div>

Can someone help me? Thank you very much!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 15, 2024, 4:27pm UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/3 "2024-04-15T16:27:56Z")

</div>

You data contains only a point cloud that changes over time, how do you define the “particle cross-section” ?

 ![image](https://discourse.paraview.org/uploads/default/original/2X/c/c89714ed98242357832750eeaeec15a29a6e3803.png)

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 1:08am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/5 "2024-04-16T01:08:08Z")

</div>

Yes. I want to view the distribution of temperature inside each particle, so I need to slice the particles, but I only have these VTK files. How can I achieve the slicing operation? Or can it be achieved by writing Python programs? Could you please provide some guidance? Thank you very much.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 8:02am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/6 "2024-04-16T08:02:01Z")

</div>

> [@Guanlong](#):
>
> I need to slice the particles, but I only have these VTK files. How can I achieve the slicing operation?

You cannot slice points. you need some volumic cells.

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 8:31am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/8 "2024-04-16T08:31:41Z")

</div>

Thank you very much for your patient reply. However, the data in these VTKs is not points but multiple particles. These particles are three-dimensional structures; cannot we perform slice operations on them?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 8:33am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/9 "2024-04-16T08:33:56Z")

</div>

> [@Guanlong](#):
>
> These particles are three-dimensional structures

Is that a DEM result ? I’m afraid the geometry of the particle is not part of the data you shared.

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 8:37am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/10 "2024-04-16T08:37:26Z")

</div>

Yes, this is the result of DEM. I still have some. DAT files. Do you need me to provide these.dat files?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 8:39am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/11 "2024-04-16T08:39:56Z")

</div>

I’m afraid ParaView is not able to reconstruct the particle geometry using .dat files. Can you export the particle geometry to .vtk format ?

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 8:44am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/12 "2024-04-16T08:44:14Z")

</div>

I have exported the VTK file, which also contains information on the physical properties of the particles. There is currently no way to perform slice operations on particles and analyze temperature changes, which I believe is a challenging issue.  
 ![e96cdffbeb8366a3ed0ec573c420113](https://discourse.paraview.org/uploads/default/original/2X/8/87042be664fa526eb1f50ddbdd146b13f1e38281.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 8:48am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/13 "2024-04-16T08:48:11Z")

</div>

> [@Guanlong](#):
>
> which also contains information on the physical properties of the particles.

Is that enough information to reconstruct the particle geometry?

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 8:51am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/14 "2024-04-16T08:51:18Z")

</div>

Previously, someone reported using Paraview to perform slice operations on particles. As far as I know, it is done by writing Python programs, but I don’t know how to operate it, so I am seeking help on this forum.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 8:52am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/15 "2024-04-16T08:52:36Z")

</div>

> [@Guanlong](#):
>
> Previously, someone reported using Paraview to perform slice operations on particles.

Please share a link

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 10:39am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/16 "2024-04-16T10:39:59Z")

</div>

I have kept you waiting for a long time. The results of the multi-particle slice operation are shown below. Do you have any methods? I would greatly appreciate it if you could help me.  
 ![56985fb13ecba9c8b9d63c7e8a08be5](https://discourse.paraview.org/uploads/default/original/2X/2/2ef1e4b730c02e7f8b58aaa955481e82c03310c7.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 11:03am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/17 "2024-04-16T11:03:43Z")

</div>

How was this image generated ?

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 11:13am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/18 "2024-04-16T11:13:06Z")

</div>

I asked them, and they said this is the result generated through Python code. However, they did not provide any further details. I am so weak.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 16, 2024, 11:14am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/19 "2024-04-16T11:14:20Z")

</div>

You could create sphere for each particles based on the radius value, is that what you want ?

---

<div class="post-metadata">

### Author: ![Guanlong](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/82dd89/32.png) [@Guanlong](https://discourse.paraview.org/u/Guanlong)
#### Post date: [April 16, 2024, 11:16am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/20 "2024-04-16T11:16:29Z")

</div>

Based on what you said, I can take a look at the results. But I don’t know how to operate it. I’m sorry.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 17, 2024, 6:04am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/21 "2024-04-17T06:04:36Z")

</div>

radius is always 0.00032500000088475645 in your data, so I dont know what you want to do.

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [April 17, 2024, 11:33am UTC](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398/22 "2024-04-17T11:33:07Z")

</div>

I note that there is a field named `temperature_inner` that I take to be the temperature at the center of the particle and a second `temperature`, which I guess is the temperature at the surface of the particle. I guess you can assume some regular interpolation (linear? quadratic? exponential?) between them on the inside of each particle.

ParaView can easily show your particles as spheres with the radius scaled by that field. But these spheres will actually be shells (as in most cases they are considered homogeneous items). There is no automatic mechanism to create a filled sphere, nor is there an easy way to interpolate the field within this space.

Based on the image you posted, it looks like a series of shells were created around the particle (perhaps by using the `Glyph` filter and varying the `Scale Factor`) and then the temperature was interpolated (perhaps by using a `Calculator` expression). From there the shells could be clipped away.

I don’t have the spare hour to come up with such a script. If you could get your hands on that script, we might be able to help you apply it.

[Next page](https://discourse.paraview.org/t/the-issue-of-temperature-at-the-cross-section-of-particles/14398.md?page=2)
