Flywheel

class Flywheel(name: str, inertia_moment: InertiaMoment)

Bases: RotatingObject

Flywheel object.

Attributes

namestr

Name of the flywheel.

driven_byRotatingObject

Rotating object that drives the flywheel, for example a DCMotor or a gear (SpurGear, HelicalGear, WormGear, WormWheel).

drivesRotatingObject

Rotating object driven by the flywheel, it can be a gear (SpurGear, HelicalGear, WormGear, WormWheel).

master_gear_ratiofloat

Gear ratio of the fixed joint between the flywheel and its driving rotating object.

master_gear_efficiencyfloat or int

Efficiency of the fixed joint between the flywheel and its driving rotating object.

angular_positionAngularPosition

Angular position of the flywheel.

angular_speedAngularSpeed

Angular speed of the flywheel.

angular_accelerationAngularAcceleration

Angular acceleration of the flywheel.

torqueTorque

Net torque applied on the flywheel.

driving_torqueTorque

Driving torque applied on the flywheel by its driving rotating object.

load_torqueTorque

Load torque applied on the flywheel by its driven rotating object.

inertia_momentInertiaMoment

Moment of inertia of the flywheel.

time_variablesdict

Time variables of the flywheel.

Methods

update_time_variables()

It updates time_variables dictionary by appending the last value of each time variable to corresponding list.

property angular_acceleration: AngularAcceleration

Angular acceleration of the flywheel. It must be an instance of AngularAcceleration.

Returns

AngularAcceleration

Angular acceleration of the flywheel.

Raises

TypeError

If angular_acceleration is not an instance of AngularAcceleration.

property angular_position: AngularPosition

Angular position of the flywheel. It must be an instance of AngularPosition.

Returns

AngularPosition

Angular position of the flywheel.

Raises

TypeError

If angular_position is not an instance of AngularPosition.

property angular_speed: AngularSpeed

Angular speed of the flywheel. It must be an instance of AngularSpeed.

Returns

AngularSpeed

Angular speed of the flywheel.

Raises

TypeError

If angular_speed is not an instance of AngularSpeed.

property driven_by: RotatingObject

Rotating object that drives the flywheel, for example a DCMotor or a gear (SpurGear, HelicalGear, WormGear, WormWheel). It must be a RotatingObject.

To set this property use add_fixed_joint.

Returns

RotatingObject

Master rotating object that drives the flywheel.

Raises

TypeError

If driven_by is not an instance of RotatingObject.

property drives: RotatingObject

Rotating object driven by the flywheel, it can be a gear (SpurGear, HelicalGear, WormGear, WormWheel). It must be a RotatingObject.

To set this property use add_fixed_joint.

Returns

RotatingObject

Rotating object driven by the flywheel.

Raises

TypeError

If drives is not an instance of RotatingObject.

property driving_torque: Torque

Driving torque applied on the flywheel by its driving rotating object. It must be an instance of Torque.

Returns

Torque

Driving torque applied on the flywheel by its driving rotating object.

Raises

TypeError

If driving_torque is not an instance of Torque.

property inertia_moment: InertiaMoment

Moment of inertia of the flywheel. It must be an instance of InertiaMoment.

Once set at the flywheel instantiation, it cannot be changed afterward.

Returns

InertiaMoment

Moment of inertia of the flywheel.

Raises

TypeError

If inertia_moment is not an instance of InertiaMoment.

property load_torque: Torque

Load torque applied on the flywheel by its driven rotating object. It must be an instance of Torque.

Returns

Torque

Load torque applied on the flywheel by its driven rotating object.

Raises

TypeError

If load_torque is not an instance of Torque.

property master_gear_efficiency: float | int

Efficiency of the fixed joint between the flywheel and its driving rotating object. Since the relation between the flywheel and its neighbor elements in the powertrain elements is always a fixed joint, the efficiency is always equal to 1 and cannot be overwritten.

Returns

float or int

Efficiency of the fixed joint between the flywheel and its driving rotating object.

property master_gear_ratio: float

Gear ratio of the fixed joint between the flywheel and its driving rotating object. It must be a positive a float. Since the relation between the flywheel and its neighbor elements in the powertrain elements is always a fixed joint, the gear ratio will be always set to 1 by add_fixed_joint.

To set this property use add_fixed_joint.

Returns

float

Gear ratio of the fixed joint between the flywheel and its driving rotating object.

Raises

TypeError

If master_gear_ratio is not a float.

ValueError

If master_gear_ratio is negative or null.

property name: str

Name of the flywheel. It must be a non-empty str.

It must be a unique name, not shared by other elements in the powertrain elements.

Once set at the flywheel instantiation, it cannot be changed afterward.

Returns

str

Name of the flywheel.

Raises

TypeError

If name is not a str.

ValueError

If name is an empty str.

property time_variables: dict[str, list[UnitBase]]

Time variables of the flywheel. Each time variable is stored as a dictionary key-value pair. The available time variables are:

Corresponding values of the dictionary are lists of the respective time variable values.

At each time iteration, the Solver appends every time variables’ values to the relative list in the dictionary.

Returns

dict

Time variables of the flywheel.

property torque: Torque

Net torque applied on the flywheel. It must be an instance of Torque.

It is computed as the difference between driving_torque and load_torque.

Returns

Torque

Net torque applied on the flywheel.

Raises

TypeError

If torque is not an instance of Torque.

update_time_variables() None

It updates time_variables dictionary by appending the last value of each time variable (key of the dictionary) to corresponding list (value of the dictionary).