Package Details: openfoam-org 9.20211007-1

Git Clone URL: https://aur.archlinux.org/openfoam.git (read-only, click to copy)
Package Base: openfoam
Description: The open source CFD toolbox (www.openfoam.org)
Upstream URL: http://www.openfoam.org
Licenses: GPL
Conflicts: openfoam-com
Provides: openfoam
Submitter: None
Maintainer: petronny
Last Packager: petronny
Votes: 51
Popularity: 0.035746
First Submitted: 2009-07-02 09:16
Last Updated: 2021-10-12 07:10

Pinned Comments

petronny commented on 2020-08-04 08:36

Pre-built binaries of this package and its dependencies can be found in the arch4edu repository.

Latest Comments

1 2 3 4 5 6 ... Next › Last »

gpettinello commented on 2021-10-09 20:48

@petronny Please could you update to openfoam-org 9. I have the PKGBUILD done:

# Maintainer: Jingbei Li <i@jingbei.li>
# Contributor: Xwang <xwaang1976@gmail.com>
# Contributor: George Eleftheriou <eleftg>
# Contributor: Andrew Fischer <andrew_at_apastron.co>
# Contributor: Gianluca Pettinello <g_pet@hotmail.com>

pkgbase=openfoam
pkgname=openfoam-org
_subver=20211007
_pkgver=9
pkgver=${_pkgver}.${_subver}
#pkgver=${_pkgver}
pkgrel=1
pkgdesc="The open source CFD toolbox (www.openfoam.org)"
_distpkgbase=OpenFOAM
_gitname=$_distpkgbase-$_pkgver
arch=('x86_64')
url="http://www.openfoam.org"
license=("GPL")
depends=('bzip2' 'paraview' 'parmetis' 'scotch' 'boost' 'flex' 'cgal')
makedepends=('bash')
provides=('openfoam')
conflicts=('openfoam-com')
source=("https://github.com/OpenFOAM/$_gitname/archive/$_subver.tar.gz")
install="${pkgbase}.install"
md5sums=('SKIP')

prepare() {
  mv $srcdir/$_gitname-$_subver $srcdir/$_distpkgbase-$_pkgver
  # Extract the current version and major of paraview and of scotch for use in the system preferences
  #_pversion=`pacman -Q paraview | sed -e 's/.* //; s/-.*//g'`
  _pversion=$(pacman -Q $(pacman -Qqo $(which paraview)) | sed -e 's/.* //; s/-.*//g')
  _pmajor=`echo $_pversion | cut -d '.' -f1`
  _sversion=`pacman -Q scotch | sed -e 's/.* //; s/-.*//g'`

  # Generate and install the system preferences file
  echo "compilerInstall=system" > ${srcdir}/prefs.sh
  echo "export WM_MPLIB=SYSTEMOPENMPI" >> ${srcdir}/prefs.sh
  echo "export ParaView_VERSION=${_pversion}" >> ${srcdir}/prefs.sh
  echo "export ParaView_MAJOR=${_pmajor}" >> ${srcdir}/prefs.sh
  cp ${srcdir}/prefs.sh ${srcdir}/${_distpkgbase}-${_pkgver}/etc

  # Generate the scotch.sh file for arch
  echo "export SCOTCH_VERSION=scotch_${_sversion}" > ${srcdir}/scotch.sh
  echo "export SCOTCH_ARCH_PATH=/usr" >> ${srcdir}/scotch.sh
  cp ${srcdir}/scotch.sh ${srcdir}/${_distpkgbase}-${_pkgver}/etc/config
}

build() {
  # Setup the build environment
  export FOAM_INST_DIR=${srcdir}
  foamDotFile=${srcdir}/${_distpkgbase}-${_pkgver}/etc/bashrc
  [ -f ${foamDotFile} ] || return 1

  # Enter build directory
  cd ${srcdir}/${_distpkgbase}-${_pkgver}

  # Build and clean up OpenFOAM
  bash -c "source ${foamDotFile}
  ./Allwmake || exit 1
  wclean all || exit 1
  wmakeLnIncludeAll || exit 1"
}

