ross.stochastic.ST_ShaftElement#

class ross.stochastic.ST_ShaftElement(L, idl, odl, idr=None, odr=None, material=None, n=None, axial_force=0, torque=0, shear_effects=True, rotary_inertia=True, gyroscopic=True, shear_method_calc='cowper', is_random=None)#

Random shaft element.

Creates an object containing a generator with random instances of ShaftElement.

Parameters:
Lfloat, pint.Quantity, list

Element length. Input a list to make it random.

idlfloat, pint.Quantity, list

Inner diameter of the element at the left position. Input a list to make it random.

odlfloat, pint.Quantity, list

Outer diameter of the element at the left position. Input a list to make it random.

idrfloat, pint.Quantity, list, optional

Inner diameter of the element at the right position Default is equal to idl value (cylindrical element) Input a list to make it random.

odrfloat, pint.Quantity, list, optional

Outer diameter of the element at the right position. Default is equal to odl value (cylindrical element) Input a list to make it random.

materialross.material, list of ross.material

Shaft material. Input a list to make it random.

nint, optional

Element number (coincident with it’s first node). If not given, it will be set when the rotor is assembled according to the element’s position in the list supplied to

axial_forcefloat, list, optional

Axial force. Input a list to make it random. Default is 0.

torquefloat, list, optional

Torque Input a list to make it random. Default is 0.

shear_effectsbool, optional

Determine if shear effects are taken into account. Default is True.

rotary_inertiabool, optional

Determine if rotary_inertia effects are taken into account. Default is True.

gyroscopicbool, optional

Determine if gyroscopic effects are taken into account. Default is True.

shear_method_calcstr, optional

Determines which shear calculation method the user will adopt. Default is ‘cowper’

is_randomlist

List of the object attributes to become random. Possibilities:

[“L”, “idl”, “odl”, “idr”, “odr”, “material”, “axial_force”, “torque”]

Methods

__init__(L, idl, odl, idr=None, odr=None, material=None, n=None, axial_force=0, torque=0, shear_effects=True, rotary_inertia=True, gyroscopic=True, shear_method_calc='cowper', is_random=None)#
plot_random_var(var_list=None, histogram_kwargs=None, plot_kwargs=None)#

Plot histogram and the PDF.

This function creates a histogram to display the random variable distribution.

Parameters:
var_listlist, optional

List of random variables, in string format, to plot. Default is plotting all the random variables.

histogram_kwargsdict, optional

Additional key word arguments can be passed to change the plotly.go.histogram (e.g. histnorm=”probability density”, nbinsx=20…). *See Plotly API to more information.

plot_kwargsdict, optional

Additional key word arguments can be passed to change the plotly go.figure (e.g. line=dict(width=4.0, color=”royalblue”), opacity=1.0, …). *See Plotly API to more information.

Returns:
figPlotly graph_objects.Figure()

A figure with the histogram plots.

Examples

>>> import ross.stochastic as srs
>>> elm = srs.st_shaft_example()
>>> fig = elm.plot_random_var(["odl"])
>>> # fig.show()
random_var(is_random, *args)#

Generate a list of objects as random attributes.

This function creates a list of objects with random values for selected attributes from ross.ShaftElement.

Parameters:
is_randomlist

List of the object attributes to become stochastic.

*argsdict

Dictionary instanciating the ross.ShaftElement class. The attributes that are supposed to be stochastic should be set as lists of random variables.

Returns:
f_listgenerator

Generator of random objects.