[ Paraview Tutorial 11 ] Automating Paraview Tasks with Python Script

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ • 79

  • @krishnapatel8526
    @krishnapatel8526 4 роки тому +4

    thanks, man I watched all the tutorials of ParaView along with practice in one sitting. Huge thanks, Bro.

  • @jordandenev5305
    @jordandenev5305 4 роки тому +1

    Very helpful - if you are a novice, you really need such kinds of examples with detailed explanations. I wanted just to learn how one can use Paraview with Python. I got a very good idea now how it could function. Thank you for that beautifule video, Cyprien!

    • @Feaforall
      @Feaforall  4 роки тому

      Glad it helped Jordan!

  • @Sumit_Sharma_Music
    @Sumit_Sharma_Music 4 роки тому +2

    Thank you. One of the best video tutorials on paraview.

  • @CoolestFlame
    @CoolestFlame 4 роки тому +2

    The tutorial is very useful. I am using the scripting outside of GUI to automate the export of scenes for animation purpose. Thank you!

  • @Jhonson013
    @Jhonson013 4 роки тому +1

    Thank you Cyprien for this tutorial, very nice. I watched it all

  • @Sergejs_on_sound
    @Sergejs_on_sound Рік тому

    Thank you, the best ParaView tutorial series that I found :)

  • @dmoored4
    @dmoored4 3 роки тому

    Thank you so much! I was ready to give up on trying this. I'm of the opinion that this should be the method in the documentation. This was so much easier and it actually worked!

  • @akritidadwal8668
    @akritidadwal8668 4 роки тому +2

    This is brilliant actually. You explain v nicely. Plz make another video to show how for loop can be used to get multiple planes and plot the data.
    Thanks

  • @sawyerpaccione2611
    @sawyerpaccione2611 3 роки тому

    Incredibly Helpful, thank you so much! You just saved me so much time trying to figure out how to get the Paraview module working on my current python distribution!

  • @Gabriel-bt3nd
    @Gabriel-bt3nd 3 роки тому

    Thanks a lot! I think this just revolutionized my Paraview workflow!

  • @oppen637
    @oppen637 4 роки тому +4

    This is great. Can you perhaps also show some tricks for saving memory when dealing with large data?

  • @jbbarre9733
    @jbbarre9733 3 роки тому

    Really good video to start using Paraview with Python. thanks.

  • @christinecase6398
    @christinecase6398 Рік тому

    Thank you Cyprien! This really helped me get my feet wet in Paraview!!

  • @saheldey3848
    @saheldey3848 4 роки тому +3

    Thanks a lot for this well descriptive video. It will push beginners like me to use Python shell inside Paraview. If possible, can you please make some videos for 3D vector field visualization where the same field lines are tracked continuously with time? Or some aspects of wavelet analysis? It would be really helpful then.

  • @SomeTechGuy666
    @SomeTechGuy666 3 роки тому

    Top shelf content. Great video.
    I'm really happy to see this video. I "knew" paraview could be controlled by Python, but so much easier/nicer to learn it via a video.

  • @muditmehta8317
    @muditmehta8317 4 роки тому +2

    Amazing videos! It really helped a lot

  • @磨镜匠的学徒
    @磨镜匠的学徒 4 роки тому

    Thanks a lot! As a beginner, it's really helpful to me.

  • @bhoopendragupta4782
    @bhoopendragupta4782 2 роки тому

    Great video series, easy to follow explanations. Thanks for your hard work.

  • @biaohuang7957
    @biaohuang7957 4 роки тому +2

    Great work! Thanks very much.

  • @CryDima
    @CryDima 4 роки тому +1

    Thank you, this was a really useful tutorial!

  • @umedina98
    @umedina98 4 роки тому +2

    Thanks man. Great video!

  • @pedromoresco93
    @pedromoresco93 2 роки тому

    Great video! This process u showed is useful if u are using freecad also

  • @prasadadhav93
    @prasadadhav93 4 роки тому

    Thanks for this video.
    I did not know we can record Marcos.
    This is really helpful since I usually apply similar kinds of filters to view my results.

  • @heike6872
    @heike6872 8 місяців тому

    Great video! Thank you very much 🙂

  • @peeolo
    @peeolo 4 роки тому +2

    Python

  • @mohamedelgamal6333
    @mohamedelgamal6333 4 роки тому +1

    Thanks a lot for your huge effort

  • @Buenofresser
    @Buenofresser Рік тому

    Hi, great video! Thanks to you I know how to utilize Python. Maybe you can help me with that: I am trying to load a state with a specific file (selectinbg choose file name during load), but with the command LoadState(saved_state_path, LoadStateDataFileOptions='Choose File Names', filenames='D:\Simulations\out_97.xmf') I dont get the respective picture, but the initial one, as if I only load the state without specifying the file.

  • @noahzhang892
    @noahzhang892 4 роки тому

    Cyprien, this is a great introductory video on the topic. I have got one question. How can we enable the AutoMPI in pvpython or is there any way to run the .py file in parallel?

    • @Feaforall
      @Feaforall  4 роки тому +1

      You have another executable special just to run the bigger parallel scripts... pvbatch? (From memory)

    • @noahzhang892
      @noahzhang892 4 роки тому

      @@Feaforall thanks.

  • @juanandresbreme9168
    @juanandresbreme9168 4 роки тому

    Great video! Very clear explanation and super useful stuff! Thank you very much for this material. Cheers!

  • @mehrdadkazemi8402
    @mehrdadkazemi8402 3 роки тому

    Thanks a lot just one thing when I click on the start trace I get the error
    ""vtkSMTrace (0x561097d29a70): Failed to import paraview.smtrace module.
    Generic Warning: In /build/paraview-vlxewD/paraview-5.7.0/ParaViewCore/ServerManager/Core/vtkSMTrace.cxx, line 162
    Trace not started since required Python modules are missing.""
    I tried to install other packages of the Python module it doesn't solve
    how can I solve this error?

  • @santafelkin
    @santafelkin 4 роки тому

    Hello Cyprien. Excellent tutorials. My question is regarding to Wrap Svale filter. Could you advice me about how to applied? I have had problems applying this kind of filter. Some times seems that just it doesn't work (I don't see it active). Thanks for your time and help.

  • @santi_mendez
    @santi_mendez 4 роки тому

    Great tutorial! I learnt a lot. thankssss

  • @russellquadros2948
    @russellquadros2948 2 роки тому

    Incredible!!!!! Thank you

  • @benjackson9541
    @benjackson9541 4 роки тому +1

    thank you for the tutorial. How would you run the python script file from pvpython, assume that is possible?

    • @Feaforall
      @Feaforall  4 роки тому

      Go in terminal and enter “pvpython script.py” (pvpython has to be in your path and you must be located in the directory where your script is)

    • @benjackson9541
      @benjackson9541 4 роки тому

      @@Feaforall thank you!

  • @syntheticperson
    @syntheticperson 2 роки тому

    Very helpful. Thanks

  • @brunoquezada1486
    @brunoquezada1486 4 роки тому

    Thanks for the video
    I want to apply a Macro to a lot of different files which have the same structure but different names, so when I save a Macro and I try to use it with other files it won't work well because the names of the variables changes. Do yo know how can I modify the Macro in order to work among other files, given that they have the same structure?

    • @Feaforall
      @Feaforall  4 роки тому

      Sure, you have some ways in python to look for files in a folder or with a certain name, that way it will automatically use the right file. Try to os.walk() function for example

  • @НиколайКувшинников-л3ы

    Thanks a lot for your work! What is a correct way to execute some external python script from disk? I use line "execfile(‘full_path/script.py’) " in the "script" window , but see ‘execfile is not found’. Where is a mistake?

    • @Feaforall
      @Feaforall  3 роки тому

      For a normal python installation you can just run « python full_path/script.py » in the terminal. I don’t know what is « execfile ».
      For paraview python script you will have to use the special python executable pvpython like I show in the video

    • @НиколайКувшинников-л3ы
      @НиколайКувшинников-л3ы 3 роки тому

      @@Feaforall Dear Cyprien! Thank you for your answer. but I use pvpython and write python script in window "script" using copy-paste procedure. It works, At that moment paraview prompts to use
      "execfile(‘full_path/script.py’) "! Thatis the
      problem.....

  • @srz4720
    @srz4720 4 роки тому +1

    very helpful, thanks :)

  • @hemanthHK11
    @hemanthHK11 4 роки тому

    Hello Cyprien Rusu, Thank you for letting us learn more and more stuff from you.....
    I have a question...... Can we collect data of velocity at each mesh point in Paraview / OpenFoam! and if yes how!
    Thank you, Will wait for your reply

    • @Feaforall
      @Feaforall  4 роки тому

      Hi Hemanth, yes, you can. I think you need to watch this video: [Paraview Tutorial 4] How to display node and elements data in Paraview

    • @hemanthHK11
      @hemanthHK11 4 роки тому

      @@Feaforall Hello Cyprien Rusu, Thank you so much, I got the results..... Just one more doubt i have done Plot over time and imported to csv format, I am getting Temperature and Velocity as Avg, Max and min.... Is ti possible to get normal original value at each time step..... Thank you in advance.

  • @april6146
    @april6146 4 роки тому

    thank you very much for making this tutorial, actually, I would like to ask if you have used python code to make calculation between the values, for example, calculating the principal stresses with the stress tensor, and shown eventually as a function of each node and time.

    • @Feaforall
      @Feaforall  4 роки тому

      I haven’t done any video about that (yet) but it’s totally doable. You can also have a look at a python module called pyvista. It’s easy to couple that with Jupyter notebook to do some calculations of the tensor values. Good luck

  • @youjiezhang1007
    @youjiezhang1007 5 місяців тому

    Thank you so much!

  • @EW-mb1ih
    @EW-mb1ih 3 роки тому

    thank you for your video!

  • @evertonribeiro7327
    @evertonribeiro7327 4 роки тому

    Thank you! Great videos

  • @PavanYadav-lf5bu
    @PavanYadav-lf5bu 4 роки тому

    Can we perform mathematical operation like root mean square of field variable over the entire domain and visualize in paraFoam ? Can Python script help in any manner ?

    • @Feaforall
      @Feaforall  4 роки тому

      Sure, you just have to use the right filter (the calculator filter can do that, watch my video about paraview filters to see how it works). Then you can record the python macro and do it within a python script.

  • @lucascuisset2174
    @lucascuisset2174 4 роки тому

    Hi Cyprien, thank you for the tutorial ! I added the path for pvpython as you said, but then when I want to import all from paraview.simple in spyder (installed with anaconda) it doesn't work, can you help me please ?

    • @Feaforall
      @Feaforall  4 роки тому

      Probably because spyder is not using pvpython but it’s own python version. I am sure spyder has its own environment variable to set the python distribution used, but I am not familiar enough with it to tell you which one. Check the documentation, there is surely the answer somewhere.

    • @lucascuisset2174
      @lucascuisset2174 4 роки тому +1

      @@Feaforall finaly I used subprocess.run to execute my python script with pvpython.exe from spyder. Thank you for your answer :)

  • @nguyenkhoa9201
    @nguyenkhoa9201 3 роки тому

    Hi sir, is it possible to execute python script with paraFoam (paraview but with openfoam case) directly?

    • @Feaforall
      @Feaforall  3 роки тому

      Yes, of course. ParaFoam is just paraview with some added functions

    • @nguyenkhoa9201
      @nguyenkhoa9201 3 роки тому

      Sorry, since I'm new to this. May I ask one more question?
      When I use paraFoam, there will be an existent built-in (openFoam case) (which using paraview is not). Hence, if I want to execute code through pvpython then will I have to import that built-in or the trace-back can also trace that existent built-in?

    • @Feaforall
      @Feaforall  3 роки тому

      Sure, just double check that your parafoam has been compiled with python (if you have the python console in it, it should be)

  • @engineeringarts4509
    @engineeringarts4509 3 роки тому

    I did the same procedures as you mentioned, but dont know why it doesn't work in powershell, while works well in the python IDLE interface.

    • @Feaforall
      @Feaforall  3 роки тому

      You mean it works in the Python console of paraview, but not powershell? That’s probably because of the environment. If you use the pvpython executable of paraview, it should work in powershell, but if you use another python distribution, then it will not recognize paraview if you don’t import the correct modules.

    • @engineeringarts4509
      @engineeringarts4509 3 роки тому

      @@Feaforall No, python can be worked on different interfaces - e.g. on powershell / on IDLE (just the interfaces for python, NOT for paraview). After linking up paraview to python, you work on powershell while I work on IDLE, both are working by calling in paraview with "from paraview.simple import *". But, I don't know why I can only work on IDLE, but no powershell.

    • @engineeringarts4509
      @engineeringarts4509 3 роки тому

      @@Feaforall By the way, thanks for your movie, very useful!!!

    • @Feaforall
      @Feaforall  3 роки тому

      @@engineeringarts4509 have you checked if your IDLE and the python distribution you are calling from powershell are the same python distribution?
      For me using “from paraview.simple import *” directly with python often does not work because some distributions are not compatible with the modules paraview is calling. That’s why I talk in the video about using the pvpython distribution provided with paraview to read the paraview/python code (this one has been tested and it is sure to work)

    • @engineeringarts4509
      @engineeringarts4509 3 роки тому

      @@Feaforall i see your point. But, can you get me a pointer how to ensure the same distribution of paraview as to the python? I'm out of context on this point from the video, sorry about that.

  • @kennydoritos
    @kennydoritos 4 роки тому

    is it possible to run the python macro in the terminal without opening the GUI?

    • @Feaforall
      @Feaforall  4 роки тому

      Yes, I am sure I talk about that in the video... did you watched all of it?

    • @kennydoritos
      @kennydoritos 4 роки тому

      ​@@Feaforall Yep i did... you ran pvpython and the 'from paraview.simple import *' line (which is the first line of the script).
      but i later figured that pvpython can is essentially the same as python. so i can run 'pvpython script.py' where script.py is the py macro generated in paraview

  • @MohammedBEffat
    @MohammedBEffat 2 роки тому

    You are awesome!

  • @sop980
    @sop980 4 роки тому

    Great help.. please keep up making more advanced topic. I WAS LOOKING FOR MAKING AN ANIMATED 3D MESH TO EXPORT FROM PARAVIEW TO RUN INSIDE A GAME ENGINE. If you can please teach us a way to do so will be a great help. I WAS LOOKING FOR EXPORTING any type of result data as mesh or point cloud volume to game engine. I need 3D animated mesh not a static mesh. Is it possible?
    Also is I tried to export fluid simulation stream line result into. csv format. Which i tried to reopen in 3ds max in cfd data import option. But the result does not look same as the paraview. If you could show a pipeline to import the animated result into game engine would be a great help.. Thanks a bunch in advanced..

    • @Feaforall
      @Feaforall  4 роки тому

      Hey Jukka, paraview is a software for scientifics and engineers. If you are looking to create game graphics and animations, you should look into Maya or Blender (open source). Paraview is not for for that purpose.

  • @fabiocaruso1386
    @fabiocaruso1386 3 роки тому

    Thank you man!

  • @yongfeng8336
    @yongfeng8336 4 роки тому

    Great!

  • @rohitsinghal938
    @rohitsinghal938 3 роки тому

    Thanks a lot ! Really helpful