CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   fvschemes and fvsolutions in MRFSimpleFoam (http://www.cfd-online.com/Forums/openfoam-solving/70428-fvschemes-fvsolutions-mrfsimplefoam.html)

renyun0511 November 24, 2009 09:07

fvschemes and fvsolutions in MRFSimpleFoam
 
hi all,
i use MRFSimplefoam to study a centrifugal pump impeller study.the problem is :after several steps of iterations,i have a Floating exception error,due to the fast increase in epsilon and k values.during the calculation,i keep the fvschemes and fvsolutions unchanged,so i guess they maybe the cause to divergenced.

fvschemes:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

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

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

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}

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


fvsolutions:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p GAMG
{
tolerance 1e-8;
relTol 0.05;

smoother GaussSeidel;

cacheAgglomeration true;

nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;
};

U smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.1;
};

k smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.1;
};

epsilon smoothSolver
{
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-7;
relTol 0.1;
};
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

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

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

could you please tell me how can i resolve it?
thank you
yours jennifer


gwierink November 25, 2009 02:24

Hi Jennifer,

You could try to decrease the relaxation factor of k and epsilon and check that the time step is small enough.

renyun0511 November 25, 2009 07:37

thank you Gijs,
after i change the relaxation factor 0.25 for turbulence properties.0.5 for velocity,
0.1 for pressure,and it iterate more steps than before.but it divergenced at last ,also due to the fast increase in epsilon and k values.
appreciate!

jennifer

gwierink November 25, 2009 09:31

You're very welcome, glad to help. Another thing may be the number of cells in the coarsest level for the pressure solver. In the tutorials this is usually some low number because the grid is commonly good. If you have a more complex grid with some weird and/or skewed cells it works to increase that number, that is increase
Code:

nCellsInCoarsestLevel 20;
to e.g.
Code:

nCellsInCoarsestLevel 500;
But note that the number cannot be too high, then the solver will complain.

waynezw0618 November 25, 2009 10:28

Hi Renyun:
would you mind show me the information of last iteration ? i mean which one is first go to diverge.

renyun0511 November 25, 2009 22:30

Quote:

Originally Posted by waynezw0618 (Post 237696)
Hi Renyun:
would you mind show me the information of last iteration ? i mean which one is first go to diverge.

Hello Doctor Zhang wei,
the last iteration is as follows:
Time = 16

smoothSolver: Solving for Ux, Initial residual = 0.0146841, Final residual = 0.00071266, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00278712, Final residual = 0.00015971, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.000257914, Final residual = 3.3909e-06, No Iterations 2
GAMG: Solving for p, Initial residual = 4.86694e-06, Final residual = 1.07195e-07, No Iterations 2
time step continuity errors : sum local = 2.70395e+23, global = 8.88956e+22, cumulative = 8.88956e+22
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.00258025, No Iterations 2
bounding epsilon, min: -2.59328e+36 max: 9.99446e+45 average: 2.25125e+40
smoothSolver: Solving for k, Initial residual = 0.00087545, Final residual = 8.77668e-07, No Iterations 2
bounding k, min: -7.27788e+35 max: 2.9925e+38 average: 6.85609e+32
ExecutionTime = 575.49 s ClockTime = 588 s

after the 17th step ,it divergenced!
several days ago,i have a structured impeller meshed in CFX calculated by MRFSimpleFoam.but it divergenced again,so i guess there maybe something wrong with my setup,could you mind to help me?
regards!
renyun

stawrogin November 26, 2009 02:51

Hi Renyun,

I would try to start with simple Upwind for turbulence first:

So:
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss upwind;

And than switch to higher order schemes maybe later. But from my experience this is often not needed for turbulence to use higher order schemens, but of course for div(phi,U).

Also I think that in Simple alg. the underrelaxation for U+p should be "1". So maybe it helps to adapt the underrelaxation.

Hope this helps.

Stawrogin

gwierink November 26, 2009 02:52

