Install Openfoam for Windows

cfd support logo

Install OpenFOAM® for Windows

When running OpenFOAM® in Windows we recommend to use Cygwin software to keep the workflow consistent with Linux as much as possible. There are many other ways of using OpenFOAM® for Windows, depending on your previous experiences, preferred applications and other circumstances. This page describes just one of those ways.

After downloaded OpenFOAM® for Windows installation file, simply run it. We recommend to follow the installation default options.

Example 1 : first case run

  1. run OpenFOAM for Windows
  2.  $  mc  

    mc command runs midnight commander, which is truly powerful tool when working in terminal, note you can always switch by ctrl+o to command line to run commands and again ctrl+o back to manage files

  3.  $  run  

    run alias jumps to your working directory

  4.  $  cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity ./

    copy the cavity tutorial case here

  5.  $  cd cavity

    change directory to cavity

  6.  $  blockMesh.exe

    create the computational mesh

  7.  $  icoFoam.exe

    run the solver

  8.  $  paraFoam

    view results in ParaView

OpenFOAM for Windows cavity Example 1

Example 2 : run OpenFOAM for Windows in parallel

  1. run OpenFOAM for Windows
  2.  $  mc  
  3.  $  run 
  4.  $  cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily ./
  5.  $  cd pitzDaily
  6.  $  cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/motorBike/system/decomposeParDict ./system/
  7.  $  blockMesh.exe
  8.  $  decomposePar.exe
  9.  $  mpiexec -n 6 simpleFoam -parallel
  10.  $  reconstructPar.exe
  11.  $  paraFoam
OpenFOAM for Windows Example 2 pitzDaily 1

Example 3 : create new solver (compilation)

  1. run OpenFOAM for Windows
  2.  $  mc  
  3.  $  run
  4.  $  mkdir myFirstWindowsOpenFOAMSolver
  5.  $  cd myFirstWindowsOpenFOAMSolver
  6.  $  cp -r $FOAM_SOLVERS/incompressible/icoFoam/* ./
  7.  $  sed -i "s/\/icoFoam/\/myFirstWindowsOpenFOAMSolver/g" Make/files
  8.  $  wmake
  9.  $  run
  10.  $  cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity ./
  11.  $  cd cavity/
  12.  $  blockMesh.exe
  13.  $  myFirstWindowsOpenFOAMSolver.exe
  14.  $  paraFoam
OpenFOAM for Windows cavity Example 1 x250 1

Example 4 : motorBike

  1. run OpenFOAM for Windows
  2.  $  mc  
  3.  $  run
  4.  $  cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/motorBike ./
  5.  $  cd motorBike
  6.  $  find ./ -type f | xargs sed -i "s/WM_PROJECT_DIR/OPENFOAM_INSTALL_PATH/g"
  7.  $  ./Allrun
  8.  $  paraFoam
OpenFOAM for Windows motorBike case example 4 1

Please contact us for further information.

PARTNERS