Skip to main content

Multi-objective Bayesian Optimization on OpenFOAM cases with Ax-platform

Project description

Multi Objective Optimization on OpenFOAM cases

If you're using this piece of software, please care enough to cite it in your publications

Relying on ax-platform to experiment around 0-code parameter variation and multi-objective optimization of OpenFOAM cases.

Objectives and features

  • Parameter values are fetched through a YAML/JSON configuration file. Absolutely no code should be needed, add parameters to the YAML file and they should be picked up automatically
  • The no-code thing is taken to the extreme, through a YAML config file, you can (need-to):
    • Specify the template case
    • Specify how the case is ran
    • Specify how/where parameters are substituted
    • Specify how your metrics are computed

How do I try this out?

Some examples, which range from simple and moderate levels of complexity, are provided as reference.

Strictly speaking, you don't need an OpenFOAM installation unless you are running a CFD case. You can always use your own code to evaluate the trials; but parameters must be passed through an OpenFOAM-like dictionary (See single-objective opt. example for inspiration.

# Clone the repository
git clone https://github.com/FoamScience/OpenFOAM-Multi-Objective-Optimization foamBO
cd foamBO
# Install dependencies
pip3 install -r requirements.txt

Apptainer containers

git clone https://github.com/FoamScience/openfoam-apptainer-packaging /tmp/of_tainers
git clone https://github.com/FoamScience/OpenFOAM-Multi-Objective-Optimization foamBO
cd foamBO
ansible-playbook /tmp/of_tainers/build.yaml --extra-vars="original_dir=$PWD" --extra-vars="@build/config.yaml"
# Get an apptainer container at containers/projects/foambo-<version>.sif

Contribution is welcome!

By either filing issues or opening pull requests, you can contribute to the development of this project, which I would appreciate.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foambo-0.0.7.tar.gz (502.1 kB view hashes)

Uploaded Source

Built Distribution

foambo-0.0.7-py3-none-any.whl (13.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page