export_time_variables

Powertrain.export_time_variables(folder_path: str, time_unit: str | None = 'sec', angular_position_unit: str | None = 'rad', angular_speed_unit: str | None = 'rad/s', angular_acceleration_unit: str | None = 'rad/s^2', torque_unit: str | None = 'Nm', driving_torque_unit: str | None = 'Nm', load_torque_unit: str | None = 'Nm', force_unit: str | None = 'N', stress_unit: str | None = 'MPa', current_unit: str | None = 'A') None

It exports the powertrain’s elements’ computed time variables to some files.

It creates a file for each rotating object in the powertrain’s elements. The file name is taken from the rotating object’s name.

The exported files are a .csv files. The time variables are exported in a tabular form, in which each column is a time variable and each row is a simulated time step. The columns are separated by a comma. The first column reports the simulated time steps and the first row reports the column names.

Parameters

folder_pathstr

Path to the folder in which to save the time variables’ files. It must be a non-empty str.

time_unitstr, optional

Symbol of the unit of measurement to which convert the time values in the exported files. It must be a str. Default is 'sec'. See Time.unit for more details.

angular_position_unitstr, optional

Symbol of the unit of measurement to which convert the angular position values in the exported files. It must be a str. Default is 'rad'. See AngularPosition.unit for more details.

angular_speed_unitstr, optional

Symbol of the unit of measurement to which convert the angular speed values in the exported files. It must be a str. Default is 'rad/s'. See AngularSpeed.unit for more details.

angular_acceleration_unitstr, optional

Symbol of the unit of measurement to which convert the angular acceleration values in the exported files. It must be a str. Default is 'rad/s^2'. See AngularAcceleration.unit for more details.

torque_unitstr, optional

Symbol of the unit of measurement to which convert the torque values in the exported files. It must be a str. Default is 'Nm'. See Torque.unit for more details.

driving_torque_unitstr, optional

Symbol of the unit of measurement to which convert the driving torque values in the exported files. It must be a str. Default is 'Nm'. See Torque.unit for more details.

load_torque_unitstr, optional

Symbol of the unit of measurement to which convert the load torque values in the exported files. It must be a str. Default is 'Nm'. See Torque.unit for more details.

force_unitstr, optional

Symbol of the unit of measurement to which convert the force values in the exported files. It must be a str. Default is 'N'. See Force.unit for more details.

stress_unitstr, optional

Symbol of the unit of measurement to which convert the stress values in the exported files. It must be a str. Default is 'MPa'. See Stress.unit for more details.

current_unitstr, optional

Symbol of the unit of measurement to which convert the electric current values in the exported files. It must be a str. Default is 'A'. See Current.unit for more details.

Raises

TypeError
  • If folder_path is not a str,

  • if time_unit is not a str,

  • if angular_position_unit is not a str,

  • if angular_speed_unit is not a str,

  • if angular_acceleration_unit is not a str,

  • if torque_unit is not a str,

  • if driving_torque_unit is not a str,

  • if load_torque_unit is not a str,

  • if force_unit is not a str,

  • if stress_unit is not a str,

  • if current_unit is not a str.

ValueError

If folder_path is an empty str.