OpenFoam CFD Server
OpenFoam Installation on Ubuntu
OpenFoam 5.0 installation for Ubuntu is described at: https://openfoam.org/download/5-0-ubuntu/
Installation steps for Ubuntu 16.04 and OpenFoam 5.0:
- Add OpenFoam repository
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
- Update package list
sudo apt-get update
- Install OpenFoam and Paraview
sudo apt-get -y install openfoam5
- Edit shell configuration, open .bashrc in editor
and add at the end of file:
Pmod Configuration for OpenFoam
Once PMOD is properly installed, the OpenFoam CFD server can be easily configured performing the following steps:
- Open the main configuration interface using the Config button available on the PMOD Toolbox.
- Select the DATABASE tab and Add new source as illustrated below:
- Activate the Create Database button and configure the Path to OpenFoam:
Note that path should point to OpenFoam main folder e.g. /opt/openfoam5/
- Switch the radio button from Use Direct Connection to Use Transaction Server:
- Configure the properties of the transaction server. The Secure box is for enabling secure communication. This mode should be used if the communication is not confined within the institution. Otherwise it will slow down the communication speed unnecessarily.
- An important property is the IP Port for the communication. It must be a unique number not used by any other transaction server or other process. The default port is 5202 if no other transaction server was configured during the PMOD installation.
- Another important property is the IP address. It must contain the address of the host in which the servers are running, so typically the system on which the configuration is performed. For this system the IP address can be obtained by activating the Set Local Host button. Note that entering "localhost" in the HOST area will NOT work!
- Check the box Stand alone and activate the Save Starting Script button. A dialog window appears which shows the contents of the created script. The example below shows the result for Ubuntu system:
- Select Yes to save the starting script with the specified Name in the specified subdirectory of the PMOD installation directory:
Note: Do NOT switch the radio button back to Use JDBC Connection. The transaction server should run at all times so command window should remain open.
- Save the PMOD configuration with the OK button and exit PMOD.
- Start the Pmod Transaction Server by double-clicking the script file. Please note that Transaction Server doesn’t need a WIBU Key to run, it can be unplugged.
Pmod configuration for OpenFoam (client side)
Start the PGEM local configuration to configure the OpenFoam PMOD client. The steps for an appropriate configuration are as follows:
- In the CFD Modeling section enable the Server radio button. Define the server by the host name or IP address and set the Port number used in the openFoam transaction server configuration as indicated below:
- Set the number of cores on the server to be used when solving CFD cases with the OpenFoam:
- Define the local path (client side) to the cases folder:
Note that cases downloaded from the server will be stored on the location specified on the Case path local.
- Finally, activate the Echo and Manage OpenFOAM cases button to verify the configuration: