AirfoilEnv2D
- class fluidgym.envs.airfoil.AirfoilEnv2D(reynolds_number: float, adaptive_cfl: float, step_length: float, episode_length: int, dt: float, attack_angle_deg: float, use_marl: bool, dtype: dtype = torch.float32, cuda_device: device | None = None, debug: bool = False, load_initial_domain: bool = True, load_domain_statistics: bool = True, randomize_initial_state: bool = True, enable_actions: bool = True, differentiable: bool = False)[source]
Bases:
AirfoilEnvBaseEnvironment for 2D airfoil aerodynamic efficiency improvement.
References
[1] X. Garcia et al., “Deep-reinforcement-learning-based separation control in a two-dimensional airfoil,” Feb. 24, 2025, arXiv: arXiv:2502.16993. doi: 10.48550/arXiv.2502.16993.
[2] Y.-Z. Wang, Y.-F. Mei, N. Aubry, Z. Chen, P. Wu, and W.-T. Wu, “Deep reinforcement learning based synthetic jet control on disturbed flow over airfoil,” Physics of Fluids, 2022, [Online]. Available: https://doi.org/10.1063/5.0080922
- Parameters:
reynolds_number (float) – The Reynolds number of the flow.
adaptive_cfl (float) – Target CFL number for adaptive time stepping.
step_length (float) – The non-dimensional time length of each environment step.
episode_length (int) – The number of steps per episode.
dt (float) – The time step size to use in the simulation.
attack_angle_deg (float) – The angle of attack of the airfoil in degrees.
use_marl (bool) – Whether to enable multi-agent reinforcement learning mode.
dtype (torch.dtype) – The data type to use for the simulation.
cuda_device (torch.device | None) – The CUDA device to use for the simulation. If None, the default cuda device is used. Defaults to None.
debug (bool) – Whether to enable debug mode. Defaults to False.
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.
- property n_agents: int
The number of agents in the environment.