OpenFoam Under Windows is a Poor Solution
From the getgo, the idea of using Virtualization will hobble the system performance by 10%.
From there, the user experience is truly terrible. For certain applications, perhaps the user might have to rename their user folder, which is ridiculous. There are also the issues of 3 layers of possible security issues and permissions, which really shouldn't be added to Microsoft Windows' already sketchy security. As if what I've written wasn't shocking and potentially offensive enough... If OpenFoam is so white-space sensitive that it cannot run well across systems, perhaps those component deficiencies should instead be addressed. Ah, that felt good. Thanks for reading. :) |
The solution is of course to compile FOAM natively on Windows. This gets rid of al security and virtualisation problems and gives you a native environment you are already used to.
This is what we did foam-extend Hrvoje |
Hjasak, thank you for the reply.
I had read that there are serious, unfixable compatability problems with it running on Windows and non-Posix operating system. Is that not true? Why would OpenFoam bother with a complicated system like Docker, otherwise? |
Hjasak, BTW, I followed up on Foam-extend.
I am downloading it, and will try it. Thanks. I like modeling in Rhino3D. There is a Grasshopper extension which can set up OF cases, which seems cool, though it looks for Docker paths. Perhaps I can modify the code to reflect the path, but I am not sure I can. I've done some experimentation with OpenFoam. The issue I had with OpenFoam was meshing, and with the addition of SnappyHexMesh, there was little reason for them to fix the tetrahedral mesh issues. |
There are no fundamental reasons. In fact, FOAM is an easy code to port, so the reasons are more related to Ego, fear and just being awkward.
There has been several successful ports to Windows. I did foam-extend in about 4 days and merged it into the development line; we now support native Windows builds. I have worked with dr. Cesare Guradino (absolute expert for Windows!) who did all the hard work; my changes were in the main development line. Further, foam-extend-4.1 comes with CMake, meaning that you can export the project file and load foam-extend into Microsoft Visual Studio. I did not try this (not my favourite tool. Here are the things I had to do: - in foam/OSSpecific, the interface to functions interfacing with MS Windows was added. This is ~1000 lines of code and it is mostly trivial - there is a series of file name clashes, because Windows uses a non-case-sensitive filing system. Overall, about 100 files have been renamed to avoid name clashes - some function names had to be changed; this is silly but necessary. For example, "interface"is a keyword in Microsoft C++ but not in the standard. The biggest challenge is the Third Party environment, which needs to be installed "just-so" :) This includes things such as openmpi, scotch, python etc. which are easily installed on Linux (lunix) :) but not on Windows. Overall, this was a pleasant experience; we also fixed some bugs found by the Windows compiler which did not appear under Linux. From time to time, there are minor problems, like post-processing files for k and K, which are the same on Windows, but the code works well, both in serial and in parallel. The compilation is native and even some of my students at the CFD course at Uni Zagreb choose to run under Windows... Hrvoje |
In the past, I have written to OpenFoam, stating the same I stated in my original post.
Having read what you wrote, I now have to wonder why OpenFoam has worked so hard to push Docker as well as the other Windows Ubuntu virtual machine meta-solution. I just got back from the dentist, but already, I am contemplating how I might call out and lecture and harass OpenFoam.org with your success. ( I use Windows, Linux, and Mac. I have had more contact with the Linux version of OpenFoam, but there are issues with getting cross-platform toolchains working, so I do want a Windows version of OpenFoam as well, as the Linux, and even the Mac. I feel that many science applications are too esoteric and vertical to exclude programing help from other platforms, as it there are so few people capable of writing CFD code of OpenFoam quality, that I want to expose as many potential programmers to OpenFoam, and for that, it needs to be an easy, cross-platform install.) |
Brenda, what do you want? What was the point of this thread? All I have seen you do on these forums is complain about OF not being easy to use, not having good documentation, not having good tutorials etc etc as if it was something you've paid for.
You just come here and point out things you think are wrong and dishing out criticism, and not the constructive kind. Did you even google or search the forums for "windows native openfoam|foam"? Doubt it Did you offer any alternatives? No. Did you even make a request for alternatives? Also no, it was just yelling into the wind. Next time you want to complain about foam, tell your cat about it. And again you bring up some perceived issue with tetrahedral meshes, there is no issue. I am convinced now that you do not have a firm understanding of the underlying nature of FVM. It has been know for a long time that tets will have higher non-orthogonality than an equivelant hexa mesh, yes the accuracy can be mostly resolved with tricky discretisation schemes and correction loops applied but it costs processor time. There is no issue with OF and tets. The foam community is complicated and by no means a monolith, who do you think makes all this stuff for you to use? I bet you don't even know who you're talking to here... I really don't like being this negative but I really don't appreciate when people come here with ill ( or no ) intentions. Again, the question I lead with, what were you trying to do, make the development team feel bad? Ah, that felt good. Thanks for reading. [emoji4] |
@pete20r2,
You have a right to doubt, yet I've experimented with BlueFoam. It's over a year old now, and quite large for some reason. I have also written OpenFoam's Karen K. in January, and I likely told it like it is. [I wanted other meshing methods such as tetrahedralization to remain supported because they allow other programs to prepare meshes more easily. The hex meshes are beautiful and effecient, but given that anything other than a 3 point plane can warp, I regard them higher yet less-universal solution, and universal and widely adopted is what I want. A lowest common denominator mesh might be just the thing--especially in a world becoming crowded with powerful, cheap, and unwanted, blockchain GPUs, with varying floating point capabilities. Then also there is the fact that .STL is the de-facto real-world sampling format, and that format deals with triangles that are more easily tetrahedralized than converted to hexes. I had problems with OpenFoam and tetrahedrals, and the sense of what I got from others that tetrahedral code was on the back burner because the SnappyHexMesh was OpenFoam's darling meshing solution. Meshing issues aside....] What I am specifically attacking is OpenFoam.org's use of Docker and other VM solutions. They are a fix-the-symptom but not-the-cause solutions. I would rather a friend feel bad than walk in the wrong direction. What I want, and the point of this thread try to persuade OpenFoam not to spend their effort on an under-performing fix, fraught with inherent issues, and instead prepare a native Windows solution. I think I understand Docker's need to propagate their product, I don't think that a Docker proof-of-concept win is a good Windows OpenFoam user win. If one or a few persons came up with a better Windows OpenFoam solution, working independently, then why has not OpenFoam.org helped them by even listing his/their work on their website? As far as alternatives you ask for, has OpenFoam.org considered hjasak's solution? (As seen above) |
@hjasak, if I may ask, how do you handle the lack of Windows OpenMPI?
Did you build OpenMPI it using Cygwin? As you compiled and graciously offered, can Foam-extend run a single computer, or is it multi-threading that will be affected. |
Greetings to all!
I'm somewhat late to the discussion, but I'll try to explain what I'm able to answer, specially since I've dealt with porting OpenFOAM to Windows for several years now (namely provided it via blueCFD-Core). Hrvoje Jasak is correct in what he wrote, but there are a few more details at the problem of porting OpenFOAM to Windows. I'm not able at the moment to have a cohesive outline of things on their own topics, so here goes a rough list of things as I'm able to think of them:
Best regards, Bruno |
Wyldckat, thank you for replying. It's my hope that a dialogue will happen.
I agree that Windows licensing is poor at best, though many people have it, and it is my hope that if people can more easily try OpenFoam, they might be inspired to help, on what is a vertical program with a very small qualified programing base. I've seen BlueFoam, and it is inspiring. Thank you for your effort. Would requiring something like putting OpenFoam on C:/OpenFoam help, or is it an parameter-passing thing? Could the powers that be help solve this in the design implementation? As far as WLS, I was still ever hopeful of having something truly native because while it may be quite a feat to implement OpenFoam on Windows, it's also not not seem trivial for the user to work with it, and for other helper programs and pre/post programs to work with it. I hear a lot of woe, which adds to my woe, but I am glad you left some here, as you left some good information. Thank you. : ) |
Quick answers:
Quote:
And although "BlueFoam" has a nice ring to it, the official name is "blueCFD-Core", to avoid trademark infringement (see https://www.cfd-online.com/Forums/op...ging-name.html as an example of why "bluefoam" isn't a thing ;)). Quote:
You can find more details on the approaches used with blueCFD-Core at the following pages:
Quote:
Because from one perspective, Windows is sort-of-broken by design in order to be user friendly. Yes, most of its constraints are actually to avoid people shooting themselves in the foot. From another perspective, OpenFOAM's design is to do the right thing and not wasting time with subpar operating systems... specially when the resources are limited (i.e. funding to develop/maintain it in the first place). Either way, digitally we can do anything, even everything that doesn't make sense in the real world. This to say that even though things are still not the best they can be right now, things were "a lot worse" in 2004, when we didn't have even half of the possible solutions available right now. Which reminds me: Did you know that there is an add-on for FreeCAD that can assist in setting up cases to run in OpenFOAM, as well as providing support for blueCFD-Core on Windows? Here: https://github.com/jaheyns/CfdOF#com...ch-for-freecad - And all of these components are open source!!! |
I was experimenting with the Docker version of OpenFoam again. It does not run on my machine--even with a no-space user name, which few Windows uses--and of course virtualization turned on.
Unfortunately, also, it appears that the software I wanted to experiment with preparing the cases may not work with BlueCFD, though I made a post, asking adding my name to a list of people who are asking for BlueCFD support for the software. The Docker fix attempted to fix the symptom, but not the problem. There are equally heavy-hitter open-source applications which run seamlessly across platforms, Paraview, Librieoffice, Blender, FreeCAD, ImagJ, Inkscape, and unless I am wrong, Salome Mecha does not use VM. I worry that the OpenFoam people might have struck some deal with the Docker people, and Windows users might be stuck with this mess for years. |
Agree with you!
Computers are like air conditioners, they stop working properly when you open windows. --unknow Quote:
|
Why would you run OpenFOAM on a Windows machine in the first place?
Scientific computing is done mainly on UNIX-based OSes. This is also the reason why OpenFOAM was created on and for UNIX-based OSes. Historically, there was no need to publish a Windows version of OpenFOAM. In my opinion, having OpenFOAM on Windows via Docker or the Windows Subsystem for Linux is little more than a gimmick. In my view this is targeted at new users to provide them an easy way to try and test OpenFOAM. Thus, people can install Docker or a virtualiser on their Windows machines, try and learn OpenFOAM. If they are convinced it fits their need, the next logical step is to convince management to cough up the money to set up a dedicated simulation rig. You just don't do large, production CFD simulations on your workstation. If you ever want to use OpenFOAM in production, run it using a native installation (on a POSIX compatible OS) on bare metal (i.e. no virtualisation). So, any performance-hit caused by Docker or virtualisation is a non-issue. |
I am sorry but this is pathetic.
I want to run OpenFOAM on a Windows machine because I write software and a Windows machine is a computer. From my 25+ years of experience I have learned that porting (my) code to new systems makes it better and teaches me something new, just like a new compiler finds new errors and writes interesting warnings. This is why we run FOAM on Solaris, Dec-Alpha, IBM, Cray, NEC, Hitachi and whatever other tin can had a C++ compiler that could handle templates from the very early days of development (done on SGI IRIX, which is now conveniently dead). I do not remember meeting you EVER in Room 600 at Imperial College, meaning that you are not really qualified to speak historically. There are ZERO technical obstacles for OpenFOAM running on Windows and complaining that one fining system is slower than the other is just poor taste. My computer is faster than yours but that does not make you stupid or less worthy. We all live within the limitations we have. Once you start talking to big multinational companies, you will find that their IT departments (for good or bad reasons) SPECIFY which hardware and software shall be used by 100,000 employees world-wide and you (or a poor CFD engineer) has no say. This is now Wikki ported foam-extend natively onto Windows. Maintaining it is no issue, not to mention that I can now have 30+ students show up in my CFD class and run natively the code I write on whatever hardware they happen to have. Remember: the code user is a customer and the customers KNOWS what needs to be done. By the way - when you finish your PhD and start looking for a job, just tell your future potential employer on a job interview that you do not wish to work with a Windows computer - and you will soon keep sheep on a mountain somewhere. Hrvoje Jasak |
I like Linux, and have used Novell Unix, Redhat, Fedora, Debian, Ubuntu, LinuxCNC, Ubuntu when it was still cool, and Mint Linux with Cinnamon window dressing. I admit openly that I am too girly for Slackware, but I once have compiled Gnome from source--without apt, and lived to tell the tall stories of dependency-hell. I also use Macs and Windows machines.
Personally, when designing things, how cumbersome a tool-chain becomes is an issue. I admit openly that I use some closed-source software. The design program I use, which is 1/7th the price as it's competitor's gives people of lesser means a chance to design things. I think that if OpenFoam's cross-platform issues were solved that ultimately its programmer-base will widen, and its code and functionality will improve. After-all, there is no user-interface to hold back its code. |
Quote:
|
Still no PhD though...
|
Please, all, staying on topic is the best way to avoid moderation.
While I do stand by my opening comments, I am sorry that I did not set the initial conditions for better discourse. Edit: Removed "Paris in the the Spring" error. |
It's been my observation that blueCFD-Core appears not to have the whitespace issues that the official OpenFoam Docker based solution does. This is relevant because most Windows users have a space in their user folder name, which may not seem like an issue, but renaming a Windows user folder is beyond most Windows users' technical experience and skill.
While the user name itself can be renamed through the graphical user interface, renaming the user folder itself requires the creation of a temporary Administrator-raised user--as well as a registry hack. I implore OpenFoam to move past the current Docker-based solution, toward a native cross-platform solution that would best show off their programming abilities. |
Quick notes:
Quote:
OpenFOAM.com v1812 does provide a bit better support for spaces in folder/file names, as reported here: https://www.openfoam.com/releases/op...ty-portability - section "Improvements in portability" - although it still requires that symbolic links should be created to solve some situations... which might not be very practical in many situations. |
Wyldckat, I cannot ask you in an open forum what politics and rational were involved OpenFoam's decision not to do what needs to be done to make OpenFoam Windows-compatable, given that the information, the gatchas, and maybe even the source code is out there.
It is a baffling decision to use Docker on the Windows version. [As a former Microware OS9 enthusiast, I have no love for Microsoft, Apple, or Linux, so I feel I can call 'em like I see them. As far as I remember, at one time Silicon Graphics was a competitor to Microsoft, making high-end workstations like the Indigo. The indigo ran on a form of Unix. Perhaps it is unpalatable for SGI/Openfoam to support the platform that contributed to their...dormancy, though some of that credit goes to 3dfx for popularizing the ironically OpenGL-compatable video cards that launched the entire inverted pyramid of Windows-compatable workstations, gaming computers, and GPU supercomputers we see today. https://www.youtube.com/watch?v=ooLO2xeyJZA ] |
Quick note: OpenCFD is currently ongoing development for making OpenFOAM to cross-compile on Linux to run on Windows: https://develop.openfoam.com/Develop...us/issues/1238
edit: What this means is that it will be built on Linux, but then runs without any virtualization-type things on Windows. |
Thank you for the news. I think that in the long run OpenFoam may gain more programmers for it.
I imagine that what BlueCFD-Core did could help. For years I have been badgering them about this. It looks like I will have to find something else to do. Perhaps I will have more time for CFD studies. |
Docker in Financial Trouble
Docker, as a company appears to be in financial trouble.
https://www.cnbc.com/2019/09/27/dock...b-bearden.html |
Building a Native Code
Hi guys!
to whom it may be interesting to build a native code on a Microsoft's Windows machine, I'm currently working on a version of OpenFOAM-7 which can be run on Microsoft's Visual Studio 2017. The code has been changed in a way that you can use it as a lib in your projects. You can find it here: https://github.com/amir5200fx/OpenFoam7 At the moment, almost all the files of the src directory has been ported while some of applications are still in progress. |
Quote:
It also seems that your code has stripped out a fair chunk of copyrights and GPL notices - this is not GPL conformant!! |
I'm not a CFD guy, and I want to use OpenFOAM on Visual Studio because I write software on the Visual Studio platform! There are so many reasons that I always wonder why there is no Visual Studio version of it. For example, the Intellisense, providing "sample template arguments" are some key features of a Visual Studio platform that make it much easier to understand and develop the code in the future.
I'm not sure what you exactly mean I've violated the GPL notices. OpenFOAM is free software, and I made some changes and shared it with others under the terms of the GPL! Please, explain it to me. |
All times are GMT -4. The time now is 00:27. |