ENH: Setting up boatPropeller tutorial

This commit is contained in:
sergio
2018-12-14 16:39:40 -08:00
parent 69f257adc7
commit 68e6cd79d7
15 changed files with 207 additions and 36 deletions

View File

@ -7,10 +7,22 @@ runApplication blockMesh
#runApplication -s 1 topoSet -dict system/topoSetDictRefine #runApplication -s 1 topoSet -dict system/topoSetDictRefine
#runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict #runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict
runApplication -s 1 topoSet -dict system/topoSetDictRefine runApplication -s 1 topoSet -dict system/topoSetDictRefine
runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict.2
runApplication -s 2 topoSet -dict system/topoSetDictRefine runApplication -s 2 topoSet -dict system/topoSetDictRefine
runApplication -s 2 refineMesh -overwrite -dict system/refineMeshDict runApplication -s 2 refineMesh -overwrite -dict system/refineMeshDict.2
runApplication -s 0 topoSet -dict system/topoSetDictRefine.2
runApplication -s 0 refineMesh -overwrite -dict system/refineMeshDict.2
runApplication -s 6 topoSet -dict system/topoSetDictRefine.2
runApplication -s 6 refineMesh -overwrite -dict system/refineMeshDict.2
runApplication -s 7 topoSet -dict system/topoSetDictRefine.3
runApplication -s 7 refineMesh -overwrite -dict system/refineMeshDict.2
runApplication -s 8 topoSet -dict system/topoSetDictRefine.4
runApplication -s 8 refineMesh -overwrite -dict system/refineMeshDict.2
# Select cellSets # Select cellSets
runApplication -s 3 topoSet -dict system/topoSetDictHull runApplication -s 3 topoSet -dict system/topoSetDictHull

View File

@ -28,11 +28,11 @@ motionSolver rigidBodyMotion;
solver solver
{ {
type Newmark; type Newmark;
gamma 0.1; // Velocity integration coefficient //gamma 0.1; // Velocity integration coefficient
beta 0.1; // Position integration coefficient //beta 0.1; // Position integration coefficient
} }
accelerationRelaxation 1.0; accelerationRelaxation 0.9;
//- prescribedRotation requires some sub-iterations to converge faster //- prescribedRotation requires some sub-iterations to converge faster
// to desired value. // to desired value.

View File

@ -29,14 +29,14 @@ vertices
( -1.00 1.0 1) ( -1.00 1.0 1)
// hullBox // hullBox
( 0.0 -0.20 -0.2) // 8 ( -0.03 -0.20 -0.2) // 8
( 0.80 -0.20 -0.2) ( 0.80 -0.20 -0.2)
( 0.80 0.20 -0.2) // 10 ( 0.80 0.20 -0.2) // 10
( 0.0 0.20 -0.2) ( -0.03 0.20 -0.2)
( 0.0 -0.20 0.2) // 12 ( -0.03 -0.20 0.2) // 12
( 0.80 -0.20 0.2) ( 0.80 -0.20 0.2)
( 0.80 0.20 0.2) // 14 ( 0.80 0.20 0.2) // 14
( 0.0 0.20 0.2) ( -0.03 0.20 0.2)
// propeller // propeller
( -0.03 -0.08 -0.08) // 16 ( -0.03 -0.08 -0.08) // 16
@ -50,24 +50,24 @@ vertices
// rudder // rudder
( -0.15 -0.1 -0.05) // 24 ( -0.15 -0.1 -0.05) // 24
( -0.028 -0.1 -0.05) ( -0.04 -0.1 -0.05)
( -0.028 0.1 -0.05) // 26 ( -0.04 0.1 -0.05) // 26
( -0.15 0.1 -0.05) ( -0.15 0.1 -0.05)
( -0.15 -0.1 0.05) // 28 ( -0.15 -0.1 0.05) // 28
( -0.028 -0.1 0.05) ( -0.04 -0.1 0.05)
( -0.028 0.1 0.05) // 30 ( -0.04 0.1 0.05) // 30
( -0.15 0.1 0.05) ( -0.15 0.1 0.05)
); );
blocks blocks
( (
hex (0 1 2 3 4 5 6 7) background (80 80 40) simpleGrading (1 1 1) hex (0 1 2 3 4 5 6 7) background (80 80 80) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) hullBox (20 20 20) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) propeller (10 20 20) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) propeller (10 20 20) simpleGrading (1 1 1)
hex (24 25 26 27 28 29 30 31) rudder (20 20 20) simpleGrading (1 1 1) hex (24 25 26 27 28 29 30 31) rudder (20 22 11) simpleGrading (1 1 1)
); );
edges edges

View File

