# Save Integrate Variable values as specific variables for use in calculator

**URL:** https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978
**Category:** ParaView Support
**Tags:** python
**Created:** [July 4, 2024, 12:43am UTC](https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978 "2024-07-04T00:43:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vsaha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/4491bb/32.png) [@vsaha](https://discourse.paraview.org/u/vsaha)
#### Post date: [July 4, 2024, 12:43am UTC](https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978/1 "2024-07-04T00:43:53Z")

</div>

Hello, I want to use an integrated variable as an input for further calculations for CFD postprocessing (FVM method). The steps are described below:

1. Create a Slice.
2. Apply filter Cell Size to the slice, to obtain individual mesh cell areas and individual velocities.
3. Integrate over entire Slice to obtain total area of the slice & average velocitiy through the slice and store it as a callable variable, say Slice\_Area, and U\_Avg.
4. Use the above stored variables in a separate (upstream) calculator applied to Cell Size filter, to calculate this factor:  
INDEX = [(U\_Avg - “Individual Cell Velocities”)/U\_Avg] \* [“Individual Cell Areas”/Slice\_Area]
5. Apply Integrate Variable filter to INDEX.

I am considering using Python Calculator or Programmable Filter, but haven’t found good examples of how to go about step 3 in particular. Advice is greatly appreciated, 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: [July 4, 2024, 10:10am UTC](https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978/2 "2024-07-04T10:10:37Z")

</div>

> [@vsaha](#):
>
> but haven’t found good examples of how to go about step 3 in particular

Use the IntegrateVariable filter ?

---

<div class="post-metadata">

### Author: ![vsaha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/4491bb/32.png) [@vsaha](https://discourse.paraview.org/u/vsaha)
#### Post date: [July 5, 2024, 2:30am UTC](https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978/5 "2024-07-05T02:30:59Z")

</div>

I did, and then I want to: “store it as a callable variable, say Slice\_Area, and U\_Avg”

Basically I would like to use these values in a calculator along with the individual cell areas to calculate the factor INDEX specified in step 4.

---

<div class="post-metadata">

### Author: ![vsaha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/4491bb/32.png) [@vsaha](https://discourse.paraview.org/u/vsaha)
#### Post date: [July 5, 2024, 4:28am UTC](https://discourse.paraview.org/t/save-integrate-variable-values-as-specific-variables-for-use-in-calculator/14978/6 "2024-07-05T04:28:46Z")

</div>

{{SOLVED}}  
I was able to apply Programmable Filter simultaneously to both CellSize & IntegrateVariable filters by selecting them both in the Outline Tree (holding down the Ctrl key) before applying the filter. Thereafter I was able to extract and store the parameters I was interested into individual variables and proceeded with my calculations.
