CylinderRotEnv2D

class fluidgym.envs.cylinder.CylinderRotEnv2D(reynolds_number: float, resolution: int, dt: float, adaptive_cfl: float, step_length: float, episode_length: int, lift_penalty: float, use_marl: bool, dtype: dtype = torch.float32, cuda_device: device | None = None, load_initial_domain: bool = True, load_domain_statistics: bool = True, randomize_initial_state: bool = True, enable_actions: bool = True, differentiable: bool = False)[source]

Bases: CylinderEnvBase

Environment for flow around a cylinder with rotating cylinder actuation.

Parameters:
  • reynolds_number (float) – The Reynolds number of the flow.

  • resolution (int) – The resolution of the simulation grid. Corresponds to the angular resolution around the cylinder.

  • dt (float) – The time step size to use in the simulation.

  • adaptive_cfl (float) – The adaptive CFL number to use in the simulation.

  • step_length (float) – The non-dimensional time length of each environment step.

  • episode_length (int) – The number of steps per episode.

  • lift_penalty (float) – The penalty factor for lift in the reward calculation.

  • use_marl (bool) – Whether to enable multi-agent reinforcement learning mode.

  • dtype (torch.dtype) – The data type to use for the simulation. Defaults to torch.float32.

  • cuda_device (torch.device | None) – The CUDA device to use for the simulation. If None, the default cuda device is used. Defaults to None.

  • load_initial_domain (bool) – Whether to load initial domain states from disk. Defaults to True.

  • load_domain_statistics (bool) – Whether to load domain statistics from disk. Defaults to True.

  • randomize_initial_state (bool) – Whether to randomize the initial state on reset. Defaults to True.

  • enable_actions (bool) – Whether to enable actions. If False, the environment will be run in uncontrolled mode. Defaults to True.

  • differentiable (bool) – Whether to enable differentiable simulation mode. Defaults to False.

References

[1] M. Tokarev, E. Palkin, and R. Mullyadzhanov, “Deep Reinforcement Learning Control of Cylinder Flow Using Rotary Oscillations at Low Reynolds Number,” Energies, vol. 13, no. 22, Art. no. 22, Jan. 2020, doi: 10.3390/en13225920.

property id: str

Unique identifier for the environment.