mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Improving twoRotorTutorial set up
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.1 0 0);
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -24,7 +24,6 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
//type slip;
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
@ -37,20 +36,14 @@ boundaryField
|
||||
|
||||
outlet
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
type uniformFixedValue;
|
||||
uniformValue (0 0 0);
|
||||
}
|
||||
//
|
||||
// right1
|
||||
// {
|
||||
// type zeroGradient; //calculated;
|
||||
// value $internalField;
|
||||
// }
|
||||
|
||||
overset
|
||||
{
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
|
||||
"(walls|hole|inlet|outlet)"
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -22,27 +22,10 @@ boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
"(walls|hole)"
|
||||
"(walls|hole|outlet|inlet)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
//
|
||||
// right1
|
||||
// {
|
||||
// type fixedValue; //calculated;
|
||||
// value $internalField;
|
||||
// }
|
||||
|
||||
overset
|
||||
{
|
||||
type overset;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -5,10 +5,10 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
./Allrun.pre
|
||||
|
||||
# Serial
|
||||
#runApplication $(getApplication)
|
||||
runApplication $(getApplication)
|
||||
|
||||
# Parallel
|
||||
runApplication decomposePar -cellDist
|
||||
runParallel $(getApplication)
|
||||
#runApplication decomposePar -cellDist
|
||||
#runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -14,6 +14,15 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -50,11 +50,11 @@ vertices
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (73 37 1) simpleGrading (1 1 1)
|
||||
hex (0 1 2 3 4 5 6 7) (140 70 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (8 9 10 11 12 13 14 15) movingZone1 (28 12 1) simpleGrading (1 1 1)
|
||||
hex (8 9 10 11 12 13 14 15) movingZone1 (60 24 1) simpleGrading (1 1 1)
|
||||
|
||||
hex (16 17 18 19 20 21 22 23) movingZone2 (12 28 1) simpleGrading (1 1 1)
|
||||
hex (16 17 18 19 20 21 22 23) movingZone2 (24 60 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
@ -99,7 +99,7 @@ boundary
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
@ -108,7 +108,7 @@ boundary
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
|
||||
@ -16,6 +16,12 @@ FoamFile
|
||||
|
||||
libs ("liboverset.so");
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
overset 0;
|
||||
dynamicOversetFvMesh 0;
|
||||
}
|
||||
|
||||
application overPimpleDyMFoam;
|
||||
|
||||
startFrom startTime;
|
||||
@ -24,9 +30,9 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.6;
|
||||
endTime 0.08;
|
||||
|
||||
deltaT 0.00025;
|
||||
deltaT 2e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
@ -46,7 +52,7 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep yes;
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
@ -54,6 +60,30 @@ maxCo 1;
|
||||
functions
|
||||
{
|
||||
// #include "catalyst"
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
libs ("libsampling.so");
|
||||
|
||||
// Name of the directory for probe data
|
||||
name probes;
|
||||
|
||||
// Write at same frequency as fields
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
// Fields to be probed
|
||||
fields (p U);
|
||||
|
||||
// Optional: interpolation scheme to use (default is cell)
|
||||
interpolationScheme cell;
|
||||
|
||||
probeLocations
|
||||
(
|
||||
(0.015 0.005 0.005) // at inlet
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -22,18 +22,16 @@ ddtSchemes
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(T) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div(phi,R) Gauss limitedLinear 1;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||
div(phi,U) Gauss upwind;
|
||||
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
@ -55,7 +53,7 @@ snGradSchemes
|
||||
|
||||
oversetInterpolation
|
||||
{
|
||||
method inverseDistance;
|
||||
method cellVolumeWeight;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
@ -65,4 +63,10 @@ fluxRequired
|
||||
p ;
|
||||
}
|
||||
|
||||
oversetInterpolationSuppressed
|
||||
{
|
||||
grad(p);
|
||||
surfaceIntegrate(phiHbyA);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -30,13 +30,14 @@ solvers
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
tolerance 1e-9;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
$p;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
pcorr
|
||||
@ -70,13 +71,13 @@ solvers
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
momentumPredictor true;
|
||||
correctPhi no;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nCorrectors 5;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
|
||||
ddtCorr false;
|
||||
ddtCorr true;
|
||||
|
||||
pRefPoint (0.0001 0.0001 0.001);
|
||||
pRefValue 0.0;
|
||||
|
||||
Reference in New Issue
Block a user