CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [Other] How to install OpenFOAM under Windows? (https://www.cfd-online.com/Forums/openfoam-installation/65175-how-install-openfoam-under-windows.html)

lzgwhy June 7, 2009 06:40

How to install OpenFOAM under Windows?
 
How to install OpenFOAM under Windows?

sega June 7, 2009 10:03

Well, lzgwhy, maybe you should be more specific with you questions.
Otherwise I'm not sure anybody will take them serious.

Concerning your questions I can tell that OpenFOAM is not designed for running with Windows but I think there is a workaround using the cygwin software. But I am pretty sure no one in this forum will suggest you to use it.

If you are afraid of running your machine with a linux operating system I can strongly suggest you try the VirtualBox and emulate a linux system from inside Windows. Thats how I started but in the meantime I switched to a "real" linux system. (Although mainly because of performance advantages and not because I like linux...)

philippose June 7, 2009 16:57

Hello there,

If you are using only the standard features of OpenFOAM-1.5, and not doing any snazzy dynamic mesh stuff with parallel simulations, you can have a look at the following project:

http://sourceforge.net/projects/openfoam-mswin/

This is a native port of OpenFOAM-1.5 to Windows and compiles using MinGW without any Unix emulations. They even supply you with Code::Blocks projects, and the entire patched source code...

It is still in a highly experimental state, and I recently installed it on my computer at home and on one at work. So far things have been working very well with the standard OpenFOAM solvers and utilities...

They have also created a first version of a graphical user interface using QT called OpenFOAM Designer, which works roughly on the lines of the old FoamX.

I have no idea if this project is a result of work together with the official OpenFOAM team, but the guys sound like a highly motivated set of people :-)!

Check it out!

Philippose

lzgwhy June 7, 2009 22:22

Thank you!
 
Thank Sega and Philippose for your help!
Sega, I think I understood you. Maybe I should detail the question. I never used OpenFoam, which I just knew recently. I knew it is a open source software, I wonder if I can get its source code, which, I think, could be conpiled in any platform including Windows, if possible, because as we all know, the C/C++ language can be easily migrated with some corresponding libraries under Windows, for example. Do you think this process could be practised? Philippose suggested a website relate to MS Windows OpenFoam, but I have not know the details. Thank you again!

derjames June 11, 2009 09:28

Dear Izgwhy, look at the ubuntu forums http://www.ubuntuforums.org (my username is the same) where I detailed how to run openFoam under WindowsXP using colinux/andLinux. This runs quite OK but it may not be good for large computations.

Cheers

padmanathan August 4, 2009 01:55

hi Philippos and all,

thank you for your post.

i have installed and tried some tutorials, i can able to do all the processing. only problem i have faced is I can't able to open .vtk files in paraView. while opening, paraview shows following error,

ERROR: In C:\tmp\OpenFOAM-1.5\3rdparty\ParaView-3.4.0\VTK\IO\vtkUnstructuredGridReader.cxx, line 350
vtkUnstructuredGridReader (0x26b7a568): Unrecognized keyword: =ÂŹ\=®{<#×

can anyone suggest me regarding this?

padhu

liuhuafei August 25, 2009 02:11

postprocessing error

wyldckat September 22, 2009 08:41

foamToVTK in Windows...
 
Hello Padhu,

It's been a while since you asked that question, but only now I've seen it...

It's quite simple: the foamToVTK executable in Windows still has a few glitches, and one of them is the linux binary version of vtk files isn't exactly the same as in Windows. So, just use:
Code:

foamToVTK -ascii
in the command line and it will export in text format and Paraview will be able to open it.

Best regards,
Bruno

jcraparo October 26, 2009 16:50

Help with paraview
 
Hello all,

I recently installed the sourceforge version of OpenFoam on my Windows XP machine. I'm new to this, so I tried to run the 'cavity' tutorial. Everything seems to work, but when I try to view the mesh and/or results in Paraview, there is no cavity.OpenFOAM file to read. My guess is that the file is not being written by the mesh generator. Any suggestions on how to fix?

Thanks.

wyldckat October 27, 2009 05:47

How to open cases in Paraview under Windows
 
Hello Joe,

You have three choices:
  1. Run "foamToVTK -ascii" in the command line, and open the *.vtk files in your Paraview;
  2. Get the native reader version, which is available here; then on your case folder either create an empty file "cavity.foam", using Windows Explorer, or by doing "echo. > cavity.foam" in the command line. Then open "cavity.foam" with the Paraview with the native reader. NOTE: regular Paraview's cannot open *.foam files, since they use a very old plugin that no longer works.
  3. In case your Paraview already opens *.OpenFOAM files, then just do as explained in the second hypothesis... create an empty file with the name you want :) The plugin will do the rest on its own.
