-
-
Notifications
You must be signed in to change notification settings - Fork 129
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 1 commit
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class volVectorField; | ||
| object U; | ||
| } | ||
|
|
||
| dimensions [0 1 -1 0 0 0 0]; | ||
|
|
||
| internalField uniform (0 0 0); | ||
|
|
||
| boundaryField | ||
| { | ||
|
|
||
| flap | ||
| { | ||
| type movingWallVelocity; | ||
| value uniform (0 0 0); | ||
| } | ||
|
|
||
| top | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| bottom | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| inlet | ||
| { | ||
| type fixedValue; | ||
| value uniform (1 0 0); | ||
| } | ||
|
|
||
| outlet | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| front | ||
| { | ||
| type empty; | ||
| } | ||
| back | ||
| { | ||
| type empty; | ||
| } | ||
| } |
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,49 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class volScalarField; | ||
| object p; | ||
| } | ||
|
|
||
| dimensions [0 2 -2 0 0 0 0]; | ||
|
|
||
| internalField uniform 0; | ||
|
|
||
| boundaryField | ||
| { | ||
| flap | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| top | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| bottom | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| inlet | ||
| { | ||
| type zeroGradient; | ||
| } | ||
|
|
||
| outlet | ||
| { | ||
| type fixedValue; | ||
| value uniform 0; | ||
| } | ||
|
|
||
| front | ||
| { | ||
| type empty; | ||
| } | ||
| back | ||
| { | ||
| type empty; | ||
| } | ||
| } |
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,50 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class pointVectorField; | ||
| object pointDisplacement; | ||
| } | ||
|
|
||
| dimensions [0 1 0 0 0 0 0]; | ||
|
|
||
| internalField uniform (0 0 0); | ||
|
|
||
| boundaryField | ||
| { | ||
| inlet | ||
| { | ||
| type fixedValue; | ||
| value uniform (0 0 0); | ||
| } | ||
|
|
||
| outlet | ||
| { | ||
| type fixedValue; | ||
| value uniform (0 0 0); | ||
| } | ||
|
|
||
| flap | ||
| { | ||
| type fixedValue; | ||
| value $internalField; | ||
| } | ||
|
|
||
| top | ||
| { | ||
| type slip; | ||
| } | ||
|
|
||
| bottom | ||
| { | ||
| type slip; | ||
| } | ||
| front | ||
| { | ||
| type empty; | ||
| } | ||
| back | ||
| { | ||
| type empty; | ||
| } | ||
| } |
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,6 @@ | ||
| #!/usr/bin/env sh | ||
| set -e -u | ||
|
|
||
| . ../../tools/cleaning-tools.sh | ||
|
|
||
| clean_openfoam . |
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,21 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| object dynamicMeshDict; | ||
| } | ||
|
|
||
|
|
||
| dynamicFvMesh dynamicMotionSolverFvMesh; | ||
|
|
||
| motionSolverLibs ("libfvMotionSolver.so"); | ||
|
|
||
| solver displacementLaplacian; | ||
| // OpenFOAM9 or newer: rename "solver" to "motionSolver" | ||
|
|
||
| diffusivity uniform; | ||
|
|
||
| displacementLaplacianCoeffs { | ||
| diffusivity quadratic inverseDistance (flap); | ||
| } |
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,12 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| object transportProperties; | ||
| } | ||
|
|
||
| transportModel Newtonian; | ||
|
|
||
| nu nu [0 2 -1 0 0 0 0 ] 0.001; | ||
| pRef pRef [1 -1 -2 0 0 0 0 ] 0.0; |
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,9 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| object turbulenceProperties; | ||
| } | ||
|
|
||
| simulationType laminar; |
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,13 @@ | ||
| #!/usr/bin/env bash | ||
| set -e -u | ||
|
|
||
| . ../../tools/log.sh | ||
| exec > >(tee --append "$LOGFILE") 2>&1 | ||
|
|
||
| blockMesh | ||
|
|
||
| ../../tools/run-openfoam.sh "$@" | ||
|
|
||
| . ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | ||
|
|
||
| close_log |
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 @@ | ||
| constant/polyMesh/blockMeshDict |
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,82 @@ | ||
| /*--------------------------------*- C++ -*----------------------------------*\ | ||
| | ========= | | | ||
| | \\ / F ield | foam-extend: Open Source CFD | | ||
| | \\ / O peration | Version: 4.1 | | ||
| | \\ / A nd | Web: http://www.foam-extend.org | | ||
| | \\/ M anipulation | | | ||
| \*---------------------------------------------------------------------------*/ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| location "system"; | ||
| object controlDict; | ||
| } | ||
| // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
hoehnp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| //application pimpleFoam; // latest OpenFOAM | ||
| application pimpleDyMFoam; // OpenFOAM v1712, OpenFOAM 5.x, or older | ||
|
|
||
| startFrom startTime; | ||
|
|
||
| startTime 0; | ||
|
|
||
| stopAt endTime; | ||
|
|
||
| endTime 2.5; | ||
|
|
||
| deltaT 2.5e-2; | ||
|
|
||
| writeControl adjustableRunTime; | ||
|
|
||
| writeInterval 2.5e-2; | ||
|
|
||
| purgeWrite 0; | ||
|
|
||
| writeFormat ascii; | ||
|
|
||
| writePrecision 10; | ||
|
|
||
| writeCompression uncompressed; | ||
|
|
||
| timeFormat general; | ||
|
|
||
| timePrecision 8; | ||
|
|
||
| runTimeModifiable true; | ||
MakisH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| adjustTimeStep no; | ||
|
|
||
| maxCo 0.9; | ||
MakisH marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| libs | ||
| ( | ||
| "libforces.so" | ||
| "liblduSolvers.so" | ||
| "libpreciceAdapterFunctionObject.so" | ||
| ); | ||
|
|
||
| functions | ||
| { | ||
| forces | ||
| { | ||
| type forces; | ||
| functionObjectLibs ( "libforces.so" ); | ||
| outputControl timeStep; | ||
| outputInterval 1; | ||
| patches (flap); | ||
| pName p; | ||
| UName U; | ||
| rhoName rhoInf; | ||
| log true; | ||
| rhoInf 10; | ||
| CofR (0 0 0); | ||
| } | ||
|
|
||
| preCICE_Adapter | ||
| { | ||
| type preciceAdapterFunctionObject; | ||
| errors strict; // Available since OpenFOAM v2012 | ||
| } | ||
| } | ||
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,24 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| location system; | ||
| object decomposeParDict; | ||
| } | ||
|
|
||
| numberOfSubdomains 2; | ||
|
|
||
| method hierarchical; | ||
| hierarchicalCoeffs | ||
| { | ||
| n (2 1 1); | ||
| delta 0.001; | ||
| order xyz; | ||
| } | ||
|
|
||
| distributed false; | ||
| roots | ||
| ( | ||
| ); | ||
|
|
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,40 @@ | ||
| FoamFile | ||
| { | ||
| version 2.0; | ||
| format ascii; | ||
| class dictionary; | ||
| location "system"; | ||
| object fvSchemes; | ||
| } | ||
|
|
||
| ddtSchemes | ||
| { | ||
| default backward; | ||
| } | ||
|
|
||
| gradSchemes | ||
| { | ||
| default cellLimited Gauss linear 1; | ||
| } | ||
|
|
||
| divSchemes | ||
| { | ||
| default none; | ||
| div(phi,U) Gauss linearUpwind grad(U); | ||
| div((nuEff*dev(T(grad(U))))) Gauss linear; | ||
| } | ||
|
|
||
| interpolationSchemes | ||
| { | ||
| default linear; | ||
| } | ||
|
|
||
| laplacianSchemes | ||
| { | ||
| default Gauss linear corrected; | ||
| } | ||
|
|
||
| snGradSchemes | ||
| { | ||
| default corrected; | ||
| } |
Oops, something went wrong.
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.