1.3. Ubuntu 18.04.2 LTS¶
1.3.1. New administrator¶
https://linuxconfig.org/how-to-create-sudo-user-on-ubuntu-18-04-bionic-beaver-linux
(Don’t need Chromium - Google Chrome is installed)
1.3.2. Background¶
I have saved this to Pictures/do_not_delete.svg
Only need Adwaita-dark theme (Unity Tweak is already installed)
1.3.3. Change hostname¶
$ hostnamectl set-hostname andrew-pc
1.3.4. Texmaker¶
Ubuntu software center
1.3.5. Aspell¶
sudo apt-get install aspell
1.3.6. Network access¶
Wired connection needs no password
802.1x security > Don’t used 802.1X security for this connection.
1.3.7. VPN¶
Download installed package: https://as.exeter.ac.uk/it/network/vpn/
Install the package and dependencies:
$ sudo dpkg -i ps-pulse-linux-5.3R7.0-b919-ubuntu-debian-64-bit-installer.deb
$ /usr/local/pulse/PulseClient.sh install_dependency_packages
Connect to VPN (it won’t ask for sudo password):
$ /usr/local/pulse/pulsesvc -h vpnsecure.exeter.ac.uk -u apr207 -U https://vpnsecure.exeter.ac.uk -r Exeter
1.3.9. GIMP¶
Ubuntu software centre
1.3.10. Pointwise¶
sh pw-V18.0R2-linux_x86_64-jre.sh
Next, Accept
/home/andrew/Pointwise/PointwiseV18.0R2
is installation directory
There is currently no license
1.3.11. Net-tools¶
sudo apt-get install net-tools
1.3.12. Tree¶
sudo apt-get install tree
1.3.13. TMUX¶
Ubuntu software centre
1.3.14. VIM¶
sudo apt-get install vim
1.3.15. SSH¶
This didn’t work - ssh: connect to host 82.110.157.210 port 22: No route to host or fell silent
sudo apt-get install openssh-server
from laptop: ssh -XC user@IP address
Start ssh: sudo service ssh start
Stop ssh: service ssh stop
1.3.16. OpenFOAM 4.x¶
Have to install 32 bit integer support for compatiblility with CFMesh
https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-4.x/Ubuntu#Ubuntu_16.04
Ubuntu 16.04
Here you have the following choices:
Follow the official instructions for building from source code: OpenFOAM Source Repository
Or by following the detailed step-by-step instructions below…
Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.
Steps:
Switch to root mode (administrator), to install the necessary packages:
sudo -s
If the ‘sudo’ command tells you’re not in the sudoers list, then run:
su -
Update the apt-get cache by running:
apt-get update
Install the necessary packages:
apt-get install git-core build-essential binutils-dev cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev libqtwebkit-dev gnuplot \
libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin libboost-system-dev libboost-thread-dev libgmp-dev \
libmpfr-dev python python-dev libcgal-dev
Note: It has been reported that the following should also be executed in some cases, so that ParaView will build properly:
apt-get install libglu1-mesa-dev libqt4-opengl-dev
Now exit from the root mode:
exit
Download and unpack (here you can copy-paste all in single go):
#OpenFOAM downloading and installation
cd ~
mkdir OpenFOAM
cd OpenFOAM
git clone https://github.com/OpenFOAM/OpenFOAM-4.x.git
git clone https://github.com/OpenFOAM/ThirdParty-4.x.git
Optional: Let’s make a few symbolic links that should ensure that the correct global MPI installation is used by this OpenFOAM installation:
ln -s /usr/bin/mpicc.openmpi OpenFOAM-4.x/bin/mpicc
ln -s /usr/bin/mpirun.openmpi OpenFOAM-4.x/bin/mpirun
This way we avoid having problems in case there is more than one MPI toolbox installed in your Ubuntu system, for example if MPICH2 is installed and is the default MPI toolbox.
For building OpenFOAM itself, it depends on whether you have installed the i686 or x86_64 architecture of Ubuntu. To check this, run:
uname -m
Now, accordingly:
For i686:
source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc WM_ARCH_OPTION=32 FOAMY_HEX_MESH=yes
For x86_64, it depends on whether you need 64-bit integer support or not:
For building with the normal 32-bit integer support (maximum
2.147×10^9
cells, faces or points):
source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc FOAMY_HEX_MESH=yes
For building with the normal 64-bit integer support (maximum
9.22×10^18
cells, faces or points):
source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc WM_LABEL_SIZE=64 FOAMY_HEX_MESH=yes
Save an alias in the personal .bashrc file, simply by running the following command:
echo "alias of4x='source \$HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc
Note: This last line means that whenever you start a new terminal window or tab, you should run the alias command associated to the OpenFOAM-4.x shell environment. In other words, whenever you start a new terminal, you should run:
of4x
For more information on this topic, read section Using aliases to help manage multiple OpenFOAM versions in the page Installation/Working with the Shell.
Now, in order to build ParaView 5.0.1, including with the ability to use Python and MPI, a few steps are needed:
Make sure you’re running in the ThirdParty folder and that the correct Qt version is used:
cd $WM_THIRD_PARTY_DIR
export QT_SELECT=qt4
For building ParaView with Python and MPI, it depends on whether you have installed the i686 or x86_64 architecture of Ubuntu. To check this, run:
uname -m
Now, accordingly:
For i686:
#this will take a while... somewhere between 30 minutes to 2 hours or more
./makeParaView -python -mpi -python-lib /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 > log.makePV 2>&1
For x86_64:
#this will take a while... somewhere between 30 minutes to 2 hours or more
./makeParaView -python -mpi -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 > log.makePV 2>&1
wmRefresh
Now let’s build OpenFOAM:
Go into OpenFOAM’s main source folder and be certain that the correct Qt version is being used:
cd $WM_PROJECT_DIR
export QT_SELECT=qt4
This next command will take a while… somewhere between 30 minutes to 3-6 hours:
./Allwmake -j 4 > log.make 2>&1
Note: The “4” refers to the number of cores to be used for building in parallel. In addition, the amount of RAM needed for building scales with the number of cores used, something like 1GB of RAM per core; a minimum of 1.5GB is needed for linking the libraries, which is not done in parallel.
Run it a second time for getting a summary of the installation:
./Allwmake -j 4 > log.make 2>&1
Note: Technically, the build will stop as soon as the first error is found. Running a second time only makes it easier to sort through between what’s already been built and where the crash occurred.
To check if everything went well: Check if icoFoam is working, by running this command:
icoFoam -help
1.3.17. CFMESH¶
$ cd ~
$ wget https://sourceforge.net/projects/cfmesh/files/v1.1.2/cfMesh-v1.1.2.tgz
$ tar zxvf cfMesh-v1.1.2.tgz
$ cd cfMesh-v1.1.2/
$ chmod u+x ./Allwmake
$ ./Allwmake
1.3.19. numpy¶
pip install numpy
1.3.20. matplotlib¶
pip install matplotlib
1.3.21. PyFoam¶
pip install PyFoam==0.6.6
1.3.22. Numpy-stl¶
pip install numpy-stl
1.3.23. DEAP¶
pip install deap
1.3.24. Scipy¶
pip install scipy
1.3.25. CFD Test Problem Suite¶
git clone https://bitbucket.org/arahat/cfd-test-problem-suite.git
1.3.26. Build the problems¶
of4x # load your OpenFOAM installation using alias
cd Exeter_CFD_Problems/data/PitzDaily/solvers
chmod u+x ./Allmake
./Allmake
cd ../../../..
cd Exeter_CFD_Problems/data/KaplanDuct/solvers
chmod u+x ./Allmake
./Allmake
cd ../../../..
cd Exeter_CFD_Problems/data/HeatExchanger/solvers
chmod u+x ./Allmake
./Allmake
1.3.27. Remove conda () env on bash¶
conda config --set changeps1 true
1.3.28. Test the problem suite¶
$ cd your_directory_of_choice/cfd-test-problem-suite/
$ of4x # use the alias for your OpenFOAM installation
$ ipython
In [1]: run sample_script.py -h # to see the help documentation
1.3.29. TEXLive¶
sudo apt search texlive-full
1.3.30. DVIPNG (for saving figures)¶
sudo apt-get install dvipng
1.3.31. Pointwise .bashrc¶
1.3.32. Pointwise¶
Downloaded pw-V18.0R2-linux_x86_64-jre.sh
sh pw-V18.0R2-linux_x86_64-jre.sh
Next
Accept
/home/apr207/Pointwise/PointwiseV18.0R2 is installation directory
Run Pointwise
(Won't find license)
Specify license server
server: emps-pointwise
port: 2385
Added this to .bashrc:
# Pointwise
alias pointwise="/home/apr207/Pointwise/PointwiseV18.0R2/pointwise"
1.3.33. .bashrc for CFD_Problems¶
1.3.34. Foxit Reader¶
1.3.35. PDF Presenter Console¶
sudo apt-get install pdf-presenter-console