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

reconstruct certain time steps

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 12, 2011, 15:43
Default reconstruct certain time steps
  #1
Member
 
Join Date: Nov 2010
Posts: 50
Rep Power: 7
usergk is on a distinguished road
Hi

I have the time directories as 0, 0.001, 0.002 .... 0.499, 0.5 in the processors.

I want to reconstruct only 0, 0.05, 0.10, ... 0.40, 0.45, 0.50

I know one could individually generate these time directories, but is there a single statement that I could use to reconstruct at intervals of 0.05 instead of 0.001?

Thanks,
gk
usergk is offline   Reply With Quote

Old   February 14, 2011, 03:51
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 779
Rep Power: 19
olesen will become famous soon enough
Quote:
Originally Posted by usergk View Post
Hi

I have the time directories as 0, 0.001, 0.002 .... 0.499, 0.5 in the processors.

I want to reconstruct only 0, 0.05, 0.10, ... 0.40, 0.45, 0.50

I know one could individually generate these time directories, but is there a single statement that I could use to reconstruct at intervals of 0.05 instead of 0.001?
There is no simple way to do this. The -times option can handle ranges, but doesn't handle step sizes (which can be a bit messy/fuzzy for non-integer values).
If you don't mind a small workaround:
Use a small Perl/Python/whatever program to generate the required list for you and then use it. For example,
Code:
reconstructPar $(myTimes) ...
where 'myTimes' would emit the required times list
Code:
-times 0,0.05,0.10,0.40,0.45,0.50
This might even prove more flexible for you than anything else that could be added to OpenFOAM.
olesen is offline   Reply With Quote

Old   February 14, 2011, 13:19
Default
  #3
Member
 
Join Date: Nov 2010
Posts: 50
Rep Power: 7
usergk is on a distinguished road
Thanks so much, Mark!

This looks quite convenient too.

gk
usergk is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35
Time Steps gets smaller and smaller titio OpenFOAM Running, Solving & CFD 1 July 22, 2009 08:19
UDF for time steps David FLUENT 0 August 14, 2007 11:54
Time steps - Large Eddy - LES Gernot FLUENT 0 September 14, 2005 11:54
Number of time steps in fluent 4-NT Newbie FLUENT 0 March 24, 2001 14:44


All times are GMT -4. The time now is 21:55.