You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Would Windninja developers upgrade openfoam version to latest one? #537
Just like the title described, current ninjafoam parts seem not compatible with latest openfoam version. Some of functions are no longer used in latest version or recent versions. Is there any plan to use latest openfoam?
We've actually been looking into this for a while, and recently, as building on Windows requires special treatment with OpenFOAM. In my last evaluation, there are actually bugs with how OpenFOAM 10 to 12 in openfoam.org versions deal with refined meshes as we do them, and seemingly bugs in how timesteps are even treated, so going to the latest and "greatest" would take some time to first figure out. In other words, is it really somehow a bug that wasn't fixed across so many versions (we just upgraded to foam 8 last year from 2.2.0 btw), or is it just adjusting our code to how openfoam has changed. We still have to investigate, because since OpenFOAM 10 and on, they significantly combined and reorganized much of their code base again, changing how to even use and call many of the basic functions. So it's complicated. And so it could take quite a bit of
time.
In the meantime, the latest known compatible openfoam.org version is 9, I keep getting side tracked with other projects and haven't finished doing such an upgrade yet. Partially because we also want to investigate the openfoam.com versions, as they have MinGW releases for windows, implying an ability to build directly with MinGW without editing the openfoam.org code base for MinGW builds. Openfoam.com is harder to build in general though, using that code base would mean going back to building openfoam from scratch instead of using one from the apt store.
Long term (years) we are actually hoping to eventually get away from OpenFOAM as a dependency, if we are able, but in the meantime I'm working to migrate to newer versions as we are able, focusing on Ubuntu builds with the ability to build on Windows.
If you need to have multiple versions of OpenFOAM on your machine, say to swap from WindNinja's version of OpenFOAM (8 soon to be 9) to whatever version you need for your other work, on Ubuntu, you just have to comment out the source /opt/openfoam8/etc/bashrc line from your .bashrc (/home/user_name/.bashrc), and add another line similar to it pointing to your other version of OpenFOAM, something like source /path_to_openfoam_dir/etc/bashrc, and then run source .bashrc to update your environment with the new path. You may need a system restart if it gets confused mixing paths or remembering the old paths alongside the new ones.
I personally like to have a ## OpenFOAM line followed by a line for each path to each version of OpenFOAM that I use in my .bashrc file, commenting and uncommenting out however I need to, to pick the version that I want to use at a given time. So far the differing dependencies across versions of OpenFOAM hasn't caused me trouble yet, thankfully.
@lo-y-wni Which OpenFOAM version are you wanting to use? As @latwood mentioned, we currently support several versions (the ones available in the apt package manager for our supported Ubuntu versions) and if possible, the simplest solution would be to install one of those versions alongside the newer version and switch between the two as needed, sourcing the appropriate .bashrc. Let us know if this can work for you.
Activity
latwood commentedon Nov 27, 2024
latwood commentedon Nov 27, 2024
If you need to have multiple versions of OpenFOAM on your machine, say to swap from WindNinja's version of OpenFOAM (8 soon to be 9) to whatever version you need for your other work, on Ubuntu, you just have to comment out the
source /opt/openfoam8/etc/bashrcline from your.bashrc(/home/user_name/.bashrc), and add another line similar to it pointing to your other version of OpenFOAM, something likesource /path_to_openfoam_dir/etc/bashrc, and then runsource .bashrcto update your environment with the new path. You may need a system restart if it gets confused mixing paths or remembering the old paths alongside the new ones.I personally like to have a
## OpenFOAMline followed by a line for each path to each version of OpenFOAM that I use in my.bashrcfile, commenting and uncommenting out however I need to, to pick the version that I want to use at a given time. So far the differing dependencies across versions of OpenFOAM hasn't caused me trouble yet, thankfully.nwagenbrenner commentedon Nov 27, 2024
@lo-y-wni Which OpenFOAM version are you wanting to use? As @latwood mentioned, we currently support several versions (the ones available in the apt package manager for our supported Ubuntu versions) and if possible, the simplest solution would be to install one of those versions alongside the newer version and switch between the two as needed, sourcing the appropriate .bashrc. Let us know if this can work for you.