|
[Sponsors] |
March 15, 2014, 06:30 |
iteration of loop in FORTRAN language
|
#1 |
New Member
saida chatti
Join Date: Mar 2014
Posts: 6
Rep Power: 12 |
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: 20 |
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: 12 |
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: 20 |
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: 12 |
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: 20 |
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 |
|
|
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 |
How to do a counter to exit loop in scheme language? | rayolau | Fluent UDF and Scheme Programming | 1 | May 23, 2013 09:15 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |
Creating, loop or iteration using expression edito | Jan | CFX | 3 | July 28, 2003 12:01 |