CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

fvschemes and fvsolutions in MRFSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2009, 10:07
Default fvschemes and fvsolutions in MRFSimpleFoam
  #1
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
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

renyun0511 is offline   Reply With Quote

Old   November 25, 2009, 03:24
Default
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Jennifer,

You could try to decrease the relaxation factor of k and epsilon and check that the time step is small enough.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 25, 2009, 08:37
Default
  #3
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
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
renyun0511 is offline   Reply With Quote

Old   November 25, 2009, 10:31
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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.
kiddmax and bennn like this.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 25, 2009, 11:28
Default
  #5
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi Renyun:
would you mind show me the information of last iteration ? i mean which one is first go to diverge.
waynezw0618 is offline   Reply With Quote

Old   November 25, 2009, 23:30
Default
  #6
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
Quote:
Originally Posted by waynezw0618 View Post
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
renyun0511 is offline   Reply With Quote

Old   November 26, 2009, 03:51
Default
  #7
Member
 
Join Date: Nov 2009
Posts: 36
Rep Power: 17
stawrogin is on a distinguished road
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
stawrogin is offline   Reply With Quote

Old   November 26, 2009, 03:52
Default
  #8
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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?
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 26, 2009, 04:55
Default
  #9
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
hello 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:


Last edited by renyun0511; November 26, 2009 at 07:38.
renyun0511 is offline   Reply With Quote

Old   November 26, 2009, 05:20
Default
  #10
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   November 26, 2009, 22:09
Smile
  #11
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
Quote:
Originally Posted by stawrogin View Post
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!
renyun0511 is offline   Reply With Quote

Old   May 17, 2011, 03:48
Default
  #12
Member
 
Kurne
Join Date: Aug 2010
Location: Pune, INDIA
Posts: 88
Rep Power: 16
kurne is on a distinguished road
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.
Attached Files
File Type: gz schemes.tar.gz (897 Bytes, 21 views)
__________________
Simulation Is Determination Of Imagination Towards Approximation ®


Best Regards

Mubeen K Kurne
kurne is offline   Reply With Quote

Old   June 25, 2011, 07:36
Default MRFSimpleFoam divergence
  #13
Member
 
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16
aldo.iannetti is on a distinguished road
Quote:
Originally Posted by gwierink View Post
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
Attached Images
File Type: jpg Immagine.jpg (56.6 KB, 73 views)
Attached Files
File Type: txt fvSchemes.txt (2.0 KB, 47 views)
File Type: txt fvSolution.txt (1.9 KB, 37 views)
aldo.iannetti is offline   Reply With Quote

Old   June 26, 2011, 03:55
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by aldo.iannetti View Post
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,
Attached Files
File Type: txt fvSchemes.txt (1.7 KB, 107 views)
File Type: txt fvSolution.txt (1.8 KB, 90 views)
bennn likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 26, 2011, 05:02
Default MRFSimpleFoam issue
  #15
Member
 
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16
aldo.iannetti is on a distinguished road
Quote:
Originally Posted by alberto View Post
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
Attached Files
File Type: zip Case.zip (67.7 KB, 30 views)
aldo.iannetti is offline   Reply With Quote

Old   June 26, 2011, 05:18
Default
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
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,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 26, 2011, 05:27
Default
  #17
Member
 
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16
aldo.iannetti is on a distinguished road
Quote:
Originally Posted by alberto View Post
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?
aldo.iannetti is offline   Reply With Quote

Old   June 26, 2011, 05:36
Default
  #18
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
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. :-)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 26, 2011, 21:42
Default
  #19
Member
 
任芸
Join Date: Jun 2009
Posts: 75
Rep Power: 17
renyun0511 is on a distinguished road
Quote:
Originally Posted by aldo.iannetti View Post
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!
renyun0511 is offline   Reply With Quote

Old   August 1, 2011, 09:35
Default
  #20
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 21
Rep Power: 15
suh is on a distinguished road
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?
suh is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
General help for fvSchemes and fvSolution settings harly OpenFOAM Running, Solving & CFD 4 September 7, 2009 11:31


All times are GMT -4. The time now is 23:24.