Commit 6e6ae853 authored by mattijs's avatar mattijs
Browse files

ENH: prescribedRotation: improvements to testcase. See #872.

parent b50331d5
......@@ -41,12 +41,6 @@ boundaryField
value uniform (0 0 0);
}
//
// right1
// {
// type zeroGradient; //calculated;
// value $internalField;
// }
"overset.*"
{
......
......@@ -21,7 +21,7 @@ dynamicFvMesh dynamicOversetFvMesh;
motionSolver rigidBodyMotion;
// rigidBodyMotionCoeffs
// rigidBodyMotionCoeffs - not needed any more
// {
report on;
......@@ -45,11 +45,16 @@ motionSolver rigidBodyMotion;
type rigidBody;
parent root;
// Cuboid mass
// Cuboid mass -- very simple setup. For more complicated shapes
// see utility surfaceInertia
mass 9;
rho 1;
inertia (0.05 0 0 0.05 0 0.05);
centreOfMass (0.21 -0.07 0);
centreOfMass (0.21 -0.07 0); // relative to the centreOfMass
// of parent body
// (here root = global coord system)
// Transformation tensor and centre of rotation
transform (1 0 0 0 1 0 0 0 1) (0.21 0 0);
joint
......@@ -58,16 +63,18 @@ motionSolver rigidBodyMotion;
joints
(
{
type Pxyz;
type Pxyz; // Allow movement in any direction
}
{
type Rxyz;
type Rxyz; // Allow rotation along any axis
// (local - body CS)
}
);
}
patches (hullWall);
innerDistance 100;
innerDistance 100; // With overset we want to avoid the mesh
// deformation so have large innerDistance
outerDistance 200;
} // end hull
......@@ -117,8 +124,15 @@ motionSolver rigidBodyMotion;
type prescribedRotation;
body rudder;
referenceOrientation (1 0 0 0 1 0 0 0 1);
axis (0 1 0);
omega (0 26 0);
axis (0 1 0); // Axis of rotation
omega sine; // Function1 entry
omegaCoeffs
{
frequency 4;
amplitude 0.2;
scale (0 1 0);
level (0 1 0);
}
}
propellerRotation
{
......@@ -128,7 +142,8 @@ motionSolver rigidBodyMotion;
axis (1 0 0);
omega table
(
(0 (16 0 0))
(0 (0 0 0))
(1 (16 0 0))
);
}
}
......
......@@ -56,6 +56,7 @@ oversetInterpolation
{
method inverseDistance;
}
oversetInterpolationRequired
{
alpha.water;
......@@ -63,10 +64,6 @@ oversetInterpolationRequired
fluxRequired
{
// default no;
// p_rgh;
// pcorr;
// alpha.water;
}
// ************************************************************************* //
/*--------------------------------*- 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 dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss limitedLinearV 1;
div(U) Gauss linear;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,omega) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
oversetInterpolation
{
method inverseDistance;
}
fluxRequired
{
default no;
p;
// p_rgh;
// pcorr;
// alpha.water;
}
// ************************************************************************* //
......@@ -59,6 +59,12 @@ solvers
tolerance 1e-9;
relTol 0.01;
}
Phi
{
$p_rgh;
}
p_rghFinal
{
$p_rgh;
......@@ -82,9 +88,9 @@ PIMPLE
nCorrectors 2;
nNonOrthogonalCorrectors 0;
ddtCorr yes;
correctPhi no;
massFluxInterpolation no;
ddtCorr yes;
correctPhi no;
massFluxInterpolation no;
moveMeshOuterCorrectors no;
turbOnFinalIterOnly no;
......@@ -92,6 +98,12 @@ PIMPLE
oversetAdjustPhi no;
}
potentialFlow
{
nNonOrthogonalCorrectors 2;
PhiRefCell 0;
PhiRefValue 0;
}
relaxationFactors
{
......
......@@ -24,12 +24,6 @@ globalCoeffs
tan1 (1 0 0);
tan2 (0 1 0);
}
/*
patchLocalCoeffs
{
patch outside;
tan1 (1 0 0);
}*/
directions ( tan1 tan2 );
......
......@@ -18,7 +18,6 @@ actions
(
{
name bgr0; // all around bgr
// set hullBox0set;
type cellSet;
action new;
source zoneToCell;
......@@ -80,9 +79,6 @@ actions
boxes
(
(0.05 -0.082 -0.1)(0.52 0.052 0.1) //hullBox
// (0 -1 -1)(5 1 1) //hullBox
// (-0.02 -0.05 -0.03)( -0.01 0.05 0.03) //propeller
// (-0.08 -0.08 -0.03)(-0.06 0.08 0.03) //rudder
);
}
}
......@@ -132,7 +128,6 @@ actions
set bgr0;
}
}
);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name hullBox0; // all around bgr
type cellSet;
action new;
source regionToCell;
sourceInfo
{
insidePoints ((0.3 0.001 0.001));
}
}
// Select box to remove from region 1 and 2
// {
// name box; //all but hullBox0 region
// type cellSet;
// action new;
// source cellToCell;
// sourceInfo
// {
// set c0;
// }
// }
{
name box; // all cells including hullBox0
type cellSet;
action new; // was: add;
source cellToCell;
sourceInfo
{
set hullBox0;
}
}
{
name box;
type cellSet;
action subset;
source boxToCell;
sourceInfo
{
boxes
(
(0.0501 -0.1 -0.1)(0.5 0.1 0.1) //hullBox
// (0 -1 -1)(5 1 1) //hullBox
// (-0.02 -0.05 -0.03)( -0.01 0.05 0.03) //propeller
// (-0.08 -0.08 -0.03)(-0.06 0.08 0.03) //rudder
);
}
}
{
name box;
type cellSet;
action invert;
}
{
name c0; //copy
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set hullBox0;
}
}
{
name c0; //all cells but hullBox0 region
type cellSet;
action invert;
}
{
name box; // all cells including hullBox0
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set c0;
}
}
);
// ************************************************************************* //
......@@ -18,7 +18,6 @@ actions
(
{
name bgr0; // all around bgr
// set hullBox0set;
type cellSet;
action new;
source zoneToCell;
......@@ -79,9 +78,7 @@ actions
{
boxes
(
// (0.15 -0.1 -0.1)(0.5 0.1 0.1) //hullBox
(-0.0199 -0.0499 -0.0499)( -0.00998 0.0499 0.0499) //propeller
// (-0.10 -0.0749 -0.00499)(-0.050 0.0749 0.00499) //rudder
);
}
}
......@@ -131,131 +128,6 @@ actions
set bgr0;
}
}
);
// /*--------------------------------*- C++ -*----------------------------------*\
// | ========= | |
// | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
// | \\ / O peration | Version: plus-overset |
// | \\ / A nd | Web: www.OpenFOAM.com |
// | \\/ M anipulation | |
// \*---------------------------------------------------------------------------*/
// FoamFile
// {
// version 2.0;
// format ascii;
// class dictionary;
// object topoSetDict;
// }
// // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//
// actions
// (
// {
// name propeller0; // all around bgr
// type cellSet;
// action new;
// source zoneToCell;
// sourceInfo
// {
// name propeller;
// // insidePoints ((-0.02 0.0001 0.0001));
// }
// }
// {
// name c0; //copy
// type cellSet;
// action new;
// source cellToCell;
// sourceInfo
// {
// set propeller0;
// }
// }
//
// {
// name c0; //all around hullBox0
// type cellSet;
// action invert;
// }
//
// /*
//
// {
// name c1;
// type cellSet;
// action new;
// source regionsToCell;
// sourceInfo
// {
// insidePoints ((-0.01 0.0 0.0));
// set c0;
// }
// }
//
//
//
//
//
// {
// name c1;
// type cellSet;
// action delete;
// source cellToCell;
// sourceInfo
// {
// set c2;
// }
// }
// */
// // Select box to remove from region 1 and 2
//
// {
// name box;
// type cellSet;
// action new;
// source cellToCell;
// sourceInfo
// {
// set c0;
// }
// }
//
//
// {
// name box;
// type cellSet;
// action add;
// source cellToCell;
// sourceInfo
// {
// set propeller0;
// }
// }
//
// {
// name box;
// type cellSet;
// action subset;
// source boxToCell;
// sourceInfo
// {
// boxes
// (
// // (0 -0.1 -0.1)(0.5 0.1 0.1) //hullBox
// (-0.0199 -0.0499 -0.0499)( -0.00998 0.0499 0.0499) //propeller
// // (-0.08 -0.08 -0.03)(-0.06 0.08 0.03) //rudder
// );
// }
// }
//
// {
// name box;
// type cellSet;
// action invert;
// }
// );
//
// // ************************************************************************* //
// ************************************************************************* //
......@@ -16,7 +16,6 @@ FoamFile
actions
(
{
name refineSet;
type cellSet;
......@@ -27,13 +26,9 @@ actions
boxes
(
(-0.2 -0.2 -0.2)(0.0 0.2 0.2) //hullBox
// (0 -1 -1)(5 1 1) //hullBox
// (-0.02 -0.05 -0.03)( -0.01 0.05 0.03) //propeller
// (-0.08 -0.08 -0.03)(-0.06 0.08 0.03) //rudder
);
}
}
);
// ************************************************************************* //
......@@ -18,7 +18,6 @@ actions
(
{
name bgr0; // all around bgr
// set hullBox0set;
type cellSet;
action new;
source zoneToCell;
......@@ -79,8 +78,6 @@ actions
{
boxes
(
// (0.15 -0.1 -0.1)(0.5 0.1 0.1) //hullBox
// (-0.02 -0.05 -0.03)( -0.01 0.05 0.03) //propeller
(-0.10 -0.0749 -0.00499)(-0.050 0.0749 0.00499) //rudder
);
}
......@@ -131,134 +128,6 @@ actions
set bgr0;
}
}
);
// ************************************************************************* //
// /*--------------------------------*- C++ -*----------------------------------*\
// | ========= | |
// | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
// | \\ / O peration | Version: plus-overset |
// | \\ / A nd | Web: www.OpenFOAM.com |
// | \\/ M anipulation | |
// \*---------------------------------------------------------------------------*/
// FoamFile
// {
// version 2.0;
// format ascii;
// class dictionary;
// object topoSetDict;
// }
// // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//
// actions
// (
// {
// name rudder0; // all around bgr
// type cellSet;
// action new;
// source zoneToCell;
// sourceInfo
// {
// name rudder;
// //insidePoints ((-0.11 0.0 0.0));
// }
// }
// {
// name c0; //copy
// type cellSet;
// action new;
// source cellToCell;
// sourceInfo
// {
// set rudder0;
// }
// }
//
// {
// name c0; //all around hullBox0
// type cellSet;
// action invert;
// }
//
// /*
//
// {