Last active
November 21, 2021 17:58
-
-
Save thomas-gale/05a43e018cb174e0cd374e99b198045e to your computer and use it in GitHub Desktop.
OpenFOAM Docker Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Tested on mainline Arch Linux | |
# No dependencies other than docker/curl and assuming sudo configured. | |
# Following https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/docker#running-openfoam-in-a-container: | |
curl https://develop.openfoam.com/packaging/containers/-/raw/main/openfoam-docker -o openfoam-docker | |
sudo chmod +x openfoam-docker | |
# Check that script can be executed: | |
# openfoam-docker -help | |
# Make a exe that will bind to the current working directory from any prompt (make a symlink): | |
sudo ln -sf $(pwd)/openfoam-docker /usr/local/bin/openfoam-run | |
# From that point onward to run openfoam-docker: | |
# openfoam-run | |
# This will create an interactive openfoam prompt with the current directory mounted into the container. | |
# On host, you will need to install paraview if you want viz: | |
# sudo pacman -S paraview | |
# To viz, after you've run blockMesh/icoFoam etc. | |
# run `foamToVTK` in container | |
# run `paraview` on host (open generated openfoam.vtm.series) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment