Hi Everyone,
I am currently using interDyMFoam using sixDoFRigidBodyMotion to try to simulate the effect of a submerged flapping foil where the foil is only permitted to oscillate in pitch. So far I have modified the wingMotion tutorial and added a free surface to the case. For the free surface I took the same BCs as seen in the DTCHull tutorial.
I receive one of two errors depending on the velocity BCs that I use.
1. U: When using outletPhaseMeanVelocity as outlet BC I get a continuity error stated mass inflow and outflow do not equal:
--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 2193.49051
Specified mass inflow : 22
Specified mass outflow : 0.4397427304
Adjustable mass outflow : 2.653510327e-27
2. U: When I change this BC to inletOutlet OR fixedValue, I no longer have continuity errors but rather the simulation diverges within seconds. I have also tried using a fixed timeStep rather then adjusted but to no avail.
I am wondering if I have missed something obvious....even when I restrain the foil fully the errors remain. Leading me to deduce it is the presence of the free surface to blame.
Below are my U & p_rgh files. And a picture of my case in attached.
Thanks in advance!
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Umean 2;
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform (2 0 0);
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
#include "include/fixedInlet"
outlet
{
/* type fixedValue;
value uniform (2 0 0);
value $internalField;*/
type outletPhaseMeanVelocity;
Umean $Umean;
alpha alpha.water;
value $internalField;
/*
type inletOutlet;
inletValue uniform (2 0 0);
value $internalField;
*/
/*type variableHeightFlowRate;
lowerBound 0;
upperBound 0.9;
value uniform 0;*/
}
wing
{
type movingWallVelocity;
value uniform (0 0 0);
}
#include "include/frontBackTopBottomPatches"
}
|
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
wing
{
type fixedFluxPressure;
value $internalField;
}
outlet
{
type zeroGradient;
}
inlet
{
type fixedFluxPressure;
value $internalField;
}
#include "include/frontBackTopBottomPatches"
}
|
I will also post fvSchemes & fvSolutions just in case the problem lies here:
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"pcorr.*"
{
solver GAMG;
smoother DIC;
agglomerator faceAreaPair;
mergeLevels 1;
nCellsInCoarsestLevel 10;
cacheAgglomeration true;
tolerance 0.1;
relTol 0;
};
p
{
$pcorr
tolerance 1e-7;
relTol 0.01;
}
pFinal
{
$p;
tolerance 1e-7;
relTol 0;
}
p_rgh
{
solver GAMG;
smoother DIC;
agglomerator faceAreaPair;
mergeLevels 1;
nCellsInCoarsestLevel 10;
cacheAgglomeration true;
tolerance 5e-8;
relTol 0.001;
};
p_rghFinal
{
$p_rgh;
relTol 0;
}
"alpha.water.*"
{
nAlphaCorr 3;
nAlphaSubCycles 1;
cAlpha 1;
icAlpha 0;
MULESCorr yes;
nLimiterIter 10;
alphaApplyPrevCorr yes;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-10;
relTol 0;
minIter 1;
}
"(U|k|omega)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0.1;
}
"(U|k|omega)Final"
{
$U;
tolerance 1e-06;
relTol 0;
}
cellDisplacement //I assume this is necessary for the moving mesh?
{
solver GAMG;
tolerance 1e-5;
relTol 0;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
}
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 5;
nNonOrthogonalCorrectors 6;
adjustPhi no;
moveMeshOuterCorrectors yes;
turbOnFinalIterOnly yes;
pRefCell 0;
pRefValue 0
}
;
potentialFlow
{
nNonOrthogonalCorrectors 10;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"(U|k|omega)" 0.7;
"(U|k|omega)Final" 1.0;
}
}
cache
{
grad(U);
}
|
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
limitedGrad cellLimited Gauss linear 1;
/*default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;*/
}
divSchemes
{
default none;
div(rhoPhi,U) Gauss linearUpwind grad(U);//Gauss vanLeer; //Gauss vanLeerV
div(phi,alpha) Gauss vanLeer;//Gauss upwind;
div(phirb,alpha) Gauss linear; //Gauss vanLeer
div(phi,U) Gauss upwind;//Gauss linearUpwind grad(U);
div(phi,k) Gauss linearUpwind limitedGrad;
div(phi,omega) Gauss linearUpwind limitedGrad;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
/*
div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,k) Gauss linearUpwind limitedGrad;
div(phi,omega) Gauss linearUpwind limitedGrad;
div((muEff*dev(T(grad(U))))) Gauss linear;*/
}
laplacianSchemes
{
default Gauss linear corrected;//limited corrected 0.5;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
pcorr ;
p_rgh;
alpha.water;
//p;
}
|