Quote:

bounding epsilon, min: -2.59328e+36 max: 9.99446e+45 average: 2.25125e+40
smoothSolver: Solving for k, Initial residual = 0.00087545, Final residual = 8.77668e-07, No Iterations 2
bounding k, min: -7.27788e+35 max: 2.9925e+38 average: 6.85609e+32
Clearly epsilon and k explode. What are your initial and boundary conditions for epsilon and k?

renyun0511 November 26, 2009 03:55

http://www.cfd-online.com/Forums/C:\...9;名.pnghello Gijs,
the epsilon and k initial values are:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0.45;

boundaryField
{
wall
{
type zeroGradient;
}
Outlet
{
type zeroGradient;
}
Inlet
{
type fixedValue;
value uniform 0.45;
}
}


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

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

internalField uniform 0.09;

boundaryField
{
wall
{
type zeroGradient;
}
Outlet
{
type zeroGradient;
}
Inlet
{
type fixedValue;
value uniform 0.09;
}
}

by the way,the values of k and epsilon calculate by the following eaquations:


gwierink November 26, 2009 04:20

Hi Renyun,

Usually it helps to have the k and epsilon values for the internalField lower (by, say, a factor of 10) than the inlet values. Also, I'd try to play a bit with the schemes, as stawrogin suggests.

renyun0511 November 26, 2009 21:09

Quote:

Originally Posted by stawrogin (Post 237765)
Hi Renyun,

I would try to start with simple Upwind for turbulence first:

So:
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss upwind;

And than switch to higher order schemes maybe later. But from my experience this is often not needed for turbulence to use higher order schemens, but of course for div(phi,U).

Also I think that in Simple alg. the underrelaxation for U+p should be "1". So maybe it helps to adapt the underrelaxation.

Hope this helps.

Stawrogin

Thank you very much Stawrogin,
i can continue the calculation after adopting your advice.As you known,the problem has puzzled me since two months ago.it is indeed a good news to me that it's not divergenced again!i am extremely grateful to you,and to all people helped me.
and there are some problem :
1.the original divSchemes set is:
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

i don't know the difference between Gauss upwind and Gauss limitedLinear.why is Gauss?and which in Fluent is one/two order upwind(i know).
2.in Simple alg. why the underrelaxation for U+p should be "1"? the following i changed is:
relaxationFactors
{
p 0.3;
U 0.5;
k 0.5;
epsilon 0.5;
}


yours

jennifer
appreciate!

kurne May 17, 2011 02:48

1 Attachment(s)
Dear 任芸

I am facing similar problem what u have face and mentioned here.

I have followed the guidance mentioned by stawrogin but still i am facing same problem.Will u please guide me.

I have attached my fvschemes & fvsolutions here.Please Help.

Will you please help me.

aldo.iannetti June 25, 2011 06:36

MRFSimpleFoam divergence
 
3 Attachment(s)
Quote:

Originally Posted by gwierink (Post 237689)
You're very welcome, glad to help. Another thing may be the number of cells in the coarsest level for the pressure solver. In the tutorials this is usually some low number because the grid is commonly good. If you have a more complex grid with some weird and/or skewed cells it works to increase that number, that is increase
Code:

nCellsInCoarsestLevel 20;
to e.g.
Code:

nCellsInCoarsestLevel 500;
But note that the number cannot be too high, then the solver will complain.

Hi,
I'm facing an issue using MRFSimpleFoam simulting a centrifugal pump, I see the divergence just when the residual seem to come low enough to think to be out of problems, have a kook to the image, (p residual is missing but it behaves just like the others). The divergence occurs within 2 iteration only and I'm not able to understand which field causes the problem, here attached fvSchemes and fvSolution.
Thanks

Aldo

alberto June 26, 2011 02:55

2 Attachment(s)
Quote:

