How to plot Residuals in OpenFOAM | [OpenFOAM in Windows 10]

Поділитися
Вставка
  • Опубліковано 26 вер 2024
  • Tutorial on plotting residual for OpenFOAM simulation.
    Pre-requisite for WSL users: • Enable Graphical Appli...
    Gnuplot code: drive.google.c...
    Download presentation and materials from the Telegram channel.
    Join Telegram channel: t.me/DDFluids​...
    Join UA-cam channel: DD Fluids
    Join me on Linkedin: / divyeshvariya
    Join Instagram: / cfd_openfoam​
    Join me on Twitter: / divyeshvariya
    #openfoam​ #paraview​ #cfd​ #residuals

КОМЕНТАРІ • 19

  • @claudiadelacruz7899
    @claudiadelacruz7899 3 роки тому +1

    Thank very much for your explanations!! This is the best video I founded about plot Residuals

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

    there is an alternate way for those who use other plotting methods (like python or excel).. "foamLog " command will create "logs" folder and place residuals along with other variables extracted from logfile.. which further can be taken to excel or read by python and plot

  • @vigneshsp4619
    @vigneshsp4619 3 роки тому +2

    Nice video, but I usually use solverInfo functionObject and foam monitor command, mainly to check residuals during run time

    • @DDFluids
      @DDFluids  3 роки тому +1

      FunctionObject is also a good option for run time post-processing. But is it possible in v2012? Is there freedom of changing colors, thickness of lines and text of graph?

  • @gilbertheduardocruzadomend310
    @gilbertheduardocruzadomend310 3 роки тому +2

    Thank U, its much interesting

  • @gaurya4071
    @gaurya4071 3 роки тому +3

    Very nice video👍👍👍

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

      Thank you very much!

  • @momosh59
    @momosh59 2 роки тому +1

    It was a great video. Thanks
    Could you please explain how to plot a value, (for example Pressure Average at an Outlet of a pipe or etc) while the simulation is running?
    Best wishes

  • @asifraj321
    @asifraj321 2 роки тому +1

    "Residuals" line 10: undefined variable: pause.
    I get this in the terminal while typing gunplot Residuals. how can I rectify it?
    Also hope you make a video on the graph plot and save data for reference.

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

      Sure. In 15 days 😃

  • @gaurya4071
    @gaurya4071 3 роки тому +2

    Hye, bro also make videos on grid independency.

    • @DDFluids
      @DDFluids  3 роки тому +2

      Sure, Thanks for suggestions!

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

    Sir I have downloaded gunplot from your video but unable to plot this graph although all steps I have done correct
    Error showing is
    "Residuals", line0:Cannot open script file 'residuals'

    • @NITESHKSAHU
      @NITESHKSAHU 3 місяці тому

      USE this
      set border lw 4
      set logscale y
      set title "Residuals" font "arial,22"
      set ylabel "Residual" font "arial,18"
      set xlabel "Iteration" font "arial,18"
      set key width 1
      # Loop to update the plot
      do for [i=0:*] {
      plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines lw 4,\
      "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines lw 4,\
      "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines lw 4,\
      "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines lw 4,\
      "< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines lw 4
      pause 1
      }

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

    Hello, great video!
    I was wondering could we plot "mean & maxCo" the same way? By adding a similar line with " < cat log grep... maxCo.." something like that? Thanks

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

      Yes. That is possible.

  • @NITESHKSAHU
    @NITESHKSAHU 3 місяці тому

    set border lw 4
    set logscale y
    set title "Residuals" font "arial,22"
    set ylabel "Residual" font "arial,18"
    set xlabel "Iteration" font "arial,18"
    set key width 1
    # Loop to update the plot
    do for [i=0:*] {
    plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines lw 4,\
    "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines lw 4,\
    "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines lw 4,\
    "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines lw 4,\
    "< cat log | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines lw 4
    pause 1
    }
    The above script works without error