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

changeDictionary fails with multiple times

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2013, 04:37
Default changeDictionary fails with multiple times
  #1
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
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, 14:01
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
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, 15:59
Default
  #3
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
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, 19:40
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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, 05:06
Default
  #5
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
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, 05:59
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
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, 11:50
Default
  #7
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18
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 13:03.
wouter 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[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 13:21


All times are GMT -4. The time now is 14:00.