ross.ShaftElement6DoF
ross.ShaftElement6DoF#
- class ross.ShaftElement6DoF(L, idl, odl, idr=None, odr=None, material=None, n=None, axial_force=0, torque=0, shear_effects=True, rotary_inertia=True, gyroscopic=True, alpha=0, beta=0, tag=None)#
A 6 Degrees of Freedom shaft element.
This class will create a shaft element that takes into account shear stress, rotary inertia and gyroscopic effects. The matrices will be defined considering the following local coordinate vector:
\[[u_0, v_0, w_0, \theta_0, \psi_0, \phi_0, u_1, v_1, w_1, \theta_1, \psi_1, \phi_1]^T\]Being the following their ordering for an element:
\(x_0,u_0\) - horizontal translation;
\(y_0,v_0\) - vertical translation;
\(z_0,w_0\) - axial translation;
\(\theta_0\) - rotation around horizontal, bending on the yz plane;
\(\psi_0\) - rotation around vertical, bending on the xz plane;
\(\phi_0\) - torsion around axial, z direction.
- Parameters
- Lfloat, pint.Quantity
Element length.
- idlfloat, pint.Quantity
Inner diameter of the element at the left node (m).
- odlfloat, pint.Quantity
Outer diameter of the element at the left node (m).
- idrfloat, pint.Quantity, optional
Inner diameter of the element at the right node (m). Default is equal to idl value for cylindrical element.
- odrfloat, pint.Quantity, optional
Outer diameter of the element at the right node (m). Default is equal to odl value for cylindrical element.
- materialross.Material
Shaft material.
- alphafloat, optional
Proportional damping coefficient, associated to the element Mass matrix
- betafloat, optional
Proportional damping coefficient, associated to the element Stiffness matrix
- nint, optional
Element number, coincident 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 the rotor constructor.
- axial_forcefloat, optional
Axial force (N). Default is zero.
- torquefloat, optional
Torque moment (N*m). Default is zero.
- 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.
- tagstr, optional
Element tag; Default is None.
- Returns
- shaft_elementrs.ShaftElement6DoF
A 6 degrees of freedom shaft element, with available gyroscopic, shear and rotary inertia effects.
References
- Hut01
J. R. Hutchingson. Shear coefficients for timoshenko beam theory. J. Appl. Mech., 2001.
Examples
>>> from ross.materials import steel >>> shaft1 = ShaftElement6DoF(L=0.5, idl=0.0, odl=0.01, idr=0.0, odr=0.01, ... material=steel, n=0, axial_force=10, torque=30) >>> shaft2 = ShaftElement6DoF(L=0.5, idl=0.05, odl=0.1, idr=0.05, odr=0.15, ... alpha=0.01, beta=100, material=steel, ... rotary_inertia=False, shear_effects=False) >>> shaft2.kappa 0.7099387976608923
- Attributes
- Poissonfloat
Poisson coefficient for the element.
- kappafloat
Shear coefficient for the element, determined from [Hutchingson, 2001] formulation.
Methods
- C()#
Proportional damping matrix for an instance of a 6 DoF shaft element.
- Returns
- Cnp.ndarray
Proportional damping matrix for the 6 DoF shaft element.
Examples
>>> from ross.materials import steel >>> shaft = ShaftElement6DoF(L=0.25, idl=0, odl=0.05, material=steel) >>> shaft.C().shape (12, 12)
- G()#
Gyroscopic matrix for an instance of a 6 DoFs shaft element.
Gyroscopic matrix for the 6 DoF shaft element. Similar to the Kst stiffness matrix, this Gyro matrix is also multiplied by the value of the rotating speed Omega. It is omitted from this and must be added in the respective analyses.
- Returns
- Gnp.ndarray
Gyroscopic matrix for the 6 DoF shaft element.
Examples
>>> from ross.materials import steel >>> shaft = ShaftElement6DoF(0.25, 0, 0.05, material=steel) >>> shaft.G().shape (12, 12)
- K()#
Stiffness matrix for an instance of a 6 DoF shaft element.
- Returns
- Knp.ndarray
Omega independent stiffness matrix for the 6 DoF shaft element.
Examples
>>> from ross.materials import steel >>> Timoshenko_Element = ShaftElement6DoF(0.25, 0, 0.05, material=steel) >>> Timoshenko_Element.K().shape (12, 12)
- Kst()#
Dynamic stiffness matrix for an instance of a 6 DoF shaft element.
Dynamic stiffness matrix for the 6 DoF shaft element. This is directly dependent on the rotation speed Omega. It needs to be multiplied by the adequate Omega value when used in time depen- dent analyses. The matrix multiplier term is:
[(Iz*Omega*rho)/(15*L)] * [Kst]
and here the Omega value has been suppressed and must be added in the adequate analyses.
- Returns
- Kstnp.ndarray
Dynamic stiffness matrix for the 6 DoF shaft element.
Examples
>>> from ross.materials import steel >>> Timoshenko_Element = ShaftElement6DoF(0.25, 0, 0.05, material=steel) >>> Timoshenko_Element.Kst().shape (12, 12)
- M()#
Mass matrix for an instance of a 6 DoF shaft element.
- Returns
- Mnp.ndarray
Mass matrix for the 6 DoF shaft element.
Examples
>>> Timoshenko_Element = ShaftElement6DoF(0.25, 0, 0.05, material=steel) >>> Timoshenko_Element.M().shape (12, 12)
- __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, alpha=0, beta=0, tag=None)#
- dof_local_index()#
Get the local index for a element specific degree of freedom.
- Returns
- local_index: namedtupple
A named tuple containing the local index.
Examples
>>> # Example using BearingElement >>> from ross.bearing_seal_element import bearing_example >>> bearing = bearing_example() >>> bearing.dof_local_index() LocalIndex(x_0=0, y_0=1)
- dof_mapping()#
Degrees of freedom mapping.
Returns a dictionary with a mapping between degree of freedom and its index.
- Returns
- dof_mappingdict
A dictionary containing the degrees of freedom and their indexes.
Examples
The numbering of the degrees of freedom for each node.
Being the following their ordering for a node:
x_0 - horizontal translation y_0 - vertical translation z_0 - axial translation alpha_0 - rotation around horizontal beta_0 - rotation around vertical theta_0 - torsion around axial
>>> sh = ShaftElement6DoF(L=0.5, idl=0.05, odl=0.1, material=steel, ... rotary_inertia=True, shear_effects=True) >>> sh.dof_mapping()["x_0"] 0
- classmethod from_table(file, sheet_type='Simple', sheet_name=0)#
Instantiate one or more shafts using inputs from an Excel table.
A header with the names of the columns is required. These names should match the names expected by the routine (usually the names of the parameters, but also similar ones). The program will read every row bellow the header until they end or it reaches a NaN.
- Parameters
- filestr
Path to the file containing the shaft parameters.
- sheet_typestr, optional
- Describes the kind of sheet the function should expect:
Simple: The input table should specify only the number of the materials to be used. They must be saved prior to calling the method. Model: The materials parameters must be passed along with the shaft parameters. Each material must have an id number and each shaft must reference one of the materials ids.
- sheet_nameint or str, optional
Position of the sheet in the file (starting from 0) or its name. If none is passed, it is assumed to be the first sheet in the file.
- Returns
- shaft: list
A list of shaft objects.
- classmethod load(file)#
- classmethod read_toml_data(data)#
Read and parse data stored in a .toml file.
The data passed to this method needs to be according to the format saved in the .toml file by the .save() method.
- Parameters
- datadict
Dictionary obtained from toml.load().
- Returns
- The element object.
Examples
>>> # Example using BearingElement >>> from tempfile import tempdir >>> from pathlib import Path >>> from ross.bearing_seal_element import bearing_example >>> from ross.bearing_seal_element import BearingElement >>> # create path for a temporary file >>> file = Path(tempdir) / 'bearing1.toml' >>> bearing1 = bearing_example() >>> bearing1.save(file) >>> bearing1_loaded = BearingElement.load(file) >>> bearing1 == bearing1_loaded True
- save(file)#
Save the element in a .toml file.
This function will save the element to a .toml file. The file will have all the argument’s names and values that are needed to reinstantiate the element.
- Parameters
- filestr, pathlib.Path
The name of the file the element will be saved in.
Examples
>>> # Example using DiskElement >>> from tempfile import tempdir >>> from pathlib import Path >>> from ross.disk_element import disk_example >>> # create path for a temporary file >>> file = Path(tempdir) / 'disk.toml' >>> disk = disk_example() >>> disk.save(file)
- classmethod section(L, ne, s_idl, s_odl, s_idr=None, s_odr=None, alpha=0, beta=0, material=None, n=None, gyroscopic=True)#
Shaft section constructor.
This method will create a shaft section with length ‘L’ divided into ‘ne’ elements.
- Parameters
- odlfloat, pint.Quantity
Outer diameter of the element at the left node.
- idrfloat, pint.Quantity, optional
Inner diameter of the element at the right node; Default is equal to idl value for cylindrical element.
- odrfloat, pint.Quantity, optional
Outer diameter of the element at the right node; Default is equal to odl value for cylindrical element.
- Efloat
Young’s modulus.
- G_sfloat
Shear modulus.
- alphafloat
Proportional damping coefficient, associated to the element Mass matrix
- betafloat
Proportional damping coefficient, associated to the element Stiffness matrix
- materialross.material
Shaft material.
- 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 the rotor constructor.
- axial_forcefloat
Axial force.
- torquefloat
Torque.
- gyroscopicbool
Determine if gyroscopic effects are taken into account. Default is False.
- Returns
- elementslist
List with the ‘ne’ shaft elements.
Examples
>>> # shaft material >>> from ross.materials import steel >>> # shaft inner and outer diameters >>> s_idl = 0 >>> s_odl = 0.01585 >>> sec = ShaftElement.section(247.65e-3, 4, 0, 15.8e-3, material=steel) >>> len(sec) 4 >>> sec[0].i_d 0.0
- summary()#
Present a summary for the element.
A pandas series with the element properties as variables.
- Returns
- A pandas series.
Examples
>>> # Example using DiskElement >>> from ross.disk_element import disk_example >>> disk = disk_example() >>> disk.summary() n 0 n_l 0 n_r 0...
Attributes
n
Set the element number as property.