CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] Compile my own solver with a 'Native-windows' OF installation?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2026, 11:28
Default Compile my own solver with a 'Native-windows' OF installation?
  #1
Member
 
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16
Orgogozo is on a distinguished road
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
Orgogozo is offline   Reply With Quote

Old   January 9, 2026, 06:54
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 885
Blog Entries: 1
Rep Power: 20
dlahaye is on a distinguished road
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)?
dlahaye is offline   Reply With Quote

Old   January 9, 2026, 07:08
Default
  #3
Member
 
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16
Orgogozo is on a distinguished road
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.
Orgogozo is offline   Reply With Quote

Old   January 9, 2026, 08:06
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 885
Blog Entries: 1
Rep Power: 20
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Old   January 9, 2026, 09:44
Default
  #5
Member
 
Laurent Orgogozo
Join Date: Mar 2011
Location: Toulouse
Posts: 36
Rep Power: 16
Orgogozo is on a distinguished road
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
Orgogozo is offline   Reply With Quote

Reply

Tags
openfoam windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:44.