CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   time step continuity error increases with time_SRFSimplefoam (https://www.cfd-online.com/Forums/openfoam-solving/220844-time-step-continuity-error-increases-time_srfsimplefoam.html)

 mostafa kamal September 24, 2019 08:57

time step continuity error increases with time_SRFSimplefoam

3 Attachment(s)
hello every one
iam trying to simulate flow on horizontal axis wind turbine
1- first i made the mesh for 1 blade with periodic boundary conditions using ansys mesher as shown in (1.png ) ,the domain consists of ( inlet & upper--> velocity inlet with fixed value and zero gradient pressure)+(outlet --> zero gradient velocity and outlet pressure with fixed value= 0)+(side faces are periodic)
2- i run the case on ansys fluent and it run successfully

3- in openfoam i converted the msh file to foam by fluent3Dmeshtofoam and it was converted but without the periodic boundary condition(it was walls) so i used createpatch to convert this walls to periodic

3- i checked the mesh and was ok (2.png)
4- i search for the simplest way to simulate the flow so i found SRFSimplefoam --> the mixer tutorial and this boundary conditions where the same in this tutorial and i run the solver with the default fvoptions and fvschemes,but there was a divergence problem due to time step continuity error increases with time (3.png)

5- i don't know where is the problem till now i am stuck from weeks till now and iam trying to know the problem
6- i tried some other cases such that
6.1-making the side faces walls not periodic
6.2- making an empty domain and side faces as walls
and both cases gave me the same error (time step continuity error increases with time)
i appreciate if any one can help or give me some hints

 sivakumar September 25, 2019 02:15

Hi,

You are facing the problem because of your mesh. The check mesh gave the non orthogonality warning.

Also it is clearly mentioned in the OF user guide, if the non orthogonality is more than 70, the solution may not be stable.

try to increase the non orthogonality correction in fvSolution. Some time it may help you, instead please generate good quality mesh, that is the best way.

Regarding Fluent, the simulation may run without problem, but i dont think you will get the good solution.

If you want to learn something please stick with OF, which will guide you properly. People in the forum usually says that OF is a strict teacher, that is true.

Thanks,
Sivakumar

 mostafa kamal September 25, 2019 13:19

i have some questions for you

1-i tried many times to reduce the number of non orthogonal faces by remeshing iterativly but every time there exists nonorthogonal faces i cant control it and if you see 2.png it tells that no of severely nonorthognal faces is 9760 out of a 1 million cell which i think is accepted .
i was thinking it is because of the geometry of the blade that it must exist nonorhognal faces
and i also increased the non orthogonality correction in fvSolution and it didn't make any difference and it still the same problem.

if i am wrong please correct my mistakes as iam a beginner in openfoam?

2-according to fluent the simulation run and gave me results near the experimental data which i think it is OK,isn't it?

3- i need to inform you that i made this domain without the blade (empty domain) and the mesh was better and nonorthognality values was much lower and when i run it gave me the same error (time step continuity error)

 sivakumar September 28, 2019 03:53

Hi Kamal,
I am sry for the delayed response,

I completely disagree with your first point, what ever the angle and twist, it is possible to get reasonably good quality mesh. I am not sure up to what extend the non orthogonality is accepted.

Which per-processing tool you are using?

try to use first order upwind for turbulent quantities.

What is your YPlus value? try to maintain 100- 200, ( actual 30 -300)

what are the boundary conditions that you are using double check it.

Try using attached boundary conditions,
if you are not getting success for this setting, you must fix your mesh.

good luck,

Sivakumar

 sivakumar September 28, 2019 04:08

fvSchemes

ddtSchemes
{
}

{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div(phi,epsilon) Gauss upwind ;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear limited 0.7;
laplacian(1,p) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear limited 1;
laplacian(DkEff,k) Gauss linear limited 0.7;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

{
default limited 0.5;
}

fluxRequired
{
default no;
p ;
}

// ************************************************** *********************** //

fvSolutios:

solvers
{
p
{
solver GAMG;
tolerance 1e-08;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-07;
relTol 0.001;
minIter 1;
maxIter 1000;
}

k
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-07;
relTol 0.001;
minIter 1;
maxIter 1000;
}

omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.001;
nSweeps 1;
minIter 1;
maxIter 1000;
}

epsilon
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-07;
relTol 0.001;
minIter 1;
maxIter 1000;
}
}

