# iteration of loop in FORTRAN language

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

 March 15, 2014, 06:30 iteration of loop in FORTRAN language #1 New Member   saida chatti Join Date: Mar 2014 Posts: 6 Rep Power: 3 Hello how I can write in FORTRAN an iterative loop that stops when the convergence condition is satisfied. The convergence condition is: the difference between the two values ​​obtained by two successive iteration (X (iter2)-X (iter1)) is low in the order of [10] [-3]. thank you very much

 March 15, 2014, 11:48 #2 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 551 Rep Power: 11 http://en.wikibooks.org/wiki/Fortran/Fortran_control This should answer your question! Last edited by cfdnewbie; March 15, 2014 at 13:27.

 March 15, 2014, 13:22 #3 New Member   saida chatti Join Date: Mar 2014 Posts: 6 Rep Power: 3 hello thank you very much for the reply. i calculate the velocity. I want to express the difference between two values ​​for two successive iteration if the difference is we stopped the iteration if not the calculated repeats

 March 15, 2014, 13:28 #4 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 551 Rep Power: 11 Well, you have already described the algorithm: compute the difference, compare it to some threshold and abort the computation or continue... I'm not sure what it is that confuses you...

 March 15, 2014, 13:49 #5 New Member   saida chatti Join Date: Mar 2014 Posts: 6 Rep Power: 3 hello yes that's what i want to calculate. i don't know how to write that the value of the velocity of the first iteration is the old one and the value of the second iteration is the new one and the convergence this the new - the old thank you

 March 15, 2014, 14:44 #6 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 551 Rep Power: 11 This is very basic stuff. I suggest you work through something like this: http://www.cs.mtu.edu/~shene/COURSES...S/fortran.html This will enable you to do want you intend to do!

 Tags convergence, fortran, iteration

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 Today 02:09 rayolau Fluent UDF and Scheme Programming 1 May 23, 2013 08:15 Mohan CFX 20 March 30, 2011 18:56 Franny Main CFD Forum 13 July 7, 2007 15:57 Jan CFX 3 July 28, 2003 11:01

All times are GMT -4. The time now is 09:34.