suboptimumg.vehicle.aerodynamics.aerodynamics#
- class suboptimumg.vehicle.aerodynamics.aerodynamics.Aero(vehicle_model)[source]#
Bases:
object- Parameters:
vehicle_model (VehicleModel)
- drs_disabled_override()[source]#
Force DRS off for the duration of a
withblock.- Return type:
Generator[None, None, None]
- drs_is_active(drs_threshold)[source]#
Check whether DRS is currently active, honoring the disable override.
- Parameters:
drs_threshold (float) – Current lateral acceleration threshold (m/s^2)
- Returns:
True if DRS is equipped, not overridden off, and within threshold.
- Return type:
bool
- get_drag(v, drs_threshold)[source]#
Calculates the drag force based on the current velocity. Varies the output based on the DRS active state.
- Returns:
Drag force (N)
- Return type:
float
- Parameters:
v (float)
drs_threshold (float)
- get_lift(v)[source]#
Calculates the lift force based on the current velocity without DRS.
- Returns:
Lift force (N)
- Return type:
float
- Parameters:
v (float)
- tire_lift_forces(v, drs_threshold, pitch=None, roll=None)[source]#
Calculates the lift force on each tire based on the current velocity. Varies the output based on the DRS active state.
- Returns:
Front and rear lift forces on each tire (N)
- Return type:
tuple
- Parameters:
v (float)
drs_threshold (float)
pitch (float | None)
roll (float | None)
- class suboptimumg.vehicle.aerodynamics.aerodynamics.DRS(vehicle_model)[source]#
Bases:
object- Parameters:
vehicle_model (VehicleModel)
- drs_activate(drs_threshold)[source]#
Check whether DRS should be activated based on lateral acceleration.
- Parameters:
drs_threshold (float) – Current lateral acceleration threshold (m/s^2)
- Returns:
True if DRS should be activated, False otherwise
- Return type:
bool
- get_drs_drag(v)[source]#
Calculate the drag force based on the current velocity with DRS active.
- Parameters:
v (float) – Current velocity (m/s)
- Returns:
Drag force (N)
- Return type:
float