Skip to content

npuljc/RL_control_Nek5000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reinforcement-learning-based flow control in the Nek5000 environment

This repo is to showcase how to apply reinforcement learning (RL) based control in the CFD environment of Nek5000. Using RL implemented in TensorForce, this repo is developed by referring to the open-source RL-based flow control repo of Rabault et al. So, they have almost the same structure. If you're familiar with Rabault's repo, it will be very easy for you to run the test case here.

The main differences are the simulation environment and reward functions:

  • Nek5000 is used to simulate the confined cylinder wake flow.
  • Reward function is defined by evaluating the shedding energy related to the SFD base flow.
  • Stability-enhanced reward is presented by penalizing the original reward using the DMD eigenvalue.

Installation

  • python3 and pip3: sudo apt install python3-pip
  • tensorflow: pip3 install tensorflow==1.13.1
  • tensorforce: pip3 install tensorforce==0.4.2
  • Nek5000: see the description here

How to run

  • Complie the CFD code in folder flowcontrol/cylinder: makenek cylinder
  • Train the control policy in folder flowcontrol: python3 training.py.py
  • Test the control performance in folder flowcontrol: python3 testing.py
  • If you want to compute the SFD base flow by yourself, go to folder SFDbase and run: 1. makenek cylinder 2. nekmpi cylinder 5

Vortex shedding suppression performance

CFD solver: Nek5000 Reynolds number: 150

The following is the comparison of two flows (the top is baseline and the bottom is controlled flow).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published