Advanced Configuration

User directory structure

On both Linux and Windows user specific settings are located under:
<HOME>/.simflow
and for particular operating system:

  • Windows: C:/Users/<User>/.simfow

  • Linux: /home/<User>/.simflow

Content

A typical user directory contains following elements:

  • user.properties - file containing basic user properties, eg.: profile that should be used

  • system.properties - file containing basic system properties, eg.: background color

  • license.dat - (optional) file containing license information

  • materials - directory containing material database

  • profiles - directory containing profiles definitions

Profiles

Profile definitions are located under profiles subdirectory. Each profile properties are defined in file
<profile-name>.properties
Additionally each profile has a directory with the same name where additional profile information are located, eg.: profile named my_profile/ is defined in file:
profiles/my_profile.properties
and has asociated directory:
profiles/my_profile

Configuration files

SimFlow configuration files have extension .properties and are located in user directory. Current SimFlow configuration files are:

  • user.properties - User specific settings

  • system.properties - System specific settings

  • profiles /<profile_name> .properties - Profile definition files

*.properties file syntax

Properties file are standard Java configuration files. This file is a dictionary containing key-value pairs. Delimiters between key a value are equal sign = and semicolon : , so entry can look like this:

some.key=some value

is equivalent to

some.key:some value

This format also supports multi line values. If value consists of multiple lines, each line has to end with backslash \ . Properties format supports python-like comments - comment is a line starting with hash # , eg.:

#this is a comment and you can put here whatever you want

Since equal sign, semicolon and backslash are special characters, they have to be 'escaped' with additional backslash sign. For example specification of Windows path for ParaView would require an entry of the form:

paraview=C\:\\Program Files\\ParaView 4.3.1\\bin\\paraview.exe

or

paraview=C\:/Program Files/ParaView 4.3.1/bin/paraview.exe

user.properties file

This file typically consists of folowing entries:

  • license.file - path to the license file. If this entry is empty or does not exist system will look for license file: <HOME>/.simflow/license.dat .

  • profile - name of the profile to load settings from. If this entry is empty or does not exist or points to an invalid profile name system will look for a profile named default . If this profile cannot be found system will create it and try to load it with some reasonable settings.

Typical user.properties file on Linux would look like this:

license.file=/home/<User>/.simflow/license.dat
profile=default

system.properties file

This file contains system settings:

  • errors.report (boolean) - entry tells the system if it should send any errors to the support team. If this entry does not exist, system will ask user before sending anything.

  • view.projection - default projection used in the 3D window. Possible values are Perspective and Parallel .

  • background.top - definition of top background color in 3D window. This entry is consists of three integers surrounded with brackets, representing RGB components of the color, eg.: (255 0 0) for pure red color.

  • background.bottom - same as background.top but defines background bottom color.

Typically, this file looks like this:

errors.report=yes
view.projection=Perspective
background.top=(86 153 238)
background.bottom=(255 255 255)

Profile *.properties files

Profiles define the environment for execution of OpenFOAM and ParaView. Profile name is taken from the file name by discarding the .properties extension.

File named some_name.properties will be interpreted as a profile named some_name .

OpenFOAM definition

Definition of the OpenFOAM has the same form for both local and remote profiles, and has the following entries:

  • openfoam.version - version of OpenFOAM. This entry should consist of three integers separated by dots, eg.: 2.3.1 .

  • openfoam.precision - determines whether this version of OpenFOAM uses single or double precision. This entry is important for reading and writing binary files. Possible values are Double and Single .

System definition

To determine whether SimFlow should run cases locally or on a remote system, following entry should be defined:

  • system.type - if this entry is not defined cases will be run locally. Currently, possible entries are local and ssh .

Local settings

Setting that are used only on a local system:

  • openfoam.location - directory containing bin and lib subdirectories with OpenFOAM executables and dynamic libraries.

  • paraview - path to the ParaView executable file. If it is not defined user will be asked for this path when trying to run ParaView.

  • env.<some_variable> - additional environment variables that should be defined or overwritten.

  • extrapath - additional path that should be added to the PATH (and LD_LIBRARY_PATH on linux) environment variable.

SSH settings (since 2.1)

Remote SSH session requires following entries:

  • host.name - name (or IP) of the computer to connect to.

  • user.name - name of the remote user. Note that password will not be stored anywhere.

  • user.identity - path to private SSH key. This option is required if server accepts only private key authentication.

  • system.setup - command that is to be called before calling any remote executable. This should usually setup all OpenFOAM environment variables.

Additionally you can define optional entries:

  • mesh.read - boolean flag to enable or disable reading full mesh. May be usefully for remote sessions where bandwidth is limited.

Typical local profile definitions looks like this:

system.type=local
openfoam.version=2.3.1
openfoam.precision=Double
openfoam.location=D\:/OpenFOAM/OpenFOAM-2.3.1-x64
paraview=C\:/Program Files/ParaView 4.3.1/bin/paraview.exe
env.WM_PROJECT_DIR=D\:/OpenFOAM/OpenFOAM-2.3.1-x64
env.MPI_BUFFER_SIZE=200000000

Typical remote SSH profile looks like this:

system.type=ssh
user.name=User
host.name=SomeHost
openfoam.version=2.3.1
openfoam.precision=Double
system.setup=source /opt/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc