TUT: Corrections

This commit is contained in:
Andrew Heather
2018-12-20 09:05:02 +00:00
parent 9f97084605
commit c03c6bdea2
15 changed files with 106 additions and 92 deletions

View File

@ -15,13 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 8; numberOfSubdomains 16;
method simple; method simple;
simpleCoeffs simpleCoeffs
{ {
n (2 2 2); n (4 2 2);
} }

View File

@ -45,6 +45,7 @@ boundaryField
"overset.*" "overset.*"
{ {
type overset; type overset;
patchType overset;
value uniform (0 0 0); value uniform (0 0 0);
} }
} }

View File

@ -42,12 +42,7 @@ boundaryField
{ {
type fixedFluxPressure; type fixedFluxPressure;
} }
//
// right1
// {
// type fixedValue; //calculated;
// value $internalField;
// }
"overset.*" "overset.*"
{ {

View File

@ -12,12 +12,6 @@ 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.2 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 topoSet -dict system/topoSetDictRefine.3
runApplication -s 7 refineMesh -overwrite -dict system/refineMeshDict.2 runApplication -s 7 refineMesh -overwrite -dict system/refineMeshDict.2
@ -25,16 +19,16 @@ runApplication -s 8 topoSet -dict system/topoSetDictRefine.4
runApplication -s 8 refineMesh -overwrite -dict system/refineMeshDict.2 runApplication -s 8 refineMesh -overwrite -dict system/refineMeshDict.2
# Select cellSets # Select cellSets
runApplication -s 3 topoSet -dict system/topoSetDictHull runApplication -s hull topoSet -dict system/topoSetDictHull
runApplication -s 3 subsetMesh keepBox -patch hullWall -overwrite runApplication -s hull subsetMesh keepBox -patch hullWall -overwrite
# Select cellSets # Select cellSets
runApplication -s 4 topoSet -dict system/topoSetDictPropeller runApplication -s propeller topoSet -dict system/topoSetDictPropeller
runApplication -s 4 subsetMesh keepBox -patch propellerWall -overwrite runApplication -s propeller subsetMesh keepBox -patch propellerWall -overwrite
# Select cellSets # Select cellSets
runApplication -s 5 topoSet -dict system/topoSetDictRudder runApplication -s rudder topoSet -dict system/topoSetDictRudder
runApplication -s 5 subsetMesh keepBox -patch rudderWall -overwrite runApplication -s rudder subsetMesh keepBox -patch rudderWall -overwrite
restore0Dir restore0Dir
@ -42,6 +36,6 @@ restore0Dir
runApplication -s 1 setFields -dict system/setFieldsDict runApplication -s 1 setFields -dict system/setFieldsDict
runApplication -s 2 setFields -dict system/setFieldsDictWaterLevel runApplication -s 2 setFields -dict system/setFieldsDictWaterLevel
touch rbm.foam touch boatAndPropeller.foam
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -32,10 +32,10 @@ motionSolver rigidBodyMotion;
//beta 0.1; // Position integration coefficient //beta 0.1; // Position integration coefficient
} }
accelerationRelaxation 0.9; accelerationRelaxation 0.4;
//- prescribedRotation requires some sub-iterations to converge faster //- prescribedRotation requires some sub-iterations to converge faster
// to desired value. // to desired value of omega.
nIter 3; nIter 3;
bodies bodies
@ -45,28 +45,32 @@ motionSolver rigidBodyMotion;
type rigidBody; type rigidBody;
parent root; parent root;
// Cuboid mass -- very simple setup. For more complicated shapes // To get Tensor of Inertia (symmetrical) use surfaceInertia
// see utility surfaceInertia // here hull is empty shell
mass 9;
rho 1; mass 0.552;
inertia (0.05 0 0 0.05 0 0.05); inertia (0.0033 0 0 0.01 0 0.0095);
centreOfMass (0.21 -0.07 0); // relative to the centreOfMass centreOfMass (0.2857 -0.07 0); // relative to the centreOfMass
// of parent body // of parent body
// (here root = global coord system) // (here root = global coord system)
// Transformation tensor and centre of rotation // Transformation tensor and centre of rotation (CoR)
transform (1 0 0 0 1 0 0 0 1) (0.21 0 0); transform (1 0 0 0 1 0 0 0 1) (0.2857 -0.07 0);
joint joint
{ {
// These constrains are applied only to body hull,
// other bodies need to have their own set
// Constraints used for faster run
type composite; type composite;
joints joints
( (
{ {
type Pxyz; // Allow movement in any direction type Px; // Allow translation in X -
} }
{ {
type Rxyz; // Allow rotation along any axis type Ry; // Allow rotation along Y axis
// (local - body CS) // (local - body CS)
} }
); );
@ -84,11 +88,11 @@ motionSolver rigidBodyMotion;
type rigidBody; type rigidBody;
parent hull; parent hull;
centreOfMass (-0.228 0.0 0); centreOfMass (-0.2847 0.03 0); // Relative to parent CoM
mass 1; mass 0.0288;
rho 1; inertia (7.6e-6 0 0 4.2e-6 0 4.2e-6);
inertia (0.001 0 0 0.001 0 0.001); // transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.228 0 0); transform (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0);
patches (propellerWall); patches (propellerWall);
innerDistance 100; innerDistance 100;
outerDistance 200; outerDistance 200;
@ -101,12 +105,12 @@ motionSolver rigidBodyMotion;
rudder rudder
{ {
type rigidBody; type rigidBody;
parent hull;//root; parent hull;
centreOfMass (-0.265 0 0); centreOfMass (-0.3602 -0.0055 0);
mass 1; mass 0.0746;
rho 1; inertia (3.3e-5 0 0 4.7e-6 0 3.4e-5);
inertia (0.001 0 0 0.001 0 0.001); // transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.265 0 0); transform (1 0 0 0 1 0 0 0 1) (-0.3487 -0.04 0);
patches (rudderWall); patches (rudderWall);
innerDistance 100; innerDistance 100;
outerDistance 200; outerDistance 200;
@ -114,11 +118,12 @@ motionSolver rigidBodyMotion;
{ {
type Ry; type Ry;
} }
} } //end rudder
} }
restraints restraints
{ {
rudderRotation rudderRotation
{ {
type prescribedRotation; type prescribedRotation;

View File

@ -15,6 +15,6 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0]; dimensions [0 1 -2 0 0 0 0];
value (0 -9 0);//( 0 -9.81 0 ); value (0 -9.81 0);//( 0 -9.81 0 );
// ************************************************************************* // // ************************************************************************* //

View File

@ -14,6 +14,14 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -19,49 +19,50 @@ scale 1;
vertices vertices
( (
// backgroundMesh // backgroundMesh
( -1.00 -1 -1) // 0 ( -0.50 -0.5 -0.7) // 0
( 1.00 -1 -1) ( 1.00 -0.5 -0.7)
( 1.00 1.0 -1) ( 1.00 0.5 -0.7)
( -1.00 1.0 -1) ( -0.50 0.5 -0.7)
( -1.00 -1 1) // 4 ( -0.50 -0.5 0.7) // 4
( 1.00 -1 1) ( 1.00 -0.5 0.7)
( 1.00 1.0 1) ( 1.00 0.5 0.7)
( -1.00 1.0 1) ( -0.50 0.5 0.7)
// hullBox // hullBox
( 0.04 -0.20 -0.2) // 8 ( 0.045 -0.14 -0.15) // 8
( 0.80 -0.20 -0.2) ( 0.60 -0.14 -0.15)
( 0.80 0.20 -0.2) // 10 ( 0.60 0.10 -0.15) // 10
( 0.04 0.20 -0.2) ( 0.045 0.10 -0.15)
( 0.04 -0.20 0.2) // 12 ( 0.045 -0.14 0.15) // 12
( 0.80 -0.20 0.2) ( 0.60 -0.14 0.15)
( 0.80 0.20 0.2) // 14 ( 0.60 0.10 0.15) // 14
( 0.04 0.20 0.2) ( 0.045 0.10 0.15)
// propeller // propeller
( -0.03 -0.08 -0.08) // 16 ( -0.02 -0.08 -0.04) // 16
( 0.04 -0.08 -0.08) ( 0.04 -0.08 -0.04)
( 0.04 0.08 -0.08) // 18 ( 0.04 0.00 -0.04) // 18
( -0.03 0.08 -0.08) ( -0.02 0.00 -0.04)
( -0.03 -0.08 0.08) // 20 ( -0.02 -0.08 0.04) // 20
( 0.04 -0.08 0.08) ( 0.04 -0.08 0.04)
( 0.04 0.08 0.08) // 22 ( 0.04 0.00 0.04) // 22
( -0.03 0.08 0.08) ( -0.02 0.00 0.04)
// rudder // rudder
( -0.15 -0.1 -0.05) // 24 ( -0.10 -0.14 -0.02) // 24
( -0.04 -0.1 -0.05) ( -0.04 -0.14 -0.02)
( -0.04 0.1 -0.05) // 26 ( -0.04 -0.02 -0.02) // 26
( -0.15 0.1 -0.05) ( -0.10 -0.02 -0.02)
( -0.15 -0.1 0.05) // 28 ( -0.10 -0.14 0.02) // 28
( -0.04 -0.1 0.05) ( -0.04 -0.14 0.02)
( -0.04 0.1 0.05) // 30 ( -0.04 -0.02 0.02) // 30
( -0.15 0.1 0.05) ( -0.10 -0.02 0.02)
); );
blocks blocks
( (
hex (0 1 2 3 4 5 6 7) background (80 80 80) simpleGrading (1 1 1) // hex (0 1 2 3 4 5 6 7) background (60 40 56) simpleGrading (1 1 1) // coarser mesh cell size 0.025 m
hex (0 1 2 3 4 5 6 7) background (75 50 70) simpleGrading (1 1 1) // cell size 0.02 m
hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1)

View File

@ -19,13 +19,13 @@ libs ("liboverset.so" "librigidBodyDynamics.so");
application overInterDyMFoam; application overInterDyMFoam;
startFrom latestTime; startFrom startTime;
startTime 0; startTime 0;
stopAt endTime; stopAt endTime;
endTime 5; endTime 1.5;
deltaT 0.001; deltaT 0.001;
@ -49,10 +49,20 @@ runTimeModifiable true;
adjustTimeStep yes; adjustTimeStep yes;
//maxCo 1;
maxCo 4.0; maxCo 4.0;
maxAlphaCo 5.0; maxAlphaCo 5.0;
maxDeltaT 1; maxDeltaT 1;
functions
{
minMax
{
type fieldMinMax;
libs ("libfieldFunctionObjects.so");
fields (U);
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -39,7 +39,7 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default Gauss linear uncorrected; default Gauss linear uncorrected;//uncorrected;
} }
interpolationSchemes interpolationSchemes
@ -49,12 +49,12 @@ interpolationSchemes
snGradSchemes snGradSchemes
{ {
default uncorrected; default uncorrected;//uncorrected;
} }
oversetInterpolation oversetInterpolation
{ {
method inverseDistance;//cellVolumeWeight; method inverseDistance;
} }
oversetInterpolationSuppressed oversetInterpolationSuppressed

View File

@ -83,7 +83,7 @@ solvers
PIMPLE PIMPLE
{ {
momentumPredictor yes; momentumPredictor no;
nOuterCorrectors 2; nOuterCorrectors 2;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
@ -93,7 +93,7 @@ PIMPLE
massFluxInterpolation no; massFluxInterpolation no;
moveMeshOuterCorrectors no; moveMeshOuterCorrectors no;
turbOnFinalIterOnly no; turbOnFinalIterOnly yes;
oversetAdjustPhi no; oversetAdjustPhi no;

View File

@ -60,7 +60,7 @@ actions
source boxToCell; source boxToCell;
boxes boxes
( (
(0.07 -0.082 -0.1)(0.52 0.052 0.1) //hullBox (0.12 -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.0 -0.0499 -0.0499)( 0.02 0.0499 0.0499) //propeller (0.005 -0.061 -0.0199)( 0.018 -0.0199 0.0199) //propeller
); );
} }

View File

@ -30,7 +30,7 @@ actions
source boxToCell; source boxToCell;
boxes boxes
( (
(-0.2 -0.2 -0.2)(0.05 0.2 0.2) //hullBox (-0.2 -0.2 -0.2)(0.04 0.2 0.2) //hullBox
); );
} }
); );

View File

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