|
[Sponsors] |
Residual value keeps repeating for all iteration |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2015, 06:33 |
Residual value keeps repeating for all iteration
|
#1 |
New Member
Ashish Jain
Join Date: Jul 2013
Posts: 10
Rep Power: 13 |
Hi, I have a very simple problem in a typical cfd code in fortran. I have set the convergence criterion very low 10>-3 for temperature prediction in a hollow cylindrical wall domain. temperature is predicted at each axial segment from inlet to exit. As solution marches axially towards exit, there comes a cross-section, where residual value after a no. of iteration doesnt change and freezes at a value say 0.005346346. Iteration keeps increasing and it doesnt move forward axially as residual at that section is not decreasing.
Simple expression i m using as follows. residual= residual+abs(Tnew-Told) What could be possible reasons for this problem?. Any help will be appreciated. |
|
January 8, 2015, 12:11 |
|
#2 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 211
Rep Power: 17 |
I suspect the problem to be with the residual calculation, since you do not normalize it at the start ?! by that i mean calculate the value of the residual at the first iteration and then have an if statement as
if(iteration.eq.1) then res_norm = residual endif with res_norm you can normalize your residuals at every timestep n as do i=1,domainsize residual = residual + (Tnew-Told) enddo residual = residual / res_norm now your very first residual you will see is going to be 1 and then you residuals should fall below your convergence criteria. one possible explanation to why your residuals are stopping to drop is that the initial residual is very high and hence dropping below 10^-3 is rather difficult as your variables have a certain precision to them attached (standard single precision) ... you can change the precision of the variables as well to double precision which will let your residuals drop even further just declare your variables with the kind operator as real(kind=8), allocatable :: Tnew(, Told( and real(kind=8) :: residual = 0.d0 kind=4 would be single precision. if that doesn't work, do the results make sense or do you get non physical results. you could also post your source code which would make it either to spot bugs hope that helped |
|
Tags |
finite difference method, heat transfer |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 14:12 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 09:35 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |