# iteration of loop in FORTRAN language

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Search this Thread Display Modes
 March 15, 2014, 06:30 iteration of loop in FORTRAN language #1 New Member   saida chatti Join Date: Mar 2014 Posts: 6 Rep Power: 10 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: 557 Rep Power: 18 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: 10 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: 557 Rep Power: 18 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: 10 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: 557 Rep Power: 18 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 Search this Thread Search this Thread: Advanced Search 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 Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post [Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09 rayolau Fluent UDF and Scheme Programming 1 May 23, 2013 09:15 Mohan CFX 20 March 30, 2011 19:56 Franny Main CFD Forum 13 July 7, 2007 16:57 Jan CFX 3 July 28, 2003 12:01

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

 Contact Us - CFD Online - Privacy Statement - Top