SPACAR |
|
|
Delft University of Technology |
Manual SPACAR95 (pdf 137k)
A free downloadable student version can be obtained from UTwente SPACAR site.
1 Introduction
2 Purpose and objective.
3 Area of application.
4 Characteristics.
5 Input Specification for
SPACAR95
5.1 Elements
5.2 Nodes
5.3 Boundary Conditions
5.4 Initial Values
5.5 Dynamic Properties
5.6 Settings and Controls
5.7 Example of an Input File
6 Implementation of a New element Type
7 Credo
References
This is a guide to the software package SPACAR95 for dynamic and kinematic analyses of multibody systems. Companion papers are [1] to [73] . Earlier versions were described in [25]. The software described in this document, SPACAR95 , is the sequential version of PLANAR [15] and SPACAR [25], the first 2 and 3 dimensional kinematic analyses programs based on the finite element method. Both were developed in the Laboratory for Engineering Mechanics at the Mechanical Engineering department of the Delft University of Technology. Compared to previous versions SPACAR95 has significant internal structural changes that are not apparent to the user. In addition it is somewhat more convenient to use, and it has a Matlab user interface primarily for graphical representation of the results. The first author is much indebted to J.P.Meijaard for his inspiration, encouragement and support.
SPACAR95 is a programming system for the analyses of motion of spatial multibody systems, including planar systems, with rigid and flexible links. In the development of the SPACAR95 system the main objective was to make use of finite element techniques. It is felt that a consistent description of the kinematics is a good starting point for the development of dynamic analyses techniques, for example vibration analyses of multibody systems. The finite element method approach satisfies automatically the requirement of a maximum of variety of multibody systems to be analyzed, provided that suitable finite elements are available. Typical available elements are truss, beam and hinge elements. In the case of more specialized analyzes one can think of belt and pulley, wheel and contact elements. Many multibody systems have multiple degrees of freedom. The system was designed such that multiple degrees of freedom could easily be treated. The program should serve a large class of users having different problems. All users have in common that they want to know the pure kinematical behaviour of the multibody system. The kinematical properties of the motion are specified by the discrete transfer functions which relate the various position parameters of the multibody system with the input motion. The SPACAR95 program system provides the following steps:
SPACAR95 contains possibilities for writing calculated results after each integration step to user defined ASCII files. The SPACAR95 system must be seen as a skeleton program forming the basis of the user's application. How the subroutines of the skeleton program are called and how the necessary input must be prepared is described in this manual.
Multibody systems find their application in numerous fields of engineering. In the case of multi degree of freedom systems having all elements rigid, or only a few deformable, SPACAR95 is at its best.
As it is not possible to predict which questions will be asked about the multibody system in specific cases, a programming system, that is a toolbox, was developed. Consequently the user must compose his own program using the modules of the system. Pre and post-processing is not our cup of tea, the talents of the SPACAR95 system are in the field of mechanics. In a computer application three aspects can be distinguished: input definition, task definition and output definition. The SPACAR95 input defines the topological and geometrical composition of the multibody system to be analyzed. This input can be given in a format free ASCII input file with keywords and numbers. The SPACAR95 system is able to handle all multibody systems composed of truss, beam and hinge elements. The degrees of freedom can be rotational or translatory. The system is particularly suited for multidegree of freedom multibody systems having few deformable elements. The numeric integration of the equations of motion expressed in the degrees of freedom of the system is a standard task component. The calculation of the transfer function values is a sub task. The transfer function of order zero gives the mechanism position. The first and second order derivatives of the transfer functions with respect to the degrees of freedom, which are also calculated, are required for the determination of the velocities and accelerations. Other task components such as equilibrium forces for the nodes and the elements, linearized equations of motion etc. can be calculated on request of the user. A few output possibilities are incorporated in the system. Before and after having processed the input definition some statistics of the SPACAR95 system together with the given input definition of the to be analyzed multibody system are printed on the standard output. The system variables, such as position velocity acceleration force etc., can be written to an accordingly named ASCII file where each line stands for a discrete moment in time. Most post-processing programs such as Matlab or grtool are capable of reading these files. The SPACAR95 system is written in FORTRAN77. We have tried to keep ourselves very strict to the standard. For those who want to program in FORTRAN and use SPACAR95 as a toolbox, please read the credo file. The SPACAR95 system does not call routines belonging to other systems, it is selfcontained and in that
The input data is given in the form of a keyword with parameters. The keyword is a character string starting with an alphabetic character and with a maximum length of 8 characters. The parameters can be integer or real numbers and are seperated by white spaces. The real numbers can be given in exponent E-format. The end of line terminates the parameter list. In the description of the input the keywords are written in upper case characters but lower case or a mixture is allowed. I there is an asterisk character * on the first position of the line then this line will be treated as a comment line. Input can be given in blocks, where every block is terminated by the keyword END. After this command the analysis is started or continued. The total input is delimited by the physical end of file or by the end of file keyword EOF. The output is written to the console and can be captured by redirecting it to a file. After an analysis the input data and the current state is written as output. From this output a restart can be made.
The keywords of similar kind are listed in groups. Element numbers and node numbers are usually denoted by e and n which are integers bounded to the maximum number of elements and nodes. The numbering need not be consecutive. Node number p1 is an integer referring to the first position node of an element, where o1 refers to the first orientation node number.
BEAM | e | p1 o1 p2 o2 | x y z | x y z is the initial direction of the principal y-axes of the cross-section of the beam. |
BEAMNL | e | p1 o1 p2 o2 | x y z | beam with bending corrected elongation, x y z is the initial direction of the principal y-axes of the cross-section of the beam. |
TRUSS | e | p1 p2 | ||
HINGE | e | o1 o2 | x y z | x y z is the initial axes of rotation. |
BEARING | e | p1 o1 p2 o2 | x y z | x y z is the initial axes of rotation. |
SURFACE | e | p1 | c1..c10 | c1..c10 are the coefficients of the quadratic surface. |
L2MIN1 | e | o1 | the constraint on the Euler parameters, usually automatically created when the first time an Euler parameter is defined. | |
PLBEAM | e | p1 o1 p2 o2 | planar beam. | |
PLBEAMNL | e | p1 o1 p2 o2 | planar beam with bending corrected elongation. | |
PLHINGE | e | o1 o2 | planar hinge. | |
PLTRUSS | e | p1 p2 | planar truss. | |
PLBELT | e | p1 o1 p2 o2 | r1 r2 | planar belt with radii r1 and r2. |
PLBEAR | e | p1 o1 p2 o2 | planar bearing. | |
PLWHEEL | e | p1 o1 o2 | r x y | planar wheel with radius r and initial axis of rotation x y, node o1 is the orientation of this axis and node o2 is the rotation along this axis. |
X | n | x1 x2 x3 x4 | any node n with coordinates x1 x2 x3 x4. |
XY | n | x y | 2D position node n with coordinates x y. |
BETA | n | beta | 2D orientation node n with coordinates beta. |
XYZ | n | x y z | 3D position node n with coordinates x y z. |
LAMBDA | n | l0 l1 l2 l3 | 3D orientation node n with Euler parameters l0 l1 l2 l3. |
FIX | n | i | node n component i is fixed. |
INPUTX | n | i | node n component i is input motion. |
DYNX | n | i | node n component i is dynamic degree of freedom. |
RLSE | e | i | element e deformation i is released. |
INPUTE | e | i | element e deformation i is input motion. |
DYNE | e | i | element e deformation i is dynamic degree of freedom. |
LINE | e | i | element e deformation i is to be a linearization parameter. |
ENHC | e1 | i1 e2 i2 | element e1 deformation i1 is nonholonomic, the corresponding kinematic coordinate is element e2 deformation i2. |
XD | n | i | x | node n component i has velocity x. |
XDD | n | i | x | node n component i has acceleration x. |
E | e | i | x | element e deformation i has value x. |
ED | e | i | x | element e deformation i has rate x. |
EDD | e | i | x | element e deformation i has double rate x. |
TIME | t | set the current time to t. | ||
DIR | e | x y z | the first director of element e is x y z. | |
LGEOMY | e | x1..x13 | element e general geometry values are x1..x13. | |
LENGTH0 | e | l0 | element e has initial length l0. |
MASS | n | m | concentrated mass m in XY and XYZ node n. |
Izz | moment of inertia Izz in BETA node. | ||
Ixx Ixy Ixz Iyy Iyz Izz | inertia tensor I values for LAMBDA node. | ||
EMASS | e | rhoA | uniformly distributed mass rhoA per length for element e. |
rhoA a1 a2 | uniformly distributed mass rhoA per length for PLBELT; in the initial state the amount of belt winded at pulley 1 measured from the contact point, counterclockwise, has a total length of a1*r1 and for pulley 2 measured from the contact point, clockwise, a length of a2*r2. | ||
ESTIFF | e | EA GIp EIy EIz | stiffness parameters for BEAM element e |
EA | TRUSS. | ||
St | torsional stiffness for HINGE element. | ||
EA EI | PLBEAM. | ||
EA | PLTRUSS, PLBELT. | ||
St | PLHINGE. | ||
Sx Sy St | linear and torsional stiffness for PLBEAR element. | ||
EDAMPP | e | x1..x4 | damping values x1..x4 for element e, for the interpretation for different element types see ESTIFF. |
FORCE | n | x1..x4 | prescribed constant force x1..x4 at any node n. |
TORQUEL | n | T | bodyfixed prescribed constant torque T at LAMBDA node n. |
TIMESTEP | n | Tp | integrate the system with n number of constant output intervals over a time period of Tp. |
HMAX | h | integrate the system with a maximum stepsize of h. | |
MAXITERAT | n | allow maximum n kinematic iterations per step. | |
EPSKIN | eps | kinematic convergence tolerance eps on the deformations. | |
EPSINT | eps | maximum local integration truncation error eps for the deformations. | |
EPSIND | eps | maximum local integration truncation error eps for the deformation rates. | |
FORCEMODE | 0 | no reaction forces, no element forces calculated. | |
1 | yes reaction forces, no element forces calculated. | ||
2 | yes reaction forces, yes element forces calculated. | ||
ANIMATE | 0 | graphic animation off. | |
1 | graphic animation on. | ||
MATASC | 0 | no of the state in ASCII files. | |
1 | write at every output interval the state in ASCII formatted files which can be read by MATLAB. | ||
JOBID | id | an integer identifier id which can be used in the program for indentification of a specific input file. | |
RESTART | 0 | continue numeric integrator. | |
1 | restart numeric integration. | ||
EOF | a logical end of file marker, the input is terminated. | ||
END | the reading of input is stopped and the analysis is continued until the end of the specified time interval is reached after which the program continues reading the input. |
An example of an input file for the dynamic analysis of a slider-crank mechanism with an elastic connecting rod is:
PLBEAM 1 1 2 3 4 PLBEAM 2 3 5 6 7 PLBEAM 3 6 7 8 9 FIX 1 FIX 8 2 X 3 0.15 0. X 6 0.30 0. X 8 0.45 0. INPUTX 2 1 DYNE 2 2 DYNE 2 3 DYNE 3 2 DYNE 3 3 TIMESTEP 100 5.0 MASS 8 0.033375 EMASS 1 0.2225 EMASS 2 0.2225 EMASS 3 0.2225 ESTIFF 2 0. 0.0012723 ESTIFF 3 0. 0.0012723 INPUTX 2 1 XD 2 1 1.5 END
And this is what the state should be after 5 seconds as written by the program:
PLBEAM 1 1 2 3 4 PLBEAM 2 3 5 6 7 PLBEAM 3 6 7 8 9 XY 1 0.000E+00 0.000E+00 BETA 2 7.500E+00 XY 3 5.199E-02 1.407E-01 BETA 4 7.500E+00 BETA 5 -4.443E-01 XY 6 1.863E-01 7.383E-02 BETA 7 -4.903E-01 XY 8 3.168E-01 0.000E+00 BETA 9 -5.279E-01 FIX 1 1 FIX 1 2 INPUTX 2 1 FIX 8 2 DYNE 2 2 DYNE 2 3 DYNE 3 2 DYNE 3 3 TIME 5.000E+00 XD 2 1 1.500E+00 XDD 2 1 0.000E+00 E 2 2 2.673E-03 ED 2 2 -3.049E-03 EDD 2 2 -6.476E-02 E 2 3 4.227E-03 ED 2 3 -5.511E-04 EDD 2 3 -2.260E-02 E 3 2 3.644E-03 ED 3 2 -4.904E-03 EDD 3 2 -1.124E-01 E 3 3 1.996E-03 ED 3 3 -5.660E-04 EDD 3 3 -1.237E-02 LENGTH0 1 1.500E-01 LENGTH0 2 1.500E-01 LENGTH0 3 1.500E-01 LGEOMY 1 0.000E+00 LGEOMY 2 0.000E+00 LGEOMY 3 0.000E+00 MASS 8 3.337E-02 EMASS 1 2.225E-01 EMASS 2 2.225E-01 EMASS 3 2.225E-01 ESTIFF 2 0.000E+00 1.272E-03 ESTIFF 3 0.000E+00 1.272E-03 HMAX 9.999E+03 MAXITERAT 10 EPSKIN 1.000E-05 EPSINT 1.000E-03 EPSIND 1.000E-03 FORCEMODE 1 ANIMATE 0 MATASC 0 RESTART 0 TIMESTEP 100 5.000E+00 END
To implement a new element type there are three distinct things to do.
First, write a FORTRAN subroutine which calculates the element specific matrices as there are zero, first and second order derivates of the generalized deformations, initial geometry values from the current state, generalized stresses, mass matrix and convective force vector, third order derivative of the deformations, first order derivatives of the mass matrix and convective forces, material stiffness and damping matrix. The minimum required implementation is the zero, first and second order derivates of the generalized deformations, all other jobs may return zero. Work by example. For a 2-D element look at the planar beam element as implemented in the PLBEAM subroutine and for a new 3-D element type take the spatial beam subroutine BEAM as an example. The appropriate JOB identification can be found in the subroutine LPROCS.
Second, define the new element type in the subroutine NLTDEF by adding the element specific lines. If you want to add a 2-D element called FOO with 3 nodes, the first a XY node, the second a BETA node, and the third a XY node, and 2 deformation parameters and the first free element type identifier is 18 then you type:
NTLK(1)=2 NTLK(2)=1 NTLK(3)=2 CALL LTDEFI(18,'FOO',2,3,NTLK,IER)
Third, make the connection between the subroutine you have written, f.i. FOOBAR, and the element type identifier, 18, by adding the following line in the subroutine LPROCS:
ELSEIF(LTYPE.EQ.18)THEN CALL FOOBAR(JOB,KEL)
Check your dimensions with the current maximum implemented as can be found in the include file SPPARA which defines all parameters for the dimensions. Specific for a new element type are the parameters:
* MXLT :MaXimum number of eLement Types. * MXNL :MaXimum number of Nodes per eLement. * MXXL :MaXimum number of X-components per eLement. * MXEL :MaXimum number of dEformations per eLement. * MXML :MaXimum number of Mass values per eLement. * MXSL :MaXimum number of Stiffness values per eLement.
*-purpose--------------------------------------------------------------- * Het vastleggen van de style van programmeren voor SPACAR95 *-edit log-------------------------------------------------------------- * 03-Feb-95 meijaard/schwab created. *----------------------------------------------------------------------- Houd u aan de FORTRAN77 standaard. Een goed referentieboek is: Metcalf,M.,"Effective Fortran 77",Oxford University Press,1989. bv: Alle F77 source in HOOFDLETTERS, commentaar strings en formats mogen in kleine letters. Gebruik DOUBLE PRECISION ipv REAL*8. Er bestaat maar een INTEGER type ipv INTEGER*2 of INTEGER*4. Commentaar regels worden aangegeven met een * op de eerste positie van de regel. Gebruik voor oude FORTRANIV source een C op de eerste positie om duidelijk het verschil met F77 aan te geven. Dit is ondermeer belangrijk bij het gebruik van lokale variabelen. In FORTRANIV ging men ervan uit dat bij subsequentie aanroep van een subroutine met lokale variabelen, de waarde van deze variabelen bewaard zou blijven. In F77 is dit NIET het geval. Wil men dit toch dan kan men dit bereiken door het SAVE statement toe te passen. We vermelden dit hier zo uitgebreid omdat het in het verleden een bron van fouten is geweest! Houd u aan de impliciete declaratie: REAL (A-H,O-Z) INTEGER (I-N) Declareer expliciet alle variabelen uit: de parameterlijst van een SUBROUTINE of FUNCTION, een COMMON block. !en houd u aan de impliciete declaraties!. Beter: Declareer expliciet alle variabelen en compileer uw source met de optie IMPLICIT UNDEFINED. Dit voorkomt de beruchte fouten zoals: LLX0 ipv LLXO. !en houd u aan de impliciete declaraties!. Spring 2 spaties in bij een DO-loop en een IF-THEN-ELSE block. Bij ieder DO-loop hoort een afzonderlijk CONTINUE statement. INTEGER constanten die mbv het PARAMETER statement gedefinieerd worden en die de grootte van array's aangeven bij voorkeur laten beginnen met de letters MX. Het karakter voor het vervolgen van een statement op de volgende regel is een $ teken op positie 6. Het label nr om een exceptie aan te geven, spring uit de loop etc, is 9999. Gebruik dit getal eventueel ook voor bijzondere INTEGER of REAL waarden. Op deze wijze vallen de bijzonderheden in de source in een oogopslag op. In de parameter file zijn hiervoor 3 constanten gedefinieerd: IUNDEF=9999,RUNDEF=9999.0 en CUNDEF='9999'. SPACAR is een eindig elementen programma waarbij de begrippen node(knoop) en element erg vaak voorkomen. Gebruik, bij voorkeur, voor een eLement-eigenschap de afkorting L en voor een Node-eigenschap de afkorting N. bv: De coordinaten X van een eLement zijn XL(*) De coordinaten X van een Node zijn XN(*) We gaan proberen SPACAR modulair op te bouwen en voorzien vooralsnog 3 modulen: 1-SPKD: Kinematica + Dynamica. 2-SPID: Inverse Dynamica. 3-SPLN: Lineairisatie. De basis module is SPKD. Alle andere modulen moeten hierop aansluiten. Dus geen wijzigingen in SPKD. Schrijf het FORMAT statements direct bij het bijbehorende WRITE statement. Gebruik afwijkende labelnummers, bv > 1000. In een COMMON block is geen mix van CHARACTER en andere typen toegestaan. Gebruik kleine letters voor filenamen. Gebruik de extensie .f voor een FORTRAN source file. Gebruik de extensie .h voor een PARAMETER include file. Gebruik de extensie .h voor een COMMON block include file. Wij ondersteunen het gebruik van het printer control character NIET. Laat echter het eerste karakter in iedere regel uitvoer een spatie zijn (FORMAT(1X,.....)). De classificatie van de argumenten voor een SUBROUTINE en FUNCTION zijn: I(nput): het argument MOET een waarde bij aanroep hebben en deze waarde wordt NIET veranderd. O(utput): het argument moet een VARIABELE zijn en krijgt zijn waarde in de SUBROUTINE/FUNCTION. I(nput)/O(utput): spreekt voor zich. Assumed size array's altijd aangeven met een * (en geen 1 of zo). Schrijf REAL getallen altijd met een .0 (bv 0 en 2 schrijven als 0.0 en 2.0). Indien het nulstellen van een array in de "loop" zit (b.v. voor ieder integratiestapje of zo) gebruik dan nooit de routines CLRRA1,2,3 maar schrijf dit geheel uit mbv DO-loops. De routines CLRRA1,2,3 vragen in verhouding erg veel tijd. Is het nulstellen incidenteel, gebruik ze dan wel voor duidelijkheid.
A.L.Schwab