|
[Sponsors] |
October 28, 2013, 10:30 |
print results each number of steps
|
#1 |
New Member
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15 |
Please I wanna ask how for exampl make a commande that allow to print a results each 1000 step
like do kk=1,1000000 ... ... ... if (mod(kk,1000)eq.0)) then??? call result (u,v,T,Nu) stop end I would appreciate your help thanks |
|
October 28, 2013, 10:57 |
|
#2 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
You got the algorithm right, where remains your problem? Just do a modulo in an IF, and then print whatever you want.
|
|
October 28, 2013, 11:23 |
|
#3 |
New Member
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15 |
I did exactly like this
Do kk=1,100000 . . . . . . . if ((modkk,1000)eq.0) then call result(u,v,T,...) stop end endif enddo stop end but it said that there is an error 'EXPECTING END PROGRAM' |
|
October 28, 2013, 11:44 |
|
#4 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
What language are you using? it looks like Fortran, but the stops in there make no sense then...
|
|
October 28, 2013, 11:45 |
|
#5 |
New Member
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15 |
Hey, it works thanks alot.
I have another question please: if for example i want that kk=5000,10000,20000 what the condition that I should put because if I put mod(kk,5000) eq.0 it gives me all the values with zero remain |
|
October 28, 2013, 14:05 |
|
#6 |
New Member
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15 |
I am using fortran
yeah I did a mistake, it is if mod (kk,5000) then call result endif enddo stop end |
|
October 28, 2013, 17:13 |
|
#7 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Again, the last stop makes no sense. You should brush up on your Fortran a bit...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |
decomposePar pointfield | flying | OpenFOAM Running, Solving & CFD | 28 | December 30, 2013 15:05 |
Time step size, number of time steps and max iterations per time step | guido_88 | FLUENT | 4 | August 30, 2012 14:49 |
Node Number And Results | ZenCef | FLUENT | 0 | July 9, 2011 01:29 |
how to print the results from CFX-4.2 | cfd_99 | Main CFD Forum | 5 | June 21, 1999 09:23 |