Convergence problem
Hello everybody out there! I have a problem about convergence in my code. My code is FVM with Hybrid (UDS-CDS) differencing scheme and applied to steady flow in ventilated chamber. My problem is when I refine grid the program is not converge (convergence criteria is 1e-4) . It stay at some value depend on number of control volumes used. But it works well when apply to coarse grid. Does anyone have the experence to same problem ? How did you solve it? Any suggestion will please to me. Thank you in advance.
Suthichock Nunthasookkasame. Post graduate student, Chulalongkorn University, Thailand. |
Re: Convergence problem
1) Is your convergence criteria an absolute norm or a L2 norm?
2) What kind of linear equation solver do you use. |
Re: Convergence problem
what do you mean by convergence criteria in this case ? is it the non-dimensional mass residue ('b' as per patankar) from the continuity / p' equation ? is it a turbulent flow and accordingly modelled ? please clarify. meanwhile some temporary suggestions : 1. apply double precision throughout - if not applied so far. 2. if uniform grid, pick up the maximum 'b' - if the cv for max 'b' is next to boundary (my guess at this stage - a very common occurence), check equations and program. 3. if non-uniform grid, pick up the max b and min b and (max b/min b)ratio.if the ratio exceeds 1e+03 check if you have ever crossed the ratio of 1.4 (laminar) or 1.2 (turbulent) for any two adjacect cv dimension (for 3d problem in x-y, y-z and x-z directions). modify accordingly. some will argue that with grid refinement, it is a typical problem and has to be compromised for. wanted further discussion then.
|
Re: Convergence problem
I have also come across this problem when using a commericial FV flow solver, upon carring out successive grid refinement. In my case the problem was turbulent. I found that if the first cell size on any of the wall boundaries was too small, violating the law of the wall Y+ condition (i.e. 30 < Y < 500) the solution failed to converge. I also found that rapid changes in aspect ratio also contributed to non convergence of some solutions.
|
Re: Convergence problem
Ofcourse, it could also be that the flow is unsteady and the coarse grid was so dissipative to give a steady solution. So when you refine the grid, it dosent converge.
chidu... |
Re: Convergence problem
Hi Sebastien Perron . Thank for your quickly response.
First question, My convergence criteria is calculate from sum of absolute resudual normalized by momentum flux at inlet for X and Y Momentum and mass flux from Pressure correction equation (term 'b' in Patankar) normalized by mass flux at inlet. Anyway i know not thing about L2 norm. Could you give me a short explain ation or reference ? Second question, I use 2 kind of linear solver for testing but it gave me the same behavior. They are TDMA and SIP. |
Re: Convergence problem
Hi Arun. Thank for your response.
1) My convergence criteria are the maximum of the residual from X, Y momentum eq. and pressure correction eq. For X,Y momentum, The absolute sum of residual are normalized by momentum flux at the inlet. For prssure correction eq, Yes , as you understand. 2) I did not use any turbulent model in my code. thank again for your suggestion. I will try to work follow your suggestion. Suthichock Nunthasookkasame |
Re: Convergence problem
Hi James Date .
Thank for you response. Could you tell me what is Commericial FV code 's name ? Anyway, Do you have any ideas why grid size at the boundary effect the solution convergence ? Suthichock Nunthasookkasame. |
Re: Convergence problem
Hello Chidu.
Thank for your comment. Do you know, I really agree with you about this. I ever try to use Upwind differencing scheme to this problem and solution is converged at the same grid used by Hybrid scheme. But when i refine more, It still not converge. So, my assumption is thefaulse diffusion (or numerical diffusion) which generate from UDS can damp some ossilate behavior. Suthichock Nunthasookkasame. |
Re: Convergence problem
do you mean your convergence criteria are three simultaneously (and not two !! because you have two mom eqs, u and v) viz., u-mom residue, v-mom residue and 'b'? please confirm you are using hybrid and not uds (first order ?). in such case suggest do the following : (1)don't consider u-mom and v-mom eqn residues - consider only 'b'. (2) see if 'b' attaining 1e-04 with coarse grid. (3) if it attains then check u-mom and v-mom res. if 'b' is <=1e-04 but u,v mom res are not, then check cv dimension ratio as i mentioned earlier. it should be <=1.4 (laminar) if using non-uniform grid. increase u-mom and v-mom sweeps. (4) if 'b' not attaining 1e-04, then first increase number of sweeps (just double them and >20) of p' eqn and then u-mom and v-mom eqs (i am against mom sweeps), i hope you have a u-v sequence solving to break the nonlinearity and coupling together.
|
Re: Convergence problem
1. Grid aspect ratio is a very important 'aspect', which we very often neglect and/or ignore and then land up in mess. Any one can look at the book by Anderson et.al.
2. y+ <50 is also not a problem provided one uses the proper formulation and incorporates IT. In a commercial software I do not know how you do it. However, target should be to maintain 300 > y+ > 50. In reality the code should have the provision for checking the same. One can look at the publications of Rodi, Nallasamy and others for 2-layer , 3-layer models. |
Re: Convergence problem
One question here : Is the steady state solution being attempted thru the solution of elliptic equation or parabolic equation with so-called 'false transient' approach ? If the second one is true, then how is the adequacy of calculation of residuals for momentum equations being taken care of ? Will Suthichock please let us know ? I believe there is the clue. Where is our friend, philosopher and guide John.C.Chien ?
|
Re: Convergence problem
I get this behaviour all the time in my applications. If you have discrete jets interacting with solid walls or plumes interacting with a stratified environment then natural instabilities can make it difficult to obtain the steady state solution. Diffusion (real or numerical) will always help the jets to settle down as will damping down the velocities either by underrelaxation or reducing 'virtual' time steps (if you are using that approach). Actually using a pseudo time stepping approach in systems that are inherently unstable wil lead to periodic variations in the residuals that itself is a good indication that there is no steady state solution (or at least you are in or near a transitional state).
The N/S equations know what should be going on and comprehend how they are being solved, they will react according to how you treat them (just like women). Fred. |
Re: Convergence problem
Hello Arun.
Normally , I uses Hybrid in my code. I thought that it quite stable. But some time I try the other scheme to compare the results. When i read the response massages most of these talk about CV ratio. Could you explain to me how the grid ratio effect the solution? Suthichock Nunthasookkasame |
Re: Convergence problem
1) I have read the other messages concerning your problem. I had the same problems using an hybrid scheme. My problem would converge with an upwind sheme but wouldn't with the hybrid sheme. If you want to get rid of some of the false diffusion with the upwind sheme I suggest using the power law sheme. You'll will obtain better results and it is far more stable.
2) The L2 norm of function f is : sqrt( integral (on domain) f^2 dV ) For a discrete problem it is similar to the norm you use. 3) The norm you use is a sum, if you increase the numer of unknows this norm will get bigger. In order to avoid this, It is better to sum over the residuals which can be multiply by their associated volume (or surface in 2D) i.e. |r| = sum_i r_i*dv_i 4) What kind of scheme do you use to solve the incompresible flow (Simple, Simple, Simplec, Chorin'a algorithm or derivative) |
Re: Convergence problem
The code is CFX-4.3. I'm note sure which boundary you are referring to? If you are referring to the outer boundary, the grid should be as smooth as possible, however if the boundary is placed far enough away from the major distrubances in the flow, hence the flow gradients are small, rapid changes in aspect ratio, cell size, etc can often be got away with. I hope this helps.
|
Re: Convergence problem
Suthichock
Sorry to intrude. I refer to your posting addressed to Arun re : 'how the grid ratio effect the solution ?'. 1. Suggest consult 'Computational Fluid Mechanics and Heat Transfer' by Dale.A.Anderson, John.C.Tannehill and Richard.H.Pletcher (Hemisphere,1984), p.358 and chap.3.[John.C.Chien, you agree I hope !] . Additionally you may consult the book 'Applied Numerical Methods in Engineering' by B.Carnahan,et.al. You will get a feel of consistency, stability, convergence and various kinds of errors in solving PDE thru FDE. 2. In our working group, with whatever little experience we have, we observe that dimension ratio for two adjacent cvs [delta-y(i)/delta-y(i+1)] should be 1.2 max (tur) and 1.4 max (lam) for majority of the problems we have handled. We also ensure that the aspect ratio of any one cv (delta-y/delta-x) does not exceed 1.4 in critical regions. 3. I tend to look at the problem this way, I wish I had mathematics to support (any help by anyone please ?): We estimate the acceleration thru the mom eqns and hence the speed at which the information gets transmitted should depend on the constrain we impose thru the cv dimension (time step apart). In first order upwind, this is partly taken care of because only the upstream is considered. In central diff or hybrid (cd+ud) scheme we incorporate the downstream also while the estimate is to be arrived at thru 'our' imposition of cv dimension. Hence we are putting a binding on the speed of transmission of the information (e.g., the BCs). This leads to problems. |
Re: Convergence problem
(1). Convergence is very important, because it is the main issue in CFD. (2). Since you did not state your problem and conditions clearly, there is no simple way to answer your question. (3). In general, you need to state the Reynolds number of your problem, and whether it is laminar or turbulent. (4). If your problem is low Reynolds number laminar flow, say several hundreds, and you are having convergence problem,then, you need to rework your code. If you can not pass this low Reynolds number laminar flow stage, then you have some basic problems. (5). For high Reynolds number problem, we have no way of knowing whether the solution will converge or not, assuming that you are dealing with steady-state equations. For transient formulation for high Reynolds number flow, it is likely that the solution will be transient all the time.(although it still depends on the numerical algorithm used) (6). So, if your problem is in the high Reynolds number range, say Re>1000, then the solution may not converge even if you are using the steady-state formulation. This is the reason why that more accurate numerical scheme tend to diverge, while lower order schemes are more stable. Accurate scheme tends to be more unstable.(7). Even if you are using the iterative approach, it can be viewed as a transient process. As you refine the mesh, you have more unknowns, which tend to promote the transient motion. (8). So, what I am saying is: the heart of CFD is the development of numerical algorithms for high Reynolds number flows. The goal definitely is not trying to automate the codes or just running more cases. (9). In the turbulent flow, you have the added complexity of the turbulence modeling. The highly non-uniform eddy viscosity field will promote the divergence of the numerical solution or iteration. And if you start handling the flow separation with low Reynolds number model, you will have a huge problem in getting a converged solution. (10). For this reason, most results obtained in engineering CFD applications were non-converged, incorrect answers. We simply are not there yet to handle correctly the high Reynolds number flows or turbulent flows. More is needed in the basic research instead of applications. (the commercial cfd codes I haved used diverge all the time. You can say that, most of the time, we are trying to adjust the parameters to bring the solution to a converged state. So, the CFD application in industries is in serious problem.) (11). Well, in order to convince yourself, you can easily reduce the Reynolds number of your problem, and I think, if the Re is less than 1000, you should have a great chance to obtain a converged solution. If you are not using uniform meshes, then the grid ratio should be kept at/or below 1.2 (12). There are two basic issues in CFD: one is the numerical algorithm to obtain the solution, and the other is the turbulence model to simulate the real world flows. The use of un-structured mesh can not solve these two fundamental problems, it can only create additional complexity to it. (13). The world of CFD is wide open. It requires your smart thinking and ideas. And you can only trust a relatively few cfd solutions which have been validated to this date. (14). As an exercise, you can start a problem at very low Reynolds number, run it to converge. Then increase the Reynolds number and repeat the process, until the solution becomes unstable at some Reynolds numbers. This is the only way to know whether you are going to have stable and accurate solution or not. You can test this process using your own code, or a commercial code. (try the laminar flow first). So, if as an average engineer, you still have problems in obtaining accurate converged solutions, then, you can safely say that the CFD application is still in its state of infancy. (15). By the way, if the CFD solution is based on the non-converged results, then it will collapse just like the Japanese economy in recent years. I like this question, because it pointed out the central issue of CFD.
|
Re: Convergence problem
dude!
I hope you are aware of a literary construct known as a paragraph!! If yes, please try to use it. :) The intention is not to be rude here, your posting did take me by surprise. I have never seen such a mass of words. regards, chidu... |
Re: Convergence problem
(1). That is because we are all having convergence problem! (2). Thank you very much for your patience to read the long message. I can assure that when I run a commercial cfd code, it takes much longer to converge, several days to a couple of weeks to converge. I had to run the same case several times because it normally would diverge several times. (3). Everyone would be very happy to use CFD if someone could show us the 1-2-3 step solution.
|
Re: Convergence problem
Hi, John I didn't read your answer to manjgi question. Actually I said one more time what you have already said, while using not as many words as you did. One small addition: the best way to lower your Reynolds number is to increase your density. You might use very very very high densities. In this case your code MUST work. If not try to find the bug.
best regards Jannis |
y+
Hello Everybody!
I am also struggling with convergence problems, so I found this thread. Now I have some question to Y+ (1) As I was told and (by the way: what is y?) So y+ is part of the solution and not a attribute of my mesh? According to that y+ is also conditioned by my boundary conditions? (2) Which Size should y+ have? I was told y+ <1. In this thread it is suggested 50<y+<300 and here: http://www.cfd-online.com/Forums/openfoam-solving/59331-y-cell-aspect-ratio.html they say it should be smaller than 5 (3) I have a computation perfektly converged but yPlusRAS gives me an average of about 1600 for y+. Does this mean the solution is incorrect? (4) I am using simpleFoam with k-Epsilon Turbulence Model. Do I have to care about y+? Because in my Opinion k-Epsilon is using a wall function. Mmm a lot of Questions! I am thankfull for every hint! Saludos |
Yes, a lot of analysis faces convergence problems, the way to solve this kind of situations is straight forward. Convergence is a mathematical concept, and if you carefully look at any analysis technique (in the context of CFD) and if it is a Finite Element, Finite difference or Finite Volume, there is one common base line, all these techniques lead to the formation of a matrix that has to be solved.
Ask yourself What causes a matrix to be solved or not and what can be done to ease the difficulties then you have the answer to your original question. Yes, the aspect ratio as mentioned in a previous post, is a very important factor (think in terms of the matrix you are solving). Cheers and good luck.:):):) |
Quote:
Quote:
Quote:
|
Jed
I patiently googled for the paper till I located a ps file that I downloaded and read. what can I say? too much mathematics. In solving a matrix, simple arithmetic operations of division, multiplication and subtraction are involved and if these operations fail, the solution is difficult to arrive at. let us see:- 1- Well posed physical problems never lead to singular matrices. 2- near singular matrices are difficult to solve so what applied scientists can do in order to avoid near singular matrices? The only tool we have is the mesh quality. Boundary conditions are imposed by the physics they represent Or to say it in other words, can a mesh with aspect ratio of 2 or higher lead to a matrix that converge at the same rate as a matrix representing a mesh whose aspect ratio is 1.1 or 1.2 I am not trying to over simplify the problem, just I want to use a language that is understood by every one involved in a serious real world cfd analysis. Cheers and good luck to all:):):) |
Quote:
|
Quote:
For wall cells the velocities are known thus you know the convection terms. Usually flux is zero. So convection terms are zero. Now for the diffusional terms you have no idea how to get them. So a simple way is to assume a linear profile and find out shear stress by formula tw = visc * (du/dy). For this you know viscosity and du/dy can be obtained by velocity profile. However the main issue is that if profile is not linear where you cell center is the above formula gives wrong shear stress. So log wall law is proposed. And used for calculating shear stress. If k and omega are used in calculating y+ u+ etc, wrong values of k omega could cause diveregence. So very fine mesh and with no wall model may be more stable. |
Quote:
|
All times are GMT -4. The time now is 06:02. |