DYNROT LIGHT A FINITE ELEMENT CODE FOR ROTORDYNAMIC ANALYSIS Dipartimento di Meccanica Politecnico di Torino Torino – Italy September 2003 Foreword DYNROT is a code for rotordynamics computations based on the finite element method (FEM). It has been evolved in various versions through more than 20 years. The present version is based on the MATLAB1 interactive software package and consequently can be used on any hardware on which MATLAB has been installed. Version 4.0 or higher of MATLAB is required. The original code was written at the end of the 1970s by Giancarlo Genta and Antonio Gugliotta, both of Department of Mechanics of Politecnico di Torino, using HPL and then HP-BASIC language, for desktop HP 9800 computers. Subsequent versions written in Fortran and C languages were developed in the eighties and finally the present version using MATLAB package was evolved. Its superiority lays mainly in the ability of MATLAB of dealing with complex arithmetics, its graphic tools and the possibility of easily obtaining output ASCII files. At present the DYNROT project is coordinated by Giancarlo Genta. Its aim is to continue the development of the code to widen its capabilities and to make it an even more powerful tool for the dynamic analysis of rotating machinery. A number of persons worked and is still working in it, mostly undergraduate and post graduate students. Among them Giacomo Brussino, Philip Miller, Domenico Bassani, Cristiana Delprete, Stefano Carabelli and Andrea Tonoli must be mentioned. G. Genta Torino, Sptember 2003 1 MATLAB is a trademark of The MathWorks, Inc. Contents 3 Contents Foreword Contents 1 3 Part 1. How to get started 1.1 Installation 1.2 Running DYNROT 1.3 Structure of the driver M-file 1.4 How to input data 5 6 6 7 8 Part 2. General informations 2.1 Aims of the code 2.2 Theoretical background 2.3 Parametric modelling 2.4 Units 11 11 11 12 12 Part 3. Elements 3.1 Element 1: beam 3.2 Element 2: tapered beam 3.3 Element 3: spring 3.4 Element 4: damper 3.5 Element 5: concentrated mass 13 13 14 15 16 17 Part 4. Construction of the model 4.1 Construction of the matrices of the elements 4.2 Saving matrices 4.3 Function DYNPLOT 4.4 Function DYNPLOT1 19 19 20 20 20 Part 5. Solution programs: static analysis 5.1 Function DYNSTAT 5.2 Function STATPLT 5.3 Function FORCES 21 22 22 23 Part 6. Solution programs: critical speeds 6.1 Function DYNCRIT 6.2 Function CRITPLT 25 25 26 Part 7. Solution programs: unbalance response 7.1 Function DYNUNBAL 7.2 Function UNPLT 27 27 28 Part 8. Solution programs: Campbell diagram 8.1 Functions DYNCAMP and DYNDAMP 8.2 Function CAMPLT 29 30 31 3 4 Contents 8.3 Function CAMPLT1 8.4 Function ROOTPLT 31 32 Part 9. Examples 9.1 Example TEST1 9.2 Example TEST2 9.3 Example TEST3 9.4 Example TEST4 33 33 35 36 38 4 Part 1 How to get started 1.1 Structure of the code The code is based on a number of MATLAB M-files. Some of them are script files, while others are function files. The input data for any particular program are contained in a particular M-file, that can be prepared by the user with any editor or generated interactively using the programs contained in the INPUT directory (see section 1.5). Examples of these data files are supplied in the directory DATA. A driver called DYNROT can be run by typing DYNROT in the MATLAB command window followed by a <RETURN>. A menu then appears, from which all parts of the code can be accessed. The computation must start with the construction of the model from the data mfile, created using any editor. Once the model has been prepared, the solutions of the various problems are obtained by running the several M-files which solve them (e.g., DYNCRIT.M finds the critical speeds, UNBAL.M computes the unbalance response, etc. ). They are all function files and consequently the calling statement must contain the relevant parameters, although alternative ways of running solution routines exist. An in-line help is provided: for example, by typing HELP DYNCRIT a short description of the DYNCRIT function and of the calling parameters needed is supplied. The user can call any number of solution routines, to solve the various problems related to a particular model. If the solution is impossible, as calling the unbalance response of a rotor whose unbalances have not been defined, the program stops with an error message (e.g. -** ERROR ** Unbalances not defined-). Many solution routines supply the results in form of messages on the screen and/or of a plot on MATLAB graphic windows. All messages on the screen are saved in a diary-file while each plot is drawn in a separate graphic window which can then be recalled at will. After computations are performed, the results can be post processed in three different ways. The most direct is that of calling a function M-file provided in the DYNROT diskette (e.g., function CRITPLT.M plots the mode shapes at the critical speeds). The outputs are generally plots in various graphic windows. The second alternative is that of loading the file containing the results from within MATLAB either using the command LOAD (e.g. LOAD CRSPEED.### MAT, where ### is the code of a particular problem, will result in loading the scalar quantity "neig" expressing the number of critical speeds, the one-column matrix Part 1: How to get started 6 OMCR, containing the critical speeds, and the matrix of the eigenvectors EIGV, all prepared by the function DYNCRIT). The matrices can then be saved in ASCII form and processed using any graphical program. The numbers can be passed, through an ASCII file, to any word processor to be included in a report. The third alternative is that of preparing a code which reads the output file to produce a plot or a report, either directly from the outputs in MATLAB format or, after conversion, in ASCII form. 1.2 Installation To install DYNROT on a computer, MATLAB must be installed first. A directory for DYNROT must be created on the hard disk to contain all the program M-files (e.g. C:\DYNROT). The directory with the M-files must be inserted in the MATLABPATH. No other changes in the MATLABPATH will be needed. All M-files from PROGRAM subdirectory of the DYNROT diskette (or CD) must be copied in the chosen directory of the hard disk. The data files can be located in any directory, provided it is accessible to MATLAB. Note that in the driver files included for the examples this directory is C:\DYNROT\DATA; if this name is changed, the driver files must be changed accordingly. The data and the results of each case can be placed in different directories. They can be subdirectories of C:\DYNROT or not. These directories must be created before starting the computations and need not to be included in the MATLABPATH. To run the test cases the data M-files must be copied on the hard disk. 1.3 Running DYNROT Before running the code, the M-file containing the data must be moved in a directory which is included into the matlabpath. Alternatively, a directory for data (e.g., C:\DYNROT\DATA) can be created and included into the matlabpath. The user can invoke each file from the keyboard one by one and perform all the computation in this way. This procedure is however not very convenient. If the code is installed on a personal computer the most convenient way to run DYNROT LIGHT is by using the interactive driver supplied with the code. Type first DYNROT to start the driver. A first menu will be visualized to state whether: • to start a new computation (in case the matrices of the particular problem have not been computed earlier); • to continue a computation already performed. In some cases the directory in which to store the data or the results must be supplied. The computation then goes on using different menus, until the user exits from the interactive driver. Note that to change problem code the user must exit and enter again, typing DYNROT. Another way to run the code, which is best suited for computers other than personal computers, is that of preparing a driver, i.e a M-file which acts as a batch 6 7 Part 1: How to get started command file and calls all the needed script and function files. This is important mainly to go through the first part of the computation, the building of the model. For the subsequent parts, the solution and the post processing, the relevant function files can easily be called by the user from the keyboard. Some drivers are included in the directory DATA (e.g. TEST1DRV.M). Drivers with any name can be created, the only limitation being that the name must be different from that of the M-file containing the data. The driver M-file must be moved to a directory included in the MATLABPATH. Once the driver is started, all the computations included in it are performed automatically. They can be just the construction of the model or the whole solution of the problem, if all the required solution and post-processing functions are called. The driver can contain any other instruction the userwants to include, and all its outputs are printed in the diary file. All messages outputted by the function M-files not included in the driver but called directly from the keyboard will not be included in the diary file, except if the user creates explicitly a new diary file. 1.4 Structure of the driver M-file This section describes the structure of the driver M-file, which is not needed to run the code using the interactive driver. It can be skipped completely by the user who plans to use DYNROT as an interactive code. The driver M-file is a standard script file which must contain the following instructions: clear filename = 'aaaaaa'; aaaaaaa.m is the name of the m-file (maximum length of filename is 8 characters) containing the data of the problem to be studied. Among the data, there will be a code of three characters designating the problem to be solved. If the code is xxx, all files containing the results will have xxx as extension (example: filename = 'test1'; in file TEST1.M there is the instruction jobcode = 'ts1';). datapath = yyyyyyyyy; yyyyyyyyy is a directory in which all results of the problem to be solved will be written (example: datapath = 'c:\dynrot\test1\'; the final \ is needed). This directory must be created in advance. eval (['delete ' datapath 'dynrot.log']); eval (['diary ' datapath 'dynrot.log']); These instructions delete the old diary file and prepare a new one. The diary file is named DYNROT.LOG and is created in the directory yyyyyyyyy. dynprep(filename,datapath); 7 Part 1: How to get started 8 DYNPREP function is run to build the model. If other parameters must be passed to function dynprep, they must have be arranged in a form of a single matrix (e.g. matrix par) and the line becomes (see section 2.3.): dynprep(filename,datapath,par); After this instruction all the required function M-file are called, e.g. dynplot('xxx',0); It calls function DYNPLOT which plots all the model. In all function M-files the first parameter xxx is the three-characters code which designates the particular problem and corresponds to the code entered in the data M-file aaaaaaa.M. In the present example the second parameter is 0. diary off This is the last instruction, which closes the diary file. It must not be omitted. 1.5 How to input data As already stated, data must be entered by creating a script M-file. The M-file containing the data can be created and archived in the directory containing the results of the particular problem, but before running the program it must be moved in a directory included in the matlabpath. The supplied data files contain many comment lines, so they should be selfexplanatory. It is advisable to use one of them to prepare new data files, simply substituting the data with those of the problem to be studied. The first two instructions must be of the type jobcode = 'xxx'; jobtitle = 'cccccccccccccccc'; xxx is a three-characters code designating the problem whose data are specified. All files containing the results will have xxx as extension. cccccccccccccccc is a string (maximum 256 characters) containing a description of the problem. It is used only for description purposes, is displayed in outputs but is never actually used in computations. Keep it as short as possible, as in some graphic outputs there may be not much space for it. The instructions oscale = a; lscale = b; then follow. a and b are either 1, or 2 or 3. They designate the scales for spin speed (Ω) and frequency (ω) axes in graphical outputs: • oscale (lscale) = 1 scales in rad/s • oscale (lscale) = 2 scales in rpm • oscale (lscale) = 3 scales in Hz Note that oscale and lscale may be omitted: in this case all scales will be in rad/s. 8 9 Part 1: How to get started The data are supplied in form of matrices, using MATLAB notation. Matrix COORD contains the nodal co-ordinates. It has as many rows as there are nodes and 1 column containing the z co-ordinates of the nodes. Matrix ELEM contains element data. It has as many rows as there are elements and 6 columns. In column 1 a number designating the type of element is entered. In the present version of the code there are 5 types of elements (see Part 3). In the following 2 columns the numbers of the nodes are listed. A zero is introduced for nodes not needed. In columns 4 and 5 the numbers of the geometry and of the material are listed. Column number 6 is for the rotation index, a number linked with the spin speed of the particular element. Matrix MATER contains data of materials. It has as many rows as there are different materials and 6 columns. In the first column the number of the material is entered while the other columns contain the Young's modulus, Poisson's ratio, density, loss factor and thermal expansion coefficient (actually not needed in the LIGHT version). Matrix GEOM contains geometrical data of elements; the term geometrical must be here intended in a generalized sense, as it contains also axial forces in case of beam elements. It has as many rows as there are different geometries and a variable number of columns. In the first column the number of the geometries is entered, the second column contains the geometry type (5 geometries defined in this version of the code) while the other columns contain properties of the elements. Note that all lines of matrix GEOM must contain the same number of elements: zeros must be inserted in the empty columns of elements which require a smaller number of parameters. The instructions defining static forces then follow. • gx is a number defining the constant (gravitational) acceleration in direction of x-axis. • gy is a number defining the constant (gravitational) acceleration in direction of y-axis. If no gravitational acceleration is accounted for, gx and gy need not to be defined. Matrix STFOR contains data of constant concentrated generalized forces acting at the nodes in the inflection planes. It has as many rows as there are concentrated forces and 5 columns. In the first column the number of the node on which the force acts is entered. The following columns contain the values of the forces in x and y directions and the values of the moments about y and x axes. Matrix UNFOR contains data about unbalances. It has as many rows as there are concentrated unbalances and 5 columns. In the first column the number of the node on which the unbalance acts is entered. The following columns contain the values of the static unbalances in x and y directions and the values of couple unbalances about y and x axes. Matrix STATUS defines whether the various degrees of freedom of the nodes are master, slave or constrained. It has as many rows as there are nodes and 3 columns. In the first column the number of the node is entered. The following 2 columns contain the status of the first (complex radial displacement) and the second (complex bending rotation) degree of freedom for flexural behaviour. 9 Part 1: How to get started 10 The overall characteristics of a model are listed in a vector named GLOBAL, which is automatically generated by the code. They are: Row Content 1 number of nodes 2 number of elements 3 number of materials 4 number of geometries 5 number of static forces 6 number of unbalances 16 number of substructures 17 index for hysteretic rotating damping 18 index for hysteretic non rotating damping 19 index for viscous rotating damping 20 index for viscous non rotating damping 31 number of degrees of freedom (flexural behaviour) 32 number of master degrees of freedom (flexural behaviour) 33 number of slave degrees of freedom (flexural behaviour) 51 gx 52 gy 61 index for omega scale 62 index for frequency scale 10 Part 2 General informations 2.1 Aims of the code DYNROT LIGHT is a simplified tool for the dynamic analysis of rotating machines. Its main aim is then to perform all the usual rotordynamics computations, such as the evaluation of critical speeds and the plotting of the Campbell diagram of axi-symmetrical rotor-stator systems. While building the model, the inertial properties (mass, moments of inertia and co-ordinates of the centre of mass) of the whole model and of the various substructures are computed, printed to the screen and in the diary file. As the whole machine is made of different parts which can rotate at different speeds, all outputs can be obtained for the various substructures separately. A substructure is here defined as the assembly of all the parts which rotate at the same spin speed. The spin speed is entered as rotation index: rotation index equal to zero characterizes the nonrotating parts of the machine (stator); rotation index equal to 1 characterize all the parts of the machine rotating at the nominal speed. If the value of the rotation index is α, the spin speed is α times the nominal speed. Although it is possible, to use slightly different values of the rotating index (e.g., 1 and 1.0000001 for parts rotating at the nominal speed) to obtain separate outputs for parts constituting the same substructure (in the above mentioned sense), this must be done with extreme care, particularly if hysteretic is present. 2.2 Theoretical background DYNROT code uses more or less a standard finite element formulation, with some deviations aimed to allow a more straightforward analysis of rotating systems. The most important peculiar feature of DYNROT code is the use of complex coordinates to express the flexural displacements and rotations. Assume that z-axis of a fixed reference frame lays along the rotation axis of the machine and that each node has 4 degrees of freedom, two translational and two rotational. The two translational degrees of freedom ux and uy are composed to produce the complex displacement r = ux + i uy and the two rotational degrees of freedom ϕx and ϕy are composed to produce the complex rotation ϕ = ϕy - i ϕx. The complex co-ordinates r and ϕ are dealt with in the way real co-ordinates usually are. Part 2: General informations 12 2.3 Parametric modelling There are cases in which the user wants to investigate the effects of the changes in some of the data of a certain model. Obviously he can perform the relevant computations several times stating different values of the parameters, but this can be time consuming. DYNROT allows leaving some of the data in symbolic form and then passing the relevant numerical values to the code at the time of the execution. In this way it is possible to call the various routines within a loop, to study the effects of the variation of the design parameters. An example, related to the construction of a plot of the critical speeds as functions of the stiffness of the bearings, is shown in Example TEST 4. The user can refer to this example for all relevant informations. The parameters are passed to DYNPREP function and from it to the other functions computing the model of the system in the form of a matrix named par. It can have any number of rows or columns. 2.5 Units All numerical quantities are expected to be introduced into the code using any consistent system. Obviously the use of S.I. system is highly recommended and consequently the most important units are expected to be: length density ang. vel. pressure m kg/m3 rad/s Pa mass kg stress N/m2 frequency rad/s force angle decay rate N rad 1/s There is only one exception: in few cases angles are requested to be introduced in degrees, as it is far more immediate for the user. In this case the user is explicitly warned to do so in the present guide. The user is explicitly warned not to use mm for lengths and N/mm2 for stresses and Young's moduli: in this case the correct unit for densities would not be kg/mm3 but t/mm3, which could lead to misunderstandings. 12 Part 3 Elements Only 5 element are included in the library of DYNROT LIGHT code: 1 beam 2 tapered beam 3 spring 4 damper 5 mass The data concerning the element connectivity and some general characteristics are given in ELEM matrix while those concerning the geometrical properties of the element are given in GEOM matrix. In this way if some elements have the same geometrical properties the latter can be listed only once. 3.1 Element 1: beam Element 1 is a constant circular or annular cross section. Its formulation is of the type usually referred to as simple Timoshenko beam, with a consistent formulation mass and gyroscopic matrices. Two different outer diameters can be defined: an outer diameter and a mass outer diameter. Usually the two are coincident (in this case the mass outer diameter can be set to zero), but the second can be larger than the first if there is a part of the cross section of the shaft which contributes to its inertial properties and not to its stiffness, as in the case of laminations and windings of electric motors and generators. In this case a ratio of densities can be defined as the ratio between the density of the part of the element not contributing to its stiffness and the density of the inner core. The last two parameters must be entered, even if they can be set to zero if they are useless. It has two nodes at its ends. The data to be introduced in matrix ELEM are 1 Type number of the node at one end (it is immaterial which end) N1 number of the node at the other end N2 number of the type of geometry (reference to matrix GEOM) Geometry number of the type of material (reference to matrix MATER) Material Rotation index 0 if the element belongs to the stator; 1 if the element belongs to the rotor (spinning at the nominal speed); r = ratio between the spin speed of the element and the nominal speed. Part 3: Elements 14 Data to be introduced in matrix GEOM number of the geometry (reference to matrix ELEM) Column 1 code of the element type (1) (reference to matrix ELEM) Column 2 inner diameter Column 3 outer diameter Column 4 axial force acting on the element Column 5 outer "mass" diameter (0 if equal to the outer diameter) Column 6 ratio of densities (outer part/inner core) Column 7 Data to be introduced in matrix MATER number of the material (reference to matrix ELEM) Column 1 Young's modulus Column 2 Poisson's ratio Column 3 density Column 4 loss factor Column 5 3.2 Element 2: tapered beam Element 2 is a beam with circular or annular cross section with linearily varying inner and outer radii. Its formulation is of the type usually referred to as simple Timoshenko beam two nodes at its ends. A consistent formulation has been used for mass and gyroscopic matrices. The data to be introduced in matrix ELEM are 2 Type number of the node at one end (it is immaterial which end) N1 number of the node at the other end N2 number of the type of geometry (reference to matrix GEOM) Geometry number of the type of material (reference to matrix MATER) Material Rotation index 0 if the element belongs to the stator; 1 if the element belongs to the rotor (spinning at the nominal speed); r = ratio between the spin speed of the element and the nominal speed. Data to be introduced in matrix GEOM number of the geometry (reference to matrix ELEM) Column 1 code of the element type (2) (reference to matrix ELEM) Column 2 inner diameter at node 1 Column 3 outer diameter at node 1 Column 4 inner diameter at node 2 Column 5 outer diameter at node 2 Column 6 axial force acting on the element Column 7 14 15 Part 3: Elements Data to be introduced in matrix MATER Column 1 number of the material (reference to matrix ELEM) Column 2 Young's modulus Column 3 Poisson's ratio Column 4 density Column 5 loss factor 3.3 Element 3: spring Element 3 is a spring element which can be connected at both ends at two nodes of the structure (e.g. to simulate joints, bearings between two different shafts or between a shaft and the stator) or at one node only, the other end being fixed, i.e. connected with the ground (e.g. to simulate an elastic support). The characteristics of the spring must be isotropic in xy plane. If two nodes are present, their co-ordinates must be the same. The data to be introduced in matrix ELEM are 3 Type number of the node at one end (it is immaterial which end) N1 number of the node at the other end (0 if grounded) N2 number of the type of geometry (reference to matrix GEOM) Geometry number of the type of material (reference to matrix MATER). Material The material must be specified to introduce the loss factor. Rotation index 0 if the element belongs to the stator; 1 if the element belongs to the rotor (spinning at the nominal speed); r = ratio between the spin speed of the element and the nominal speed. Data to be introduced in matrix GEOM number of the geometry (reference to matrix ELEM) Column 1 code of the element type (3) (reference to matrix ELEM) Column 2 stiffness in x (y) direction Column 3 rotational stiffness about x (y) axis Column 4 Data to be introduced in matrix MATER Column 1 number of the material (reference to matrix ELEM) Column 2 Young's modulus Column 3 Poisson's ratio Column 4 density Column 5 loss factor 15 Part 3: Elements 16 3.4 Element 4: damper Element 4 is a viscous damper element which can be connected at both ends at two nodes of the structure or at one node only, the other end being fixed, i.e. connected with the ground, in a way which is similar to the spring element. The characteristics of the damper must be isotropic in xy plane. If two nodes are present, their co-ordinates must be the same. The data to be introduced in matrix ELEM are Type 4 N1 number of the node at one end (it is immaterial which end) N2 number of the node at the other end (0 if grounded) Geometry number of the type of geometry (reference to matrix GEOM) Material number of the type of material (reference to matrix MATER) The material needs not be specified as it is useless and a 0 can be entered. Rotation index 0 if the element belongs to the stator; 1 if the element belongs to the rotor (spinning at the nominal speed); r = ratio between the spin speed of the element and the nominal speed. In case of intershaft dampers, the spin speed is that of the element in which energy is dissipated. Data to be introduced in matrix GEOM Column 1 number of the geometry (reference to matrix ELEM) Column 2 code of the element type (4) (reference to matrix ELEM) Column 3 damping coefficient in x (y) direction Column 4 rotational damping coefficient about x (y) axis No data need to be introduced in matrix MATER 16 17 Part 3: Elements 3.5 Element 5: concentrated mass Element 5 is an isotropic mass element. Owing to isotropy, the moments of inertia Jx and Jy are equal and are indicated as Jt. The element has only one node. The data to be introduced in matrix ELEM are Type 5 N1 number of the node N2 0 Geometry number of the type of geometry (reference to matrix GEOM) Material 0 Rotation index 0 if the element belongs to the stator; 1 if the element belongs to the rotor (spinning at the nominal speed); r = ratio between the spin speed of the element and the nominal speed. Data to be introduced in matrix GEOM number of the geometry (reference to matrix ELEM) Column 1 code of the element type (5) (reference to matrix ELEM) Column 2 mass Column 3 transversal moment of inertia Jt (Jx = Jy) Column 4 Column 5 polar moment of inertia Jp (Jz) No data need to be introduced in matrix MATER 17 Part 3: Elements 18 18 Part 4 Construction of the model The model is built by the script M-file DYNPREP.M. It performs the following tasks: • Construction of the map of the degrees of freedom; • Construction of the matrices of the elements and assembly in the matrices of the structure; • Matrix condensation (Guyan reduction); • Saving all the matrices computed in suitable files. The above mentioned tasks are mainly performed by calling suitable functions. Four function M-files can be called to plot the model after it has been assembled: • • DYNPLOT( jobcode, nsub). DYNPLOT1( jobcode, nsub, [tview <0>, type <0>, mesh <0>, light <0>]). 4.1 Construction of the matrices of the elements All matrices are written in a form which distinguishes directly the master degrees of freedom from the slave degrees of freedom. In order to reduce the size of the problem, DYNROT code employs Guyan reduction. The user must specify in matrix STATUS in the input M-file whether each degree of freedom has to be considered as a master or as a slave degree of freedom. A third option is that the degree of freedom is constrained, which is a way to add rigid constraints, as an alternative to introduce a spring element with very high stiffness. As a general rule, degrees of freedom corresponding to nodes in which large inertias or concentrate damping are located must be stated as master. In the case a part of the structure is much stiffer than other parts, most of its degrees of freedom can be assumed to be slave, except the minimum number needed to identify the position in space of the rigid body. Guyan reduction can be avoided and all degrees of freedom can be assumed to be master. The user is expected to experiment with different condensation schemes, in order to understand how long does it take to run the different solution routines with different numbers of degrees of freedom on his particular installation of DYNROT. The convergence of the results to those of the complete computation (all degrees of freedom being master) with an increasing number of master degrees of freedom should be noted. The choice of which degrees of freedom can be considered as slave degrees of freedom is mainly a fact of experience and physical insight of the problem. Part 4: Construction of the model 20 4.2 Saving matrices DYNPREP code stores automatically the following data files, in MATLAB format, (### is the code of the particular problem): • path.###: contains the path of the problem; it is written in the current directory, which must be included in the MATLABPATH • global.###: contains all global data of the model • matrices.###: contains matrices of flexural problem All files except path.### are written in the directory of the particular problem indicated in path.###. It does not need to be included in the MATLABPATH. 4.3 Function DYNPLOT DYNPLOT( jobcode, nsub) Plotting of the model of the system. The whole model or any of its substructures can be plotted. Parameters jobcode code of problem nsub number of substructure to be plotted ( 0 = all) 4.4 Function DYNPLOT1 DYNPLOT(jobcode, nsub, [tview <0>, type <0>, mesh <0>, light <0>]) Plotting a tri-dimensional image of the model of the system. Some problems may occur with the representation of hidden surfaces. The user is suggested to try with different choices of combinations of viewpoint, type of plot and light conditions. Parameters code of problem jobcode number of substructure to be plotted ( 0 = all) nsub [number/string] (default value 0) viewpoint options [0/1] (default value 0) tview 0: view from right (positive z) 1: view from left (negative z) plot type options [0/1] (default value 0) type 0: view 1: section mesh options [0/1/2] (default value 0) mesh 0: only edges shown 1: element contours shown 2: no edge shown lighting options [0/1] (default value 0) light 0: light condition 1 1: light condition 2 20 Part 5: Solution programs; static analysis 21 Part 5 Solution programs: static analysis Functions • • • DYNSTAT( jobcode, state, [ommin, ommax, deltaom]) STATPLT( jobcode, [omega<-1>, nsub<0>]) FORCES( jobcode, type, omega, [file<0>]) This group of solution routines computes the static flexural deformations of the system under the effect of static forces. Static forces can be defined in the input file in the form of concentrated nodal forces and moments or in that of a gravitational acceleration acting in a direction perpendicular to the rotation axis. The forces, moments and accelerations must be introduced in the form of their components in xz and yz planes. The equation which solves the problem for a linear isotropic rotor is ([K ] − iΩ[C r ] + i[K "r ]){q} = {Fn } If viscous damping is not present, the response does not depend on the speed. To plot the deflected shape or to compute the forces on the elements, use functions STATPLT or FORCES (the latter with type = 1), which require program DYNSTAT to be run in advance. 21 Part 5: Solution programs; static analysis 22 5.1 Function DYNSTAT DYNSTAT( jobcode, state, [ommin, ommax, deltaom]) Response to static forces. Parameters jobcode code of problem state [ 0/1] options 0: damping not considered 1: hysteretic damping considered 2: viscous damp. considered (response function of speed) ommin [rad/s] minimum spin speed (only if state = 2) ommax [rad/s] maximum spin speed (only if state = 2) deltaom [rad/s] spin speed increment (only if state = 2) Output file (in the selected directory) STATRES.### containing: STATRES: a matrix containing the complex deflected shape (each row contains one of the displacement vectors starting from the second column; in the first column the speed is entered.) 5.2 Function STATPLT STATPLT( jobcode, [omega<-1>, nsub<0>]) Potting of the deflected shape due to static loading. The projections on xz and yz planes are plotted separately. STATPLT requires program DYNSTAT to be run in advance. Parameters jobcode code of problem omega speed (if a negative number is entered, all shapes are plotted) nsub number of substructure to be plotted ( 0 = all) 22 23 Part 5: Solution programs; static analysis 5.3 Function FORCES FORCES( jobcode, type, omega, [file<0>]) Computing the forces due to various loading acting on the elements: for static loading it must be run with type = 1. STATFOR requires program DYNSTAT to be run in advance. The values of the forces are printed on the screen, and, if the function is called by the driver M-file, are automatically written in the diary file DYNROT.LOG. If the function is called from the keyboard, it is possible to write the outputs in a diary file using variable file as input parameter. Be careful that a non numeric value of variable file used when the function is called by the driver causes the diary file DYNROT.LOG to be closed. Parameters code of problem jobcode [0/1] options (default value 0) type 0: forces on elements due to unbalance 1: forces on elements due to static loading spin speed at which the forces are computed omega [ number/string] (default value 0) file file is a number: no file recorded file is a string: recording of file '###file.log' Output file (in the selected directory) ###file.log ASCII file (recorded only if file is a string) containing the outputs of the program. 23 Part 6 Solution programs: critical speeds Functions • • DYNCRIT( jobcode, [antyp <0>, ncrit<10>, par<1>]) CRITPLT( jobcode, ncrit1, ncrit2, [state<0>, nsub<0>]) This group of solution routines computes the critical speeds of the system and plots the corresponding mode shapes. The basic equation which solves the problem for a linear isotropic rotor is ( ) det − ω 2 ([M ] − [G ]) + [K ] = 0 To plot the mode shapes at critical speeds, use function CRITPLT (requires program DYNCRIT to be run in advance). 7.1 Function DYNCRIT DYNCRIT( jobcode, [antyp <0>, ncrit<10>, par<1>]) Computation of critical speeds and secondary critical speeds. The system is assumed to be undamped. If damping is present in the model, it is neglected. The values of the critical speeds are written on the screen and recorded in the diary file. Parameters jobcode code of problem ncrit maximum number of critical speeds computed (def. val. 10) par ratio lambda/omega for secondary critical speeds (default value 1) Output file (in the selected directory) CRSPEED.### containing: neig: number of critical speeds OMCR : vector with critical speeds EIGV : matrix of eigenvectors. Part 6: Solution programs; critical speeds 7.4 Function CRITPLT CRITPLT( jobcode, ncrit1, ncrit2, [state<0>, nsub<0>]) Plotting of the mode shapes related to the critical speeds CRITPLT requires program DYNCRIT to be run in advance. Parameters jobcode ncrit1 ncrit2 state nsub 26 code of problem number of first mode to be plotted number of last mode to be plotted options (default value 0) -2: 3-D plot (only master dof) -1: 3-D plot (all dof) 0: 2-D plot number of substructure to be plotted ( 0 = all) (default value 0) 26 Part 7 Solution programs: unbalance response Functions • DYNUNBAL( jobcode, om1, om2, deltaom, [state<0>, nhar<3>]) • UNPLT( jobcode, state, pltype, p1, [p2 <0>, p3<0>, p4<maxspeed>]) These solution routines compute the unbalance response of the system and plot the corresponding deflected shapes. The basic equation that solves the problem for a linear isotropic rotor is (− ω ([M ] − [G ]) + iω [C ] + [K ]){q } = ω {F } 2 2 n 0 r To plot the inflected shapes, use function UNPLT. To compute the forces in the elements due to unbalance, use function FORCES with type = 0. See response to static forces. 7.1 Function DYNUNBAL DYNUNBAL( jobcode, om1, om2, deltaom, [state<0>, nhar<3>]) Computation of unbalance response. Parameters jobcode om1 om2 deltaom code of problem [rad/s] first value of spin speed [rad/s] second value of spin speed [rad/s] spin speed increment Output files (in the selected directory) UNBAL@.### containing: UNBRES : matrix containing the unbalance response. Each line contains the response at each value of the speed. First column: spin speed; second column: driving torque (only if state = 0); subsequent columns: the displacement vector transposed. @ = state. Part7: Solution programs; unbalance response 28 7.2 Function UNPLT UNPLT( jobcode, state, pltype, p1, [p2<0>, p3<0>, p4<maxspeed>]) Plotting of the unbalance response. Linear or logarithmic plots can be obtained. The drag torque or the inflected shape at a given speed can also be plotted. UNPLT requires program DYNUNBAL, to be run in advance. Parameters code of problem jobcode [0/1/2] options (default value 0) pltype 0: displacement versus speed 1: drag torque versus speed 2: inflected shape number of node (if pltype = 0) p1 omega (if pltype = 2) [0/1] (default value 0) p2 0: linear plot 1: logarithmic plot (if pltype = 0) number of substructure (0 = all) (if pltype =2) minimum for linear scale (if pltype = 0) [0] p3 -2: 3-D plot (only master dof) -1: 3-D plot (all dof) 0: 2-D plot (q1, q2 comp.) (if pltype = 2) max. for linear scale (default value computed max.) P4 28 Part 8 Solution programs: Campbell diagram Functions • • DYNCAMP(jobcode,ommin,ommax,deltaom,[npair<10>,state<0>]) DYNDAMP(jobcode,ommin,ommax,deltaom,[npair<10>,state<<0>]) The basic equation that solves the problem for a linear isotropic rotor is the eigenproblem expressed by equation (− λ [M ] + λ (ω [G ] + i[C ] + i[C ]) + [K ] − iω [C ]){q } = 0 2 n r r 0 The undamped analysis is far faster than the damped one and should be performed as a first approach to the problem. Also hysteretic damping can be introduced into the computation. • CAMPLT1( jobcode, ommin, ommax, [lammin <-ommax>, lammax <ommax>, dmin<0>, dmax<0>]) routine, which requires programs DYNCAMP or DYNDAMP to be run in advance, is used to plot the Campbell diagram and the decay rate plot. • CAMPLT( jobcode, n, [nsub <0>]) routine, which requires programs DYNCAMP or DYNDAMP to be run in advance, is used to plot the mode shapes at varying speed. • ROOTPLT( jobcode, remin, remax, immin, immax) routine, which requires program DYNDAMP to be run in advance, is used to plot the root locus. Part 8: Solution programs; Campbell diagram 30 8.1 Functions DYNCAMP and DYNDAMP DYNCAMP(jobcode,ommin,ommax,deltaom,[npair<10>,state<0>]) DYNDAMP(jobcode,ommin,ommax,deltaom,[npair<10>,state<0>]) Computation of the undamped Campbell diagram (DYNCAMP) and of the damped the Campbell diagram and of the plot of the decay rates (DYNDAMP). In DYNCAMP the system is assumed to be linear and undamped and if damping is present, it is neglected. Parameters jobcode ommin ommax deltaom npair state code of problem [rad/s] minimum spin speed [rad/s] maximum spin speed [rad/s] spin speed increment maximum number of eigenvalue pairs searched [0/1] options (default value 0) 0: recording eigenvalues 1: recording eigenvalues and eigenvectors Output files (in the selected directory) CAMPBELL.### containing: nomega : number of speeds CAMPB: matrix containing the points to plot the diagram. Each line contains the frequencies at each value of the speed. First column: spin speed; subsequent columns: frequencies. Containing: (only if state = 1) EGCAM@.### om : speed EIGV: matrix of eigenvectors the number of files EGCAM@.### is nomega; @ is a number from 1 to nomega 30 31 Part 8: Solution programs; Campbell diagram 8.2 Function CAMPLT CAMPLT( jobcode, n, omega, [state<0>, nsub <0>]) Plotting of the mode shapes at different speeds. The various mode shapes computed at all speeds at which the points for the Campbell diagram have been computed are all superimposed. CAMPLT requires programs DYNCAMP or DYNDAMP to be run in advance. Parameters jobcode n omega state nsub code of problem mode to be plotted (positive = forward; negative = backward) speed (negative = all) options (default value 0) -2: 3-D plot (only beam elements, only master dof) -1: 3-D plot (only beam elements, all dof) 0: 2-D plot number of substructure to be plotted ( 0 = all) (default value 0) 8.3 Function CAMPLT1 CAMPLT1( jobcode, ommin, ommax, [lammin <-ommax>, lammax <ommax>, dmin <0>,dmax<0>]) Plotting of the real and imaginary parts of the Campbell diagram in 2 different graphic windows. Scales are selectable, so any part of the plot can be zoomed. CAMPLT1 requires programs DYNCAMP or DYNDAMP to be run in advance. Parameters jobcode ommin ommax lammin lammax dmin dmax code of problem [rad/s] minimum of speed scale [rad/s] maximum of speed scale [rad/s] minimum of frequency scale (default value -ommax) [rad/s] maximum of frequency scale (default value ommax) [1/s] minimum of decay rate scale (default value 0) [1/s] maximum of decay rate scale (default value 0) 31 Part 8: Solution programs; Campbell diagram 8.4 Function ROOTPLT ROOTPLT( jobcode, remin, remax, immin, immax) Plotting of the root locus of a damped rotor at varying speed ROOTPLT requires program DYNDAMP, to be run in advance. Parameters jobcode remin remax immin immax 32 code of problem minimum of real part of s maximum of real part of s minimum of imaginary part of s maximum of imaginary part of s 32 Part 9 Examples In the present section some examples, contained in the directory DATA of the DYNROT diskette (or CD), are presented. For each example two files are supplied: a data M-file and a driver M-file. To run the examples the user must, either use the interactive driver DYNROT or: • create a directory on the hard disk whose name is indicated in the driver M-file (instruction datapath); • copy the data M-file and the driver M-file in the directory in which MATLAB M-files are located (must be included in the MATLABPATH); • enter MATLAB and type the name of the driver M-file. Remember that in the supplied driver files the subdirectory for data is C:\DYNROT\DATA and that for results is C:\DYNROT\TEST# (# is the number of the example). If these names are changed, also the dirver files must be changed accordingly). 9.1 Example TEST1 - micro turbojet engine The data are included in the file TEST1.M and the driver is file TEST1DRV.M. The driver M-file is here commented in detail: clear filename = 'test1'; datapath = 'c:\dynrot\test1\'; The M-file containing the data is TEST1.M; the jobcode is TS1 and the path for results is C:\DYNROT\TEST1\. eval (['delete ' datapath 'dynrot.log']); eval (['diary ' datapath 'dynrot.log']); These instructions delete the old diary file and prepare a new one. The diary file is named DYNROT.LOG and is created in the directory C:\DYNROT\TEST1\. dynprep(filename,datapath) Part 9: Examples 34 DYNPREP M-file is run to build the model. dynplot('ts1',0) dynplot1('ts1',0,0,1,1,0) Functions DYNPLOT and DYNPLOT1 are called to plot the two- and tridimensional representations of the model dyncrit('ts1',3,1) Function DYNCRIT is called to compute the first 3 critical speeds. critplt('ts1',1,2,0,0) critplt('ts1',1,1,-2,0) critplt('ts1',2,2,-2,0) Function CRITPLT is called 3 times, the first one to plot the first 2 mode shapes in two dimenions, and the ather two to plot the 3-D plotes of the same mode shapes. dynunbal('ts1', 0,16000,10) Function DYNUNBAL is called to compute the unbalance response from 0 to 16000 rad/s, with a speed increment of 10 rad/s. unplt('ts1',0,3,1,0,16000) unplt('ts1',1,0,1,0,16000) unplt('ts1',2,10000,0,0,0) Function UNPLT is called 3 times, the first time to plot the amplitude at node 3, the second one to plot the drag torque and the third the mode shape at 10000 rad/s. forces('ts1',0,10000,0) Function FORCES is called to compute the forces in the elements due to unbalance at at 10000 rad/s. dyncamp('ts1', 0,16000,1000,3,1) Function DYNCAMP is called to plot a the Campbell diagram from 0 to 16000 rad/s,with increments of 1000 rad/s. camplt('ts1',1,3000,0) Function CAMPLT is called to plot the first mode shape at 3000 rad/s. diary off The diary file DYNROT.LOG is closed. 34 35 Part 9: Examples 9.2 Example TEST2 – twin spool turbojet The example shows how rotors running at different speeds can be dealt with. The data are included in the file TEST2.M and the driver is file TEST2DRV.M. The driver M-file is here commented in detail: clear filename = 'test2'; datapath = 'c:\dynrot\test2\'; The M-file containing the data is TEST2.M; the jobcode is TS2 and the path for results is C:\DYNROT\TEST2\. eval (['delete ' datapath 'dynrot.log']); eval (['diary ' datapath 'dynrot.log']); These instructions delete the old diary file and prepare a new one. The diary file is named DYNROT.LOG and is created in the directory C:\DYNROT\TEST2\. dynprep(filename,datapath); DYNPREP M-file is run to build the model. dynplot('ts2',0) dynplot('ts2',2) dynplot('ts2',3) dynplot1('ts2',0,0,0,0,0) dynplot1('ts2',2,0,1,0,0) dynplot1('ts2',3,0,1,0,0) Functions DYNPLOT and DYNPLOT1 are called to plot a sketch of all the model (cross section and 3-D view). With parameter 0 the whole machine is plotted, with parameter 1 only the low pressure shaft, with parameter 2 only the high pressure shaft. dyncrit('ts2',3,1) critplt('ts2',1,2,0,0) critplt('ts2',1,1,-2,0) critplt('ts2',2,2,-2,0) Function DYNCRIT is called to compute the first 3 main critical speeds and the corresponding mode shapes. The values of the critical speeds are recorded in the diary file DYNROT.LOG. Function CRITPLT is then called 3 times to plot the first two mode shapes in 2-D and then, separately, in 3-D. dyncamp('ts2',0,3000,1000,3,1) camplt1('ts2',0,3000,-5000,5000,0,0) camplt('ts2',1,3000,0) 35 Part 9: Examples 36 Function DYNCAMP is called to plot a the Campbell diagram from 0 to 3000 rad/s, with increments of 1000 rad/s with 3 pair of modes (3 forward and 3 backward modes. Function CAMPLT1 is then called to plot the Campbell diagram with the chosen scales. Finallt CAMPLOT is called to plot the first mode shape at 3000 rad/s. diary off The diary file DYNROT.LOG is closed. 9.3 Example TEST3 – aircraft auxiliary power unit The example shows how rotors running at different speeds can be dealt with. The data are included in the file TEST2.M and the driver is file TEST2DRV.M. The driver M-file is here commented in detail: clear filename = 'test3'; datapath = 'c:\dynrot\test3\'; The M-file containing the data is TEST3.M; the jobcode is TS3 and the path for results is C:\DYNROT\TEST3\. eval (['delete ' datapath 'dynrot.log']); eval (['diary ' datapath 'dynrot.log']); These instructions delete the old diary file and prepare a new one. The diary file is named DYNROT.LOG and is created in the directory C:\DYNROT\TEST3\. dynprep(filename,datapath); DYNPREP M-file is run to build the model. dynplot('ts3',0) dynplot1('ts3',0,0,1,0,0) Functions DYNPLOT and DYNPLOT1 are called to plot a sketch of all the model (cross section and 3-D view). dyncrit('ts3',3,1) critplt('ts3',1,2,0,0) Function DYNCRIT is called to compute the first 3 main critical speeds and the corresponding mode shapes. The values of the critical speeds are recorded in the diary file DYNROT.LOG. Function CRITPLT is then called to plot the first two mode shapes. critplt('ts3',1,1,-2,0) critplt('ts3',2,2,-2,0) 36 37 Part 9: Examples Function CRITPLT is called again twice to plot the first two mode shapes in the form of a 3-D plot. dynunbal('ts3',5000,10,0,0) DYNUNBAL is called to compute the unbalance response, from 0 to 5000 rad/s, with a speed increment of 10 rad/s. Note that in the data a static unbalance with an eccentricity of 1 µm is given to the centre of gravity of the compressor. unplt('ts3',0,3,1,0,5000) unplt('ts3',1,0,1,0,5000) Function UNPLT is called to plot the unbalance response at node 3 (centre of gravity of the compressor) and then called again to plot the driving torque needed to run the rotor at constant speed against the losses due to unbalance. Note that the torque is vanishingly small due to the small effect of nonrotating damping applied to very stiff bearings. Logarithmic plots are requested. unplt('ts3',2,4000,0,-1,0) Function UNPLT is called again to plot the inflected shape at the same speed as a 3-D plot. forces('ts3',0,2000,0) Function FORCES is called to compute the forces on the elements at 2000 rad/s. No specific diary file is given, to avoid closing the diary file DYNROT.LOG. dyncamp('ts3',0,5000,500,3,1) camplt1('ts3',0,5000,-5000,5000,0,0) camplt('ts3',1,-1,0) camplt('ts3',1,3000,0) Function DYNCAMP is called to plot a the Campbell diagram from 0 to 5000 rad/s, with increments of 500 rad/s with 3 pair of modes (3 forward and 3 backward modes. Function CAMPLT1 is then called to plot the Campbell diagram with the required scales. Function CAMPLT is then called twice to plot the first mode shape at the various speeds and then at 3000 rad/s only. dyndamp('ts3',0,5000,100,3,1) camplt1('ts3',0,5000,-5000,5000,-100,10) rootplt('ts3',-100,10,-5000,5000) Function DYNDAMP is called to plot a the damped Campbell diagram from 0 to 5000 rad/s, with increments of 10 rad/s with 3 pair of modes (3 forward and 3 backward modes. Function CAMPLT1 is then called to plot the Campbell diagram and the decay rate plot with the required scales. Function ROOTPLT is then called twice to plot the roots locus. 37 Part 9: Examples 38 diary off The diary file DYNROT.LOG is closed. 9.4 Example TEST4 – parametric study The aim of the example is that of plotting the first two critical speeds of the rotor of example TEST 3 as functions of the stiffness of the bearings. The data are included in the file TEST4.M, which is identical to file TEST3.M but for two lines: k = par(1,1); which defines the stiffness k (matrix par is the matrix which is passed to DYNPREP function and contains the parameters), and 8 3 k 0 0 0 1; defining the 8-th line of matrix GEOM (defining the parameters of the 8-th geometry, that of an element type 3, i.e. a spring element, used to model the bearings). The driver file is TEST8DRV.M, which now is not just a driver file but is an actual program plotting the required graph and using as subroutines the relevant function files of DYNROT. The driver M-file is here commented in detail: clear filename = 'test4'; datapath = 'c:\dynrot\test4\'; The M-file containing the data is TEST4.M; the jobcode is ts4 and the path for results is C:\DYNROT\TEST4\. eval (['delete ' datapath 'dynrot.log']); eval (['diary ' datapath 'dynrot.log']); These instructions delete the old diary file and prepare a new one. The diary file is named DYNROT.LOG and is created in the directory C:\DYNROT\TEST8\. stiffness = [1e5 2e5 5e5 1e6 2e6 5e6 1e7 2e7 5e7 1e8 2e8 5e8 1e9 2e9 5e9 1e10]; [dummy,nstiff] = size(stiffness); A matrix called stiffness in which the various values of the stiffness of the bearings are listed and the variable nstiff indicating the number of such values are defined. for in = 1 : nstiff k(1,1) = stiffness(in); dynprep(filename,datapath,k); 38 39 Part 9: Examples dyncrit('ts4',0,3,1) eval(['load ',datapath,'crspeed.ts4 -mat']); RES(in,:)=OMCR; end These lines define a loop in which the value of the stiffness is introduced in k, function DYNPREP is called with the added parameter to be passed later to the program defining the model, function DYNCRIT is called to compute the first 3 critical speeds. The file in which the critical speeds are stored is then loaded and the critical speeds are stored in the lines of matrix RES, containing the results. figure for in = 1 :2 semilogx(stiffness,RES(:,in)*30/pi,'k','LineWidth',1.2) hold on end xlabel('Stiffness (N/m)') ylabel('Critical speeds (rpm)') title('Test 8 - Critical speeds versus stiffness') hold off grid on drawnow The first two critical speeds are plotted on a semilog plot against the stiffness of the bearings and the proper labels are written. diary off The diary file DYNROT.LOG is closed. 39
© Copyright 2025 Paperzz