ross.stochastic.ST_Rotor
Contents
ross.stochastic.ST_Rotor#
- class ross.stochastic.ST_Rotor(shaft_elements, disk_elements=None, bearing_elements=None, point_mass_elements=None, min_w=None, max_w=None, rated_w=None, tag=None)#
A random rotor object.
This class will create several rotors according to random elements passed to the arguments. The number of rotors to be created depends on the amount of random elements instantiated and theirs respective sizes.
- Parameters:
- shaft_elementslist
List with the shaft elements
- disk_elementslist
List with the disk elements
- bearing_elementslist
List with the bearing elements
- point_mass_elements: list
List with the point mass elements
- tagstr
A tag for the rotor
- Attributes:
- RV_sizeint
Number of random rotor instances.
- ndofint
Number of degrees of freedom for random rotor instances.
- Returns:
- Random rotors objects
Examples
# Rotor with 2 shaft elements, 1 random disk element and 2 bearings >>> import numpy as np >>> import ross as rs >>> import ross.stochastic as srs >>> steel = rs.materials.steel >>> le = 0.25 >>> i_d = 0 >>> o_d = 0.05 >>> tim0 = rs.ShaftElement(le, i_d, o_d, material=steel) >>> tim1 = rs.ShaftElement(le, i_d, o_d, material=steel) >>> shaft_elm = [tim0, tim1]
# Building random disk element >>> size = 5 >>> i_d = np.random.uniform(0.05, 0.06, size) >>> o_d = np.random.uniform(0.35, 0.39, size) >>> disk0 = srs.ST_DiskElement.from_geometry(n=1, … material=steel, … width=0.07, … i_d=i_d, … o_d=o_d, … is_random=[“i_d”, “o_d”], … ) >>> stf = 1e6 >>> bearing0 = rs.BearingElement(0, kxx=stf, cxx=0) >>> bearing1 = rs.BearingElement(2, kxx=stf, cxx=0) >>> rand_rotor = srs.ST_Rotor(shaft_elm, [disk0], [bearing0, bearing1]) >>> len(list(iter(rand_rotor))) 5
Methods
- __init__(shaft_elements, disk_elements=None, bearing_elements=None, point_mass_elements=None, min_w=None, max_w=None, rated_w=None, tag=None)#
- run_campbell(speed_range, frequencies=6, frequency_type='wd')#
Stochastic Campbell diagram for multiples rotor systems.
This function will calculate the damped or undamped natural frequencies for a speed range for every rotor instance.
- Parameters:
- speed_rangearray
Array with the desired range of frequencies.
- frequenciesint, optional
Number of frequencies that will be calculated. Default is 6.
- frequency_typestr, optional
Choose between displaying results related to the undamped natural frequencies (“wn”) or damped natural frequencies (“wd”). The default is “wd”.
- Returns:
- results.speed_rangearray
Array with the frequency range
- results.wdarray
Array with the damped or undamped natural frequencies corresponding to each speed of the speed_range array for each rotor instance.
- results.log_decarray
Array with the log dec corresponding to each speed of the speed_range array for each rotor instance.
- run_freq_response(inp, out, speed_range=None, modes=None)#
Stochastic frequency response for multiples rotor systems.
This method returns the frequency response for every rotor instance, given a range of frequencies, the degrees of freedom to be excited and observed and the modes that will be used.
- Parameters:
- inpint
Input DoF.
- outint
Output DoF.
- speed_rangearray, optional
Array with the desired range of frequencies. Default is 0 to 1.5 x highest damped natural frequency.
- modeslist, optional
Modes that will be used to calculate the frequency response (all modes will be used if a list is not given).
- Returns:
- results.speed_rangearray
Array with the frequencies.
- results.magnitudearray
Amplitude response for each rotor system.
- results.phasearray
Phase response for each rotor system.
- run_time_response(speed, force, time_range, ic=None)#
Stochastic time response for multiples rotor systems.
This function will take a rotor object and plot its time response given a force and a time. This method displays the amplitude vs time or the rotor orbits. The force and ic parameters can be passed as random variables.
- Parameters:
- speed: float
Rotor speed
- force2-dimensional array, 3-dimensional array
Force array (needs to have the same number of rows as time array). Each column corresponds to a dof and each row to a time step. Inputing a 3-dimensional array, the method considers the force as a random variable. The 3rd dimension must have the same size than ST_Rotor.RV_size
- time_range1-dimensional array
Time array.
- ic1-dimensional array, 2-dimensional array, optional
The initial conditions on the state vector (zero by default). Inputing a 2-dimensional array, the method considers the initial condition as a random variable.
- Returns:
- results.time_rangearray
Array containing the time array.
- results.youtarray
System response.
- results.xout
Time evolution of the state vector for each rotor system.
- run_unbalance_response(node, unbalance_magnitude, unbalance_phase, frequency_range=None, modes=None)#
Stochastic unbalance response for multiples rotor systems.
This method returns the unbalanced response for every rotor instance, given magnitide and phase of the unbalance, the node where it’s applied and a frequency range.
Magnitude and phase parameters can be passed as random variables.
- Parameters:
- nodelist, int
Node where the unbalance is applied.
- unbalance_magnitudelist, float, pint.Quantity
Unbalance magnitude (kg.m). If node is int, input a list to make make it random. If node is list, input a list of lists to make it random. If there’re multiple unbalances and not all of the magnitudes are supposed to be stochastic, input a list with repeated values to the unbalance magnitude considered deterministic.
- unbalance_phaselist, float, pint.Quantity
Unbalance phase (rad). If node is int, input a list to make make it random. If node is list, input a list of lists to make it random. If there’re multiple unbalances and not all of the phases are supposed to be stochastic, input a list with repeated values to the unbalance phase considered deterministic.
- frequency_rangelist, float, optional
Array with the desired range of frequencies. Default is 0 to 1.5 x highest damped natural frequency.
- modeslist, optional
Modes that will be used to calculate the frequency response (all modes will be used if a list is not given).
- Returns:
- results.force_resparray
Array with the force response for each node for each frequency
- results.speed_rangearray
Array with the frequencies.
- results.magnitudearray
Magnitude of the frequency response for node for each frequency.
- results.phasearray
Phase of the frequency response for node for each frequencye.
- use_random_var(f, is_random, *args)#
Generate a list of random objects from random attributes.
This function creates a list of objects with random values for selected attributes from ross.Rotor class or its methods.
- Parameters:
- fcallable
Function to be instantiated randomly with its respective *args.
- is_randomlist
List of the object attributes to become stochastic.
- *argsdict
Dictionary instanciating the ross.Rotor class. The attributes that are supposed to be stochastic should be set as lists of random variables.
- Returns:
- f_listgenerator
Generator of random objects.