It is an excellent question.andylaurence wrote:How does OCCFD determine the OpenFOAM version?
Long winded explanation:
The story is OCCFD runs (or try to) the command "simpleFoam -help" and identify the version from the output - the line "Using:" below.
Code: Select all
C:\Program Files (x86)\blueCFD-2.1>simpleFoam -help
Usage: simpleFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage
Using: OpenFOAM-2.1 (see www.OpenFOAM.org)
Build: 2.1-88b2f2ae3a0b
Then it gets a little more complicate:
1) If the executable "simpleFoam" is in the path, then it runs the command directly; otherwise
2) It looks for the executable in a number of place (and should not find it there); then
3) It looks for the file "setvars.bat" in similar places, including C:\Program Files\OpenFoam, C:\Program Files\OpenFoam\OpenFoam, c:\Program Files\blueCFD-2.1\OpenFoam-2.1\etc;
4) If it find the file "setvars.bat", it creates a batch file with a number of commands and runs it:
Code: Select all
call {PATH}\setvars.bat
cd {SomePath}
simpleFoam -help
Now let's try to solve your problem
1) Start a command prompt;
2) Type "simpleFoam -help". It should return:
Code: Select all
'simpleFoam' is not recognized as an internal or external command,
operable program or batch file.
4) Type "simpleFoam -help". It should return the message listed above with the help for the command;
5) Start a command prompt;
6) Type "call {PATH}\setvars.bat"
7) Type "simpleFoam -help". It should return the simpleFoam help.
Let me know what works and what does not work.