Coder Social home page Coder Social logo

gerlero / openfoam-app Goto Github PK

View Code? Open in Web Editor NEW
138.0 8.0 9.0 6.13 MB

Native OpenFOAM for macOS. OpenFOAM v2406 now available!

License: GNU General Public License v3.0

Ruby 0.92% Makefile 28.61% Shell 41.39% AppleScript 0.67% Python 28.41%
openfoam mac macos apple-silicon m1-mac intel cfd computational-mechanics finite-volume-method macos-app

openfoam-app's Introduction

OpenFOAM.app: OpenFOAM for macOS

🎉 OpenFOAM v2406 is now available!

Native OpenFOAM as a Mac app, with binaries compiled from the OpenFOAM source code. Intel and Apple silicon variants.

CI Release GitHub all releases homebrew cask

🍏 Prerequisites

  • An Apple silicon or Intel Mac
  • A recent version of macOS
    • Apple silicon: macOS 14 Sonoma
    • Intel: macOS 12 Monterey or later
    • Running an older version of macOS? See here

📦 Install

  • ✨ Get the latest OpenFOAM version with Homebrew (recommended):

    brew install --no-quarantine gerlero/openfoam/openfoam
  • Or, choose the OpenFOAM version(s) you want:

  • Need an older version of OpenFOAM? See here

🧑‍💻 Use

Just open the OpenFOAM app to start an OpenFOAM session in a new Terminal window.

That's it! When using OpenFOAM, a read-only volume will be loaded and visible in the Finder. The OpenFOAM installation lives inside this virtual disk. When you're not actively using OpenFOAM, it is safe to "eject" the volume from the Finder sidebar.

💻 From the command line: when installed with Homebrew, the app includes a terminal command that starts an OpenFOAM session:

openfoam

If you did not install with Homebrew, you can get the same by invoking the following command (replace the path and app name as needed):

/Applications/OpenFOAM-v2312.app/Contents/Resources/etc/openfoam

🙋 Q&A

I also need ParaView. How can I get that?

Get the native macOS version of ParaView from the official site or install with Homebrew (prefer the latter if you'd like to use OpenFOAM's paraFoam command).

Why do I see a dialog that says the app "cannot be opened because the developer cannot be verified"?

This message appears because the app is not notarized by Apple. You can tell macOS to allow the app to run by right-clicking on the app in a Finder window and selecting Open from the context menu. You only need to do this for the first launch of the app.

If you're installing with Homebrew, the suggested --no-quarantine option does this for you on install.

Can I compile and install my own (or third-party) solvers?

Yes. Just a few things to keep in mind:

  • The OpenFOAM installation itself is not user-writable. This is very much intentional (and is similar with how it works with packaged OpenFOAM on Linux). The right way to install additional solvers and libraries is to place the binaries in $FOAM_USER_APPBIN and $FOAM_USER_LIBBIN respectively. See here for an example of a project that installs this way.

  • The compiler used on macOS is Apple's Clang, which is not the same as the GCC compiler used by default on Linux. If your code was never tested with Clang before, some lines might require a little tweaking (this is the most common fix that is needed) to be able to build across both compilers.

  • The default macOS filesystem is case-insensitive, which differs from Linux. See below for what this means.

What's the deal with case sensitivity?

OpenFOAM is notably developed with a case-sensitive filesystem in mind. This is a non-issue on Linux systems, which conventionally use case-sensitive filesystems. In practice, a case-sensitive filesystem means that two different files named phi and Phi in the same directory can exist just fine. In contrast, a case-insensitive filesystem, as is the default on macOS, will only allow one of those files to exist in the same folder.

This project gets around potential case-sensitivity issues by putting OpenFOAM itself inside a (read-only) disk image with its own case-sensitive filesystem, which is mounted as a virtual volume during use. This is enough to accommodate OpenFOAM, and for most purposes you can just use your regular filesystem for everything else (e.g. to store OpenFOAM cases).

