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

Oscillating Residuals (with picture)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes
  • 1 Post By flotus1
  • 1 Post By flotus1
  • 1 Post By diamondx
  • 1 Post By oj.bulmer
  • 3 Post By oj.bulmer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2013, 09:12
Default Oscillating Residuals (with picture)
  #1
New Member
 
Pete Drum
Join Date: Sep 2012
Posts: 6
Rep Power: 13
fluent_beiyo is on a distinguished road
Hi guys,
iam doing a wind flow velocity analysis around a building as a project for college (->external flow). As I said in the title, i have an issue with oscillating residuals.

I meshed the system with tets and generated 10 boundary layers around the building. Number of elements is about 1.8 *10^6. I made the enveloping body as big as described in the ANSYS tutorials.

As Inlet andOutlet I used velocity inlet and pressure outlet.
The turbulence model is a k-epsilon with realizable and enhanced wall treatment. The wind velocity at the inlet is 8 m/s.

furhtermore, I defined SIMPLE and everything alse as second-order. Y+ is about 200.
I didnt change any of the URF's. There are no mesh warnings, if I check the mesh in the solver. solver is pressure-based and I defined steady state.

thats how it looks after 5000 iterations:


Uploaded with ImageShack.us


any ideas how to solve this problem?

thank you!

regards
fluent_beiyo is offline   Reply With Quote

Old   March 22, 2013, 10:26
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Some things you can try:
  • check the turbulence values at the inlet
  • make sure your model has the right dimensions
  • lower under relaxation factors for pressure and momentum
  • deactivate the realizable option of the k-epsilon turbulence model
  • use first order interpolation schemes
  • use a mesh with lower Y+
  • post a picture of the setup here
  • ...
  • many other things
  • ...
  • run a LES instead of the RANS approach because of the dominant transient influence on the flow
Phanindra Raavi likes this.
flotus1 is offline   Reply With Quote

Old   March 22, 2013, 10:35
Thumbs up
  #3
New Member
 
Pete Drum
Join Date: Sep 2012
Posts: 6
Rep Power: 13
fluent_beiyo is on a distinguished road
Hey flotus1, thanks for your answer.I will try that for sure.

But I have two questions about your suggestions:
1. Why would you deactivate the realizable option? I thought it generates more accurate results than the other options.

2. Could you explain how I can check the turbulence values at the inlet in a more detailed way?

thank you : )
regards
fluent_beiyo is offline   Reply With Quote

Old   March 22, 2013, 10:44
Default
  #4
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
The realizable option may produce better approximations of the flow in some cases.
But if the solution doesnt converge with this option, then in my opinion the standard k-epsilon formulation still is better.
We experienced similar convergence problems for the external flow around blunt bodies with the realizable option.
The k-omega SST model might also be an alternative worth trying.

Since you get warnings about the turbulent viscosity ratio limited in many cells, you should make sure that you didnt set unreasonably high values at the inlet.
Yet it is more probable that the warning comes from cells in the wake region of the building.
Phanindra Raavi likes this.
flotus1 is offline   Reply With Quote

Old   March 22, 2013, 11:09
Default
  #5
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 28
diamondx will become famous soon enough
if you can provide us with some picture of your mesh ...
Phanindra Raavi likes this.
__________________
Regards,
New to ICEM CFD, try this document --> https://goo.gl/KAOIwm
Ali
diamondx is offline   Reply With Quote

Old   March 22, 2013, 11:37
Default
  #6
New Member
 
Pete Drum
Join Date: Sep 2012
Posts: 6
Rep Power: 13
fluent_beiyo is on a distinguished road
Thanks for your answers. I will upload some pictures of my mesh wehn Im at home.

regards
fluent_beiyo is offline   Reply With Quote

Old   March 25, 2013, 06:24
Default
  #7
New Member
 
Pete Drum
Join Date: Sep 2012
Posts: 6
Rep Power: 13
fluent_beiyo is on a distinguished road
Hi again,
I gave it another try with the recommended options (realizable off, reduced URFs (momentum from 0.7 to 0.6 and pressure from 0.3 to 0.2), started with frist order then switched to second order when it converged, )
Result is looking way better than before, but there are still some jumps in the residuals. Another problem is the area weighted average velocity. It is oscillating very much. Any Ideas what I could do to obtain good results?


Picture:


Uploaded with ImageShack.us

thank you!

PS:Sorry for not uploading a picture of the mesh. I will do that today evening.
fluent_beiyo is offline   Reply With Quote

Old   March 25, 2013, 07:05
Default
  #8
Member
 
Thiagu
Join Date: Oct 2012
Location: India
Posts: 60
Rep Power: 13
jthiakz is on a distinguished road
Good progress. But need the picture of your setup.
comments
# Area weg. avg velocity @ which location ?
# how about the overall mesh distribution
# mesh distribution in wake region (where the velocity gradients are more)
# for extenal flow one equation (spalart allmaras) model is preferred , but i'm not sure check in fluent recommendation.
# how close the BCs and object (buliding)
jthiakz is offline   Reply With Quote

