Город МОСКОВСКИЙ
00:14:15

OpenFOAM v11 and OpenFOAM v2306 installation on Ubuntu 20.04.6 LTS | Use of Alias for version switc

Аватар
Карьера.
Просмотры:
21
Дата загрузки:
01.12.2023 01:24
Длительность:
00:14:15
Категория:
Лайфстайл

Описание

Link to OpenFOAM v11: https://openfoam.org/download/11-ubuntu/

Commands line to run in the terminal (ctrl+alt+toT) to install v11 (no need to go to the website)
Installation:

sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key (angle bracket here beside question mark in the keyboard) /etc/apt/trusted.gpg.d/openfoam.asc"

sudo add-apt-repository http://dl.openfoam.org/ubuntu

sudo apt-get update

sudo apt-get -y install openfoam11

User Configuration:

gedit ~/.bashrc

source /opt/openfoam11/etc/bashrc
or
. /opt/openfoam11/etc/bashrc

foamRun -help


Link to OPenFOAM v2306: https://www.openfoam.com/news/main-ne...

Command lines to install it no need to go on the website.

First make sure you will have the curl if not then install it using the commands below

sudo snap install curl
or
sudo apt install curl

Precompiled packages Debian, Ubuntu

# Add the repository
curl https://dl.openfoam.com/add-debian-re... | sudo bash

# Update the repository information
sudo apt-get update

# Install preferred package. Eg,
sudo apt-get install openfoam2306-default

# Use the openfoam shell session. Eg,
openfoam2306

Command to use the Alias are shown below
gedit ~/.bashrc

#of11
alias of11='. /opt/openfoam11/etc/bashrc'
#of2306
alias of23='. /usr/lib/openfoam/openfoam2306/etc/bashrc'

then basically open the terminal and type of11 if you want o use v11 or of23 if you want use v2306

Рекомендуемые видео