CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Installation of ParaView on Ubuntu that exists in (Windows Subsystem Linux) (https://www.cfd-online.com/Forums/paraview/190259-installation-paraview-ubuntu-exists-windows-subsystem-linux.html)

k.farnagh July 9, 2017 03:45

Installation of ParaView on Ubuntu that exists in (Windows Subsystem Linux)
 
Hi

I'm going to install ParaView on Ubuntu which installed through Windows Subsystem Linux (WSL).

So I've downloaded ParaView v5.4 from https://www.paraview.org/download/
and installed it. (I don't know what is 'nightly builds' in that link so I ignor them)

Further more, I've followed 'Enabling Graphical Applications' that exist in https://openfoam.org/download/windows-10/

I could finally ran a case with openfoam but when I want to apply paraview below error appears:

Code:

kasra@Kasra-PC:/c/mnt/Users/kasra/tutorial/cavity$ paraFoam

ERROR: ParaView reader module library (PVFoamReader) does not exist
Please build the reader module before continuing:

    cd $WM_PROJECT_DIR/applications/utilities/postProcessing/graphics/PVReaders
    ./Allwclean
    ./Allwmake

Using the native VTK/OpenFOAM reader instead
/opt/OpenFOAM/OpenFOAM-v1706/bin/paraFoam: 317: /opt/OpenFOAM/OpenFOAM-v1706/bin/paraFoam: paraview: not found
kasra@Kasra-PC:/c/mnt/Users/kasra/tutorial/cavity$

Would you please help me.
Sincerely Yours

wyldckat July 9, 2017 09:03

Quick answer: To at least test if it works or not, you need to run the following command first:
Code:

export PATH=$PATH:/path/to/paraview/bin
Where you need to replace the path "/path/to/paraview/bin" with the actual path where you placed ParaView 5.4.0, including the path to its "bin" folder.

k.farnagh July 9, 2017 09:50

Hi Dear Bruno

CFD online and Just Bruno you are the best. Thanks for reply.
As I mentioned early, the installation was performed in windows which caused that Linux kernel could not detect and apply it (as I recognized).

Then I enter
Code:

sudo apt install paraview
in bash to download it directly from Ubuntu.

With performing paraFoam the below message appears
Code:

ERROR: ParaView reader module library (PVFoamReader) does not exist
Please build the reader module before continuing:

    cd $WM_PROJECT_DIR/applications/utilities/postProcessing/graphics/PVReaders
    ./Allwclean
    ./Allwmake

Using the native VTK/OpenFOAM reader instead

The last line caused going everything well. If you think there are some problem hidden please tell me. Thank you again.
Sincerely Yours

wyldckat July 9, 2017 19:24

Quick answers:
Quote:

Originally Posted by k.farnagh (Post 656361)
The last line caused going everything well.

Sorry, but I didn't understand which line made it work properly?

Quote:

Originally Posted by k.farnagh (Post 656361)
If you think there are some problem hidden please tell me.

I'm confused... first you stated that you downloaded ParaView 5.4.0 from paraview.org, but now you've gotten it via Ubuntu's apt?
Isn't the version available via apt an older version of ParaView?


Then again, if I understood you correctly, by using ParaView that was installed via apt, everything is working well, without the need to use the command I wrote in my previous comment.

k.farnagh July 10, 2017 01:48

Hi Dear Bruno,

I haven't any problem now.

In first try I've installed paraview in windows via .exe file which downloaded from its official site. this approach not worked and I couldn't invoke paraview from bash.

In 2nd try I've installed paraview in (WSL) via apt command. this approach works properly.

In previous comment I tried to describe how the problem can be solved for who has same problem.

As you can see in previous comments, both approaches led to same error but in 2nd the native VTK/OpenFOAM reader module library used instead of paraview reader module (I don't know what I guess is correct or not).

The only question that remains is about error. Is it important to be solved?How can I solve it?

Thanks for your consideration
Sincerely Yours

wyldckat July 10, 2017 07:02

Quick answers:
  1. The ParaView installation for Windows should be run on Windows. You would need to run it outside of bash.
  2. Within WSL:
    1. In order to not get the message about the "ParaView reader module", run paraFoam with the option "-builtin":
      Code:

      paraFoam -builtin
    2. In order to not have to always write it, you can create an alias command at the end of the file "~ /.bashrc" like this:
      Code:

      alias paraFoam='paraFoam -builtin'
      You will then either need to start a new terminal (command window) or run:
      Code:

      source ~/.bashrc
  3. In order to use ParaView outside of WSL, you can run inside WSL the following command to create the file that is used by ParaView:
    Code:

    paraFoam -touch -builtin
    "-touch" option will lead to the creation of a file with the name of the case and the file extension ".foam" that can be opened directly in ParaView.

k.farnagh July 10, 2017 08:31

Hi Dear Bruno,
Thanks for great information that is useful.

habitatguy February 10, 2021 06:50

Hi!


I am using OpenFOAM v2012 through WSL. I have installed ParaView on Windows. Is there anyway to open a .foam file directly from bash on WSL? My $FOAM_RUN directory is in the original location, and although I can access it through Windows File Explorer it would be a lot simpler to open the .foam file from bash.



Thank you!

vv123 November 20, 2023 09:40

Quote:

Originally Posted by habitatguy (Post 795849)
Hi!


I am using OpenFOAM v2012 through WSL. I have installed ParaView on Windows. Is there anyway to open a .foam file directly from bash on WSL? My $FOAM_RUN directory is in the original location, and although I can access it through Windows File Explorer it would be a lot simpler to open the .foam file from bash.



Thank you!

Hi Tomas,

I have the same question. Did you get to a solution in the mean time? Thanks!


All times are GMT -4. The time now is 09:20.