こんにちは。私は大学でopenfoamを利用した流体解析を行っています。
その中で解決できない問題が発生したため、みなさんにご協力をお願いしたいです。
わたしは解析中にプロペラを動かせるようにプログラムを組んいるのですが、0.3秒あたりで発散してします。プロペラは回っているのですが、回転軸がずれたりしています。その原因がわからないので知識を分けてもらえないでしょうか。
openfoam5.0を使用しています。メッシュはANSYSで制作しました。
モデルは800×800×2200㎜の立方体に直径250㎜のプロペラが入っています
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / A nd | Web:
www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (5 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 -5 0);
}
outlet
{
type zeroGradient;
}
propeller
{
type movingWallVelocity;
value uniform (0 0 0);
}
wallr
{
type slip;
}
walll
{
type slip;
}
wall
{
type slip;
}
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
propeller
{
type zeroGradient;
}
wallr
{
type zeroGradient;
}
walll
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//nut 壁関数
dimensions [0 0 -1 0 0 0 0];
internalField uniform 0.4;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
propeller
{
type omegaWallFunction;
value uniform 985;
}
wallr
{
type omegaWallFunction;
value $internalField;
}
walll
{
type omegaWallFunction;
value $internalField;
}
wall
{
type omegaWallFunction;
value $internalField;
}
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Re=20000:--> I=0.16*Re**(-1/8) **=bekizyou (pipeflowでの式)
// k=(3/2)*(U_ref*I)**2
// I=0.05 (自由乱流での一般値(openfoamプログラミングp192)
// k=1.5*(5*0.05)^2
// epsilon=Cμ^(3/4)*k^(3/2)/l=1.123025212 (l=0.06[m])
// omega=epsilon/k=0.08347987115
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.00375;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
propeller
{
type kqRWallFunction;
value uniform 49;
}
wallr
{
type kqRWallFunction;
value $internalField;
}
walll
{
type kqRWallFunction;
value $internalField;
}
wall
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1.123;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
wallr
{
type epsilonWallFunction;
value $internalField;
}
walll
{
type epsilonWallFunction;
value $internalField;
}
wall
{
type epsilonWallFunction;
value $internalField;
}
propeller
{
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ///
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
patches (propeller); //動かすメッシュ
innerDistance 0; //この中にあるものがすべてリジッドボディとして直接移動する
outerDistance 0.1; //外側では動かない
mass 0.00696; //重さ
centreOfMass (-1.073e-07 -0.001 2.426e-07); //中心位置
momentOfInertia (3.075e-05 3.160e-05 9.049e-09); //慣性モーメント
velocity (0 0 0); //速度
orientation
(
0.9144 0 0.4048
0 1 0
-0.4048 0 0.9144
);
angularMomentum (0 0.1 0); //角運動量
g (0 -9.81 0);
rho rhoInf;
rhoInf 1;
accelerationRelaxation 0.9; //加速の減衰
accelerationDamping 0.95; //加速の緩和
report on;
solver
{
type symplectic;
}
constraints //拘束条件
{
yLine
{
sixDoFRigidBodyMotionConstraint line;
direction (0 1 0);
}
zAxis
{
sixDoFRigidBodyMotionConstraint axis; //回転軸
axis (0 1 0);
}
}
/*
*/
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.002;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat fixed;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep no;
maxCo 1.0;
libs
(
"libsixDoFRigidBodyMotion.so"
);
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default faceLimited Gauss midPoint 1;
grad(p) Gauss midPoint;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited 0;
laplacian(diffusivity,cellMotionU) Gauss linear limited 0;
}
interpolationSchemes
{
default midPoint;
}
snGradSchemes
{
default limited 0;
}
fluxRequired
{
default no;
pcorr ;
p ;
}
// ************************************************************************* //
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"pcorr.*"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}
p
{
$pcorr;
}
pFinal
{
$p;
//relTol 0;
}
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
UFinal
{
$U;
//relTol 0;
}
cellDisplacement
{
$p;
}
k{
solver PBiCG;
preconditioner DILU;
tolerance 1e-04;
relTol 0.1;
}
kFinal{
$k;
relTol 0;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-04;
relTol 0.1;
nSweeps 1;
}
omegaFinal
{
$omega;
relTol 0;
}
epsilonFinal
{
$epsilon;
relTol 0;
}
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
}
PIMPLE
{
correctPhi yes;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
p 0.2;
//0.3
}
equations
{
U 0.6;
".*Final" 0.6;
//0.7
}
}
// ************************************************************************* //
ここからが解析結果です
Create time
Create mesh for time = 0.000000
Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: sixDoFRigidBodyMotion
--> FOAM Warning :
From function const Foam::HashTable<Foam::List<int>, Foam::word>& Foam::polyBoundaryMesh::groupPatchIDs() const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 467
Removing patchGroup 'wall' which clashes with patch 5 of the same name.
Selecting sixDoFSolver symplectic
Translational constraint tensor (0 0 0 0 1 0 0 0 0)
Rotational constraint tensor (0 0 0 0 1 0 0 0 0)
PIMPLE: Operating solver in PISO mode
Reading field p
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present
Reading/calculating face velocity Uf
No finite volume options present
Courant Number mean: 1.056 max: 295.886
Starting time loop
Courant Number mean: 1.056 max: 295.886
Time = 0.005000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 -0.001 2.426e-07)
Centre of mass: (-1.073e-07 -0.001 2.426e-07)
Orientation: (-0.862001 0 -0.506897 0 1 0 0.506897 0 -0.862001)
Linear velocity: (0 -0.0232992 0)
Angular velocity: (0 3164.56 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.00847514, No Iterations 149
time step continuity errors : sum local = 0.000353372, global = 1.22774e-06, cumulative = 1.22774e-06
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0899433, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0247176, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0584868, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 1.57492, No Iterations 1001
time step continuity errors : sum local = 0.0761535, global = -0.012076, cumulative = -0.0120747
DICPCG: Solving for p, Initial residual = 0.587973, Final residual = 5.93407, No Iterations 1001
time step continuity errors : sum local = -0.0559146, global = -0.011764, cumulative = -0.0238387
ExecutionTime = 13.9 s ClockTime = 14 s
Courant Number mean: 5.36899 max: 2.76148e+08
Time = 0.010000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 -0.00123299 2.426e-07)
Centre of mass: (-1.073e-07 -0.00123299 2.426e-07)
Orientation: (0.79825 0 0.602318 0 1 0 -0.602318 0 0.79825)
Linear velocity: (0 -4.97898 0)
Angular velocity: (0 3185.06 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.00974393, No Iterations 64
time step continuity errors : sum local = 0.0247872, global = 0.000421212, cumulative = -0.0234175
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 0.522386, Final residual = 0.012392, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.54136, Final residual = 0.0186638, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.513878, Final residual = 0.0105837, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.919922, Final residual = 0.00905351, No Iterations 39
time step continuity errors : sum local = 0.0215611, global = -0.0112622, cumulative = -0.0346797
DICPCG: Solving for p, Initial residual = 0.00428524, Final residual = 4.21568e-05, No Iterations 39
time step continuity errors : sum local = 0.0143317, global = -0.00906534, cumulative = -0.043745
ExecutionTime = 17.36 s ClockTime = 18 s
Courant Number mean: 8.23909 max: 4.42936e+06
Time = 0.015000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 -0.0507898 2.426e-07)
Centre of mass: (-1.073e-07 -0.0507898 2.426e-07)
Orientation: (-0.568396 0 -0.822749 0 1 0 0.822749 0 -0.568396)
Linear velocity: (0 13840.5 0)
Angular velocity: (0 2889.69 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.00989487, No Iterations 29
time step continuity errors : sum local = 0.00329415, global = -0.00859183, cumulative = -0.0523369
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 0.520932, Final residual = 0.0471245, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.537212, Final residual = 0.0441452, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.472506, Final residual = 0.00972228, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.0728224, Final residual = 3.72405, No Iterations 1001
time step continuity errors : sum local = -77.3722, global = -0.00578061, cumulative = -0.0581175
DICPCG: Solving for p, Initial residual = 0.0196336, Final residual = 1.56323, No Iterations 1001
time step continuity errors : sum local = 5458.2, global = -0.00614294, cumulative = -0.0642604
ExecutionTime = 32.73 s ClockTime = 34 s
Courant Number mean: 273454 max: 3.72284e+12
Time = 0.020000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 138.403 2.426e-07)
Centre of mass: (-1.073e-07 138.403 2.426e-07)
Orientation: (-0.297214 0 -0.954806 0 1 0 0.954806 0 -0.297214)
Linear velocity: (0 -1.14177e+08 0)
Angular velocity: (0 1.86997e+08 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.00980378, No Iterations 27
time step continuity errors : sum local = 59708.1, global = -0.0518579, cumulative = -0.116118
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 0.546051, Final residual = 0.0355868, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.552748, Final residual = 0.0408451, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.534272, Final residual = 0.0429076, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.980403, Final residual = 1703.25, No Iterations 1001
time step continuity errors : sum local = 3.20141e+09, global = -0.0707469, cumulative = -0.186865
DICPCG: Solving for p, Initial residual = 0.00118053, Final residual = 27.6763, No Iterations 1001
time step continuity errors : sum local = -8.84858e+16, global = 344.175, cumulative = 343.988
ExecutionTime = 47.02 s ClockTime = 49 s
Courant Number mean: 1.69573e+18 max: 4.48861e+22
Time = 0.025000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 -1.14177e+06 2.426e-07)
Centre of mass: (-1.073e-07 -1.14177e+06 2.426e-07)
Orientation: (-0.448394 0 0.89383 0 1 0 -0.89383 0 -0.448394)
Linear velocity: (0 5.04179e+22 0)
Angular velocity: (0 5.89327e+22 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 0.00966098, No Iterations 31
time step continuity errors : sum local = 1.81639e+19, global = 1.30324e+12, cumulative = 1.30324e+12
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 0.504368, Final residual = 0.0472746, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.476728, Final residual = 0.0116667, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.514028, Final residual = 0.0455025, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 9.24001, No Iterations 1001
time step continuity errors : sum local = 7.39301e+23, global = -3.00999e+09, cumulative = 1.30023e+12
DICPCG: Solving for p, Initial residual = 0.984043, Final residual = 34.6889, No Iterations 1001
time step continuity errors : sum local = -9.9727e+32, global = 4.77159e+17, cumulative = 4.77161e+17
ExecutionTime = 62.28 s ClockTime = 64 s
Courant Number mean: 6.35472e+33 max: 8.17889e+37
Time = 0.030000
forces forces:
Not including porosity effects
6-DoF rigid body motion
Centre of rotation: (-1.073e-07 5.04179e+20 2.426e-07)
Centre of mass: (-1.073e-07 5.04179e+20 2.426e-07)
Orientation: (0.152715 0 -0.988265 0 1 0 0.988265 0 0.152715)
Linear velocity: (0 -1.11418e+50 0)
Angular velocity: (0 -1.35852e+50 0)