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

How to use a solver repeatedly for design optimization

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 17, 2019, 08:49
Default How to use a solver repeatedly for design optimization
  #1
New Member
 
Karl Yang
Join Date: Jul 2016
Posts: 11
Rep Power: 10
HoneyBadger is on a distinguished road
Dear foamers,



I'm trying to do some design optimization work with openFOAM. But currently I couldn't find a way to get openFOAM solver automatically restart running with new set up.



Currently I am managing it with a bash script to repeatedly run the openfoam solver and read and rewrite the data into time 0 directory and run the solver again.



I tried to directly code into the solver of the optimization algorithm. But I could not find anyways to tell the runtime controller, say hi, go back to time 0 and loop again.



Is there anyone experienced with this?



Regards
Juntao
HoneyBadger is offline   Reply With Quote

Old   January 17, 2019, 16:48
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
Yes, this is possible. Try using runTime.setTime. Setting it to zero would be something like :

Code:
runTime.setTime(0,(label)0)
.

Caelan
clapointe is offline   Reply With Quote

Old   January 17, 2019, 20:25
Default
  #3
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
You may want to try an optimization software or write a piece of code that controls the optimization flow.

I use Dakota, it's opensource, but you can also write your code. You can create a base case, for each case you want to run you copy this base case, modify the files you want and run OpenFOAM.

There is no need to run everything in the same case going back to time 0, just start a new case with a new parameter.

Hope it helps!
lebc 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
Population Balance Modeling (PBM) - Ansys Fluent chittipo FLUENT 164 November 18, 2023 12:54
Adjoint solver wing twist optimization!! mechesanjiv FLUENT 10 April 13, 2023 10:21
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 17:08
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08


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