|
[Sponsors] | |||||
[OpenFOAM.com] Compile my own solver with a 'Native-windows' OF installation? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16 ![]() |
Dear FOAMers,
Is this possible to compile user-developped OpenFOAM solvers when using OpenFOAM on Windows, with a 'Native-windows' installation? I would need to do so for teaching purposes. Thanks by advance for your help! All the best, Laurent |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
|
Bonjour!
1/ What compiler (and linker and makefile system) do you intend to use? 2/ Can you copy a solver (e.g. laplacianFoam or simpleFoam) from src/ to a scratch space and try to compile, link and execute there (possibly good to rename solver first)? 3/ How big/complex is the user developed solver? 4/ Does it help to try this on linux first (in case not already done so)? |
|
|
|
|
|
|
|
|
#3 |
|
Member
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16 ![]() |
Bonjour
![]() Thanks for your reply, please find my answers below. Best regards, Laurent 1/ What compiler (and linker and makefile system) do you intend to use? -> I would like to compile a user developed solver with wmake (not sure that I fully understood the question). 2/ Can you copy a solver (e.g. laplacianFoam or simpleFoam) from src/ to a scratch space and try to compile, link and execute there (possibly good to rename solver first)? -> I did not get in any practical step yet, I am just wondering whether or not it is theoretically possible to compile my homemade OF solvers on a Windows installation of OpenFOAM. 3/ How big/complex is the user developed solver? -> Nothing really exotic I would say: https://develop.openfoam.com/Community/hydrology/ 4/ Does it help to try this on linux first (in case not already done so)? -> These solvers do compile on linux systems with OF2206 for instance. |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
|
Q1: wmake is a shell around the makefile. wmake in turn calls compiler and linker. It is here where differences between windows and linux become obvious.
Q2: yes, should be possible. The fact that OpenFoam compiles and runs on Native-Windows demonstrates this. Q3: clear. If not too complex, then yes, again, should work. Q4: precisely. Do we understand how to adapt the compilation of e.g. simpleFoam and laplacian to your hydrology code? How are simpleFoam and laplacian compiled on Native-Windows using wmake? What are steps that wmake takes? Can these steps be adapted to your hydrology code. Q5: you will need to adapt https://develop.openfoam.com/Communi...ref_type=heads to your windows system by providing proper definitions of variables like WM_COMPILER and WM_COMPILER_TYPE to your system. The value of these variables can be found using printenv (or similar) on your Windows machine. Bonne chance. D. |
|
|
|
|
|
|
|
|
#5 |
|
Member
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16 ![]() |
I just read this :
'Native Windows : Cross-compiled Windows binaries (mingw). Provides a quick means of using OpenFOAM on windows, but does not currently include an OpenFOAM development environment (ie, cannot compile code, no dynamic code)' https://develop.openfoam.com/Develop...mpiled/windows My bad, sorry :P |
|
|
|
|
|
![]() |
| Tags |
| openfoam windows |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Failed to compile sprayFoam solver clone | Shawn Kong | OpenFOAM Bugs | 2 | February 14, 2024 04:14 |
| Compile Fluent UDF with Windows 10 | daniel_pramudita | FLUENT | 15 | May 13, 2020 23:29 |
| fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
| Windows 64-bit with Native MPI patch for OpenFOAM 1.6.x | gocarts | OpenFOAM Announcements from Other Sources | 4 | October 4, 2010 09:56 |
| CFX 5.5 | Roued | CFX | 1 | October 2, 2001 17:49 |