# Calculate Residence time using Paraview

**URL:** https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074
**Category:** ParaView Support
**Created:** [February 25, 2022, 4:19pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074 "2022-02-25T16:19:37Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [February 25, 2022, 4:19pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/1 "2022-02-25T16:19:37Z")

</div>

Hello,  
I am trying to calculate the residence time in a TJunction and I was wondering if I could perform that just by post-processing the results using Paraview (without injecting a tracer through scalarTransportFoam)

---

<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: [March 2, 2022, 7:36am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/2 "2022-03-02T07:36:18Z")

</div>

Try using the calculator to compute what you need.

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 2, 2022, 7:53pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/3 "2022-03-02T19:53:16Z")

</div>

Hi Mathieu,

I watched your [Kitware ParaView Streamlines Webinar](https://www.youtube.com/watch?v=7WMaHXLK6No&t=1487s&ab_channel=Kitware) I generated ParticleTracer from a line source at one of the inlets of my geometry, however I am not sure how can I use the calculator to compute the residence time of the particles.

---

<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: [March 3, 2022, 7:55am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/4 "2022-03-03T07:55:05Z")

</div>

Is residence time different from integration time ?

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 4, 2022, 3:07am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/5 "2022-03-04T03:07:28Z")

</div>

No it should be the same idea, however I am not able to find the integration time when I use ParticleTracer

---

<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: [March 4, 2022, 9:24am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/6 "2022-03-04T09:24:00Z")

</div>

Please share your data.

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 7, 2022, 5:10pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/7 "2022-03-07T17:10:50Z")

</div>

You can find my data here: [VTK-TJunction.zip](https://discourse.paraview.org/uploads/short-url/KWGlrSWKA1PtErTkyJs6eEoWi8.zip) (3.5 MB)  
Thank you

---

<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: [March 8, 2022, 8:26am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/8 "2022-03-08T08:26:56Z")

</div>

Im unable to generate streams on your data, do you have a state file ?

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 9, 2022, 5:10am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/9 "2022-03-09T05:10:29Z")

</div>

I am not sure why the previous file is not working. I have this geometry (rectangular channel) where I was able to generate the particles, you can find the paraview state file inside the folder “recChannelParticleTracer.pvsm” [Files](https://www.mediafire.com/file/fjqe3l2uto771zu/VTK-recChannel.zip/file)

Thanks

---

<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: [March 9, 2022, 8:51am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/10 "2022-03-09T08:51:53Z")

</div>

the openfoam data seems missing

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 9, 2022, 6:09pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/11 "2022-03-09T18:09:06Z")

</div>

The .vtm files correspond to the openfoam data

 ![Capture](https://discourse.paraview.org/uploads/default/original/2X/4/42cb196e92bd63e63e7b0a6c757f9b82e3126524.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: [March 10, 2022, 9:24am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/12 "2022-03-10T09:24:40Z")

</div>

your pvsm file point to a foam file which does not seems to exists anywhere in your archive.

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 11, 2022, 4:30am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/13 "2022-03-11T04:30:38Z")

</div>

I have reuploaded the data [VTK\_StateFile](https://www.mediafire.com/file/s9qfv1qd1yjh70l/VTK-recChannel.zip/file)  
I know when using StreamTracer → I can get the integration time which corresponds to the cell residence time but for ParticleTracer → TemporalParticlesToPathlines → does the ParticleAge corresponds to residence time as well?

---

<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: [March 11, 2022, 8:20am UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/14 "2022-03-11T08:20:42Z")

</div>

> [@oumnion](#):
>
> does the ParticleAge corresponds to residence time as well?

Yes

---

<div class="post-metadata">

### Author: ![oumnion](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/cdc98d/32.png) [@oumnion](https://discourse.paraview.org/u/oumnion)
#### Post date: [March 14, 2022, 5:30pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/15 "2022-03-14T17:30:42Z")

</div>

Hello Mathieu thank you for all your help.

I am trying to use the plugin: StreamingParticles, I loaded the plugin but I can’t find it when I open the following window:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/657b451546e22d946cf047b2de6db55268bafeba.png)  
where can I look for it?

---

<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: [March 14, 2022, 5:53pm UTC](https://discourse.paraview.org/t/calculate-residence-time-using-paraview/9074/16 "2022-03-14T17:53:48Z")

</div>

Create a new layout to make the new representation type appears.