However, there are a few circumstances where this is not sufficient (e.g. solvers/cases using case-sensitive field names). If you fall under one of these, consider creating a case-sensitive disk image with the macOS Disk Utility for the case-sensitive stuff.

Why do I get a dialog prompting me to install the "command line developer tools"?

You are attempting something that requires development tools (e.g. a compiler), and you do not have such tools installed yet. Just follow the steps to install the necessary tools from Apple and you should be good to go.

I have an older version of macOS and cannot upgrade to a supported version. What can I do?

If you cannot upgrade to a newer macOS, you still have a few alternatives:

Whatever alternative you choose, please avoid opening an issue if something doesn't work as expected when running an older version of macOS.

Can I get an older version of OpenFOAM?

If you need an older version of OpenFOAM, you can:

Please avoid opening an issue if something doesn't work as expected when using an older version of OpenFOAM.

Can I get an app for a version from the OpenFOAM Foundation (openfoam.org, e.g. OpenFOAM 10)?

No. The OpenFOAM Foundation's distribution does not support native compilation on macOS.

How do I uninstall the app?

If you installed with Homebrew, uninstall with brew uninstall. If you downloaded manually, delete the app.

🔨 Building from source

If you need to, building an OpenFOAM.app entirely from source is easy as cloning this repo and running make, i.e.:

git clone https://github.com/gerlero/openfoam-app.git
cd openfoam-app
make

The Xcode Command Line Tools are required. See the available configuration variables and alternative targets for make in the Makefile. Note that the compilation of OpenFOAM and the necessary dependencies from source may take a while.

📄 Legal notices

Disclaimer

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.

Trademark acknowledgement

OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.

openfoam-app's People

Contributors

dependabot[bot] avatar gerlero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfoam-app's Issues

CGAL configuration failure in main

Failed: Replaced BOOST_ARCH_PATH by '"/opt/homebrew/opt/boost"' in etc/config.csh/CGAL
sed: 1: "/^[^#]/s@CGAL_ARCH_PATH ...": bad flag in substitute command: '@'
Failed: Replaced CGAL_ARCH_PATH by '/opt/homebrew/opt/cgal@4' in etc/config.sh/CGAL
sed: 1: "/^[^#]/s@setenv [ ]*CGA ...": bad flag in substitute command: '@'
Failed: Replaced CGAL_ARCH_PATH by '/opt/homebrew/opt/cgal@4' in etc/config.csh/CGAL

Caused by #40

Adding paraview as a Homebrew dependency

Hello,

I just found out that the paraview from Homebrew is more convenient. The paraview command is added to the PATH.

~ brew install --cask paraview
==> Downloading https://www.paraview.org/paraview-downloads/download.php?submit=
==> Installing Cask paraview
==> Moving App 'ParaView-5.10.1.app' to '/Applications/ParaView-5.10.1.app'
==> Linking Binary 'paraview' to '/opt/homebrew/bin/paraview'
🍺  paraview was successfully installed!

Also paraFoam will be available.

copy tutorial case

Thanks! This is a very good tutorial. My question is how can I copy a tutorial case from the Volume/openfoam:2206. I cannot visit the folder after I enter the openfoam enviornment.

stripInvalid() even on tutorial cases

Hi,

First off, this looks really great, thank you for the wonderful work.

patrickkastner$ checkMesh
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2312                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : _1d8f0d55f7-20231221 OPENFOAM=2312 version=v2312
Arch   : "LSB;label=32;scalar=64"
Exec   : checkMesh
Date   : Jan 16 2024
Time   : 21:07:24
Host   : MBPM2
PID    : 80755
fileName::stripInvalid() called for invalid fileName /Users/patrickkastner/test/Project 2/windAroundBuildings
    For debug level (= 2) > 1 this is considered fatal

For some reason, I cannot run any cases, even tutorials won't work? What am I doing wrong?

Best,

Patrick

Issues in tutorials, code runs, but generated data are empty

First of all, thank you very much for this effort!