Old   March 25, 2013, 13:26
Default
  #9
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Since you could afford 5000 Iterations in the first run, you can decrease the URFs further (0.7 to 0.6 doesnt make much difference).

I recommend 0.3-0.2 for momentum and 0.1 for pressure.
Additionally, you should use a first order upwind scheme for the momentum discretization. If the solution converges, you can still switch to second order from this initialization.
flotus1 is offline   Reply With Quote

Old   March 27, 2013, 11:52
Default
  #10
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 19
oj.bulmer will become famous soon enough
Quote:
started with frist order then switched to second order when it converged
Are you sure this is converged? I see a lot of fluctuation in your area-average velocities. And residuals are not monotonical.

Quote:
for extenal flow one equation (spalart allmaras) model is preferred
Spalart–Allmaras model only solves Euler equations, instead of Navier-Stokes equations. This assumes that the viscous effects of the fluid are nullified by intertial effects (typically at very high velocities). For moderate flow rates around buildings, such assumption can prove to be significant and hence unreasonable. Although, this can be used to initialise the solution.

It may help to use first order scheme and k-epsilon model untill you see some stability. Both of these induce a much-needed diffusion to stabilise the turbulent instabilities in the initial part of solution. Once you see some stability, you can switch to second order. Also, you can explore the blended factor and choose the order of accuracy for momentum between 1 and 2(say 1.5). This should help in smooth convergence. Also, try FMG initialisation, to see if it helps.

Additionally, it is a thumb-rule to keep the addition of URFs for pressure and momentum as 1 for SIMPLE based schemes. But this is not always possible every time, as perhaps is the case here.
wc34071209 likes this.
oj.bulmer is offline   Reply With Quote

Old   March 27, 2013, 12:11
Default
  #11
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Quote:
Originally Posted by oj.bulmer View Post
Additionally, it is a thumb-rule to keep the addition of URFs for pressure and momentum as 1 for SIMPLE based schemes. But this is not always possible every time, as perhaps is the case here.
I also heard of this rule, but until today, I havent come across any reasonable explanation why it should be valid. Do you know more about this?
When I reduce the URFs, i reduce both pressure and momentum simultaneously and never got into trouble because they didnt add to 1.

Quote:
Also, you can explore the blended factor
There is a blending factor for the order of the momentum discretization in Fluent? I thought only CFX has this. Where can I find it and in which version?

Quote:
started with frist order then switched to second order when it converged
Totally overlooked this line. Yet oj.bulmer is right, the first order solution is still far from being converged. You will need to run this for more iterations.
flotus1 is offline   Reply With Quote

Old   March 28, 2013, 16:58
Default
  #12
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 19
oj.bulmer will become famous soon enough
Quote:
I also heard of this rule, but until today, I havent come across any reasonable explanation why it should be valid. Do you know more about this?
Care for some theory? And yea, patience, this is exhaustive and enough to give good LATEX practice

Peric (Computational Methods for Fluid Dynamics) outlined an elaborate proof of this. The momentum equation can be represented as:

A_P^{u_i} u^{n+1}_{i,P} - \sum A_l^{u_i} u^{n+1}_{i,l}=  Q^{n+1}_{u_i} - \left(    \frac{{\delta p^{n+1}}} { {\delta x_i} }\right)_P (1)

P being the point of interest and l being neighbouring points.

For m coefficient loops withing each timestep in SIMPLE solver, source matrices are updated as:

A_P^{u_i} u^{m*}_{i,P} - \sum A_l^{u_i} u^{m*}_{i,l}=  Q^{m-1}_{u_i} - \left(    \frac{{\delta p^{m-1}}} { {\delta x_i} }\right)_P (2)

u^{m* } is latest coefficient loop value of u.

Above equation can be written as:

u^{m*}_{i,P} = \frac{ \sum A_l^{u_i} u^{m*}_{i,l} + Q^{m-1}_{u_i}}{A_P^{u_i} } - \frac{1}{A_P^{u_i} } \left(    \frac{{\delta p^{m-1}}} { {\delta x_i} }\right)_P (3)

Or,

u^{m*}_{i,P} = \tilde{u}^{m* }- \frac{1}{A_P^{u_i} } \left(    \frac{{\delta p^{m-1}}} { {\delta x_i} }\right)_P (4)

where \frac{ \sum A_l^{u_i} u^{m*}_{i,l} + Q^{m-1}_{u_i}}{A_P^{u_i} } = \tilde{u}^{m* }

Thus we build Poisson equation for pressure and obtain u^{m*} that satisfies continuity equation but not momentum equation nor does the pressure. We define u', p' as {u_i} ^{m}={u_i} ^{m*}+ u', p = p^{m-1} + p' (5)

