CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] get Bounds from different Mesh Regions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2017, 12:47
Default get Bounds from different Mesh Regions
  #1
New Member
 
Jonathan Geyer
Join Date: Feb 2017
Posts: 1
Rep Power: 0
JonathanGeyer is on a distinguished road
Dear all,

I would like to write a script in python. Therefore I need some Bounds of different Meshregions. I'm able to get the bounds from the internal mesh, but not from other mesh regions. I think the problem is, that I have to change the active Soure. But how is this possible? The code I tried is here:

Code:
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()

# get active source.
resultsfoam = GetActiveSource()

resultsfoam.MeshRegions = []

# Properties modified on resultsfoam
resultsfoam.MeshRegions = ['BLADES']

(x1min,x1max,y1min,y1max,z1min,z1max) = GetActiveSource().GetDataInformation().GetBounds()
print (z1max)

resultsfoam = GetActiveSource()
# Properties modified on resultsfoam
resultsfoam.MeshRegions = []

# Properties modified on resultsfoam
resultsfoam.MeshRegions = ['INFLOW']
resultsfoam = GetActiveSource()

(xmin,xmax,ymin,ymax,zmin,zmax) = GetActiveSource().GetDataInformation().GetBounds()
print (zmax)
Thank you for your help,
Jonathan
JonathanGeyer is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpleDyMfoam , AMI -- The mesh has multiple regions not connected by any face coolcrasher OpenFOAM Running, Solving & CFD 3 May 16, 2019 05:58
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 04:17
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 23:55.