I was trying to run a couple of tutorials and always incur the same issues. When using the Allrun command, it seems to compile and data are generated. These are however empty. The command foamToVTK runs and data are generated but they are basically empty and when opening the files in Paraview nothing happens, i.e. no file appears on the left side and of course no apply button is available.

I also tried to run separately the blockMesh command and then run (e.g. via potentialFoam for the cylinder tutorial). In this case I get the following log:

Create time
Create mesh for time = 0
potentialFlow: Operating solver in PISO mode
Reading velocity field U
--> FOAM FATAL ERROR: (openfoam-2212)
cannot find file "/Users/spiacqua/Documents/OpenFoam/tutorials/basic/potentialFoam/cylinder/0/U"

From virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject &, const Foam::fileName &, const Foam::word &, const bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 561.

FOAM exiting

I created a folder 0 to solve the issue and the code ran, but still, the data created are basically empty.
Any clue why that might happen? I must say, I'm not that familiar yet.
I'm running on a MacBook Pro M2 Max.

Thanks in advance

`FOAM_USER_LIBBIN` not properly configured?

I am trying to use turbinesFoam in this environment. It compiles fine, but I'm not able to load the library, apparently because the user lib directory is not being searched at runtime:

--> FOAM Warning : 
    From void *Foam::dlLibraryTable::openLibrary(const fileName &, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 188
    Could not load "turbinesFoam"
dlopen(libturbinesFoam.dylib, 0x0009): tried: 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/openmpi/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/usr/opt/fftw/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/usr/opt/mpfr/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/usr/opt/gmp/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/usr/opt/cgal/lib/libturbinesFoam.dylib' (no such file),
'/Volumes/OpenFOAM-v2312/usr/opt/boost/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/usr/opt/open-mpi/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/dummy/libturbinesFoam.dylib' (no such file), 
'libturbinesFoam.dylib' (no such file), 
'/System/Volumes/Preboot/Cryptexes/OSlibturbinesFoam.dylib' (no such file),
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/openmpi/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/dummy/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/openmpi/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/libturbinesFoam.dylib' (no such file), 
'/Volumes/OpenFOAM-v2312/platforms/darwin64ClangDPInt32Opt/lib/dummy/libturbinesFoam.dylib' (no such file), 
'/usr/lib/libturbinesFoam.dylib' (no such file, not in dyld cache), 
'libturbinesFoam.dylib' (no such file)
$ echo $FOAM_USER_LIBBIN/
/Users/pete/OpenFOAM/pete-v2312/platforms/darwin64ClangDPInt32Opt/lib/

Is there some additional configuration that needs to be done? The porousMicroTransport example given in the README seems to put the libraries into FOAM_MODULE_LIBBIN, but that variable is not defined in my environment.

wmake error when compiling my own boundary condition

Thank you so much for making this project available! I have come across the following issue:

I just brew installed openfoam2206, started it up, and tried to use wmake to compile my own boundary condition (which compiles fine when I use your openfoam-docker-arm docker image--thanks for that project too!) and got this error:

warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt]
approxPoiseuilleRectFvPatchVectorField.C:139:17: error: conversion from 'tmp<Field<double>>' to 'Foam::scalarField' (aka 'Field<double>') is ambiguous
    scalarField ycoord = 2 * ((c - ctr) & y_) / ((bb.max() - bb.min()) & y_);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^

It looks like there is a problem trying to create a variable of type scalarField (ycoord), which is necessary for my boundary condition. For some reason the variable type is not being accepted (compiler flag issue?). Is there a way to get this to work? By the way, the same error occurs with openfoam2112, which I also brew installed.

Also, I have the latest XCode version (13.4.1), command line tools, and system software (macOS Monterey 12.5.1) installed on my MacBook Pro M1 Max.

Error: Failed to mount the OpenFOAM-v2306 volume