Originally Posted by aldo.iannetti (Post 313522)
Hi,
I'm facing an issue using MRFSimpleFoam simulting a centrifugal pump, I see the divergence just when the residual seem to come low enough to think to be out of problems, have a kook to the image, (p residual is missing but it behaves just like the others). The divergence occurs within 2 iteration only and I'm not able to understand which field causes the problem, here attached fvSchemes and fvSolution.
Thanks

Aldo

I would suggest to the attached setup. If you have problems with it, try to run first a laminar simulation, to understand if the turbulence model is giving you troubles.

Also, run checkMesh on your grid to check its quality.

Best,

aldo.iannetti June 26, 2011 04:02

MRFSimpleFoam issue
 
1 Attachment(s)
Quote:

Originally Posted by alberto (Post 313594)
I would suggest to the attached setup. If you have problems with it, try to run first a laminar simulation, to understand if the turbulence model is giving you troubles.

Also, run checkMesh on your grid to check its quality.

Best,

OK,
Here attached the set-up files, I've tried to remesh the domain and (since the last post was about a GGI interface mesh using OpenFOAM 1.6 ext) tried to use OF 1.7.1 without GGI (even if I need it for the next simulations). Now I'm facing convergence but with a very strange problem: I see that the solutor has imposed a 0 velocity in the inlet BC even if I set up a 3.9 m/s vel.
1) Why is that?
2) Can I set up different BC?
3) Have I miss something?
4) Can GGI be the cause of the sudden divergence I mentioned in the last post? (checking GGI mesh had no problem)

Thanks
Aldo

alberto June 26, 2011 04:18

From your figure, it seems you impose U tangentially at the inlet, since the inlet seems parallel to z, and your velocity at the inlet is parallel to z.

Also, the case is not complete. I do not have experience with GGI, so I cannot answer to the rest.

Best,

aldo.iannetti June 26, 2011 04:27

Quote:

Originally Posted by alberto (Post 313599)
From your figure, it seems you impose U tangentially at the inlet, since the inlet seems parallel to z, and your velocity at the inlet is parallel to z.

Also, the case is not complete. I do not have experience with GGI, so I cannot answer to the rest.

Best,

I just had a look to the case and I'm sure the inlet is perpendicular to the z axis and I've imposed a +z velocity of 3.9 m/s. Do You think using a mass flow inlet BC would be lucky enough to ensure the velocity at inlet of 3.9 m/s? Why can't it keep the velocity I've imposed? Is it allowed to do that?

alberto June 26, 2011 04:36

Hi,

no, with a fixedValue BC, the code does not change the BC at all. You probably have some problem elsewhere.

P.S. If you look at the figure WaterPump.jpg in your attachment, the inlet does not seem perpendicular to z. :-)

renyun0511 June 26, 2011 20:42

Quote:

Originally Posted by aldo.iannetti (Post 313597)
OK,
Here attached the set-up files, I've tried to remesh the domain and (since the last post was about a GGI interface mesh using OpenFOAM 1.6 ext) tried to use OF 1.7.1 without GGI (even if I need it for the next simulations). Now I'm facing convergence but with a very strange problem: I see that the solutor has imposed a 0 velocity in the inlet BC Aldo

hi aldo,
From the picture of your pump model and the setup of your case, i guess may your problem is that you ingored the setup of GGI. The rotating impeller and stationary volute need to be coupled and GGI does work.
Additionally, the residuals seem not converged. so i suggest you can reset your fvsolution file.
eg.
relaxationFactors
{
p 0.5;
U 0.5;
k 0.3;
epsilon 0.3;
}
Good luck!

suh August 1, 2011 08:35

hi foamers,

please tell me that is ggi boundary conditions work with OF 1.7.1?

and for my pump case i am converting star ccm+ mesh file i.e. .ccm file. There is one wrongOrientedFace while doing checkMesh. if anybody know how to solve this then help me.

or what are the precaustions to be taken while importing ccm+ file to OF 1.7.1. to useful for MRFSimpleFoam?


All times are GMT -4. The time now is 11:27.