AirfoilEnv3D
- class fluidgym.envs.airfoil.AirfoilEnv3D(n_agents: int, reynolds_number: float, adaptive_cfl: float, step_length: float, episode_length: int, dt: float, attack_angle_deg: float, local_obs_window: int, use_marl: bool, local_reward_weight: float | None, local_2d_obs: bool = False, init_from_2d: bool = True, 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 3D airfoil aerodynamic efficiency improvement.
- Parameters:
n_agents (int) – The number of agents controlling the synthetic jets.
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.
local_obs_window (int) – The size of the local observation window for each agent.
use_marl (bool) – Whether to enable multi-agent reinforcement learning mode.
local_reward_weight (float | None) – The weight of the local reward in the combined reward for each agent. Has to be set if multi-agent step function is used. Defaults to None.
local_2d_obs (bool) – Whether to use 2D local observations (velocity in x and y directions only, a single sensor layer and window = 1). Defaults to False.
init_from_2d (bool) – Whether to initialize the 3D flow field from a 2D initial domain. This significantly reduces the initial transient phase. If the initial domain is loaded from disk, this parameter is not active. Defaults to True.
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.
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.
References
[1] R. Montalà et al., “Discovering Flow Separation Control Strategies in 3D Wings via Deep Reinforcement Learning,” Sept. 12, 2025, arXiv: arXiv:2509.10185. doi: 10.48550/arXiv.2509.10185.
- property n_agents: int
The number of agents in the environment.