CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   no convergence with simplefoam (http://www.cfd-online.com/Forums/openfoam/99182-no-convergence-simplefoam.html)

 hei@ge March 28, 2012 00:15

no convergence with simplefoam

Everyone,i use simplefoam with standard k-epsilon model to calculate the wind farm.when i type the command "simpleFoam",i get the following information:Create mesh for time = 0

--> FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /opt/openfoam210/src/OpenFOAM/lnInclude/Field.C at line 262
Reading "/root/OpenFOAM/root-2.1.0/run/tutorials/incompressible/simpleFoam/wf39/0/U::boundaryField::inlet" from line 37 to line 16
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.028;
C1 1.5;
C2 1.92;
C3 -0.33;
sigmak 1;
sigmaEps 2.51;
Prt 1;
}

No field sources present

SIMPLE: convergence criteria
field p tolerance 0.001
field U tolerance 0.001
field "(k|epsilon)" tolerance 0.001

Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.00644545010997, No Iterations 3
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.00464444535134, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.00708579374941, No Iterations 5
GAMG: Solving for p, Initial residual = 1, Final residual = 0.00735995074387, No Iterations 5
GAMG: Solving for p, Initial residual = 0.000167838426709, Final residual = 1.56259657312e-06, No Iterations 6
GAMG: Solving for p, Initial residual = 2.2891470536e-05, Final residual = 1.89675102907e-07, No Iterations 4
GAMG: Solving for p, Initial residual = 4.86359414644e-06, Final residual = 4.25624108873e-08, No Iterations 4
time step continuity errors : sum local = 3.77016513754e-08, global = -7.42217873687e-09, cumulative = -7.42217873687e-09
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.00132760727343, No Iterations 2
smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.00285899835651, No Iterations 2
bounding k, min: 0 max: 50.8029155486 average: 1.44150802022
ExecutionTime = 126.62 s ClockTime = 141 s

Time = 2

smoothSolver: Solving for Ux, Initial residual = 0.446656785658, Final residual = 0.00197538615297, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.143272919974, Final residual = 0.000770220501008, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.159528815298, Final residual = 0.00142906124564, No Iterations 2
GAMG: Solving for p, Initial residual = 0.374485256388, Final residual = 0.00336921418749, No Iterations 6
GAMG: Solving for p, Initial residual = 0.00020659453246, Final residual = 1.28186320376e-06, No Iterations 7
GAMG: Solving for p, Initial residual = 5.21634568919e-05, Final residual = 4.89086468001e-07, No Iterations 4
GAMG: Solving for p, Initial residual = 1.85185182451e-05, Final residual = 7.29808804296e-08, No Iterations 5
time step continuity errors : sum local = 5.23267147276e-08, global = -9.14582863274e-09, cumulative = -1.65680073696e-08
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"
#7
at /opt/openfoam210/applications/solvers/incompressible/simpleFoam/simpleFoam.C:66
#8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#9
in "/opt/openfoam210/platforms/linuxGccDPOpt/bin/simpleFoam"

 hei@ge March 28, 2012 00:40

my fvsolution is:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.01;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}

k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}

epsilon
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 3;

residualControl
{
p 1e-3;
U 1e-3;
"(k|epsilon)" 1e-3;
}
}

relaxationFactors
{
fields
{
p 0.2;
}
equations
{
U 0.7;
k 0.7;
epsilon 0.7;
}
}

cache
{
}

// ************************************************** *********************** //
my fvschemes is:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
}

{
default Gauss linear;
}

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

laplacianSchemes
{
default Gauss linear limited 0.333;
}

interpolationSchemes
{
default linear;
}

{
default limited 0.333;
}

fluxRequired
{
default no;
p;
}

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

 lovecraft22 March 28, 2012 05:22

Don't know if it may cause the issue, but, as the error says, you're missing the word "uniform" in your U conditions.
I would start by correcting that.

 hei@ge March 28, 2012 05:48

Thanks for your reply.I think it is just a warning and it should not the reason for my problem.Because i can calculate well in the other case with the warning.

 stawrogin March 28, 2012 06:44

Hi,
if you are sure that your BCs are okay for U (you can check in paraview) I would try to stabilize the first iterations by using a cellLimited grad schemes and setting the relaxation factors for k and eps to 05. or 0.4

Best regards

Stawrogin

 hei@ge March 28, 2012 07:03

 hei@ge March 28, 2012 07:05

which solver for p,u,k,epsilon should i choose?

 hei@ge March 28, 2012 07:19

when i use cellLimited,there gives me the following error:--> FOAM FATAL IO ERROR:

8
(
Gauss
cellLimited
cellMDLimited
extendedLeastSquares
faceLimited
faceMDLimited
fourth
leastSquares
)

From function gradScheme<Type>::New(const fvMesh& mesh, Istream& schemeData)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/gradScheme.C at line 54.

FOAM exiting

 stawrogin March 28, 2012 09:01

Hi
I would try:

{
default cellLimited Gauss linear 1;
}

Stawrogin

 hei@ge March 28, 2012 10:01

 kalyangoparaju March 28, 2012 11:06

Hi,

When you used cellLimited Gauss linear 1; what do you mean it failed. Did it fail to even start or did it fail to converge like before?

And also, is there a reason for using limited scheme for sngrad and laplacian terms?

Kalyan

 hei@ge March 28, 2012 20:19

it fail to converge like before.i make some changes,and it convergence.But i do not know the output is right or not.when i solve my problem,i will share my experience.

 hei@ge March 29, 2012 21:42

The following is my case files:https://dl-web.dropbox.com/u/69253136/system/fvSchemes
https://dl-web.dropbox.com/u/69253136/system/fvSolution
https://dl-web.dropbox.com/u/69253136/0/epsilon
https://dl-web.dropbox.com/u/69253136/0/k
https://dl-web.dropbox.com/u/69253136/0/nut
https://dl-web.dropbox.com/u/69253136/0/p
https://dl-web.dropbox.com/u/69253136/0/U
The problems I am now facing with are as following:first,when it calculate to the time=353,it occure noconvergence;second,I sample same points's value of velocity,i am sure they are wrong.I only change the files of fvsolution and fvschemes.please give me some advice to correct them.

 Tobi May 22, 2012 08:28

Hi,

your breakup is coused by the turbulence model!
Code:

```bounding k, min: 0 max: 50.8029155486 average: 1.44150802022 ExecutionTime = 126.62 s ClockTime = 141 s```
bounding is not very "good" it can appear in the simulation but should stabilize while running your case.
But you have a problem with your model:
Code:

`#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so"`
Well maybe you`ve wrong BC or completely unrealistic values for k?
I would have a look at that be for trying to change the schemes!
I think you `ve got a BC-problem. If you are not sure, save your first time step and have a look at the results. There you should see where your peaks are (k, espilon, p, U ...) - maybe there is a mesh problem at all?

I would give you the advice to correct the "uniform" error. Well maybe its not a problem but you should set the files for OF correct.

Tobi

PS: Solver for k, eps.... PBiCG -- have a look at the tutorials pitzDaily

 linnemann May 22, 2012 08:34

please give the same info as in

http://www.cfd-online.com/Forums/ope...-get-help.html

It will help

 All times are GMT -4. The time now is 00:28.