-
-
Notifications
You must be signed in to change notification settings - Fork 128
added tutorial for foam-extend #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hoehnp
wants to merge
23
commits into
precice:develop
Choose a base branch
from
hoehnp:add_foam_extend_tutorial
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4e308c2
added tutorial for foam-extend
hoehnp 33776ae
Update quickstart/fluid-foam-extend/system/controlDict
hoehnp 24d8a43
added missing variable
hoehnp 4fc127b
add blockMeshDict in right folder
hoehnp 85510a1
remove blockMeshDict from old location
hoehnp dbfdeb9
fix path for preciceDict in quickstart for foam-extend
hoehnp da48510
add missing keyword
hoehnp 50ba26c
added missing keywords for foam-extend-5.0
hoehnp 49c1e05
add missing scheme
hoehnp 2085c00
add relaxationFactors for foam-extend-4.0
hoehnp dacad27
also add Ufinal for foam-extend-4.0
hoehnp af9e813
fix typo
hoehnp c153c42
add changes to combine foam-extend and openfoam for the quickstart tu…
hoehnp d911b72
make run-foam-extend.sh executable
hoehnp f132044
remove the too late creation of blockMeshDict for OpenFOAM
hoehnp 0306949
adding missing values for foam-extend
hoehnp 6a02f4f
add fix to adjust to limited version of getApplications in foam-extend
hoehnp 7082467
add changes before deleting folder
hoehnp 02ddabb
remove no longer required folder for foam-extend
hoehnp 6baea22
run-foam-extend.sh: Back up original files
MakisH 3f11c0c
Add comments in the controlDict
MakisH fea3aaa
Add comments for lines only relevant to foam-extend
MakisH 6f4053c
Add a note in README.md
MakisH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,5 @@ interfaces | |
FSI | ||
{ | ||
rho rho [1 -3 0 0 0 0 0] 1000; | ||
nu nu [0 2 -1 0 0 0 0] 0.001; // Only relevant to foam-extend | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env sh | ||
set -e # Not setting -u as it gets triggered by the OpenFOAM RunFunctions | ||
|
||
# Prepare an (intentionally empty) .foam file for the ParaView OpenFOAM reader | ||
CASENAME="$(pwd | xargs basename)" | ||
touch "$CASENAME.foam" | ||
|
||
# Keep a backup of the files to modify | ||
echo "backing up the original files (copies: 0/U.orig, system/controlDict.orig, constant/dynamicMeshDict.orig)" | ||
cp 0/U 0/U.orig | ||
cp system/controlDict system/controlDict.orig | ||
cp constant/dynamicMeshDict constant/dynamicMeshDict.orig | ||
|
||
# Modify code for foam-extend | ||
echo "modifying everything now" | ||
sed -i "s/noSlip;/noSlipWall;/g" 0/U | ||
sed -i "s,application pimpleFoam;,//application pimpleFoam;,g" system/controlDict | ||
sed -i "s,// application pimpleDyMFoam;,application pimpleDyMFoam;,g" system/controlDict | ||
sed -i '41i\ \ \ \ "liblduSolvers.so"' system/controlDict | ||
sed -i '41i\ \ \ \ "libforces.so"' system/controlDict | ||
sed -i "s,writeCompression off,writeCompression uncompressed,g" system/controlDict | ||
|
||
sed -i "s/libfvMotionSolvers\./libfvMotionSolver\./g" constant/dynamicMeshDict | ||
|
||
# OpenFOAM run functions: getApplication, getNumberOfProcessors | ||
# shellcheck disable=SC1090 # This is an OpenFOAM file which we don't need to check | ||
. "${WM_PROJECT_DIR}/bin/tools/RunFunctions" | ||
solver=$(getApplication | cut -f 1 -d " " | sed '\~//~d') | ||
if [ "${1:-}" = "-parallel" ]; then | ||
procs=$(getNumberOfProcessors) | ||
decomposePar -force | ||
mpirun -np "${procs}" "${solver}" -parallel | ||
reconstructPar | ||
else | ||
${solver} | ||
fi | ||
|
||
# Reverse code for OpenFOAM | ||
#rm -rf constant/polyMesh | ||
#sed -i "s/noSlipWall;/noSlip;/g" 0/U | ||
#sed -i "s,application pimpleDyMFoam;,// application pimpleDyMFoam;,g" system/controlDict | ||
#sed -i "s,//application pimpleFoam;,application pimpleFoam;,g" system/controlDict | ||
#sed -i '/ "liblduSolvers.so"/d' system/controlDict | ||
#sed -i '/ "libforces.so/d' system/controlDict | ||
#sed -i "s,writeCompression uncompressed,writeCompression off,g" system/controlDict | ||
# | ||
#sed -i "s/libfvMotionSolver\./libfvMotionSolvers\./g" constant/dynamicMeshDict |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.