After yesterday getting a successful CfdOF run using HiSA (for the first time), I find that today I can't mount OpenFOAM at all.
Either by clicking on the OpenFOAM app installed, or typing % openfoam2306. The error I get on the console is:
`% /Applications/OpenFOAM-v2306.app/Contents/Resources/etc/openfoam

         |                                                             

( ) | °°° OpenFOAM-v2306.app °°°
( ) ( ) |
( ) | Native OpenFOAM for macOS
| https://github.com/gerlero/openfoam-app

Mounting the OpenFOAM-v2306 volume...
ERROR: Failed to mount the OpenFOAM-v2306 volume`

Umm, how can this be fixed? Maybe coincidentally, a "transparent" update occurred this afternoon. I found a restore.log under /System/Volumes/Update that was dated today. But the log didn't contain anything to do with OpenFOAM.

About the only thing I can think of is I did not exit the shell before rebooting the computer (network issue of some sort). Any guidance would be greatly appreciated!

Recipe for installing with writeable OpenFOAM installation

First of all, thanks a lot for your work here that enables compiling OF on Mac!

In our organization we do a lot of development of custom OF solvers and libraries for thermo, reactions, mesh modifications etc. We have a workflow where different projects are organized as internal forks of the OpenFOAM.com repo, so we need a writeable OF installation. Mostly we run on Linux, but more and more of our colleagues use Mac for their laptops.

I was able to set up my system the way I need it based on your configure.sh script and some of the other things in this repo. With a writeable case-sensitive volume I could also put my WM_PROJECT_USER_DIR there and it seems that things work nicely.

I am going to write down a recipe for this so other colleagues can follow. This could of course also be interesting for advanced OF users outside our organisation. Would you be interested in including this recipe as something like a "InstallationForAdvancedUsers.md" document on this repo?

Multiple versions ?

Thank you for your excellent work! Is it possible to provide multiple versions, such as OpenFOAM 8?

Use alternative etc config locations

As of OpenFOAM-v2006 (commit 5ba2cbc5) there is support for specifying alternative config file locations (actually for an alternative OpenFOAM etc/ layer).
This was specifically added to handle systems like MacOS and mingw cross-compilation.

For this you would probably want to try something like this (pseudo-code):

  • cd openfoam-project-dir
  • mkdir -p "etc-macos/config.sh"
  • echo 'export FOAM_CONFIG_ETC="etc-macos"' >> etc/prefs.sh
  • copy/rsync etc/config.sh/{adios2,boost,CGAL, ....} to etc-macos/config.sh
  • run bin/tools/foamConfigurePaths (can specify the -etc=... option for more certainty) and the rest of your configure.sh file

This way most of the changes will be encapsulated within the directory: making the changes more transparent and preserving them after a git update of OpenFOAM.

Errors in residual monitoring

Greetings! I am a beginner in OpenFOAM and would like to ask you about the error reported by foamMonitor, the residual file monitored and the problems encountered are as follows. The device is a MacBookAir M2, the latest version of gnuplot is installed via homebrew, the terminal mode is qt. Thank you so much!!!
residual monitoring error
solverInfo.txt
@gerlero

"openfoam" can't be opened because (null) is not allowed to open documents in Terminal.

This new error shows up on a Ventura system after downloading any variant of the app and attempting to launch it directly (after manually overriding Gatekeeper via Finder right-click as one would have done pre-Ventura):

Screenshot 2022-11-14 at 00 44 04

Meanwhile, under presence of this error, invoking the openfoam shell session script works just fine:

/Applications/OpenFOAM-v2206.app/Contents/Resources/etc/openfoam

Notably the new error doesn't occur:

  • after installing with Homebrew with the --no-quarantine option (as recommended)

  • if Gatekeeper is overridden from the command-line (with xattr -rd com.apple.quarantine /Applications/OpenFOAM-v2206.app) before any attempt is done to launch the app

Mac ARM64 M2 Building from Source ending with Errors

Good Evening and great Kudo to Gabriel for his tremendous work.

No Compilation expert here.
I am trying to build OPENFOAM from source using the guidelines:

I am having warnings for all Brew packages required:

Warning: Building open-mpi from source as the bottle needs:

  • HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Volumes/OpenFOAM-v2312/usr/Cellar)
  • HOMEBREW_PREFIX: /opt/homebrew (yours is /Volumes/OpenFOAM-v2312/usr)

In the Log file Compilationlog.log
I have at the end: Homebrew Bundle failed! 4 Brewfile dependencies failed to install.
and a lot of verbose related to issues with the installation of the brew packages along with fatal errors.

Do you have any guidance on how to solve those issues.

Thanks a lot for your support.

Tutorial case `backwardFacingStep2D` hangs if OpenFOAM is built with Xcode CLT >=14.3

simpleFoam seems to hang forever when running $FOAM_TUTORIALS/incompressible/simpleFoam/backwardFacingStep2D after OpenFOAM is compiled using this version of the Xcode Command Line Tools (full version: 14.3.1.0.1.1683849156) on an Apple silicon Mac running macOS 13 Ventura.

EDIT: same failure with Xcode CLT 14.3 (14.3.0.0.1.1679647830)
EDIT 2: OpenFOAM v2212 and OpenFOAM v2206 are affected. Didn't test OpenFOAM v2112, but I expect the same
EDIT 3: disabling floating point exception support in various ways I tried doesn't seem to fix it either

Is it possible to build HiSA within this environment?

I've tried compatible OpenFOAM and HiSA, but all fails with type checking.

boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.C:169:17: error: conversion from 'tmp<Field<Foam::Vector<double>>>' to 'Foam::vectorField' (aka 'Field<Vector<double>>') is ambiguous
    vectorField Uif = Up.patchInternalField();
                ^     ~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^
boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.C:170:17: error: conversion from 'tmp<Field<double>>' to 'Foam::scalarField' (aka 'Field<double>') is ambiguous
    scalarField pif =
                ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^
boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.C:173:17: error: conversion from 'tmp<Field<double>>' to 'Foam::scalarField' (aka 'Field<double>') is ambiguous
    scalarField psiif =
                ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^
boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.C:175:17: error: conversion from 'tmp<Field<double>>' to 'Foam::scalarField' (aka 'Field<double>') is ambiguous
    scalarField gammaif =
                ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^
boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.C:177:17: error: conversion from 'tmp<Field<double>>' to 'Foam::scalarField' (aka 'Field<double>') is ambiguous
    scalarField rhoif =
                ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/tmp.H:270:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/Volumes/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.H:232:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^
9 warnings and 5 errors generated.
make: *** [Make/darwin64ClangDPInt32Opt/boundaryConditions/characteristic/characteristicWall/characteristicWallPressureFvPatchScalarField.o] Error 1

Change OpenFOAM shell session

I think the layout of the OpenFOAM default shell's upper path and lower commands without color differentiation is unclear. How can I get the default zsh shell's configuration after activating the OpenFOAM environment like this:
usr@MBP: (green bold) current path(blue bold) %

problem for wmake

Thank u for your work for this app.
I'm new for openfoam, and now I'm studying how to use this app. But there are some problems:

  1. If I need creat the direction such as $FOAM_USER_APPBIN myself ?
  2. When I use the there are an erro code 1 happened, it said that cant output to /volumes/openfoam2112/.../bin . Is this cause by the virtual disk for openfoam is only read?

Thanks!

Issues on ThirdParty

Hello, Gerlero

Thanks a lot for your contribution to installation of OpenFOAM on MacOS. It helps a lot. I've just installed it successfully by compiling the source code directly.

However, when I tried to complied the ThirdParty source codes the same way as I did, some problems occurred when it comes to scotch and related apps. Though I tried to use homebrew to install scotch, just to skip the problem, it seems that by using homebrew, the lib complied is in the form of *.dylib instead of *.so causing the Openfoam not able to load libscotch, which subsequently results in the failure of the application of decomposePar using scotch method to decompose the meshes.

Do you have any idea about that?

Thanks in advance!

Build failure caused by 'standalone' dependency

Not even 20 days after merging #57 and releasing the first experimental standalone apps, the new build mechanism is failing when attempting install the dependencies with Homebrew into the custom prefix. See CI runs here: https://github.com/gerlero/openfoam-app/actions/runs/2801675280/

