Yes, p
is the name of the scalar point data that is in the original file I am opening.
reader = TecplotReader(FileNames=['C:/Users/joyce/OneDrive/Documents/S4.5 UH REU Summer 2020/0.675Simple2Pitch_Regrid_Off_Simulation_Output_7-17-2020/0.675Simple-20Hz-0mms-p50.dat'])
if reader==0:
print('\n ** ERROR: Could not open file **\n')
else:
print(' -- Successfully read .dat file --')
# Apply ExtractRegionSurface() filter to remove volume between swimmer and boundary
removeVolume = ExtractRegionSurface(reader)
print(' -- Successfully extracted region surface --')
# Select Swimmer
extraction = ExtractCellsByRegion(Input = removeVolume)
SetProperties(extraction, IntersectWith = 'Box')
extraction.IntersectWith.Position = BoxPosition
extraction.IntersectWith.Length = BoxLength
print(' -- Successfully selected swimmer --')
# Extract swimmer surface
swimmerSurface = ExtractRegionSurface(extraction)
# Generate normals
normals = GenerateSurfaceNormals(swimmerSurface)
pressure = Calculator(Input=removeVolume, ResultArrayName='Force_Y', Function='p*Normals_Y')
Show(pressure)
Interact()
I also defined BoxPosition and BoxLength arrays earlier in my code but did not include it here.