BO-GP
Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations.
The BO-GP codes are developed using GPy
and GPyOpt
. The optimizer is non-intrusive and can be linked to any CFD solver.
Reference:
Y. Morita, S. Rezaeiravesh, N. Tabatabaeia, R. Vinuesaa, K. Fukagata, P. Schlatter, Applying Bayesian Optimization with Gaussian Process Regression to Computational Fluid Dynamics Problems, Journal of Computational Physics, 2021.
Exmaple: Turbulent boundary layer (TBL) with non-zero pressure gradient.
See Section 5 in the above reference. The flow is simulated using OpenFOAM
.
Questions/Remarks:
Questions can be forwarded to [email protected]
, [email protected]
, and [email protected]
.
List of included files and folders:
-
driver_BOGP.py
: main driver for running the example, i.e. BO-GP of pessure-gradient TBL simulated by OpenFOAM. -
gpOptim/
: Bayesian optimization codes based on Gaussian processes, usingGPy
andGPyOpt
.workDir/
gpList.dat
gpOpt.py
-
OFcase/
:OpenFOAM
case foldersystem/
yTopParams.in
(written inmain_pre.py
, used byblockMeshDict
&controlDict
).blockMeshDict
controlDict
decomposeParDict
fvSchemes
fvSolution
0/
- U,p,k,omega,nut
- *_IC files (use
inflow.py
to make these files).
constant/
polyMesh/
(not included)transportProperties
jobscript
OFrun.sh
-
OFpost/
: Post-processing the results ofOFcase
.main_post.py
-
OFpre/
: Pre-processing theOFcase
main_pre.py
: creatingyTopParams.in
using the latest parameter sample.inflow/inflow_gen.py
: Creating inflow conditions for RANS of TBL with pressure gradient using DNS data for the TBL with zero-pressure gradient.
-
figs/
: To save figures produced when running the optimization.make_movie.sh
: make movie inpng/
from pdf files.
-
data/
: Created when running the BO-GP. -
storage/
: Created when running the BO-GP.
Settings & inputs (to run the example):
- In
driver_BOGP_example.py
: U_infty, delta99_in, Nx, Ny, Nz, t, loop params, path, beta_t etc. /gpOptim/gpOpt.py
: number of parameters, range of parameters, tolerance, GP kernel, xi, etc.
Requirements:
python3.X
numpy
matplotlib
GPy
GpyOpt
OpenFOAM
v.7 (or v.6)bl_data/
inOFpre/inflow/
(DNS data from here)
How to test the example for different settings:
-
To change the structure of the geometry
- create the new inflow from precursor using
OFpre/inflow/inflow_gen.py
(precursor results required) - update the
blockMeshDict
- update the driver accordingly
- create the new inflow from precursor using
-
To change the number of prosessors used for the OpenFOAM simulation
- update
nProcessors
in the driver - update
decomposeParDict
- update
jobScript
- update
-
To change the parameterization of the upper wall
- change
qBound
ingpOpt.py
- update
blockMeshDict
- change
-
To change beta_t (target pressure-gradient parameter beta)
- change
beta_t
in the driver
- change
-
When you clone this repository and get errors, please try run:
mkdir data
mkdir storage
mkdir OFcase/constant/polyMesh/