CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

change dictionary variable during run

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2016, 15:29
Default change dictionary variable during run
  #1
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
Hi all,

I was wondering if there's anyway to change a dictionary variable during a run?
Like if I want to experiment with the number of processors in a parallel run, instead of having to change numberOfSubdomains in decomposeParDict, I could use:
decomposePar -numberOfSubdomains $NSLOTS.
I would appreciate any feedback as sometimes this makes life much easier.
anishtain4 is offline   Reply With Quote

Old   March 21, 2016, 16:26
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi Mahdi,

You could create an "Allrun" script that requires an extra argument so as to use it with the application. This way you would need to call the script like this:

Code:
./Allrun 4
and the call to the application within the script would be something like

Code:
decomposePar -numberOfSubdomains $1
Hope it helps.

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing dictionary at run time. Divyaprakash OpenFOAM Programming & Development 0 June 22, 2015 02:26
Change geometry during unsteady run sarahtuvia STAR-CCM+ 10 August 7, 2014 10:51
Help with writing a macro/UDF_file/script to change BC at regular time step intervals Codophobia Fluent Multiphase 0 April 24, 2014 10:07
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Change mesh topology during transient run Alex77 CFX 2 October 31, 2007 02:35


All times are GMT -4. The time now is 06:53.