Best regards,
Bruno

philippose October 27, 2009 07:10

Hello there,

A Good Day to everyone, and I apologise for not having replied earlier....

There is a fourth option :-)..... The native OpenFOAM Paraview reader which is shipped with OpenFOAM-1.5 (and also present as DLLs in the Windows version) works perfectly fine.

As I too discovered fairly early on, is does not work on the Windows version "Out-of-the-box", and needs a small amount of work....

Here are the steps you need to follow:

1. Within the OpenFOAM-1.5 windows installation, in side the folder "bin/plugins/paraview", you will find the DLL versions of the native paraview reader:
- libPV3FoamReader.dll
- libPV3FoamReader_SM.dll

2. Copy these two files into the "plugins" folder under the "bin" directory of your Paraview folder (I have tested it on Paraview-3.4.0 in Windows)... if the "plugins" folder does not exist, create it.

3. Now, open Paraview from within the graphical user interface "OpenFOAM Designer" which comes as part of the windows installation.

4. Once Paraview opens up, go to the Menu: "Tools -> Manage Plugins/Extensions", and make sure that the two plugin DLLs are listed, showing that they have been loaded successfully.

5. Now, you will be able to read in files with the extension ".OpenFOAM"... Note... the extension is case sensitive.

6. You can manually create an empty file with the name of your case and ending with the extension ".OpenFOAM" directly from within OpenFOAM Designer, which you can then open in Paraview.


Remember.... you need to open Paraview using the icon present inside OpenFOAM Designer.... I think this has something to do with the paths...

Hope this helps.... :-)

Have a great day ahead!!

Philippose

jcraparo October 27, 2009 13:04

Many thanks
 
Thanks Bruno and Philippose. Your suggestions did the trick.

Best regards,

Joe



di_q_t_gusta September 15, 2010 03:55

Hello everybody!

I'm currently starting with OpenFOAM 1.5 for Windows, as suggested by Philippose, and I followed his instructions for the ParaView, but there's something wrong, because I'm not able to load the "libPV3FoamReader_SM.dll" plugin. When I try to load it manually from the Tools\Manage Plugins/Extensions window, I recieve a message that says that the file "is not a valid Qt plugin".

Any idea?

Thanks in advance

Other question: Is there anything similar to run OpenFOAM 1.7 in Windows?

wyldckat September 15, 2010 06:38

Greetings 127057 and welcome to the forum!

Starting with ParaView 3.8.0, you no longer need to use the plugin that comes with OpenFOAM. Simply use the file extension ".foam" instead of ".OpenFOAM" and it will work very well with ParaView's internal FOAM reader :)

As for OpenFOAM 1.7.0 (as well as 1.6, 1.6.x and 1.7.x) for Windows, you can see here the list of available solutions.

Best regards,
Bruno

uuivw May 22, 2014 09:29

Quote:

Originally Posted by philippose (Post 218510)
Hello there,

If you are using only the standard features of OpenFOAM-1.5, and not doing any snazzy dynamic mesh stuff with parallel simulations, you can have a look at the following project:

http://sourceforge.net/projects/openfoam-mswin/

This is a native port of OpenFOAM-1.5 to Windows and compiles using MinGW without any Unix emulations. They even supply you with Code::Blocks projects, and the entire patched source code...

It is still in a highly experimental state, and I recently installed it on my computer at home and on one at work. So far things have been working very well with the standard OpenFOAM solvers and utilities...

They have also created a first version of a graphical user interface using QT called OpenFOAM Designer, which works roughly on the lines of the old FoamX.

I have no idea if this project is a result of work together with the official OpenFOAM team, but the guys sound like a highly motivated set of people :-)!

Check it out!

Philippose

I also install openfoam 1.5v in my PC,But I find a problem that when I type the command "parafoam"the terminal will remind me of the command can not be found , Could you tell me what's going wrong?thank you~~