SIMPLE
{
momentumPredictor yes;
nNonOrthogonalCorrectors 1;
pRefCell 0;
pRefValue 0;
convergence 1e-08;

residualControl
{
p 1e-5;
U 1e-6;
epsilon 1e-6;
k 1e-6;
nuTilda 1e-6;
}
}

potentialFlow
{
nNonOrthogonalCorrectors 20;
}

relaxationFactors
{
p 0.3;
U 0.5;
k 0.5;
epsilon 0.5;
omega 0.7;
}

epsilon:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -3 0 0 0 0];

internalField uniform 0.389;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.389;
}

outlet
{
}

top0
{
type epsilonWallFunction;
value uniform 0.389;
}

top1
{
type epsilonWallFunction;
value uniform 0.389;
}

top2
{
type epsilonWallFunction;
value uniform 0.389;
}

ILR0
{
type cyclic;
}

ILR1
{
type cyclic;
}

OLR0
{
type cyclic;
}

OLR1
{
type cyclic;
}

CLR0
{
type cyclic;
}

CLR1
{
type cyclic;
}

FCLR0
{
type cyclic;
}

FCLR1
{
type cyclic;
}

center0
{
type epsilonWallFunction;
value uniform 0.389;
}

center1
{
type epsilonWallFunction;
value uniform 0.389;
}

fan
{
type epsilonWallFunction;
value uniform 0.389;
}

}

K:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.39;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.39;
}

outlet
{
}

top0
{
type kqRWallFunction;
value uniform 0.39;
}

top1
{
type kqRWallFunction;
value uniform 0.39;
}

top2
{
type kqRWallFunction;
value uniform 0.39;
}

ILR0
{
type cyclic;
}

ILR1
{
type cyclic;
}

OLR0
{
type cyclic;
}

OLR1
{
type cyclic;
}

CLR0
{
type cyclic;
}

CLR1
{
type cyclic;
}

FCLR0
{
type cyclic;
}

FCLR1
{
type cyclic;
}

center0
{
type kqRWallFunction;
value uniform 0.39;
}

center1
{
type kqRWallFunction;
value uniform 0.39;
}

fan
{
type kqRWallFunction;
value uniform 0.39;
}

}

// ************************************************** *********************** //

nut:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}

outlet
{
type calculated;
value uniform 0;
}

top0
{
type nutkWallFunction;
value uniform 0;
}

top1
{
type nutkWallFunction;
value uniform 0;
}

top2
{
type nutkWallFunction;
value uniform 0;
}

ILR0
{
type cyclic;
}

ILR1
{
type cyclic;
}

OLR0
{
type cyclic;
}

OLR1
{
type cyclic;
}

CLR0
{
type cyclic;
}

CLR1
{
type cyclic;
}

FCLR0
{
type cyclic;
}

FCLR1
{
type cyclic;
}

center0
{
type nutkWallFunction;
value uniform 0;
}

center1
{
type nutkWallFunction;
value uniform 0;
}

fan
{
type nutkWallFunction;
value uniform 0;
}

}

// ************************************************** *********************** //

Pressure:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
}

outlet
{
type fixedMeanValue;
meanValue 0;
value uniform 0;
}

top0
{
}

top1
{
}

top2
{
}

ILR0
{
type cyclic;
}

ILR1
{
type cyclic;
}

OLR0
{
type cyclic;
}

OLR1
{
type cyclic;
}

CLR0
{
type cyclic;
}

CLR1
{
type cyclic;
}

FCLR0
{
type cyclic;
}

