erro in paraview 3.12
Hi,
Trying to calcurate flowrate, this error appears: Anyone knows what do I have to do for calcurate flowrate? |
the error message is here.
AttributeError: 'NoneType' object has no attribute 'GetRange' |
I have used python shell as below
#File_Name:FlowRate.py try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() hZ=0.0492126 dZ=0.005 Slice1 = Slice( SliceType="Plane" ) Slice1.SliceType.Origin = [0.0, 0.0, hZ] Slice1.SliceType.Normal = [0.0, 0.0, 1.0] Slice1.SliceType = "Plane" ExtractSelection1 = ExtractSelection() p1=[-0.02, 0.02, hZ+dZ, 1.0] p2=[-0.02, 0.02, hZ-dZ, 1.0] p3=[-0.02, 0.054, hZ+dZ, 1.0] p4=[-0.02, 0.054, hZ-dZ, 1.0] p5=[0.033, 0.02, hZ+dZ, 1.0] p6=[0.033, 0.02, hZ-dZ, 1.0] p7=[0.033, 0.054, hZ+dZ, 1.0] p8=[0.033, 0.054, hZ-dZ, 1.0] selection_source = FrustumSelectionSource( ContainingCells=0, InsideOut=0, FieldType='CELL', Frustum=[p1[0],p1[1],p1[2],p1[3],p2[0],p2[1],p2[2],p2[3],p3[0],p3[1],p3[2],p3[3],p4[0],p4[1],p4[2],p4[3],p5[0],p5[1],p5[2],p5[3],p6[0],p6[1],p6[2],p6[3],p7[0],p7[1],p7[2],p7[3],p8[0],p8[1],p8[2],p8[3]] ) ExtractSelection1.Selection = selection_source IntegrateVariables1 = IntegrateVariables(Input=ExtractSelection1) Flow_Rate_Uz=IntegrateVariables1.CellData[4].GetRange(2)[0] #IntegrateVariables1.CellData[:] #IntegrateVariables1.CellData[0].GetNumberOfComponents() print 'Flow_Rate_Uz :',Flow_Rate_Uz,'[m/s]' # http://www.paraview.org/Wiki/The_ParaView_Tutorial http://wiki.livedoor.jp/okumao9/d/%CE%AE%CE%CC%BB%BB%BD%D0 |
All times are GMT -4. The time now is 06:43. |