I'm trying to install OpenFOAM software on my laptop. I have Windows 10 Home OS version 2004. To use OpenFOAM on Windows, I installed Windows Subsystem for Linux (File version 10.0.19041.1023) on my laptop. Then, to install OpenFOAM, I followed these commands in the WSL-sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo apt-get update sudo apt-get install openfoam8 sudo apt-get install build-essential echo ". /opt/openfoam-dev/etc/bashrc" >> $HOME/ .bashrc . $HOME/.bashrc simpleFoam -help echo "export DISPLAY=:0" >> ${HOME}/.bashrc . $HOME/.bashrc sudo apt-get install gedit gedit-plugins sudo apt-get install gnuplot gnuplot-x11 gnuplot-doc libgd-tools sudo apt-get install mplayer mencoder gedit &Here, I got the output as -[1] 21180 Unable to init server: Could not connect: Connection refused (gedit:21180): Gtk-WARNING **: 16:58:05.730: cannot open display: :0 [1]+ Exit 1 gedit Then I entered -of8and got the output as -Command 'of8' not found, did you mean: command 'os8' from deb os8 (2.1-7) command 'ofl' from deb hxtools (20200126-1build1) Try: sudo apt install <deb name>So then I tried to install it -mkdir -p $FOAM_RUN cd $FOAM_RUN cp -r $FOAM_TUTORIALS . cd tutorials/incompressible/icoFoam/cavity/cavity blockMeshThen -icoFoamThen in order to open ParaFOAM, I did this -paraFoamBut it is giving me the error - " Created temporary 'cavity.OpenFOAM' qt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. "In order to fix this, I tried doing this -/platforms$ ldd libqxcb.so sudo apt-get install libx11-xcb1 paraFoamBut it is still giving me the error - " Created temporary 'cavity.OpenFOAM' qt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.Aborted "I also tried -s apt installclibxkbcommon-x11-0 sudo apt install libxkbcommon-x11-0 This gives the output -" Reading package lists... Done Building dependency tree Reading state information... Done libxkbcommon-x11-0 is already the newest version (0.10.0-1). libxkbcommon-x11-0 set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 91 not upgraded. "And then when I again try the command paraFoam it is still giving me the error - " Created temporary 'cavity.OpenFOAM' qt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. "I don't know what to do now. Can anyone please help me install this software ?..
I installed Openfoam v5 on MacOS following the installation instructions on the official website along with XQuartz and Paraview. However while testing the installation as per the guide, I had issues with the legacy version of Paraview in the container not being able to access the driver swrast. Paraview is installed natively too, but I don't know how to open the tutorial file in Paraview since paraFoam command doesn't work due to driver issues.
14897 visits
Outline:About OpenFOAM OpenFOAM capability Importing Mesh Files Boundary Conditions Solvers Parallel Processing Post-Processing Replacement for Commercial softwares Modelling in OpenFOAM OpenFOAM code
About OpenFOAM OpenFOAM capability Importing Mesh Files Boundary Conditions Solvers Parallel Processing Post-Processing Replacement for Commercial softwares Modelling in OpenFOAM OpenFOAM code
Show video info
Pre-requisite