FCLR1
{
type cyclic;
}

center0
{
}

center1
{
}

fan
{
}

}

// ************************************************** *********************** //

Velocity:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
top2
{
type fixedValue;
value uniform (0 0 0);
}
top1
{
type fixedValue;
value uniform (0 0 0);
}
top0
{
type fixedValue;
value uniform (0 0 0);
}

center1
{
type fixedValue;
value uniform (0 0 0);
}
center0
{
type fixedValue;
value uniform (0 0 0);
}

fan
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
}
inlet
{
type fixedValue;
value uniform (0 0 10.1846);
}
ILR0
{
type cyclic;
}
ILR1
{
type cyclic;
}
OLR0
{
type cyclic;
}
OLR1
{
type cyclic;
}
CLR0
{
type cyclic;
}
CLR1
{
type cyclic;
}

FCLR0
{
type cyclic;
}
FCLR1
{
type cyclic;
}

}

// ************************************************** *********************** //

 mostafa kamal September 29, 2019 17:58

hi sivakumar
1- about your question of the preprocessing tool i used ansys mesher to make the mesh
2-you said try to use first order upwind for turbulent quantities can you explain what do you mean?

3-i didn't calculate the yplus value that there is a problem in the simulation in openfoam
and if you mean the solution in fluent , i didn't check it

this is the boundary conditions files fvschemes and fvsolutions attached

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object Urel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 7.58 0);

boundaryField
{
upper
{
type SRFVelocity;
relative no; // changed to no
inletValue uniform (0 7.58 0);
value uniform (0 0 0);
}
inlet
{
type SRFVelocity;
relative no; // changed to no
inletValue uniform (0 7.58 0);
value uniform (0 0 0);
}
outlet
{
type pressureInletOutletVelocity;
value \$internalField;
}
{
type noSlip;
}
cyclic_half0
{
type cyclic;
}
cyclic_half1
{
type cyclic;
}
}

// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
upper
{
}
inlet
{
}
outlet
{
type fixedValue;
value uniform 0;
}
{
}
cyclic_half0
{
type cyclic;
}
cyclic_half1
{
type cyclic;
}
}

// ************************************************** *********************** //

the fvschemes and fvsolutions

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
}

{
default cellLimited leastSquares 1.0;
limited cellLimited leastSquares 1.0;
}

divSchemes
{
default none;
div(phi,Urel) Gauss linearUpwind limited;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,omega) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
}

laplacianSchemes
{
default Gauss linear limited 0.5;///
}

interpolationSchemes
{
default linear;
}

{
default limited 0.5; ///
}

wallDist
{
method meshWave;
}

// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}

"(Urel|k|epsilon|omega|R|nuTilda)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.1;
}
}

SIMPLE
{
consistent yes;
}

relaxationFactors
{
equations
{
p 0.3; ///
Urel 0.7;
k 0.7;
epsilon 0.7;
omega 0.7;
R 0.7;
nuTilda 0.7;
}
}

// ************************************************** *********************** //

at the end i will try the fvschemes and fvoptions and the boundary conditions you specified for me and i will tell you what happened with me

thank you very much for your response and i appreciate your help my friend

 mostafa kamal October 1, 2019 16:07

hi sivakumar

i tried the fvschemes and fvsolutions and the boundary conditions you wrote for me

i made some modifications i don't know if it is right or not you can tell me?
1- i just changed U to Urel
2- in pressure you said
outlet
{
type fixedMeanValue;
meanValue 0;
value uniform 0;
}

when i ran the simulation it gave me error so i changed it to
outlet
{
type fixedValue;
value uniform 0;
}

div(phi,R) Gauss upwind;
div(R) Gauss linear;////
div(phi,nuTilda) Gauss upwind;

you didn't write them so, are them right?

after that i ran the simulation at first the simulation was okay no divergence then at specific iteration it began to diverge ( time step continuty error was very large) and when i opened the results in paraview the results was very wrong