Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion quickstart/fluid-openfoam/constant/dynamicMeshDict
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ motionSolverLibs ("libfvMotionSolvers.so");
solver displacementLaplacian;
// OpenFOAM9 or newer: rename "solver" to "motionSolver"

diffusivity uniform; // Only relevant to foam-extend
// The following entries are only relevant to foam-extend
/* uncomment
diffusivity uniform;
*/ // foam-extend

displacementLaplacianCoeffs {
diffusivity quadratic inverseDistance (flap);
Expand Down
2 changes: 2 additions & 0 deletions quickstart/fluid-openfoam/system/controlDict
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ functions
log true;
rhoInf 10;
// The following entries are only relevant to foam-extend
/* uncomment
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
pName p;
UName U;
rhoName rhoInf;
*/ // foam-extend
CofR (0 0 0);
}

Expand Down
5 changes: 4 additions & 1 deletion quickstart/fluid-openfoam/system/fvSchemes
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ divSchemes
{
default none;
div(phi,U) Gauss linearUpwind grad(U);
div((nuEff*dev(T(grad(U))))) Gauss linear; // Only relevant to foam-extend
// The following entries are only relevant to foam-extend
/* uncomment
div((nuEff*dev(T(grad(U))))) Gauss linear;
*/ // foam-extend
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

Expand Down
9 changes: 6 additions & 3 deletions quickstart/fluid-openfoam/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ solvers
tolerance 1e-6;
relTol 1e-4;
smoother DICGaussSeidel;
// The following entries are only relevant to foam-extend
// The following entries are only relevant to foam-extend
/* uncomment
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
*/ // foam-extend
}

pFinal
Expand Down Expand Up @@ -83,7 +85,8 @@ potentialFlow
nNonOrthogonalCorrectors 1;
}

// The relaxationFactors and fieldBounds are only relevant to foam-extend
// The following entries are only relevant to foam-extend
/* uncomment
relaxationFactors
{
U 0.7;
Expand All @@ -95,4 +98,4 @@ fieldBounds
p -1e5 1e5;
U 100;
}

*/ // foam-extend
20 changes: 20 additions & 0 deletions tools/run-foam-extend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@ sed -i "s,// application pimpleDyMFoam;,application pimpleDyMFoam;,g" sy
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,\/\* uncomment,// FOAMEXTENDBEGIN,g" system/controlDict
sed -i "s,\*\/ // foam-extend,// FOAMEXTENDEND,g" system/controlDict

sed -i "s,\/\* uncomment,// FOAMEXTENDBEGIN,g" system/fvSchemes
sed -i "s,\*\/ // foam-extend,// FOAMEXTENDEND,g" system/fvSchemes

sed -i "s,\/\* uncomment,// FOAMEXTENDBEGIN,g" system/fvSolution
sed -i "s,\*\/ // foam-extend,// FOAMEXTENDEND,g" system/fvSolution

sed -i "s/libfvMotionSolvers\./libfvMotionSolver\./g" constant/dynamicMeshDict
sed -i "s,\/\* uncomment,// FOAMEXTENDBEGIN,g" constant/dynamicMeshDict
sed -i "s,\*\/ // foam-extend,// FOAMEXTENDEND,g" constant/dynamicMeshDict

# OpenFOAM run functions: getApplication, getNumberOfProcessors
# shellcheck disable=SC1090 # This is an OpenFOAM file which we don't need to check
Expand All @@ -43,5 +53,15 @@ fi
#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,// FOAMEXTENDBEGIN,\/\* uncomment,g" system/controlDict
#sed -i "s,// FOAMEXTENDEND,\*\/ // foam-extend,g" system/controlDict
#
#sed -i "s,// FOAMEXTENDBEGIN,\/\* uncomment,g" system/fvSchemes
#sed -i "s,// FOAMEXTENDEND,\*\/ // foam-extend,g" system/fvSchemes
#
#sed -i "s,// FOAMEXTENDBEGIN,\/\* uncomment,g" system/fvSolution
#sed -i "s,// FOAMEXTENDEND,\*\/ // foam-extend,g" system/fvSolution
#
#sed -i "s/libfvMotionSolver\./libfvMotionSolvers\./g" constant/dynamicMeshDict
#sed -i "s,// FOAMEXTENDBEGIN,\/\* uncomment,g" constant/dynamicMeshDict
#sed -i "s,// FOAMEXTENDEND,\*\/ // foam-extend,g" constant/dynamicMeshDict