CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

print results each number of steps

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2013, 10:30
Default print results each number of steps
  #1
New Member
 
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15
afnene is on a distinguished road
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
afnene is offline   Reply With Quote

Old   October 28, 2013, 10:57
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
You got the algorithm right, where remains your problem? Just do a modulo in an IF, and then print whatever you want.
cfdnewbie is offline   Reply With Quote

Old   October 28, 2013, 11:23
Default
  #3
New Member
 
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15
afnene is on a distinguished road
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'
afnene is offline   Reply With Quote

Old   October 28, 2013, 11:44
Default
  #4
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
What language are you using? it looks like Fortran, but the stops in there make no sense then...
cfdnewbie is offline   Reply With Quote

Old   October 28, 2013, 11:45
Default
  #5
New Member
 
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15
afnene is on a distinguished road
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
afnene is offline   Reply With Quote

Old   October 28, 2013, 14:05
Default
  #6
New Member
 
ramila.h
Join Date: Dec 2010
Posts: 29
Rep Power: 15
afnene is on a distinguished road
I am using fortran
yeah I did a mistake, it is
if mod (kk,5000) then

call result
endif
enddo

stop end
afnene is offline   Reply With Quote

Old   October 28, 2013, 17:13
Default
  #7
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Again, the last stop makes no sense. You should brush up on your Fortran a bit...
cfdnewbie is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 02:17.