@ -19,19 +19,19 @@ libs ("liboverset.so" "librigidBodyDynamics.so");
application overInterDyMFoam; application overInterDyMFoam;
startFrom startTime; startFrom latestTime;
startTime 0; startTime 0;
stopAt endTime; stopAt endTime;
endTime 0.5; endTime 1;
deltaT 0.0001; deltaT 0.001;
writeControl adjustableRunTime; writeControl adjustableRunTime;
writeInterval 0.005; writeInterval 0.1;
purgeWrite 0; purgeWrite 0;
@ -50,7 +50,7 @@ runTimeModifiable true;
adjustTimeStep yes; adjustTimeStep yes;
//maxCo 1; //maxCo 1;
maxCo 5.0; maxCo 2.0;
maxAlphaCo 5.0; maxAlphaCo 5.0;
maxDeltaT 1; maxDeltaT 1;

View File

@ -15,14 +15,14 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4; numberOfSubdomains 8;
method hierarchical; method hierarchical;
coeffs coeffs
{ {
n (2 2 1); n (2 2 2);
// delta 0.001; // delta 0.001;
// order xyz; // order xyz;
} }

View File

@ -27,7 +27,7 @@ gradSchemes
divSchemes divSchemes
{ {
div(rhoPhi,U) Gauss upwind ;//limitedLinearV 1; div(rhoPhi,U) Gauss upwind ;//limitedLinearV 1;
div(U) Gauss upwind;//linear; div(U) Gauss linear;
div(phi,alpha) Gauss vanLeer; div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear; div(phirb,alpha) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
@ -39,7 +39,7 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default Gauss linear corrected; default Gauss linear uncorrected;
} }
interpolationSchemes interpolationSchemes
@ -49,17 +49,18 @@ interpolationSchemes
snGradSchemes snGradSchemes
{ {
default corrected; default uncorrected;
} }
oversetInterpolation oversetInterpolation
{ {
method inverseDistance; method inverseDistance;//cellVolumeWeight;
} }
oversetInterpolationRequired oversetInterpolationSuppressed
{ {
alpha.water; grad(p_rgh);
surfaceIntegrate(phiHbyA);
} }
fluxRequired fluxRequired

View File

@ -24,7 +24,7 @@ solvers
tolerance 1e-06; tolerance 1e-06;
relTol 0; relTol 0;
maxIter 100; maxIter 300;
} }
"alpha.water.*" "alpha.water.*"
@ -83,7 +83,7 @@ solvers
PIMPLE PIMPLE
{ {
momentumPredictor no;//yes; momentumPredictor yes;
nOuterCorrectors 2; nOuterCorrectors 2;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
set refineSet;
coordinateSystem global;
globalCoeffs
{
tan1 (1 0 0);
tan2 (0 1 0);
}
directions ( tan1 tan2 normal);
useHexTopology no;
geometricCut yes;
writeMesh no;
// ************************************************************************* //

View File

@ -60,7 +60,7 @@ actions
source boxToCell; source boxToCell;
boxes boxes
( (
(0.05 -0.082 -0.1)(0.52 0.052 0.1) //hullBox (0.06 -0.082 -0.1)(0.52 0.052 0.1) //hullBox
); );
} }

View File

@ -61,7 +61,7 @@ actions
source boxToCell; source boxToCell;
boxes boxes
( (
(-0.0199 -0.0499 -0.0499)( -0.00998 0.0499 0.0499) //propeller (-0.0 -0.0499 -0.0499)( 0.02 0.0499 0.0499) //propeller
); );
} }

View File

@ -17,13 +17,20 @@ FoamFile
actions actions
( (
{ {
name refineSet; name refineSet; // all around bgr
type cellSet; type cellSet;
action new; action new;
source zoneToCell;
zone background;
}
{
name refineSet;
type cellSet;
action subset;
source boxToCell; source boxToCell;
boxes boxes
( (
(-0.2 -0.2 -0.2)(0.0 0.2 0.2) //hullBox (-0.2 -0.2 -0.2)(0.05 0.2 0.2) //hullBox
); );
} }
); );

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name refineSet; // all around hullBox
type cellSet;
action new;
source zoneToCell;
zone hullBox;
}
{
name refineSet;
type cellSet;
action subset;
source boxToCell;
boxes
(
(0 -0.2 -0.2)(0.04 0.2 0.2)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name refineSet; // all around hullBox
type cellSet;
action new;
source zoneToCell;
zone hullBox;
}
{
name refineSet;
type cellSet;
action subset;
source boxToCell;
boxes
(
(0.05 -0.2 -0.2)(0.8 0.2 0.2)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name refineSet; // background around hullBox
type cellSet;
action new;
source zoneToCell;
zone background;
}
{
name refineSet;
type cellSet;
action subset;
source boxToCell;
boxes
(
(0.05 -0.2 -0.2)(0.8 0.2 0.2)
);
}
);
// ************************************************************************* //

View File

@ -61,7 +61,7 @@ actions
source boxToCell; source boxToCell;
boxes boxes
( (
(-0.10 -0.0749 -0.00499)(-0.050 0.0749 0.00499) //rudder (-0.12 -0.0749 -0.00499)(-0.070 0.0749 0.00499) //rudder
); );
} }