Skip to content

FSI + kOmegaSST turbulence model #643

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

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion perpendicular-flap/fluid-openfoam/0/U
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FoamFile

dimensions [0 1 -1 0 0 0 0];

internalField uniform (10 0 0);
internalField uniform (100 0 0);

boundaryField
{
Expand Down
66 changes: 66 additions & 0 deletions perpendicular-flap/fluid-openfoam/0/k
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2406 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
arch "LSB;label=32;scalar=64";
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 50;

boundaryField
{

inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}

flap
{
type kqRWallFunction;
value $internalField;
}

frontAndBack
{
type empty;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}


// ************************************************************************* //
52 changes: 52 additions & 0 deletions perpendicular-flap/fluid-openfoam/0/nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}

dimensions [ 0 2 -1 0 0 0 0 ];

internalField uniform 5;

boundaryField
{

inlet
{
type calculated;
value uniform 0;
}

outlet
{
type calculated;
value uniform 0;
}

flap
{
type nutkWallFunction;
value uniform 0;
}

frontAndBack
{
type empty;
}

upperWall
{
type calculated;
value uniform 0;
}

lowerWall
{
type calculated;
value uniform 0;
}

}

63 changes: 63 additions & 0 deletions perpendicular-flap/fluid-openfoam/0/omega
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2406 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
arch "LSB;label=32;scalar=64";
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 -1 0 0 0 0];

internalField uniform 80;

boundaryField
{

inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}

flap
{
type omegaWallFunction;
blending binomial;
n 2;
value uniform 80;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}


// ************************************************************************* //
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FoamFile

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-5;
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ FoamFile
object turbulenceProperties;
}

simulationType laminar;
simulationType RAS;

RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
2 changes: 2 additions & 0 deletions perpendicular-flap/fluid-openfoam/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -e -u
exec > >(tee --append "$LOGFILE") 2>&1

blockMesh
topoSet
refineMesh -overwrite

../../tools/run-openfoam.sh "$@"
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
Expand Down
11 changes: 6 additions & 5 deletions perpendicular-flap/fluid-openfoam/system/blockMeshDict
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FoamFile
x0 -3.;
x1 -0.05;
x2 0.05;
x3 3.;
x3 6.;

y0 0.;
y1 1.;
Expand Down Expand Up @@ -48,8 +48,9 @@ vertices
);

// Grading
h1 30;
h2 3;
h1 20;
h2 1;
h3 40;
v1 15;
v2 30;

Expand All @@ -60,7 +61,7 @@ blocks
simpleGrading (0.5 1 1)

hex ( 2 3 7 6 14 15 19 18 )
($h1 $v1 1)
($h3 $v1 1)
simpleGrading (2 1 1)

hex ( 4 5 9 8 16 17 21 20 )
Expand All @@ -72,7 +73,7 @@ blocks
simpleGrading (1 2 1)

hex ( 6 7 11 10 18 19 23 22 )
($h1 $v2 1 )
($h3 $v2 1 )
simpleGrading (2 2 1)
);

Expand Down
12 changes: 12 additions & 0 deletions perpendicular-flap/fluid-openfoam/system/controlDict
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ timePrecision 6;

functions
{
limitKOmega
{
// Mandatory entries (unmodifiable)
type limitFields;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
fields (omega k);
limit max;
max 1e7;
}

preCICE_Adapter
{
type preciceAdapterFunctionObject;
Expand Down
8 changes: 8 additions & 0 deletions perpendicular-flap/fluid-openfoam/system/fvSchemes
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ divSchemes
{
default none;
div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss limitedLinear 1;
div(phi,omega) bounded Gauss upwind;

div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

Expand All @@ -37,3 +40,8 @@ snGradSchemes
{
default corrected;
}

wallDist
{
method Poisson;
}
43 changes: 38 additions & 5 deletions perpendicular-flap/fluid-openfoam/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,55 @@ solvers
$U;
relTol 0;
}

"(U|epsilon|k|omega)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 1e-3;
// minIter 100;
}
"(U|k|epsilon|omega)Final"
{
$U;
tolerance 1e-6;
relTol 0;
minIter 2;
}

yPsi
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-5;
relTol 0;
}

yPsiFinal
{
$yPsi
relTol 0;
}
}

PIMPLE
{
nCorrectors 4;
nCorrectors 2;
nNonOrthogonalCorrectors 1;
// tolerance 1.0e-14;
// relTol 5e-3;
consistent true;
correctPhi true;
momentumPredictor true;
nOuterCorrectors 1;
nOuterCorrectors 2;
}


potentialFlow
relaxationFactors
{
nNonOrthogonalCorrectors 10;
equations
{
"k.*" 0.4;
"omega.*" 0.4;
}
}
32 changes: 32 additions & 0 deletions perpendicular-flap/fluid-openfoam/system/refineMeshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}

set refinementZoneVer;

globalCoeffs
{
tan1 (1 0 0);
tan2 (0 1 0);
}

directions
(
tan1
// tan2
);

coordinateSystem global;
geometricCut false;

// Whether to refine cells attached to a patch
// in the normal direction into the domain.
// refineBoundaryCells false;

writeMesh false;
useHexTopology true;
Loading