Skip to content
David Gaden edited this page Sep 5, 2013 · 4 revisions

Table of Contents

Installing equationReader

OpenFOAM-extend

If you have a recent version of OpenFOAM-extend, you may already have equationReader installed. Type this command:

 [ -d "$WM_PROJECT_DIR/src/equationReader" ]&&echo "Yes"||echo "No"

If the response is "Yes" then you already have it.

Git Installation

A git installation will allow you to download the latest updates to equationReader.

equationReader is git-tracked seperately from OpenFOAM, so if your OpenFOAM installation is also git-tracked, it is advisable to put it in a seperate directory. Alternatively, if you use the latest version of OpenFOAM-extend, equationReader is incorporated within the main git repository.

Therefore, choose a seperate directory, for example:

 -OpenFOAM
  |-OpenFOAM-2.2.x
  | |-applications
  | |-src
  | '-etc, and so on
  '-equationReader

To duplicate the structure above:

 cd $WM_PROJECT_DIR
 cd ..
 git clone https://github.com/Marupio/equationReader.git
If you have OpenFOAM 1.7.x or earlier, at this point you need to edit the file src/equationReader/include/versionSpecific.H:
Comment out the second line:
 //#define ThisIsFoamVersion2

For any version of OpenFOAM, complete the installation:

 cd equationReader/src/equationReader
 wmake libso
 cd ../../applications/solvers/equationReader/equationReaderDemo
 wmake

To later update equationReader:

 cd $WM_PROJECT_DIR
 cd ..
 git pull
 cd equationReader/src/equationReader
 wmake libso
 cd ../../applications/solvers/equationReader/equationReaderDemo
 wmake

Manual installation

To manually install equationReader:

1. Download the code from here.

2. Open a terminal window and browse to the folder with your download.

3. Execute the following commands. You should be able to just copy and paste all 8 lines into your terminal:

 unzip equationReader-master.zip
 mv equationReader-master/README equationReader-master/tutorials/equationReader
 cp equationReader-master/* $WM_PROJECT_DIR
 rm -rf equationReader-master
 cd $WM_PROJECT_DIR/src/equationReader
 wmake libso
 cd $FOAM_APP/solvers/equationReader/equationReaderDemo
 wmake

equationReader should now be installed.

Testing

To test the installation, copy the new tutorials/equationReader/ directory to your run directory, and run equationReaderDemo.