wyldckat May 24, 2014 02:49

Greetings Liaoning,
Quote:

Originally Posted by uuivw (Post 493599)
I also install openfoam 1.5v in my PC,But I find a problem that when I type the command "parafoam"the terminal will remind me of the command can not be found , Could you tell me what's going wrong?thank you~~

That project is seriously outdated now, as it was released in 2009 as a proof-of-concept and was not updated since then. But from what I can remember, that project was implemented in a way that it was meant for the user to interact by using the "Designer" interface and not as much with the command line. In other words, ParaView was to be launched from that "Designer" interface and not from the command line.

You can find several other (unofficial) builds of OpenFOAM for Windows here: http://openfoamwiki.net/index.php/Windows - they are more recent and should provide a bit more support than the old oldest one.

Best regards,
Bruno

Lubos April 16, 2015 03:24

Hi,

another option to get full version of OpenFOAM in Windows is described here:

http://www.cfdsupport.com/openfoam-for-windows.html

all the project was natively compiled in Windows, no cross-compilation in Linux.

Lubos Pirkl

sussudharsan February 5, 2018 06:35

Installing openFoam in Windows
 
Unrestricted
Guide for Installing OpenFoam in Windows
S.M.Sudharsan
Installing OpenFoam in windows could be done in three major steps, which are:
1. Enabling “Hardware Assisted Virtualization”
2. Installing “blueCFD-core” for windows
3. Installing “OpenFoam” for windows
While there are separate tutorials and videos available on installation of these software, there is no single documentation compiling all the steps and this document is aimed at achieving this.
1. Enabling “Hardware Assisted Virtualization”
Virtualization solutions enable you to run multiple Virtual Machines (VM) on a single PC. In most of the windows systems, it will be disabled by default. For proceeding further with the installation this needs to be turned on. To check the status of it, install “Microsoft Hardware-Assisted Virtualization Detection Tool” .
Installing and running “Microsoft Hardware-Assisted Virtualization Detection Tool”:
 Download the application (havdetectiontool.exe) to your local machine. There is only one installer for both 32 bit and 64 bit machines.
 Double click on the application and follow the prompts. Note: The tool requires administrator privileges.
 Based on the condition of the virtualization setting one of the below output will be shown:
Unrestricted
If Virtualization is turned off in your system, go into Bios settings and turn it on before further proceeding with the installation.
Enabling virtualization extensions in BIOS:
 Reboot the computer and open the system's BIOS menu. This can usually be done by pressing the delete key, the F1 key or Alt and F4 keys depending on the system.
 Select Restore Defaults or Restore Optimized Defaults, and then select Save & Exit.
 Power off the machine and disconnect the power supply.
 Power on the machine and open the BIOS (as per Step 1).
 Open the Processor submenu, the processor settings menu may be hidden in the Chipset, Advanced CPU Configuration or Northbridge.
 Enable Intel Virtualization Technology (also known as Intel VT) or AMD-V depending on the brand of the processor. The virtualization extensions may be labeled Virtualization Extensions, Vanderpool or various other names depending on the OEM and system BIOS.
 Enable Intel VTd or AMD IOMMU, if the options are available. Intel VTd and AMD IOMMU are used for PCI pass-through.
 Select Save & Exit.
 Power off the machine and disconnect the power supply.
 Run cat /proc/cpuinfo | grep vmx svm. If the command outputs, the virtualization extensions are now enabled. If there is no output your system may not have the virtualization extensions or the correct BIOS setting enabled.
For further details on Bios part look here.
Unrestricted
2. Installing “blueCFD-core” for windows
blueCFD is an open source project with the primary objective being to bring OpenFoam technology to run natively in Windows operating systems. blueCFD allows us to compile from source code and install OpenFoam technology on Microsoft Windows as done in Linux distributions. This is achieved by relying on MSys2 as a development infrastructure.
Installation procedure:
The software could be downloaded from here.
The above link provides the .exe file of the software. Once it is downloaded, run it and agree to the terms and conditions of the software. Following which you will be asked for installation location, go with the default folder or change if you wish. After this, do not change any default settings and continue with the installation. This package installs:
 blueCFD-core 2017-1
 ParaView 5.4.1
 MS-MPI 7.1
