Automate ParaView PostProcessing Using Python script – pvbatch

    9
    16



    IMPORTANT:
    To fix the error
    ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.0/ParaViewCore/ServerManager/Rendering/vtkSMViewLayoutProxy.cxx, line 569 vtkSMViewLayoutProxy (0x55f8ae165d60): Cell is not empty.
    Comment the line containing:
    layout1.AssignView(2, lineChartView1)

    because the code in trying to assign multiple views to the same layout
    ——————————————————————————————–

    This video shows how to avoid repetitive and time consuming tasks by automating the postprocessing in ParaView using Python script.
    ——————————————————————————————–
    Linkedin:
    https://www.linkedin.com/in/asmaa-hadane-935991a3/
    ——————————————————————————————–
    facebook
    https://www.facebook.com/OpenFoamForCFD
    ——————————————————————————————–

    source

    Previous articleUne journée chez CGI avec Julien, Business Analyst.
    Next articleBoto3 Collection for EC2 Service Part-1 | AWS Automation with Python Boto3 API and Lambda Functions

    16 COMMENTS

    1. IMPORTANT:
      To fix the error
      ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.0/ParaViewCore/ServerManager/Rendering/vtkSMViewLayoutProxy.cxx, line 569 vtkSMViewLayoutProxy (0x55f8ae165d60): Cell is not empty.
      Comment the line containing:
      layout1.AssignView(2, lineChartView1)
      because the code in trying to assign multiple views to the same layout

    2. Hi Asmaa, thanks for this video, very helpful.

      However, it throws up this error for me '( 1.029s) [pvbatch ] vtkEGLRenderWindow.cxx:295 WARN| vtkEGLRenderWindow (0x7fffe27e91e0): EGL device index: 0 is greater than the number of supported deviced in the system: 0. Using device 0 …'

      Any suggestions?

    3. This is like the only useful tutorial I've found. All others just do the example from the manual which uses the pre determined sources… one hardly ever uses them. In my case, all I want to do is open each of 120 geometries I have and save them as .ply in ASCII format. I had named my files as "model1.stl" through "model120.stl" thinking I was going to be able to assign the model number to a variable and do a for loop with a macro simply saving the file and setting the format. I'll put your video into practice and come back with he result in case anyone is as lost and frustrated as I am.

    4. Great tutorial ma'am. Thanks. I wanted to know when I run the python script for plot selection over time, generated from trace in the paraview , I get everything correct except the last step of saving the file into .csv ( plotselectionovertime spreadsheet is generated but is empty) and the python shell throws an error:

      "Warning: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.4.0/VTK/Common/DataModel/vtkDataObject.cxx, line 522
      vtkTable (0x3b65340): Attempted to ShallowCopy from null."

      How to resolve this issue ma'am? please guide us. Thanks

    5. Thanks for putting together the these videos on Paraview, very much appreciated!
      I have normally used statefiles within paraview, but it can be hit and miss whether it opens successfully without crashing.
      I may try this route using Python macros and see if its an improvement