|
[Sponsors] |
How to use a solver repeatedly for design optimization |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 17, 2019, 08:49 |
How to use a solver repeatedly for design optimization
|
#1 |
New Member
Karl Yang
Join Date: Jul 2016
Posts: 11
Rep Power: 10 |
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 |
|
January 17, 2019, 16:48 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
Yes, this is possible. Try using runTime.setTime. Setting it to zero would be something like :
Code:
runTime.setTime(0,(label)0) Caelan |
|
January 17, 2019, 20:25 |
|
#3 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
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! |
|
|
|
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 |