-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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; | ||
} | ||
} |
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; | ||
} | ||
} |
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; | ||
} | ||
} |
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 . |
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); | ||
} |
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; |
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; |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
constant/polyMesh/blockMeshDict |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "system"; | ||
object controlDict; | ||
} | ||
|
||
//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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be needed. |
||
|
||
adjustTimeStep no; | ||
|
||
maxCo 0.9; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this explicitly needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, without it, it was not running. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I start to wonder if this only applies to the debug version for some reason. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But is this even a valid combination? If |
||
|
||
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 | ||
} | ||
} |
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 | ||
( | ||
); | ||
|
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For easier maintenance, it would be good if this file followed the same order and formatting as the one in
fluid-openfoam
, so that we can easily take a diff.