These were the latest versions when this doc was created. Click here for downloading future versions.
A brief video is also available showing the installation procedure of the software, look at it for any further clarifications.
With this, the installation is done and now your system is ready to run OpenFoam simulations, and view/ edit them as in Linux systems.
The blueCFD acts like a virtual Linux terminal and the commands used in Linux could be directly used here. ParaView helps with the viewing and post-processing stages.
3. Installing “OpenFoam” for windows
Last but not the least, we need to install OpenFoam executable for windows which is available here.
Once it is downloaded follow the instructions given below to install:
 Run the OpenFoam-installer executable. It will install Docker (including VirtualBox, Git), the precompiled v1712 OpenFoam executable image and creates the working environment. (Please note that this process can take several minutes depending on your system memory.)
Unrestricted
 When the installation is complete, please click on the "OF_Create_Env” shortcut on the Desktop. A shell will open and close automatically, completing setup of the user working environment. This step is mandatory only on the first occasion of OpenFoam for Windows installation.
Now the OpenFoam along with other software are successfully installed and is ready to use. To run/create a simulation, open blueCFD-core terminal and start typing in the code. The visualization could be done in ParaView. The software now works as if it is installed in a Linux environment, so the same set of codes could be used and the tutorials available for Linux could be used for learning. Examples and tutorials could be found inside the blueCFD folder.
For further help on installation of OpenFoam, click here.
Useful Links and References:
1. https://docs-old.fedoraproject.org/e...s_in_BIOS.html
2. http://bluecfd.github.io/Core/About/
3. https://www.microsoft.com/en-in/down...ls.aspx?id=592
4. https://www.openfoam.com/download/tx...adme_v1712.txt
5. https://www.openfoam.com/download/in...ry-windows.php

maxning September 29, 2023 11:37

I am using a native-windows installation of openFoam, and use separate paraView (instead of the parafoam code). I am doing the lid-driven cavity flow tutorials and used method 1, but no .vtk file was generated, instead I found a .vtm file and opened it in paraView. But instead of a 2d mesh it was 3d. Am I doing it correctly?

cfdarif October 7, 2023 04:27

windows setup OPENFOAM
 
Hi,

I want to learn OpenFoam by installing Ubuntu on my Windows 10 computer.

However, when I follow the steps on https://openfoam.org/download/11-ubuntu/, I get the following error.

I would be happy if you help.

Best regards, good work.

cfdarif@gmail.com


Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: arifcfd
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

This message is shown once a day. To disable it please create the
/home/arifcfd/.hushlogin file.
arifcfd@arif:~$ sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
[sudo] password for arifcfd:
Sorry, try again.
[sudo] password for arifcfd:
--2023-10-07 11:21:22-- https://dl.openfoam.org/gpg.key
Resolving dl.openfoam.org (dl.openfoam.org)... 13.41.234.222
Connecting to dl.openfoam.org (dl.openfoam.org)|13.41.234.222|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1710 (1.7K) [application/pgp-keys]
Saving to: ‘STDOUT’

- 100%[=================================================>] 1.67K --.-KB/s in 0s

2023-10-07 11:21:28 (604 MB/s) - written to stdout [1710/1710]

arifcfd@arif:~$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [856 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [175 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1058 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [11.4 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [953 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [233 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [15.6 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [974 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [157 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [532 B]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [989 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [216 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [21.9 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [41.6 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [9768 B]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [472 B]
Get:27 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [41.7 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [10.5 kB]
Get:29 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
Get:30 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:31 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [24.3 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.4 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [640 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Get:35 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [154 kB]
Get:36 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [532 B]
Get:37 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [788 kB]
Get:38 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [144 kB]
Get:39 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [16.7 kB]
Get:40 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [36.5 kB]
Get:41 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [7060 B]
Get:42 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [260 B]
Fetched 27.7 MB in 13s (2157 kB/s)
Reading package lists... Done
arifcfd@arif:~$ sudo apt-get -y install openfoam11
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package openfoam11
arifcfd@arif:~$ paraviewopenfoam510
paraviewopenfoam510: command not found
arifcfd@arif:~$ sudo apt-get -y install openfoam11
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package openfoam11
arifcfd@arif:~$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
arifcfd@arif:~$ sudo apt-get -y install openfoam11
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package openfoam11
arifcfd@arif:~$


All times are GMT -4. The time now is 23:09.