Contrib/porousMultiphaseFoam

From OpenFOAMWiki

1 Overview

Source code repository
porousMultiphaseFoam at GitHub
Description
An open-source toolbox for multiphase flow in porous media.
Support pages


2 Installation steps

2.1 OpenFOAM 3.0 and newer

Valid versions: OF Version 30.png

  1. First, go into a good working folder. For example, to go to the folder $HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION, run the following commands in a terminal:
    mkdir -p $FOAM_RUN
    cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"
  2. Now, it depends on the mode in which you are able to download the toolbox. Try them in order until you don't get an error message while downloading or unpacking:
    1. From the Git repository [1], using the git command:
      git clone https://github.com/phorgue/porousMultiphaseFoam.git porousMultiphaseFoam
    2. Or by downloading a snapshot in a GZipped Tarball format (tar.gz) from the same Git repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/master.tar.gz" -O porousMultiphaseFoam.tar.gz
      tar -xf porousMultiphaseFoam.tar.gz
      mv porousMultiphaseFoam-master porousMultiphaseFoam

      Or manually:

      1. Download this file: master.tar.gz
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-master" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-master porousMultiphaseFoam
    3. Or by downloading a snapshot in ZIP format from the same Git mirror repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/master.zip" -O porousMultiphaseFoam.zip
      unzip porousMultiphaseFoam.zip
      mv porousMultiphaseFoam-master porousMultiphaseFoam

      Or manually:

      1. Download this file: master.zip
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-master" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-master porousMultiphaseFoam

  3. Now we can build the toolbox:
    cd porousMultiphaseFoam
    ./Allwmake > log.make 2>&1
  4. Run the script a second time, for getting a summary of the build:
    ./Allwmake > log.make 2>&1
  5. Look into the content of the log file:
    cat log.make

    If all went well, it should show you something like this:

    + wmake libso porousBoundaryConditions
    '/home/ofuser/OpenFOAM/ofuser-3.0.x/platforms/linux64GccDPInt32Opt/lib/libporousBoundaryConditions.so' is up to date.
    + wmake libso porousModels
    '/home/ofuser/OpenFOAM/ofuser-3.0.x/platforms/linux64GccDPInt32Opt/lib/libporousModels.so' is up to date.
    + wmake impesFoam
    make: '/home/ofuser/OpenFOAM/ofuser-3.0.x/platforms/linux64GccDPInt32Opt/bin/impesFoam' is up to date.
    + wmake anisoImpesFoam
    make: '/home/ofuser/OpenFOAM/ofuser-3.0.x/platforms/linux64GccDPInt32Opt/bin/anisoImpesFoam' is up to date.
    + wmake groundwaterFoam
    make: '/home/ofuser/OpenFOAM/ofuser-3.0.x/platforms/linux64GccDPInt32Opt/bin/groundwaterFoam' is up to date.
  6. Now for getting started, follow the instructions given in the README.md file or read it in the project page: porousMultiphaseFoam at GitHub

2.2 OpenFOAM 2.2 to 2.4

