detect OpenFOAM dev version#20
Conversation
|
The latest OpenFOAM is 8.x, can we set a really big number to indicate it is latest. Secondly, ubuntu 's openfoam use a version of 19.06, seems change the origin of source code. do you happen to know any command to detect openfoam? |
Do you mean detect foam version or location? |
|
I had a requirement to detect OpenFOAM installation into WSL, to let CFD on windows working with official openfoam. |
|
|
|
BTW, this code is unnecessarily complicated. Python can access environment variables: from os import environ
path = environ.get("WM_PROJECT_DIR", None)
version = environ.get("WM_PROJECT_VERSION", None)
if not version or not path:
raise RuntimeError("OpenFOAM envvars are not set") |
8ade6e8 to
d758fde
Compare
|
`from os import environ path = environ.get("WM_PROJECT_DIR", None) I have updated config.py yesterday. Agree your setting (8, 0) is a solution, to save future error, I set it as 10000, big engouh. Openfoam.com using version 1906 for our latest installation, there should be a command called |
I don't see this update |
Detect OpenFOAM
devversionCloses #19