In particular, the failure is caused by trying to install adios2. The error can be reproduced by running brew install --build-from-source adios2:

==> Installing adios2
==> cmake -S . -B build -DADIOS2_USE_Blosc=ON -DADIOS2_USE_BZip2=ON -DADIOS2_USE
==> cmake --build build
==> cmake --install build
Last 15 lines from /Users/gabriel/Library/Logs/Homebrew/adios2/03.cmake:
  NOT FOUND.  Reason given by package:

  The following imported targets are referenced, but are missing: ffs::ffs



-- Configuring incomplete, errors occurred!
See also "/var/folders/p0/7x_m9ksn4ydf4yvdk4c3943c0000gn/T/tmp.mgR6uS9F/CMakeFiles/CMakeOutput.log".
Failed
CMake Error at build/cmake/install/post/cmake_install.cmake:44 (message):
  generate-adios2-config.sh returned 1, should be 0
Call Stack (most recent call first):
  build/cmake_install.cmake:52 (include)



Do not report this issue to Homebrew/brew or Homebrew/core!

As the final line says, simply asking for a fix in Homebrew is not a viable option. This is because using a custom prefix is not officially supported by Homebrew; see also the discussion in #57.

OpenMP support inadvertently disabled

#165 caused OpenFOAM to be built without OpenMP support (~openmp in $WM_COMPILE_CONTROL), despite libomp being listed in the Brewfile.

This issue affects the current release (1.10.1).

Integrating swak4Foam?

Some issues need to be resolved.

  1. Broken python 2.7 integration since Monterey.
  2. swak4Foam is built into FOAM_USER_APPBIN and FOAM_USER_LIBBIN. How will your package handle this?

adios2 error during build

Happens with adios2 v2.9.0:

    compiling: adiosCoreWrite.C
