# Integrate variables on streamtube surface

**URL:** https://discourse.paraview.org/t/integrate-variables-on-streamtube-surface/15545
**Category:** ParaView Support
**Created:** [October 14, 2024, 7:08am UTC](https://discourse.paraview.org/t/integrate-variables-on-streamtube-surface/15545 "2024-10-14T07:08:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Swantje](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/c67d28/32.png) [@Swantje](https://discourse.paraview.org/u/Swantje)
#### Post date: [October 14, 2024, 7:08am UTC](https://discourse.paraview.org/t/integrate-variables-on-streamtube-surface/15545/1 "2024-10-14T07:08:53Z")

</div>

Hey,  
from a 3D velocity and temperature field I would like to generate a streamtube and integrate the temperature over its surface.  
I have a hot jet entering a colder region and have generated streamlines with a custom ellipse source where the jet is entering, but I have not found a way to reliably generate a surface from the streamlines and then integrate the temperature over this surface.  
Thanks for your help.

---

<div class="post-metadata">

### Author: ![Swantje](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/c67d28/32.png) [@Swantje](https://discourse.paraview.org/u/Swantje)
#### Post date: [November 11, 2024, 6:55am UTC](https://discourse.paraview.org/t/integrate-variables-on-streamtube-surface/15545/2 "2024-11-11T06:55:06Z")

</div>

I have found a way: the ruled surface filter from vtk that can be used as a programmable filter in paraview.  
Code of programmable filter:  
import vtk  
mesh = self.GetInputDataObject( 0, 0 )  
out=self.GetOutput()  
ruledSurfaceFilter = vtk.vtkRuledSurfaceFilter()  
ruledSurfaceFilter.SetInputData(mesh)  
ruledSurfaceFilter.SetResolution(20,20)  
ruledSurfaceFilter.SetRuledModeToResample()  
ruledSurfaceFilter.PassLinesOn()  
ruledSurfaceFilter.Update()  
outData = ruledSurfaceFilter.GetOutput()  
out.DeepCopy(outData)
