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

How to write a script to automatically modify the parameters of 0 / u file for simula

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2020, 05:23
Smile How to write a script to automatically modify the parameters of 0 / u file for simula
  #1
New Member
 
liwenpeng
Join Date: Jul 2020
Posts: 11
Rep Power: 6
liwenpeng is on a distinguished road
I need batch script to automate the process.
I may need to do several thousand simulations of flow around a rotating cylinder, the cylinder rotating speed from-100 to 100, the interval is 0.2.
But at present, I adjust the parameters manually every time, and the post-processing is also carried out manually. Forthousands of simulations, it is impossible to realize. Is there anyway and how to automatically adjust parameters and simulate. ?

I can not find any example about bash script,who could give me some example or tutorial about how to write the script.

Do I need python or matlab or shell,I do not know,I am a new with poor programming skill.

my openfoam run in Ubuntu
Many thanks!!
liwenpeng is offline   Reply With Quote

Old   July 23, 2020, 18:45
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
fumiya is on a distinguished road
Hi,

You might want to take a look at the following tutorial:
https://develop.openfoam.com/Develop...pleFoam/bump2D

In this tutorial, RAS_MODEL in turbulenceProperties file is replaced to each turbulence model's name by Allrun sh script.

Hope this helps,
Fumiya
__________________
[Personal]
fumiya 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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 11:38.