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

convergence with simple foam and different fvSchemes

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By maddalena

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2011, 10:04
Default convergence with simple foam and different fvSchemes
  #1
New Member
 
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16
subhkirti is on a distinguished road
Hi,

I am trying to simulate flow through a valve, with one inlet and one outlet. I have to calculate the pressure drop across the valve for different flowrates, and compare it with experimental values. The flow is turbulent. I am using k-epsilon model and simple foam solver for incompressible fluid. i run the calculation in two parts, which are as follows:

1. in the first part, the fvSchemes directory is the following, which is run for the first 700 steps.

ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
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;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(U) linear;
}
snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}

In the second part of the calculation, I switch from Gauss upwind to Gauss linear limitedV 0.3 for div (phi, U) case, with everything else being the same, and run it from 700 to 1200 time steps.

The problem is that for lower flowrates (of the order of 75-100 L/min), both the schemes gives good results. However, as I increase the flow rate (250-350 L/min), for the Gauss upwind, the convergence of the residuals is quite good, but when I switch it to linear limited, the solution blows up completely. Can somebody tell me why it is happening and what is the solution?

I have attached the fvSolution and checkMesh with this thread.
Attached Files
File Type: pdf fvSolution.pdf (22.4 KB, 104 views)
File Type: pdf checkMesh.pdf (20.7 KB, 48 views)
__________________
Thanks,
subhkirti is offline   Reply With Quote

Old   July 20, 2011, 10:44
Default
  #2
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello,
first of all, I suggest you to check where the solution diverges. Try to look at your pressure and turbulence fields a little bit before than everything blows away. Maybe check local residual as well. I have the feeling that something is going wrong on your high skew cells.
The reason your first setup reach convergence is that you select more diffusive schemes in comparison of the second setup. Whit a diffusive scheme, convergence is easier but the results may be less accurate.
In my opinion, a good point where to start for you is this thread: http://www.cfd-online.com/Forums/ope...ime-steps.html There is for sure something more / something better on the forum, but I started this discussion and found it really really useful. Note that it is based on a simpleFoam case, k-epsilon model...


mad
maddalena is offline   Reply With Quote

Old   July 20, 2011, 11:21
Default
  #3
New Member
 
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16
subhkirti is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hello,
first of all, I suggest you to check where the solution diverges. Try to look at your pressure and turbulence fields a little bit before than everything blows away. Maybe check local residual as well. I have the feeling that something is going wrong on your high skew cells.
The reason your first setup reach convergence is that you select more diffusive schemes in comparison of the second setup. Whit a diffusive scheme, convergence is easier but the results may be less accurate.
In my opinion, a good point where to start for you is this thread: http://www.cfd-online.com/Forums/ope...ime-steps.html There is for sure something more / something better on the forum, but I started this discussion and found it really really useful. Note that it is based on a simpleFoam case, k-epsilon model...


mad
Hi Maddalena,

Thanks for the answer. My solution blows up in the first 30-40 steps of the second part. I post here the last steps of the calculation

Quote:
Time = 735

smoothSolver: Solving for Ux, Initial residual = 0.00965189, Final residual = 5.14321e-05, No Iterations 5
smoothSolver: Solving for Uy, Initial residual = 0.00837934, Final residual = 7.90316e-05, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.0445022, Final residual = 0.000311572, No Iterations 4
GAMG: Solving for p, Initial residual = 0.0541841, Final residual = 3.88467e-05, No Iterations 8
time step continuity errors : sum local = 0.00359806, global = 2.96172e-07, cumulative = 1.22094e-05
smoothSolver: Solving for epsilon, Initial residual = 0.0928888, Final residual = 0.000873298, No Iterations 2
bounding epsilon, min: -1.66046e+06 max: 9.08848e+08 average: 4536.71
smoothSolver: Solving for k, Initial residual = 0.0785617, Final residual = 9.86185e-05, No Iterations 3
bounding k, min: -19.9142 max: 6788.27 average: 0.957605
ExecutionTime = 180.84 s ClockTime = 198 s

Time = 736

smoothSolver: Solving for Ux, Initial residual = 0.183561, Final residual = 0.00122553, No Iterations 5
smoothSolver: Solving for Uy, Initial residual = 0.19768, Final residual = 0.00157063, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.281635, Final residual = 0.00178725, No Iterations 5
GAMG: Solving for p, Initial residual = 0.0550844, Final residual = 4.40689e-05, No Iterations 8
time step continuity errors : sum local = 0.00412469, global = -5.98303e-06, cumulative = 6.22638e-06
smoothSolver: Solving for epsilon, Initial residual = 0.257892, Final residual = 0.00158647, No Iterations 2
bounding epsilon, min: -174996 max: 1.1559e+09 average: 5931.52
smoothSolver: Solving for k, Initial residual = 0.0845198, Final residual = 0.000118427, No Iterations 3
bounding k, min: -18.8464 max: 7994.82 average: 0.989789
ExecutionTime = 186.5 s ClockTime = 204 s

