Export file for plot over line: noisy curve

Hi all,

I perform CFD with a mesh that is hybrid. Some areas are structured and others are unstructured. When I export the results on a given region of my geometry, I obtain a curve that is noisy for unstructured mesh area (see attached picture).


.

Here is an extract of the code used to extract the profiles.

    reader = vtk.vtkEnSightGoldBinaryReader()
    reader.SetCaseFileName(in_casefile)
    reader.ReadAllVariablesOff()
    reader.SetTimeValue(time_value)
    
    for i, field in enumerate(fields):
        reader.SetCellArrayStatus(field[0], 1)
        reader.Update()
        print(field)
    
        fluid_domain = vtk.vtkExtractBlock()
        fluid_domain.SetInputConnection(reader.GetOutputPort())
        fluid_domain.AddIndex(1)
        fluid_domain.SetPruneOutput(True)
        fluid_domain.Update()
    
        for j, org_nor in enumerate(origins_normals):
            plane = vtk.vtkPlane()
            plane.SetOrigin(org_nor[0])
            plane.SetNormal(org_nor[1])
    
            slice1 = vtk.vtkCutter()
            slice1.SetCutFunction(plane)
            slice1.SetInputConnection(fluid_domain.GetOutputPort(0))
            slice1.GenerateTrianglesOff()
            slice1.Update()
    
            cell_centers = vtk.vtkCellCenters()
            cell_centers.SetInputConnection(slice1.GetOutputPort(0))
            cell_centers.Update()
    
            index_1 = field[1]
            index_2 = field[2]
    
            centers_data = dsa.WrapDataObject(cell_centers.GetOutputDataObject(0))
            field_centers = centers_data.PointData[field[0]].Arrays[0][:, index_1, index_2]
            
            y_centers_uniq, y_idx, y_inv, y_cnt = np.unique(
                centers_data.Points[:, 1].Arrays[0].round(decimals=16),
                return_index=True,
                return_inverse=True,
                return_counts=True)
    
            """ Averaging in Z """
            field_Zavg = np.array([algs.mean(field_centers[y_inv == idx])
                                   for idx in range(y_centers_uniq.size)])

How can I solve this issue?

Thanks a lot!