Valid versions: OF Version 22.png OF Version 23.png OF Version 24.png

  1. First, go into a good working folder. For example, to go to the folder $HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION, run the following commands in a terminal:
    mkdir -p $FOAM_RUN
    cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"
  2. Now, it depends on the mode in which you are able to download the toolbox. Try them in order until you don't get an error message while downloading or unpacking:
    1. From the Git repository [2], using the git command:
      git clone https://github.com/phorgue/porousMultiphaseFoam.git porousMultiphaseFoam
      cd porousMultiphaseFoam
      git checkout of240
      cd ..
    2. Or by downloading a snapshot in a GZipped Tarball format (tar.gz) from the same Git repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/of240.tar.gz" -O porousMultiphaseFoam.tar.gz
      tar -xf porousMultiphaseFoam.tar.gz
      mv porousMultiphaseFoam-of240 porousMultiphaseFoam

      Or manually:

      1. Download this file: of240.tar.gz
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-of240" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-of240 porousMultiphaseFoam
    3. Or by downloading a snapshot in ZIP format from the same Git mirror repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/of240.zip" -O porousMultiphaseFoam.zip
      unzip porousMultiphaseFoam.zip
      mv porousMultiphaseFoam-of240 porousMultiphaseFoam

      Or manually:

      1. Download this file: of240.zip
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-of240" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-of240 porousMultiphaseFoam

  3. Now we can build the toolbox:
    cd porousMultiphaseFoam
    ./Allwmake > log.make 2>&1
  4. Run the script a second time, for getting a summary of the build:
    ./Allwmake > log.make 2>&1
  5. Look into the content of the log file:
    cat log.make

    If all went well, it should show you something like this:

    + wmake libso porousBoundaryConditions
    '/home/ofuser/OpenFOAM/ofuser-2.4.x/platforms/linux64GccDPOpt/lib/libporousBoundaryConditions.so' is up to date.
    + wmake libso porousModels
    '/home/ofuser/OpenFOAM/ofuser-2.4.x/platforms/linux64GccDPOpt/lib/libporousModels.so' is up to date.
    + wmake impesFoam
    make: '/home/ofuser/OpenFOAM/ofuser-2.4.x/platforms/linux64GccDPOpt/bin/impesFoam' is up to date.
    + wmake anisoImpesFoam
    make: '/home/ofuser/OpenFOAM/ofuser-2.4.x/platforms/linux64GccDPOpt/bin/anisoImpesFoam' is up to date.
    + wmake groundwaterFoam
    make: '/home/ofuser/OpenFOAM/ofuser-2.4.x/platforms/linux64GccDPOpt/bin/groundwaterFoam' is up to date.
  6. Now for getting started, follow the instructions given in the README.md file or read it in the project page: porousMultiphaseFoam at GitHub

2.3 foam-extend 3.1 to 3.2

Valid versions: OF Version 31ext.png OF Version 32ext.png

  1. First, go into a good working folder. For example, to go to the folder $HOME/foam/$USER-$WM_PROJECT_VERSION, run the following commands in a terminal:
    mkdir -p $FOAM_RUN
    cd "$HOME/foam/$USER-$WM_PROJECT_VERSION"
  2. Now, it depends on the mode in which you are able to download the toolbox. Try them in order until you don't get an error message while downloading or unpacking:
    1. From the Git repository [3], using the git command:
      git clone https://github.com/phorgue/porousMultiphaseFoam.git porousMultiphaseFoam
      cd porousMultiphaseFoam
      git checkout extend-version
      cd ..
    2. Or by downloading a snapshot in a GZipped Tarball format (tar.gz) from the same Git repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/extend-version.tar.gz" -O porousMultiphaseFoam.tar.gz
      tar -xf porousMultiphaseFoam.tar.gz
      mv porousMultiphaseFoam-extend-version porousMultiphaseFoam

      Or manually:

      1. Download this file: extend-version.tar.gz
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-extend-version" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-extend-version porousMultiphaseFoam
    3. Or by downloading a snapshot in ZIP format from the same Git mirror repository, either directly in the command line:
      wget "https://github.com/phorgue/porousMultiphaseFoam/archive/extend-version.zip" -O porousMultiphaseFoam.zip
      unzip porousMultiphaseFoam.zip
      mv porousMultiphaseFoam-extend-version porousMultiphaseFoam

      Or manually:

      1. Download this file: extend-version.zip
      2. Unpack the downloaded file and move the unpacked folder "porousMultiphaseFoam-extend-version" into the folder indicated by this command:
        pwd
      3. Rename the folder:
        mv porousMultiphaseFoam-extend-version porousMultiphaseFoam

  3. Now we can build the toolbox:
    cd porousMultiphaseFoam
    ./Allwmake > log.make 2>&1
  4. Run the script a second time, for getting a summary of the build:
    ./Allwmake > log.make 2>&1
  5. Look into the content of the log file:
    cat log.make

    If all went well, it should show you something like this:

    + wmake libso porousBoundaryConditions
    '/home/ofuser/foam/ofuser-3.2/lib/linux64GccDPOpt/libporousBoundaryConditions.so' is up to date.
    + wmake libso porousModels
    '/home/ofuser/foam/ofuser-3.2/lib/linux64GccDPOpt/libporousModels.so' is up to date.
    + wmake impesFoam
    make: '/home/ofuser/foam/ofuser-3.2/applications/bin/linux64GccDPOpt/impesFoam' is up to date.
    + wmake anisoImpesFoam
    make: '/home/ofuser/foam/ofuser-3.2/applications/bin/linux64GccDPOpt/anisoImpesFoam' is up to date.
  6. Now for getting started, follow the instructions given in the README.md file or read it in the project page: porousMultiphaseFoam at GitHub