package() {
  cd ${srcdir}

  # Create destination directories
  install -d "${pkgdir}/opt/${_distpkgbase}" "${pkgdir}/etc/profile.d"

  # Copy package to pkgdir
  cp -r "${srcdir}/${_distpkgbase}-${_pkgver}" "${pkgdir}/opt/${_distpkgbase}"

  # Add source file
  echo "export FOAM_INST_DIR=/opt/${_distpkgbase}" > ${pkgdir}/etc/profile.d/openfoam-${_pkgver}.sh
  echo "alias ofoam=\"source \${FOAM_INST_DIR}/${_distpkgbase}-${_pkgver}/etc/bashrc\"" >> ${pkgdir}/etc/profile.d/openfoam-${_pkgver}.sh
  chmod 755 "${pkgdir}/etc/profile.d/openfoam-${_pkgver}.sh"

  # Add stub thirdparty directory to keep openfoam happy
  install -d "${pkgdir}/opt/${_distpkgbase}/ThirdParty-${_pkgver}"

  # Permission fixes - for system-wide install and use
  chmod -R go+r "${pkgdir}/opt"
  chmod -R 755 "${pkgdir}/opt/${_distpkgbase}/${_distpkgbase}-${_pkgver}/bin"
  chmod -R 755 "${pkgdir}/opt/${_distpkgbase}/${_distpkgbase}-${_pkgver}/etc"
}

# vim:set ts=2 sw=2 et:

massisenergy commented on 2021-10-01 14:29

Great! I actually built the oF9 from scratch a month earlier, as this was superseded. I request the maintainer to update, as @DarioP added.

DarioP commented on 2021-10-01 13:44

I only had to adjust the versions to build the release 20210903 without any issue. Here is the updated PKGBUILD: https://pastebin.com/qkXe8LPh

petronny commented on 2021-05-12 12:36

So you can modify the PKGBUILD of paraview to add -DPARAVIEW_USE_VTKM=OFF and upload it to AUR as paraview-openfoam.

massisenergy commented on 2021-05-12 12:28

@petronny, no I mean it applies for any ParaView packages. Until I install openFoam, any of those ParaView packages work. After installing OPenFOam, they stop working. So, I just did this (I have both OpenFOAM-v2012 & OpenFOAM8 installed installed in my Arch machine).

sudo pacman -R --nodeps --nodeps paraview

Then I build Paraview Version: 5.9.1-RC1-942-g7cfe71ad8e manually, after downloading the git. With only exception of adding the -DPARAVIEW_USE_VTKM=OFF in the cmake command (described here: ArchLinux ParaView build instruction).

petronny commented on 2021-05-09 08:29

@massisenergy You mean a package like paraview-openfoam?

You can upload it to AUR if you get it working.

massisenergy commented on 2021-04-27 10:17

Looks like there is some problem in the OpenFOAM-ParaView interface. Everytime I install this, ParaView stops working (I posted the details here: https://discourse.paraview.org/t/paraview-5-9-stopped-working/6746/10). This started when ParaView was updated to 5.8.1, I believe. But I could test ParaView 5.9.1 RC1 to be working (but not 5.9.0) with manual building and installation. Installing this OpenFOAM package leads to crashing of both version of ParaView.

The issue might well be just the current AUR ParaView version, which is required by OpenFOAM as a dependency. Is it possible to modify the PKGBUILD so that a particular version of ParaView (manually installed by the user) can be used as dependency for this OpenFOAM package? This happens with openfoam-com version also.

dl6tud commented on 2021-04-11 20:05

Might it be possible to remove the line "conflicts=('openfoam-com')" from the PKGBUILD file? Otherwise it is impossible to install the ESI and Foundation version (openfoam-com and openfoam-org) at the same time.

MakisH commented on 2021-01-08 11:08

@Volker_Weissmann, @petronny: ParaView now has a community package: https://archlinux.org/packages/community/x86_64/paraview/

Volker_Weissmann commented on 2021-01-06 16:28

In openfoam.install, you link to https://aur.archlinux.org/packages/paraview This site is 404.