The momentum equation thus becomes:

u'_{i,P} =  \tilde{u}'_{i,P} - \frac{1}{A_P^{u_i} } \left( \frac{\delta p'} {\delta x_i} \right)_P (6)

We now solve for pressure correction. It can be shown with some mathematics that


\tilde{u}'_{i,P} =  u'_{i,P} \frac{ \sum A_l^{u_i}} { A_P^{u_i}} (7)

In SIMPLE, we omit \tilde{u}'_{i,P} and write :

u'_{i,P} =  - \frac{1}{A_P^{u_i} } \left( \frac{\delta p'} {\delta x_i} \right)_P (8)

Problem arises in equation equation 8. We need to use pressure under relaxation otherwise the simplifications produce overpredicted pressure. Thus we use under relaxation factor \alpha_p for pressure and rewrite the equation 4 for u' as

u'_{i,P} =  \tilde{u}'_{i,P} - \frac{1}{A_P^{u_i} } \alpha_p \left(  \frac{\delta p'} {\delta x_i} \right)_P (9)

From equation 8 and 9:

\alpha_p = 1 - \frac{ \tilde{u}'_{i,P}}{  u'_{i,P}} (10)

From equation 7 and 10

\alpha_p = 1 - \frac{ \sum A_l^{u_i}} { A_P^{u_i}} (11)

Now, here comes the velocity under relaxation factor, which is introduced in momentum equation 1:

\frac{1}{\alpha_u}  A_P^{u_i} u^{n+1}_{i,P} - \sum A_l^{u_i} u^{n+1}_{i,l}=  Q^{n+1}_{u_i} - \left(    \frac{{\delta p^{n+1}}} { {\delta x_i} }\right)_P   + \frac {1- \alpha_u} {\alpha_u}  A_P^{u_i} u^{n}_{i,P} (12)

Thus A_P^{u_i} u^{n+1} =  A_P^{u_i} u^{n+1} \alpha_u (13)

with additional source term \frac {1- \alpha} {\alpha}  A_P^{u_i} u^{n}_{i,P} in equation 12.

We also know A_P^{u_i} u^{n+1}=\sum A_l^{u_i} u^{n+1}_{i,l} originally. From equation 13 with additional source term in momentum equation due to under relaxation factor, we have :

\sum A_l^{u_i} = {\alpha_u}    A_P^{u_i} (14)

From equation 11 and 14,

\alpha_p  =  1-  \alpha_u

Or

\alpha_p + \alpha_u  = 1


Hushhhhhhh!


There are many assumptions in this illustrations. Peric decided to do some trial and errors. You can read detailed analysis in his paper : ANALYSIS OF PRESSURE-VELOCITY COUPLING ON NONORTHOGONAL GRIDS.

I have attached images of study he had done for different \alpha_pand \alpha_u. According to him, \alpha_p was stablest for value of 0.2 for a wide range of \alpha_u. Differnet graphs include different configurations he did and for complex flows, the sum of the underrelaxation factors mattered.

He corrected his hypothesis later to propose that for more wider applicability, the sum of \alpha_p and \alpha_u should be 1.1!

OJ
Attached Images
File Type: jpg under_relaxation.jpg (71.7 KB, 184 views)
-Maxim-, Zbynek and SHUBHAM9595 like this.
oj.bulmer is offline   Reply With Quote

Old   March 28, 2013, 17:08
Default
  #13
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 19
oj.bulmer will become famous soon enough
Quote:
There is a blending factor for the order of the momentum discretization in Fluent? I thought only CFX has this. Where can I find it and in which version?
Go to TUI.
Navigate to solve > set > numerics
Keep entering till you get to: "1st-order to higher-order blending factor [min=0.0 - max=1.0]: "

Here you can specify the factor. 0 means first order. 1 means second order. 0.5 means 1.5 etc. Use of blending factor will make convective fluxes more diffusive, inducing some stability. But make sure in original setting, you have specified discretization as second order.

OJ
oj.bulmer is offline   Reply With Quote

Old   March 28, 2013, 20:38
Default
  #14
Senior Member
 
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13
asal is on a distinguished road
what I recommend before all, check you mesh. make sure that you have enough fine mesh. check for the skewness. If you have low quality, you will not have a converge solution. Moreover, big size variation, you will have fluctuation in the residuals.
asal is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Reason for oscillating residuals fayaazhussain Main CFD Forum 3 August 21, 2014 11:31
Solution not converging, but oscillating residuals around a constant value Irene FLUENT 2 February 7, 2012 12:55
Oscillating Residuals Cairol FLUENT 1 July 28, 2006 02:47
Oscillating Residuals in Finer Mesh Case Jake FLUENT 3 June 16, 2005 10:34
oscillating residuals dave FLUENT 2 December 10, 2004 04:01


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