Gym environment that runs PyFR on a 2D flow over a circular cylinder with rotational control.
- Install
gymfrom here - Install
PyFRversion v1.7.6 - Copy
gym.patchto the PyFR directory and usegit apply gym.patchto apply it - From the top level directory,
gym-pyfr, runpip install -e .
algorithms/- Contains sample algorithms for solving the vortex suppression problem. Includes Deep RL and proportional controller approachesbaseline_solutions/- Contains steady-state solutions for different Reynolds number flows around a circular cylinder. Note that these are approximategym_pyfr/- This folder contains thegymenvironment codeinit_states/- Contains solution states where vortex shedding has already started for different Reynolds numbersmeshes/- Contains the available meshes for the 2D circular cylinder
The following are the options available when constructing a gym-pyfr environment. Default values are given with argument = default_val.
mesh_file- The location of the mesh used by PyFRinit_file = None- The initial solution file *.pyfrs that PyFR uses to initializeconfig_file = os.path.join(__location__, 'config_base.ini')- The PyFR configuration filebaseline_file = None- The baseline solution file to compare the state to (to compute reward)backend = "cuda"- The PyFR backenddiscrete = False- Whether or not to discretize the action spacen = 20- The number of actions to discretize the action space toaction_multiplier = 0.01- Multiplier on the actions (the space is set from -2 to 2 so that initially there is not cutoff in the network)verbose = False- Whether or not to display more informationsave_dir = "."- The directory to save plots and modelssol_dir = 'sol_data'- directory to store solution data inprint_period = 100- Frequency of printing stats when verbose is offplot_best_episode = False- Whether or not to plot the reward and action vs iteration and any new best rewardssave_epsiode_animation = False- Whether or not to create an animation of each episodeanimation_period = 1- Number of timesteps between animation framesRe = None- Reynolds number overridetend = None- end time overridewrite_state_files = False- Whether or not to save the state fileswrite_state_period = 1- Period of saving state files
