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

changeDictionary fails with multiple times

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 16, 2013, 03:37
Default changeDictionary fails with multiple times
  #1
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 130
Rep Power: 8
wouter is on a distinguished road
Hello All,
because ParaFoam cannot work with uniformfixedValue I need to use
changeDictionary -time 70,80,90,100 this option does not work only the first time gets changed.

Best regards
Wouter
Ubuntu 13.04
Openfoam 2.2.x
wouter is offline   Reply With Quote

Old   September 17, 2013, 13:01
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,608
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Wouter,

I am sorry to tell that after a quick look in the source code, then it does what it is designed for, since there is no loop over the time instances.

It reads the time list given by the user, if the time list is of length zero, the utility throws an error and otherwise it does:

Code:
runTime.setTime(times[0], 0);
i.e. sets the current time instance to the first element in the user defined list. Therefore, it seems that you only have two options:

1. Execute for each time instance "manually" or,
2. Modify the solver.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   September 17, 2013, 14:59
Default
  #3
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 130
Rep Power: 8
wouter is on a distinguished road
Hello ngj,

So I can assume the bugreport has to mention the bug in the help text.

All the best
Wouter
wouter is offline   Reply With Quote

Old   September 17, 2013, 18:40
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all!

@Wouter: Ah, this is one of those situations where shell scripting can come in handy. Try this:
Code:
for timeIter in 70 80 90 100; do
  changeDictionary -time $timeIter
done
It's the same as:
Code:
for timeIter in 70 80 90 100; do  changeDictionary -time $timeIter ; done
As for bug reporting, I would say that this is a bug, because the description for the "-time" option is misleading.
But for reporting bugs to be fixed in OpenFOAM, you have to write the bug report on the official bug tracker: http://www.openfoam.org/bugs/

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   September 18, 2013, 04:06
Default
  #5
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 130
Rep Power: 8
wouter is on a distinguished road
Dear wyldckat,
Thank you again for the scripts. A hurdle is signing in for a bugreport.
I looked at sample an reconstructPar and I think it is a challenge to write my own change dir. But in the meantime I will use your script.

Regards
Wouter
wouter is offline   Reply With Quote

Old   September 18, 2013, 04:59
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Wouter: Ah, this is one of those situations where shell scripting can come in handy. Try this:
Code:
for timeIter in 70 80 90 100; do
  changeDictionary -time $timeIter
done
It's the same as:
Code:
for timeIter in 70 80 90 100; do  changeDictionary -time $timeIter ; done
Note that in bash, you can also loop as follow

Code:
for ((i=70; i<101; i+=10)); do...; done
And, probably, this would also help you (but use with cause)
Code:
for dir in [0-9]*; do ...; done;
Bernhard is offline   Reply With Quote

Old   September 18, 2013, 10:50
Default
  #7
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 130
Rep Power: 8
wouter is on a distinguished road
Dear Bernhard,
Thanks for that option, because I have 300 timesteps in parallel.
I have to run it in every processor and it is slow.

Thanks All
Wouter
for future use I renamed BC uniformFixedValue to TimeVaryingFixedValue.

Last edited by wouter; September 18, 2013 at 12:03.
wouter 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
how to set periodic boundary conditions Ganesh FLUENT 13 January 22, 2014 05:11
[ICEM] Multiple edges asal ANSYS Meshing & Geometry 2 March 22, 2013 11:10
benchmark: flow over a circular cylinder goodegg Main CFD Forum 12 January 22, 2013 12:47
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 13:58.