ross.Mesh
Contents
ross.Mesh#
- class ross.Mesh(driving_gear, driven_gear, gear_mesh_stiffness=None, square_varying_stiffness={'amplitude_ratio': 0, 'enable': False}, backlash={'enable': False, 'error_amp': 0.0, 'initial_value': 0.0, 'sigma': 10000.0, 'smooth_operator': False}, damping_ratio=0.07, orientation_angle=0)#
A class representing the meshing behavior between two gears in contact, including stiffness and contact ratio calculations.
- Parameters:
- driving_gearGearElement
The driving gear object used in the gear pair.
- driven_gearGearElement
The driven gear object used in the gear pair.
- gear_mesh_stiffnessfloat, optional
Directly specify the stiffness of the gear mesh. If not provided, it can be calculated automatically when using GearElementTVMS instead of GearElement. Default is None.
- square_varying_stiffnessdict, optional
Dictionary to enable and configure a square-shaped time-varying mesh stiffness. Keys are:
- enablebool
If True, a square-shaped time-varying mesh stiffness is used. Default is False.
- amplitude_ratiofloat
Ratio of the stiffness amplitude based on the mean value of the mesh stiffness.
Default is {“enable”: False, “amplitude_ratio”: 0}.
- backlashdict, optional
Dictionary to enable and configure the backlash model between the coupled gears. Keys are:
- enablebool
If True, the backlash model is used. Default is False.
- initial_valuefloat
Initial backlash of the gear pair (m). Default is 0.0.
- error_ampfloat
Error amplitude used in the backlash force model. Default is 0.0.
- smooth_operatorbool
If True, a smooth (hyperbolic tangent) approximation is used for the backlash force. Default is False.
- sigmafloat
Parameter related to the regularization of the smooth approach. Default is 1e4.
Default is {“enable”: False, “initial_value”: 0.0, “error_amp”: 0.0, “smooth_operator”: False, “sigma”: 1e4}.
- damping_ratiofloat, optional
Damping ratio used to compute the mesh damping when the backlash model is enabled. Default is 0.07.
- orientation_anglefloat, pint.Quantity, optional
The angle between the line of gear centers and x-axis. Default is 0.0 rad.
- Attributes:
- driving_gearGearElement
The driving_gear object, which contains information about the geometry and properties of the driving gear.
- driven_gearGearElement
The driven gear object, which contains information about the geometry and properties of the wheel gear.
- gear_ratiofloat
The transmission ratio, defined as the ratio of the number of teeth between the driving and driven gears.
- pressure_anglefloat
The pressure angle of the gear mesh (rad).
- contact_ratiofloat
The contact ratio of the gear pair.
- stiffnessfloat
The (constant or mean) mesh stiffness of the gear pair (N/m).
- backlashBacklash or None
The backlash model of the gear pair, if enabled. None otherwise.
Examples
>>> from ross.materials import steel >>> driving = GearElementTVMS( ... n=0, ... material=steel, ... width=0.02, ... bore_diameter=0.0175 * 2, ... module=0.002, ... n_teeth=62, ... pr_angle=0.349066 ... ) >>> driven = GearElementTVMS( ... n=2, ... material=steel, ... width=0.02, ... bore_diameter=0.0175 * 2, ... module=0.002, ... n_teeth=62, ... pr_angle=0.349066 ... ) >>> mesh = Mesh(driving, driven) >>> mesh.stiffness 419603831.338...
Methods
- __init__(driving_gear, driven_gear, gear_mesh_stiffness=None, square_varying_stiffness={'amplitude_ratio': 0, 'enable': False}, backlash={'enable': False, 'error_amp': 0.0, 'initial_value': 0.0, 'sigma': 10000.0, 'smooth_operator': False}, damping_ratio=0.07, orientation_angle=0)#
- compute_contact_ratio()#
Calculate the contact ratio of the gear pair.
- Returns:
- contact_ratiofloat
The calculated contact ratio.
- generate_stiffness_table(stiffness_type=None, n_points=200)#
Generate a table of stiffness values for a gear pair.
- Parameters:
- stiffness_typestr, optional
Type of stiffness to compute. Available options are: - “square”: square varying stiffness - “equivalent”: variable equivalent stiffness Default is None, which uses the stiffness type defined in the Mesh object.
- n_pointsint, optional
Number of data points to evaluate for the stiffness profile. Default is 200.
- Returns:
- theta_rangenp.ndarray
Array of angular positions (rad).
- contact_ratio_rangenp.ndarray
Array of contact ratios.
- stiffness_tablenp.ndarray
Array of stiffness values corresponding to each angular position and contact ratio.
- get_square_varying_stiffness(theta_range, contact_ratio)#
Calculate the square varying stiffness of a gear pair.
- Parameters:
- theta_rangearray-like
Angular positions at which to calculate the stiffness (rad).
- contact_ratiofloat
The contact ratio of the gear pair.
- Returns:
- stiffness_rangearray-like
Stiffness values at the given angular positions (N/m).
- get_stiffness_for_mesh_period(stiffness_type='constant', n_mesh_period=1, n_points=1000)#
Compute the mesh stiffness profile over a specified number of gear mesh periods.
- Parameters:
- stiffness_typestr, optional
Type of stiffness to compute. Available options are: - “square”: square varying stiffness - “equivalent”: variable equivalent stiffness otherwise, a constant stiffness is used.
- n_mesh_periodint, optional
Number of mesh periods to evaluate. Default is 1.
- n_pointsint, optional
Number of angular sample points to compute within the total range. Default is 1000.
- Returns:
- theta_rangenp.ndarray
Array of angular positions (rad) spanning the specified mesh periods.
- stiffness_rangelist of float
List of stiffness values corresponding to each angular position.
- get_variable_equivalent_stiffness(angular_position, contact_ratio)#
Calculate the variable equivalent stiffness of a gear pair.
This method computes the equivalent stiffness of a gear mesh at a given angular position, taking into account the periodic nature of the meshing process and the contact ratio of the gear pair. It is assumed constant rotor speed.
- Parameters:
- angular_positionfloat
Gear angular position for which the meshing stiffness is calculated (rad).
- contact_ratiofloat
The contact ratio of the gear pair.
- Returns:
- stiffnessfloat
The total equivalent meshing stiffness at the given angular position.
- interpolate_stiffness(angular_position)#
Interpolate the mesh stiffness value at a given angular position.
- Parameters:
- angular_positionfloat or array-like
Angular position(s) at which to evaluate the stiffness (rad).
- Returns:
- stiffnessfloat or np.ndarray
Interpolated stiffness value(s) in N/m.
- plot_stiffness_profile(n_mesh_period=1, n_points=1000, angle_units='rad', stiffness_units='N/m', stiffness_type=None, **kwargs)#
Plot the gear mesh stiffness profile over one or more meshing periods.
- Parameters:
- n_mesh_periodint, optional
Number of mesh periods to plot. Default is 1.
- n_pointsint, optional
Number of data points to evaluate for the stiffness profile. Default is 1000.
- angle_unitsstr, optional
Units for the angular position axis. Default is ‘rad’.
- stiffness_unitsstr, optional
Units for the stiffness axis. Default is ‘N/m’.
- stiffness_typestr, optional
Type of stiffness to compute. Available options are: - “constant”: constant stiffness - “square”: square varying stiffness - “equivalent”: variable equivalent stiffness Default is None, which uses the stiffness type defined in the Mesh object.
- **kwargsdict, optional
Additional keyword arguments passed to plotly.graph_objects.Figure.update_layout for customizing the figure (e.g., title, font, size, legend settings, etc.).
- Returns:
- figgo.Figure
Figure object.