Time = 737

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.00955122, No Iterations 6
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.00802006, No Iterations 5
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.00502654, No Iterations 7
GAMG: Solving for p, Initial residual = 0.95387, Final residual = 0.000654885, No Iterations 13
time step continuity errors : sum local = 2.43328e+11, global = 4.7337e+08, cumulative = 4.7337e+08
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0026821, No Iterations 3
bounding epsilon, min: -2.25487e+18 max: 2.91594e+19 average: 1.21489e+14
smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.00910186, No Iterations 2
bounding k, min: -2.05737e+15 max: 1.88511e+16 average: 1.73861e+11
ExecutionTime = 193.34 s ClockTime = 211 s

Time = 738

smoothSolver: Solving for Ux, Initial residual = 0.798909, Final residual = 0.00404027, No Iterations 5
smoothSolver: Solving for Uy, Initial residual = 0.614444, Final residual = 0.00505063, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.619835, Final residual = 0.00578235, No Iterations 4
GAMG: Solving for p, Initial residual = 1, Final residual = 0.000615471, No Iterations 38
time step continuity errors : sum local = 1.49895e+10, global = 2.51843e+09, cumulative = 2.9918e+09
smoothSolver: Solving for epsilon, Initial residual = 0.151145, Final residual = 4.95434e-08, No Iterations 1
bounding epsilon, min: -1.02592e+28 max: 1.91095e+31 average: 2.11506e+26
smoothSolver: Solving for k, Initial residual = 0.973271, Final residual = 0.0020885, No Iterations 3
bounding k, min: -1.55594e+26 max: 2.85546e+28 average: 3.85266e+23
ExecutionTime = 205.63 s ClockTime = 223 s
As you can see, the time step continuity errors and the bounding k and epsilon grows to a very large value. Can you tell me how to check the local residuals?

I will try to run the simulation again with a change of mesh to reduce the number of skew faces and post the results here.

Is it ok to start the simulation straight with the higher order scheme that gauss upwind? Can you throw some light on how the solution varies, and what should be the best way to approach a good solution?
__________________
Thanks,
subhkirti is offline   Reply With Quote

Old   July 20, 2011, 11:26
Default
  #4
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by subhkirti View Post
Can you tell me how to check the local residuals?
Is it ok to start the simulation straight with the higher order scheme that gauss upwind? Can you throw some light on how the solution varies, and what should be the best way to approach a good solution?
Please, check the thread I quoted above. All these questions have answer there.

mad
maddalena is offline   Reply With Quote

Old   July 20, 2011, 12:01
Default
  #5
New Member
 
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16
subhkirti is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Please, check the thread I quoted above. All these questions have answer there.

mad
Ok . i was a getting a little impatient with my results not turning out nicely.
__________________
Thanks,
subhkirti is offline   Reply With Quote

Old   July 20, 2011, 12:09
Default
  #6
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by subhkirti View Post
Ok . i was a getting a little impatient with my results not turning out nicely.
this is the worst thing you can do in CFD!

mad
tareqkh likes this.
maddalena is offline   Reply With Quote

Old   July 20, 2011, 12:13
Default
  #7
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 18
FelixL is on a distinguished road
Just a thought here:

Is your flow separating somewhere inside your domain? Maybe at those higher mass flow rates where your case is diverging.
It's possible that the higher resolution schemes capture a flow separation near the outflow area of your domain which might cause partial inflow there and thus the divergence.

Stop your simulation say 20 steps after you changed your numerical schemes and have a look at your flowfield to get an idea.


Greetings,
Felix.
FelixL is offline   Reply With Quote

Old   July 21, 2011, 03:32
Default
  #8
New Member
 
CFD user
Join Date: Apr 2010
Location: Germany
Posts: 28
Rep Power: 16
subhkirti is on a distinguished road
Quote:
Originally Posted by FelixL View Post
Just a thought here:

Is your flow separating somewhere inside your domain? Maybe at those higher mass flow rates where your case is diverging.
It's possible that the higher resolution schemes capture a flow separation near the outflow area of your domain which might cause partial inflow there and thus the divergence.

Stop your simulation say 20 steps after you changed your numerical schemes and have a look at your flowfield to get an idea.


Greetings,
Felix.
Thanks Felix. I will have a look as per your suggestion and let you know, if there is anything going absurd.
__________________
Thanks,
subhkirti is offline   Reply With Quote

Reply

Tags
gaussdivschemes


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



All times are GMT -4. The time now is 20:10.