write/adiosCoreWrite.C:77:17: error: no matching constructor for initialization of 'adios2::ADIOS'
            new adios2::ADIOS
                ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:67:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'MPI_Comm' (aka 'ompi_communicator_t *') to 'const std::string' (aka 'const basic_string<char>') for 1st argument
    ADIOS(const std::string &configFile, MPI_Comm comm);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:106:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'MPI_Comm' (aka 'ompi_communicator_t *') to 'const std::string' (aka 'const basic_string<char>') for 1st argument
    ADIOS(const std::string &configFile, const std::string &hostLanguage);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:56:5: note: candidate constructor not viable: requires single argument 'comm', but 2 arguments were provided
    ADIOS(MPI_Comm comm);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:89:5: note: candidate constructor not viable: requires single argument 'configFile', but 2 arguments were provided
    ADIOS(const std::string &configFile);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:114:5: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    ADIOS(const ADIOS &) = delete;
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:120:5: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    ADIOS(ADIOS &&) = default;
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:78:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
    ADIOS(const std::string &configFile, MPI_Comm comm,
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:95:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
    ADIOS();
    ^
write/adiosCoreWrite.C:88:17: error: no matching constructor for initialization of 'adios2::ADIOS'
            new adios2::ADIOS
                ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:67:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'MPI_Comm' (aka 'ompi_communicator_t *') to 'const std::string' (aka 'const basic_string<char>') for 1st argument
    ADIOS(const std::string &configFile, MPI_Comm comm);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:106:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'MPI_Comm' (aka 'ompi_communicator_t *') to 'const std::string' (aka 'const basic_string<char>') for 1st argument
    ADIOS(const std::string &configFile, const std::string &hostLanguage);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:56:5: note: candidate constructor not viable: requires single argument 'comm', but 2 arguments were provided
    ADIOS(MPI_Comm comm);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:89:5: note: candidate constructor not viable: requires single argument 'configFile', but 2 arguments were provided
    ADIOS(const std::string &configFile);
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:114:5: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    ADIOS(const ADIOS &) = delete;
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:120:5: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    ADIOS(ADIOS &&) = default;
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:78:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
    ADIOS(const std::string &configFile, MPI_Comm comm,
    ^
/Volumes/OpenFOAM-v2212/usr/Cellar/adios2/2.9.0/include/adios2/cxx11/ADIOS.h:95:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
    ADIOS();
    ^
2 errors generated.
make[1]: *** [/Volumes/OpenFOAM-v2212/build/darwin64ClangDPInt32Opt/modules/adios/src/adiosFoam/write/adiosCoreWrite.o] Error 1

icoFoam runs, cartesianMesh does not

System: MacBook Pro M1 Max with latest XCode version (13.4.1), command line tools, and system software (macOS Monterey 12.5.1).

After activating openfoam2206, I can run an Openfoam solver such as icoFoam and get the expected results, but when I try the cfMesh utility, cartesianMesh, I get the following error:

$ cartesianMesh
dyld[80479]: symbol not found in flat namespace (___kmpc_barrier)
Abort trap: 6

Both commands are in the same bin directory,

$ which icoFoam
/Volumes/OpenFOAM-v2206/platforms/darwin64ClangDPInt32Opt/bin/icoFoam
$ which cartesianMesh
/Volumes/OpenFOAM-v2206/platforms/darwin64ClangDPInt32Opt/bin/cartesianMesh

which is in the PATH variable. Here are the first items in PATH:

/Volumes/OpenFOAM-v2206/usr/opt/adios2/bin
/Users/nordin/OpenFOAM/nordin-v2206/platforms/darwin64ClangDPInt32Opt/bin
/Volumes/OpenFOAM-v2206/site/2206/platforms/darwin64ClangDPInt32Opt/bin
/Volumes/OpenFOAM-v2206/platforms/darwin64ClangDPInt32Opt/bin
/Volumes/OpenFOAM-v2206/bin
/Volumes/OpenFOAM-v2206/wmake
/Volumes/OpenFOAM-v2206/usr/bin
/opt/homebrew/bin
/opt/homebrew/sbin
...

I don't really know where to go from here. It looks like maybe a library is missing that cartesianMesh depends on?

Thanks for Gerlero

I have installed successfully openfoam 2112 on Mac OS (MBP 14 inch with M1 Pro).
Thank you specially. I have tried many install methods before, among these you proposed is undoubtedly the simplest and most convenient.

Compiling new solver with wake in $USER-v2112/applications/solvers/

Hi,

First of all, thanks for this project which is more than welcomed on macOS. The compilation is really easy and I ran some tutorials without any problem.

Now, I would like to compile my own solver in ~/OpenFOAM/$USER-v2112/applications/solvers/ with wmake. These warning and errors messages appear:

warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt] mypimpleFoam.C:82:10: warning: non-portable path to file '"correctPhi.H"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "CorrectPhi.H" ^~~~~~~~~~~~~~ "correctPhi.H" In file included from mypimpleFoam.C:82: ./CorrectPhi.H:1:1: error: C++ requires a type specifier for all declarations CorrectPhi ^ ./CorrectPhi.H:3:5: error: use of undeclared identifier 'U' U, ^ ./CorrectPhi.H:4:5: error: use of undeclared identifier 'phi' phi, ^ ./CorrectPhi.H:5:5: error: use of undeclared identifier 'p' p, ^ ./CorrectPhi.H:8:5: error: use of undeclared identifier 'pimple' pimple ^ In file included from mypimpleFoam.C:82: In file included from ./CorrectPhi.H:11: /Volumes/OpenFOAM-v2112/src/finiteVolume/lnInclude/continuityErrs.H:34:1: error: expected unqualified-id { ^ 2 warnings and 6 errors generated. make: *** [Make/darwin64ClangDPInt32Opt/mypimpleFoam.o] Error 1

Do you have any idea how to solve this in order to compile my own solver ?
Note that I also try to recompile pimpleFoam with a different name in ~/OpenFOAM/$USER-v2112/applications/solvers/ without any success as it gives a similar error. Therefore, the problem does not come from my coded function (I think ?). And off course, my solver compiles on linux (ubuntu).

Regards,

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.