iJiia‘li4’Il§\i§H*-uf ;; . 1:" in 4.; 4‘1‘ x-v's'H‘l -v "v a IV. 'an. bu“ x ,_ . 3- . yawn“... ._. '6’- '.... ~ ~‘( .. . ”u:— g... . .Z'; n ”w ~.,,-,-m-.v ”v- ”0-. n,- n r. u... -, v. , * “”344.“er ,_:..::.::.:,..7—J' 3" " , -'- "fur l'-~.~.-.a .....‘ w y... u. p. ”CU..." :— .......r....- “pH-.mp0" .. .4 ... —. ..~. .. “at: m . -\'.."...".". ..... 433-— ... ”."rfw... . ..,. ..._.... «a- -:‘~:p.-b: pp I-r f—a‘ 3:1» "7.11.17”, «- .. . . WNW ‘. '...‘. 2,3,. . .c.c;~- '2‘ CHIGAN STATE UNIVERSITY RABIES ‘llllluu lm l :llllllml 3 1293 00901 0640 ”—— *_¥——— — This is to certify that the thesis entitled DIVERSE PLATFORM MODELING OF DYNAMICAL SYSTEMS presented by Robert Alex Mitchell has been accepted towards fulfillment of the requirements for Master o_t_SLj_ence_degree in Mechanical. Engineering Major professor Date HAZ[4/ / / 0-7639 MS U is an Affirmative Action/Equal Opportunity lnstitu lion l LIBRARY Michigan State ' University PLACE IN RETURN BOX to remove this checkout from your record. TO AVOID FINES return on or before due due. DATE DUE DATE DUE DATE DUE MSU Is An Affirmative ActionlEqual Opportunity Institution cmma-ptt DIVERSE PLATFORM MODELING OF DYNAMICAL SYSTEMS By Robert Alex Mitchell A THESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Department of Mechanical Engineering 1991 A cunt dynami softwai soluti01 propos platfor bond g Systerr aStan 6574767 ABSTRACT DIVERSE PLATFORM MODELING OF DYNAMICAL SYSTEMS BY Robert Alex Mitchell A current problem in engineering simulation is the difficulty with which the various dynamical components of a system may be conveniently modeled using a single . software platform. The Diverse Platform Modeling (DPM) technique proposes a solution path for this modeling difficulty. Two general strategies for application of the proposed technique, using the bond-graph modeling domain as a ”host" simulation platform, are presented. A software utility has been created for ENPORT, an existing bond graph modeling and simulation platform, that allows externally created dynamical system models of a specified class to be injected into the ENPORT system graph using a Standard Model Description (SMD) file. during invalu at Ros much a a stude eventuaj Commen the ph y formidai ACKNOWLEDGEMENTS I would like to thank my advisor, Dr. Ronald Rosenberg, for his guidance during the development of this thesis. I would also like to thank Dr. Rosenberg for the invaluable skills I have attained in the area of software development under his direction at Rosencode Associates Inc. The experience I have gained in this area has been as much a part of my education as the course work. I would like to thank my family for their support throughout my long carrier as a student at Michigan State University. They have continually assured me that eventually all the struggles and sacrifices would pay off. Finally, I would like to thank my wife Robin for her suggestions and helpful comments during the writing of this thesis. There is a bright carrier waiting for her in the physieal sciences. Also, I would like to acknowledge her blossoming as a formidable contender in the arena of miniature basketball. iii TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES NOMENCLATURE Chapter 1. INTRODUCTION 2. THE DIVERSE PLATFORM MODELING TECHNIQUE 3. THE BOND GRAPH MODELING DOMAIN AS HOST FOR DPM 4. TOPOLOGICAL APPROACH TO DPM WITH ENPORT AS HOST 4.1 Multiport Configuration for Injected MCK Models 4.2 Modal Configuration for Injected MCK Models 5. SYSTEM EQUATION APPROACH TO DPM WITH ENPORT AS HOST 5.1 The Macro Dynamic System as Applied to MCK Models 5.2 A Class Specific Macro Dynamic Node Type 6. EXAMPLE SYSTEM 6.1 The Finite Element Model 6.2 Multiport Expansion 6.3 Modal Expansion 6.4 MCK Macro Dynamic System 6.5 Numerical Results 7. SUMMARY AND RECOMMENDATIONS 7.1 Summary 7.2 Recommendations for Future Development LIST OF REFERENCES iv Page vii viii ocooo‘Jx 11 15 15 17 19 19 22 23 24 25 26 26 26 28 APPENDICES A. USER DOCUMENTATION A1. SAMPLE MCK STANDARD MODEL DESCRIPTION FILE A2. USER ACCESS FROM ENPORT . THE EXAMPLE SYSTEM Bl. MCK FILE FOR THE EXAMPLE SYSTEM 132: ENPORT MODEL FILE FOR EXAMPLE PROBLEM (MULTIPORT) 133. ENPORT MODEL FILE FOR EXAMPLE PROBLEM (MODAL) . ORGANIZATION OF THE FORTRAN SOURCE CODE C1. SUBPROGRAM CALLING TREE C2. SUBPROGRAM LIST C3. FORTRAN SOURCE CODE LISTINGS 29 30 32 35 37 46 47 48 49 Table Table Table Table Table Table B-1 . Table B-2. Table 3-3. Table C-l . Table C-2. LIST OF TABLES MCK file for the example system. ENPORT model file for multiport example. ENPORT model file for modal example. The subprogram ealling tree. The subprogram list and associated source files. Page 35 37 47 48 Figure Figure Figure Figure Figure . Figure A Figure 4 Figure 4 Figure 5 Figure 6 Figure Figure 6 Figure 6 Figum 6 Figure A Figure A Figure 1-1 Figure 2-1 Figure 3-1 Figure 3-2 Figure 4-1 Figure 4-2 Figure 4-3 Figure 4-4 Figure 5-1 Figure 6-1 Figure 6-2 Figure 6-3 Figure 6—4 Figure 6-5 Figure 6—6 Figure A-l Figure A-2 Figure A-3 LIST OF FIGURES Graphical representation of DPM. Diagram of the Diverse Platform Modeling technique. Topologieal expansion of SMDs with bond graph domain as host. Direct equation generation from SMDs with bond graph domain as host. Multiport configuration for a MCK dynamical system model. Multiport configuration for a MCK dynamical system model with causality visible. Modal configuration for a MCK dynamical system model. Modal configuration for a MCK dynamical system with causality visible. The Macro Dynamic System for an n-dimensional MCK model. Dynamical system employed in numerical study. Schematic diagram of FE nodal degrees of freedom. Example system modeled using multiport expansion. Example system modeled using modal expansion. Example system modeled using a MCK Macro Dynamic System node. Response of the momentum of the load mass vs. time for sinusoidal forcing. Sample MCK Standard Description File for two DOF System. ENPORT directory path for MCK model injection utility. Sample ENPORT dialog screen for MCK model injection. vii Page \ION-hN 11 13 14 17 19 20 22 23 24 25 31 32 33 NOMENCLATURE C damping matrix C' modal damping matrix translational displacement E external effort vector stiffness matrix K' modal stiffness matrix M mass matrix M' modal mass matrix V velocity state vector X state vector 2 physical coordinate vector Greek Symbols ¢ rotational displacement 77 modal coordinate vector viii simula. compo electro simulat system mentio subsys Wmmi Diverse modelin SUbSysu The mo of the S, Chapter 1 INTRODUCTION The practicing engineer has an arsenal of powerful software available for simulating the behavior of dynamical system components. For example, Finite Element (FE) software may be used to develop accurate dynamical models of intricate structural components of a system. Similarly, circuit analysis software may be used for modeling electronic components of a system. Thermal, hydraulic, and other domain-specific simulation software is also available. It is typical, however, for large dynamical systems to be composed of elements or subsystems from a variety of the previously mentioned modeling domains as well as others. The interactions between these subsystems define the dynamieal behavior of the conglomerate system. A current problem in engineering simulation is the difficulty with which the system as a whole may be conveniently modeled using a single software platform. The Diverse Platform Modeling (DPM) technique proposes a solution path for this modeling difficulty. Proper application of DPM will allow the behavior of each subsystem to be modeled using the domain specific platform best suited for the task. The models may then be placed into a common, or ”host”, platform for the simulation of the system as a whole. This is represented graphically in Figure 1-1. Elec :\ T—l ( a» Electronic Circuit Finite Element Hydraulic Domain Domain Domain I— DICE]: Host Platform Figure 1-1. Graphical representation of DPM. The DPM concepts presented in this thesis are general and may be applied to a broad spectrum of modeling problems. The software development effort, however, has been focused on a single common class of dynamical system models. This thesis documents the current state of the proposed modeling technique and provides guidance for additional development. Illustrative examples, borrowed from existing modeling technology, lend support to the feasibility of DPM. Ti abstract the bond first app approach DPM w simulatio platform. presenter The DPM technique is first presented as a system modeling alternative in abstract form. Two general strategies for application of the proposed technique, using the bond graph modeling domain as a host Simulation platform, are presented. The first approach may be considered as a topological expansion technique. The second approach may be considered as a system equation technique. A software realization of DPM was created for use within ENPORT, an existing bond graph modeling and simulation package [1]. An illustrative example of DPM, using ENPORT as the host platform, is provided. Finally, a summary of the proposed modeling technique is presented with recommendations for additional development effort. provided states anc data state dynaija Dynamic; pape, teci Capable 0, Chapter 2 THE DIVERSE PLATFORM MODELING TECHNIQUE The general concepts of the DPM technique are illustrated by the diagram provided in Figure 2-1. The blocks shown in the figure represent three distinct data states and the arrows indieate a process by which data states are transformed. Each data state indicated in Figure 2-1 is discussed briefly in the following paragraphs: Dynamical System Model (DSM) Standard Model Description (SMD) Host Platform Model Realization (HPMR) Figure 2-1. Diagram of the Diverse Platform Modeling technique. The ”Dynamical System Model” (DSM) is any reasonable representation of a dynamical system. Two common forms for a DSM are graphical and numerical. Dynamical models may be generated using diverse platforms ranging from pencil and paper techniques to sophisticated software packages. Each modeling platform must be capable of creating a standard model description to communicate modeling information. A ”Standard Model Description“ (SMD) is a standardized format for communicating parameters of a specific problem class. The development of SMDs is essential for communieation between diverse modeling platforms and the host simulation environment. Ideally, several classes of dynamical system models should be expressible using SMDS. A communication medium, such as the data file, is required for convenient transport of SMDs between modeling platforms. As a result of the increasing popularity of windowing software, a standardized protocol for ”clipboard” communieation would also prove useful as a medium for data exchange. It is the responsibility of the host simulation platform to provide the necessary utilities to convert SMDs into an internally useful format or a ”Host Platform Model Realization” (HPMR). It is not necessary that the host simulation platform be eapable of translating all classes of dynamical systems represented by SMDs. The host platform capable of the greatest number of translations, however, is potentially the most useful. In summary, the DPM technique allows individual components of a dynamical system to be modeled using the platform best suited for the task. The resulting models may then be injected into a host platform through the use of SMDs. The host platform has the responsibility of translating SMDs into a locally useful format or HPMR. Interactions between the components of the dynamical system are achieved in a manner prescribed by the host platform. Finally, numerical simulation of the system as a whole may be performed. Chapter 3 THE BOND GRAPH MODELING DOMAIN AS HOST FOR DPM A feasibility study of DPM was conducted using the bond graph modeling domain as the host environment. The term "system graph” will be used to indicate a bond-graph/block-diagram representation of a dynamieal system. Two general strategies for incorporating SMDs into a system graph were investigated. The first strategy, illustrated in Figure 3-1, may be considered a topological expansion approach. Using this approach, a complete system graph representation of the injected model is generated and available for inspection. System equations are then generated from the system graph using standard bond graph and block diagram modeling techniques [2]. Dynamical System Model (DSM) Standard Model Description (SMD) System Graph Representation Figure 3-1 . Topological expansion of SMDs with bond graph domain as host. The second model injection strategy, illustrated in Figure 3-2, may be considered a system equation level approach. This method absorbs details of the injected model into 6 the equi of gene containe system Figure I Fi Classe3 ofi The mp0] imilkimem 0f DPM Problem C Chis saw the equivalent of a new system graph node type. The new node type must be capable of generating platform-specific system equations directly fiom the model information contained in the SMD. In this approach, the topological details are reduced to a single system node. Standard Model Description (SMD) Platform Specific Equations Figure 3-2. Direct equation generation from SMDs with bond graph domain as host. Figure 3-1 and Figure 3-2 illustrate two general strategies for injecting various classes of externally created dynamical system models into a bond graph host domain. The topological expansion approach was employed in the development of a software implementation of DPM using ENPORT as the host platform. Although the concepts of DPM are not limited to a specific class of dynamical system models, a single problem class was selected for the present software development effort. The problem class selected is the topic of Chapter 4. model equation techniqu Equatio In Equa and stiffn velocity, vector. 1 common followin g Presented bUI [Mme] 4'1 Multi] c0"Cents ( Organizin g “meme ( Chapter 4 TOPOLOGICAL APPROACH TO DPM WITH ENPORT AS HOST The behavior, or local behavior, of many dynamical systems may be accurately modeled using systems of second-order, linear, constant-coefficient, differential equations. These equations may be generated using any of several analytical modeling techniques or computer software platforms and are of the classical form provided in Equation 4-1. M2(t) + cam + Kz(t) = E'(t) (4-1) In Equation (4-1), M , C , and K are (run) real, constant-coefficient mass, dissipation, and stiffness matrices respectively; 2 , 2 , and z are (nxl) time-dependent acceleration, velocity, and displacement vectors respectively, and E is a (nxl) time dependent effort vector. For the purpose of the present investigation, dynamical system models of this common class (MCK) will be injected into the ENPORT modeling domain. The following articles discuss a software utility developed to achieve this result. The utility presented uses the system graph expansion technique to create two topologically unique but numerically equivalent representations of the injected MCK model. 4.1 Multiport Configuration for Injected MCK Models The first of the of the two topological expansion techniques exploits multiport concepts of bond graph modeling. Multiport nodes provide a convenient method for organizing the energy of a system into lumped storage and dissipation fields. The structure of Equation (4-1) suggests an organization of this type and lends itself 8 mmml mbna si'SIth': mecm C; and naturally to the multiport configuration shown in Figure 4-1. The interested reader is referred to reference [2] for a more complete coverage of multiport systems. I:M'1 R:C C:K I I § 1 l 1 no... 1 I I I 21 22 2.3 Zn SC SC SC on... se Figure 4-1. Multiport configuration for a MCK dynamical system model. The multiport I, R, and C nodes shown in Figure 4-1 represent the dynarnieal system's dissipation, potential energy, and inertia fields respectively. Associated with the C node is the stiffness matrix K; associated with the R node is the damping matrix C; and associated with the I node is the inverse of the mass matrix M. The node constitutive equations can be defined by the ENPORT function type ”MATRIX". A software utility was created to facilitate automatic system graph generation of the form indicated in Figure 4-1. The utility reads the MCK model description from a file of the form provided in Appendix A1. A suitably-sized IRC bond graph is generated. The matrix elements are placed into ENPORT as indicated in Figure 4-1 (:M'l, :C, :K). The l-junctions shown in the figure mark the geometric coordinates and provide input locations for external effort sources. Each l-j unction corresponds to a single degree of 10 freedom in the MCK model. The effort sources (Se) shown in the figure are provided for illustrative purposes. In practice, effort inputs may be of the form indicated or may be provided by connections to other nodes in the system graph. An 'Se" is needed only if the input effort is different from zero or the velocity is of interest. At this point it is important to address the issue of interfacing the injected dynamical system models to other system components in the host simulation platform. This issue is not unique to a specific problem class, to the host platform representation of the problem class, or even to the host simulation platform selected. This issue is an inherent component of dynamical system modeling. Inspection of Figure 4-2 reveals a preferred causality at the interface ports (Se locations). The term ”preferred” refers to the causal markings which result from application of the Standard Causality Assignment Procedure (SCAP) [2]. From these markings, the causal requirements at the interface nodes in Figure 4-2 are apparent. Although an alternative causality assignment at any of these locations is physically reasonable, the equations for the system would become implicit in that case. A suitable solver in the nonlinear case would require an implicit integration method. Figure 4.2 Mi Equati equatit throug ll SC SC SC IIIII SC Figure 4-2. Multiport configuration for a MCK dynamical system model with causality visible. 4.2 Modal Configuration for Injected MCK Models The second topological expansion technique requires that the MCK model of Equation (4-1) be transformed into a set of n decoupled second-order differential equations. This is accomplished using the transformations provided in Equations (4-2) through (4-4). M' = UTMU (4-2) I _ T c _ U cu (4-3) x' = UTKU (44) U is the run modal matrix composed of n column eigenvectors corresponding to the n natural frequencies of the system. M ’, C’, and K’ are the (run) modal mass, damping, and stiffness matrices respectively. It is important to note that the modal damping matrix . i specral | softwatl for this defined Equatio Eqmtior differan‘ found ir ahermit 12 matrix will only be decoupled by the technique presented in Equation (4-3) for the special but important case of a modally damped system. The current state of the software utility developed for modal expansion of injected MCK models does not check for this condition and should be used with caution. If the displacement vector is defined as z(t) = Un(t) (4-5) Equation (4-1) may be written as: M'mt) + C’ii(t) + K’n(t) = UTE“) (4-6) Equation (4-6) is a decoupled system of linear, second-order, constant-coefficient differential equations. More comprehensive coverage of modal decomposition may be found in Reference [3] or any standard vibrations text. The transformation of the MCK model into its modal form facilitates an alternate bond graph representation as illustrated in Figure 4-3. The n& and has defined ; Values “ follows intIOduc rnOdel a1 bOIld gr; locatiOns Dons of 13 T C I C I m. \1 fr, \1 f, + R T—‘1 o e o o e . R T—1 n 1/ . . . . \l Figure 4-3. Modal configuration for a MCK dynamical system model. The nib I, R, and C nodal grouping shown in Figure 4-3 represents a ”modal oscillator" and has parameter values which correspond to the nib diagonal elements of the matrices defined in Equation (4-6). The n transformers (TF) incident to the i9! O-junction have values which correspond to the nib row of the modal transformation matrix (U). This follows from Equation (4-6). The O-j unction nodes provide locations for the introduction of external effort sources for each of the n degrees of freedom in the model and for observation of the resulting motions. More detailed coverage of modal bond graph representation is provided in references [4] and [5]. Inspection of Figure 4-4 reveals a preferred causality at the interface ports (Sc locations). This observation is consistent with the discussion regarding the interface ports of the multiport topology presented in article 4.1. Figure 14 Coordinate Transformation Phyaioal inputa T c es. T + A I ill 1 a o TFa a aTF 1/ T2; Se “\f T2: Se Figure 4-4. Modal configuration for a MCK dynamical system with causality visible. equal Chapter 5 SYSTEM EQUATION APPROACH TO DPM WITH ENPORT AS HOST The system equation approach is presented as an alternative model injection strategy to topological expansion. This approach builds platform-specific system equations from a SMD. The resulting set of equations are represented with a single multipOrt node in the system graph. Two system-equation level techniques for injecting dynamieal system models into ENPORT are presented in the following articles. The first technique, the ”Macro Dynamic System” or MDS, requires the creation of a FORTRAN problem description module which must be compiled and linked with the ENPORT software package. The second technique, the "Class Specific Macro Dynamic Node Type" , involves creating a new ENPORT node type for each dynamical system class of interest. Although both strategies may be applied to a broad class of dynamical system models, the following articles concentrate on models of the form indicated in Equation (4-1). 5.1 The Macro Dynamic System as Applied to MCK Models The Macro Dynamic System (MDS) is an ENPORT utility currently under development by Yan Ying Wang, a mechanical engineering doctoral student at Michigan State University. This utility facilitates the creation of a "black box” node type in which the relationship between an arbitrary number of input and output signals is defined by a FORTRAN problem description of a specified format. The FORTRAN code must be compiled and linked with the ENPORT software package. Creating a MDS from a MCK model description requires the formulation of a set of state equations which may be integrated by ENPORT. To this end, Equation (4-1) may be 15 transfo Equati ‘ I Equatic The ap; Equafii Expreg Equati numet m3ch Vafiab l6 transformed into a system of 2n state equations by introducing a state variable as in Equation (5-1). v a 2 (5-1) Equation (4-1) may now be expressed as follows: I} = -M"CV - M'JKZ + M'lE (5-2) The appropriate state vector is provided below. le szr = [27:13] (5-3) Equations (5-1) through (5-3) may be combined to form the compact state space expression shown in Equation (54). {71nd _ -M-1C -M'1K Var]. + M-1 0 Erin] 2,... -[ I . lizml . .[o <54) Equation (5-4) defines 2n first-order differential equations which are required for numerical integration within ENPORT. The inputs required for the MCK dynamic macro are the applied forces, E. The output variables may be selected from the state variable list. A graphical representation of the MDS is shown in Figure 5-1. Ft The stat to the it (54), 2 output - an iter. one tin 5.2 A Piatlo inton- 3550c. moot Thirc MD: CnCa, Fina l7 Rest of the System Graph MDS Xlt) DX(t) Figure 5-1. The Macro Dynamic System for an n-dimensional MCK model. The state variables, X(t), and the effort variables, E(t), shown in Figure 5-1 are passed to the MDS module. The derivatives of the state variables, DX(t), defined by Equation (54), are ealculated by the MDS and returned to the ENPORT solver for storage. The output variables, Y(t), are available for use by other nodes in the system graph. This is an iterative process which serves to advance the state of the numerieal simulation by one time step. 5.2 A Class Specific Macro Dynamic Node Type The MDS utility presented in the preceding article provides an excellent test platform for a variety of dynamical systems. Its generality, however, presents some inconveniences. First, knowledge of the FORTRAN programming language and associated computer skills are required. Second, compiling a problem description module and linking it with the ENPORT software package is a time consuming process. Third, development of problem description modules is prone to error. Fourth, the MDS is a "black box" representation of a system. Thus, the dynamics of the encapsulated systems must be known to assure proper numerical integration parameters. Finally, supplying users with complete object code for a commercial software package is not i part, b softwa followi applied state 51 mod equival identic: class 5] System the Sys node q deSCIi; exists equatic the 5y, may ta 18 is not wise as a business consideration. These difficulties may be overcome, at least in part, by the inclusion of problem class specific MDS node types within the ENPORT software package. The creation of a MCK specific node types is the topic of the following discussion and is the recommended path for future DPM development effort. Inspection of Equations (5-1) through (54) reveals an algorithm which may be applied to an MCK model description for automatic formulation of ENPORT solvable state space equations. The equations generated may be placed directly into the ENPORT equation data base for integration. This development path creates the equivalent of a new node type for ENPORT. The topology of the new node type is identical to the MDS node and is functionally equivalent. The development of system class specific node types for ENPORT has many benefits. For example, dynamical system models could easily be injected into ENPORT using SMDs and represented in the system graph as a single node. In addition, by developing system class specific node types, equation generation is performed automatically and FORTRAN problem description modules are not necessary. One example of this type of node that currently exists in ENPORT is the transfer function node type. This node generates system equations directly from polynomial coefficients supplied when defining parameters for the system graph nodes. Further information regarding the transfer function node type may be found in Reference [1]. DPM f (FE me the pn Chapter 6 EXAMPLE SYSTEM The dynamical system illustrated in Figure 6-1 will be used to demonstrate DPM for the class of problems indicated in Equation (4-1). Figure 6-1. Dynamieal system employed in numerical study. The beam indieated in Figure 6-1 will be constructed using the Finite Element Method (FEM). The resulting model will be injected into the ENPORT software platform by means of a SMD. The damped spring mass oscillator will be modeled and attached to the beam within ENPORT. The source of effort will be a simple sine wave also provided within the ENPORT simulation platform. 6.1 The Finite Element Model The three-element beam structure illustrated in Figure 6-1 will be used to demonstrate DPM. Each node of the finite element mesh contains two degrees of freedom (translational and rotational) as indicated in Figure 6-2. 19 20 d" ad; Figure 6-2. Schematic diagram of FE nodal degrees of freedom. The elemental coefficient matrices are provided in Equations (6-1) and (6-2). p 156 22L pAL 22L 41.2 420 54 13L _-13L -3L2 12 6L 6L 4L2 -12 -6L __ 6L 21.2 E1 “6:? 54 —13L‘ 13L -3r.2 156 -22L -22L 4L2 —12 6L ‘ -6L 21:.2 12 —6L -6L 4sz (6-1) (6-2) M e is a consistent mass matrix, Re is the stiffness matrix, E is the material modulus of elasticity, I is the moment of inertia, P is the material density, A is the cross- sectional area, and L is the elemental length. The elemental mass and stiffness matrices are combined using standard FE techniques to form the global system of equations for the beam. The resulting (6x6) equation is of the following form, MI'r-i-Kz: E (63) The global M and K matrices indicated in Equation (6-3) are provided in Appendix B1 in the form of a SMD file and z is defined below. dis ye CT 21 z = 2 (6‘4) 3 ¢ d3 _¢ In Equation (6-4), d indicates translational displacement and ¢ indicates rotational displacement. Superscripts indicate the node number (see Figure 6-2). The effort vector provided in Equation (6-5) indieates the nodal coordinates which are stimulated externally. TEEN?) E = (6-5) The external effort sources indicated in Equation (6-5) are not necessarily defined explicitly. As previously mentioned, E1(t) is defined as a simple sine wave for this example. The effort applied to the fifth degree of freedom, E5 (t ), is the reaction force generated by the damped spring mass oscillator and may not be assigned explicitly. More detailed discussion regarding the formulation of FE models is provided in References [6] and [7]. The SMD created for the FE model is provided in Appendix B1. The following articles illustrate three unique yet numerically equivalent system graph models of the dynamical system shown in Figure 6-1. 6.2 M multip graph i Cairn PTOpi 22 6.2 Multiport Expansion The dynamieal system shown in Figure 6-1 was modeled in ENPORT using the multiport expansion approach to represent the beam component. The resulting system graph is shown in Figure 6—3. Figure 6-3. Example system modeled using multiport expansion. Careful inspection of the causal markings shown in Figure 6—3 indicates that integral eausality has been maintained throughout the system graph. Thus, the model is properly posed for the ENPORT solver. 6.3 M. repres: shown As in thrOUg] 23 6.3 Modal Expansion The modal expansion approach was used to create a second system graph representation of the model shown in Figure 6-1. The resulting system graph model is shown in Figure 6-4. C iF—oi—éi / 1 \ id" id's L 9'3. L A A A A A A Figure 6-4. Example system modeled using modal expansion. As in the multiport expansion approach, integral causality has been maintained throughout the system graph. 6.4 M medy Figu Asmd i“Puts . lhat w reQuite umfide 24 6.4 MCK Macro Dynamic System The system graph shown in Figure 6-5 represents the hypothetieal appearance of the dynamieal system as modeled using a MCK macro dynamic system node. C IIQoI-At/ 1 ’\ Sf MCK 5'3 mos Figure 6-5. Example system modeled using a MCK Macro Dynamic System node. As indicated in Figure 6-5, the MCK Macro Dynamic System node requires signals as inputs and provides signals as outputs. There are, however, no fundamental difficulties that would prevent this hypothetical dynamic node type from being developed to require power bonds to communicate information. This design issue is left for the consideration of future ENPORT developers. 25 6.5 Numerical Results The numerical results obtained during the numerical simulation of the system shown in Figure 6-1 were identical for the two system graph configurations tested (see Figure 6-3 and Figure 6-4). Thus, a single figure, representative of both topologies, is provided in Figure 6-6. ENPORT/PC Plot Date: 11/84/91 Tine: 13:23:50 Responsaof ModaIModel I-..‘ a 9 a a a a o a a O a a a u a a o a I. o a .- C a e a a a I a O o a a Response of - iRC Model .90 i A Iiiii.‘ A A 1.0 lionentun of the iiass WISH; 0 1.601144 16013-04 Figure 6-6. Response of the momentum of the load mass vs. time for sinusoidal forcing. 7.1 S oftoo develc means Inject: other : COmp] 7.2 R. Chapter 7 SUMMARY AND RECOMMENDATIONS 7.1 Summary The Diverse Platform Modeling Technique addresses the need for a coherent set of tools when modeling dynamical systems. Specifically, two software utilities were developed that facilitate the injection of MCK dynamical system models into the ENPORT modeling platform. MCK system models are communicated to ENPORT by means of a Standard Model Description file developed specifically for the task. Injected MCK models are represented in the ENPORT system graph and interact with other system nodes according to the standard rules of bond graph modeling. The utilities created to facilitate DPM within ENPORT do not represent a complete set of tools which will solve all modeling difficulties. The utilities, however, do provide support for further development of the proposed modeling technique. Recommendations for development are provided in the following article. 7.2 Recommendations for Future Development Topological expansion of MCK dynamical system models provided useful information pertaining to the development of system graph "macros" and model injection strategies. First, the two topological representations of MCK dynamic systems investigated (multiport and modal form) indicate a specific causality forced at the input sites using the Standard Causality Assignment Procedure [2]. Thus, it is recommended that future development include a method for enforcing or ”locking" 26 PW simul advan cxperi capabi increa that St 1011010] 27 proper causality at the input sites of macro nodes during the model building stage of the simulation process. Second, the topological expansion of even small MCK models produced unreasonably large system graph representations. There does not appear to be any strong evidence that these visual representations are necessary or particularly useful for the user. Thus, it is recommended that future development be focused on the direct formulation of system equations from the SMDs. This approach has the advantage of reducing topological details to a single node in the system graph. Finally, experience suggests that the platform best suited for the exploitation of graphical macro capabilities are windowing environments. This type of environment has become increasingly popular among software users and developers. Thus, it is recommended that software design and development of advanced ENPORT capabilities, such as topological macros, be restricted to environments of this type. LIST OF REFERENCES 28 LIST OF REFERENCES 1. Rosenberg, R. C., 'The ENPORT Reference Manual', Rosencode Associates Inc., Lansing, Michigan, 1990. 2. Rosenberg, R. C. and Kamopp, D. C., INTRODUCTION TO PHYSICAL SYSTEM DYNAMICS, McGraw-I-Iill, New York, 1983. 3. Meirovitch, L., ANALYTICAL METHODS IN VIBRATIONS, Macmillian, New York, 1967. 4. Margolis, D. L. and Young, G. E., 'Reduction of Models of Large Scale Lumped Structures Using Normal Modes and Bond Graphs', J. Franklin Inst., Vol. 304, No. 1, pp. 65-79, July 1977. 5. Margolis, D. L., 'A Survey of Bond Graph Modeling for Interacting Lumped and Distributed Systems', J. Franklin Inst., Vol. 319, No. 1/2, pp. 125-135, January/February 1985. 6. Reddy, 1. N., AN INTRODUCTION TO THE FINITE ELEMENT METHOD, McGraw-Hill, New York, 1984. 7. Logan, D. L., A FIRST COURSE IN THE FINITE ELEMENT METHOD, PWS, Boston, 1986. 8. Press, W. H. and Flannery, B. P. and Teukolsky, S. A. and Vetterling, W. T., NUMERICAL RECIPES - THE ART OF SCIENTIFIC COMPUTING, Cambridge University Press, Cambridge, 1986. 9. Shigley, J. E. and Mitchell, L. D., MECHANICAL ENGINEERING DESIGN, Fourth Edition, McGraw-Hill, New York, 1983. APPENDICES APPENDIX A USER DOCUMENTATION The information in this appendix pertains to the use of the MCK model injection software utility created for ENPORT. A sample SMD file is presented in Appendix A1 with discussion regarding format requirements. An abbreviated ENPORT session is included in Appendix A2 that demonstrates user access to the new utility. 29 APPENDIX A1 SAMPLE MCK STANDARD MODEL DESCRIPTION FILE A sample SMD file for a two degree of freedom MCK model is shown in Figure 11. Note that text may not be placed in the first column of the file. Data entered in the "FILE", "NAME", ”TITLE", and "DESCRIPTION” fields is not used internally by ENPORT. These fields are provided for user documentation and future internal use. The dimension of the MCK model is placed in the ”DIMENSION" field. The current maximum value for this parameter is ten. The ”FORCE INFORMATION " field contains two columns for information. The first column must be an integer value equal to zero or one. If a value of one is entered in this column, an effort source is placed in the system graph with the value indicated in the second column of the corresponding row. A value of zero in the first field prevents the placement of an effort source in the system graph for the associated degree of freedom. Thus, if a particular degree of freedom in the MCK model is of interest, a value of one must be placed in the first column. The proper format for data entry into the ”MASS MATRDI", 'STIFFNESS MATRIX", and "DAMPING MATRIX" fields is provided in Figure A-l. A ”*" in the second column of the file indicates a comment line. The delimiters for a matrix entry are '[" and "J”. The delimiter for a matrix row is ";". These delimiters are required. The mass matrix and stiffness matrix are required. The damping matrix, however, is not required. Blank lines are ignored by the processor. Finally, the file is terminated with an "END-FILE" statement. 30 31 READING FILE (Not uaed internally) VIBSZ.MCK NAME (Eight chare max - for future macro use) V1382 TITLE (Not used internally) MCK teat file. DESCRIPTION (10 linea max - Not used internally) Thia ia a Standard Model Description tile for a two degree of freedom MCK ayatem. DIMENSION (10 ie max for now) 0002 FORCE INFORMATION (0 s ignore, 1 - include) i 1 1.00003+00 1 1.00003+00 l MASS MATRIX (Required - Format in Sx,1p,313.4,1x....) * bbax.xxxxE+xx bbax.xxxxE+xx bbex.xxxx£+xx bbex.xxxxE+xx bbex.xxxxE+xx I 1.00008+00 0.00003+00; 0.0000!+00 1.00008+00) ] i STIPPNESS MATRIX (Required - Format ie Sx,1p,313.4,1x....) I 2.ooooe+oo -1.ooooe+oo; i -1.00002+00 1.00003+00; 1 DAMPING MATRIX (Values optional - heading and [] required.) I l END-FILE Figure A-l. Sample MCK Standard Description File for two DOF System. APPENDIX A2 USER ACCESS FROM ENPORT Figure 12 indicates the menu path required to gain access to ENPORT's MCK rmmklhwumbnufifign Add Node Delete Bond Modify Signal Zoom Mg; Redraw Return Options List Return Figure A-2. ENPORT directory path for MCK model injection utility. Once the MCK option indicated in Figure 12 has been selected, a small amount of user input is required. User input is achieved using the ENPORT dialog screen shown in Figure A-3. 32 33 lEnter file name : |V1833.MCK I Processing file command: READING DIMENSION FORCE INFORMATION MASS MATRIX STIFFNESS MATRIX DAMPING MATRIX END FILE | Macro Type? D Modal BMultiportI 1.0000E+OO 1.0000E+OO 1.0000E+OO 2.0000E+OO 1.0000E+OO oar-Hm Nodes required Connectors required .0 O. O) Figure A-3. Sample ENPORT dialog screen for MCK model injection. The shadowed boxes in Figure A-3 indicate the user input portions of the dialog screen. All other fields shown in the figure are status and debug information. The two numerical fields following the ”FORCE INFORMATION " heading are the values found in the first row of the corresponding heading of associated MCK data file (see Figure 11). Similarly, the numerical fields following the "MASS MATRIX", ”STIFFNESS MATRIX", and "DAMPING MATRIX” headers, are the number of elements read, first element received, and last element received respectively. After all appropriate information has been entered, ENPORT returns the user to the system graph. A location for topological expansion of the MCK data is requested and the appropriate system graph model is constructed. APPENDIX B THE EXAMPLE SYSTEM This Appendix contains additional information regarding the example system presented in Chapter 6. 34 APPENDIX Bl MCK FILE FOR THE EXAMPLE SYSTEM Table B-1 . MCK file for the example system. READING FILE FEM10.MCK NAME FEM10 (eight chars max - for future macro use) TITLE FEM test file. DESCRIPTION This file contains the mass and stiffness matrices for a 3-element 2-DOF FE model. The boundary nodes (1 and 2) are not included. The following are the physical parameters: Material : Steel E - 30x10‘6 lb/in‘z I - b*h‘3/12 p I 484 1b/ft‘3 b - 1' h - 1” l - 10” per element. DIMENSION (10 is max for now) 0006 FORCE INFORMATION (0 8 Ignore, 1 = Include) I 1.0000E+01 0.0000E+OO 0.0000E+OO 0.0000E+OO 1.0000E+02 0.0000E+OO OHOOOH l MASS MATRIX (Format is Sx,1p,E13.4,1x....) * bbsx.xxxxE+xx bbsx.xxxxE+xx bbsx.xxxxE+xx bbsx.xxxxE+xx bbsx.xxxxE+xx I 3.5880E+03 0.0000E+OO 6.21008+02 -1.49SOE+03 0.0000E+OO 0.0000E+00; 0.00008+00 9.2000E+03 1.4950E+03 -3.4500E+03 0.0000E+00 0.00008+00; 6.2100E+02 1.4950E+03 3.5880E+03 0.0000E+00 6.2100E+02 -1.49508+03; -1.4950£+03 -3.4SOOE+03 0.0000E+00 9.2000E+03 1.4950E+03 -3.45008+03; 0.00008+00 0.00008+00 6.2100E+02 1.4950E+03 1.7940E+03 -2.5300E+03; 0.0000E+00 0.00003+00 -1.4950£+03 -3.4500E+03 -2.5300E+03 4.6000E+03; 35 Table B-1 (cont'd). STIFFNESS MATRIX 6.0000E+04 0.00003+00; 0.00008+00 0.0000E+00; -3.0000E+04 1.5000E+05; 1.SOOOE+05 5.00003+05; 0.0000E+00 -1.SOOOE+05; 0.0000E+00 1.0000E+06; l 0.0000E+OO 2.0000E+06 -1.SOOOE+OS S.OOOOE+OS 0.0000E+00 0.0000E+OO DAMPING MATRIX (OPTIONAL) I ] END-FILE 36 -3.0000E+O4 -1.SOOOE+05 6.0000E+O4 0.0000E+OO -3.0000E+O4 1.SOOOE+OS 1.SOOOE+05 S.OOOOE+05 0.0000E+OO 2.0000E+06 -1.SOOOE+OS S.OOOOE+OS 0.0000E+OO 0.0000E+OO -3.0000E+O4 -1.5000E+05 3.0000E+O4 -1.5000E+OS APPENDIX B2 ENPORT MODEL FILE FOR EXAMPLE PROBLEM (MULTIPORT) Table 8-2. ENPORT model file for multiport example. READING FILE MODEL 15:41:19 11/11/91 ENPORT/PC 4.01 FEMMUL.ENP Model_name: mul port TITLE Multiport expansion of 6 DOF MCK with spring mass oscillator. DESCRIPTION This is a 6 degree of freedom FE model with a spring mass attached. The multiport expansion technique has been used to represent the FE model. SYSTEM GRAPH DESCRIPTION NODE TYPE XLOC YLOC ACT MACRO SV101 MEGV -400. 200. T 1V101 M16V -400. 100. T 1V102 MIGV -300. 100. T 1V103 M16V -200. 100. T 1V104 MlGV -100. 100. T 1V105 MlGV 0. 100. T 1V106 MlGV 100. 100. T 11 MIGV -400. -100. T C1 MCGV -200. -100. T 1J1 MIGV 0. 400. T 02 MOGV 0. 600. T 1J2 MIGV 0. 800. T 1J3 MlGV 200. 600. T CSPG MCGV 400. 500. T ISPG MIGV 200. 900. T RSPG MRGV 400. 700. T CONNECTOR TYPE FROM TO VERTICES $8101 86 V SV101 1V101 18101 86 V 1V101 11 18102 86 V 1V102 11 18103 86 V 1V103 11 18104 86 V 1V104 11 18105 86 V 1V105 11 18106 86 V 1V106 11 C8101 86 V 1V101 C1 08102 86 V 1V102 C1 C8103 86 V 1V103 C1 C8104 BG V 1V104 C1 C8105 8G V 1V105 Cl C8106 86 V 1V106 C1 37 38 Table 8-2 (cont'd). V22 80 V 1J1 02 VDIF2 86 V 02 IJ3 VSPG2 80 V 1J3 CSPG V3 80 V 02 1J2 VISPG 80 V 1J2 ISPG VSPG 80 V 1J3 RSPG V1 80 V 1J1 1V105 NODE EQUATIONS Named_parameters: 0 Number of outputs: 16 Node: SV101 Connectors: 88101 Equation: Y - SIN ( X, P ) 1 1 2 X_list X_list Parameters Index E88101 TIME 1.0000E+00 0 4.2190E+01 0 Node: Il Connectors: 18101 18102 I8103 Equation: Y - MATRIX ( X, P ) 6 6 0 P18101 PI8102 P18103 F18101 3.2510E-04 4.2076E-OS -4.7933E-05 FI8102 4.2076E-05 1.4687E-04 -4.5737E-05 F18103 -4.7933E-05 -4.5737E-05 3.8578E-04 FI8104 9.14338-05 8.1985E-05 4.5209E-05 F18105 6.7466E-05 5.9117E-05 2.3810E-04 FI8106 9.01028-05 7.91398-05 2.9024E-04 P18104 P18105 P18106 F18101 9.1433E-05 6.74668-05 9.0102E-05 FI8102 8.1985E-05 5.9117E-05 7.9139E-05 FI8103 4.52098-05 2.3810E-04 2.9024E-04 FI8104 2.3822E-04 2.6082E-04 3.36818-04 F18105 2.60828-04 2.8643E-03 1.8484E-03 F18106 3.3681E-04 1.8484E-03 1.5809E-03 Node: 01 Connectors: 08101 08102 08103 Equation: Y - MATRIX ( X, P ) 6 6 0 908101 908102 908103 E08101 6.00008+04 0.00008+00 -3.00003+04 E08102 0.0000E+00 2.0000E+06 -1.5000E+05 E08103 -3.00008+04 -1.50003+05 6.0000E+04 E08104 1.SOOOE+OS 5.00008+05 0.0000E+00 E08105 0.0000E+00 0.00008+00 -3.0000E+04 E08106 0.0000E+00 0.0000E+00 1.5000E+05 908104 908105 908106 E08101 1.5000E+05 0.0000E+00 0.0000E+00 E08102 5.00008+05 0.0000E+00 0.00008+00 E08103 0.0000E+00 -3.0000E+04 1.5000E+05 E08104 2.0000E+06 -1.5000£+05 S.0000E+05 E08105 -1.50008+05 3.0000E+04 -1.5000E+05 E08106 S.0000E+05 -1.SOOOE+05 1.0000E+06 Table 8-2 (cont'd). Node: CSPG Equation: X_list EVSPG2 Node: ISPG Equation: X_list FVISPG Node: RSPG Equation: X_list EVSPG END-FILE Connectors: Y I GAIN X_list QVSPG2 Connectors: Y I ATT X_list PVISPG Connectors: Y I GAIN X_list FVSPG (Xv?) I X: P ) ( X: P ) 1 1 1 Parameters 5.0000E+02 1 1 1 Parameters 1.0000E+01 1 1 1 Parameters 1.0000E+01 Index 0 Index 0 Index APPENDIX 83 ENPORT MODEL FILE FOR EXAMPLE PROBLEM (MODAL) Table 8-3. ENPORT model file for modal example. READING 3ILE MODEL PEMMOD.ENP 15:45:18 11/11/91 ENPORT/PC 4.01 Model_name: fem mode TITLE This is a 6 DOF FE model with spring mass oscillator attached. DESCRIPTION This is a 6 DOF Finite Element Model injected into ENPORT using the modal expansion technique. A damped spring mass oscillator has been attached to the injected Finite Element model. SYSTEM GRAPH DESCRIPTION 40 NODE TYPE XLOC YLOC ACT MACRO SM101 MEGV -400. 200. T 0M101 MOGV -400. 100. T 0M105 MOGV 2400. 100. T T3101 MTGV -400. 0. T T3102 MTGV -300. 0. T T3103 MTGV -200. 0. T T3104 MTGV -100. 0. T T3105 MTGV 0. 0. T T3106 MTGV 100. 0. T T3125 MTGV 2400. 0. T T3126 MTGV 2500. 0. T T3127 MTGV 2600. 0. T T3128 MTGV 2700. 0. T T3129 MTGV 2800. 0. T T3130 MTGV 2900. 0. T 1M101 MIGV -400. -200. T 1M102 M1GV 300. -200. T 1M103 M1GV 1000. -200. T 1M104 MIGV 1700. -200. T 1M105 M1GV 2400. -200. T 1M106 M1GV 3100. -200. T 1M101 M1GV -400. -300. T 1M102 M1GV 300. -300. T 1M103 M1GV 1000. -300. T 1M104 MIGV 1700. -300. T 1M105 M1GV 2400. -300. T 1M106 M1GV 3100. -300. T CM101 MCGV -300. -300. T CM102 MCGV 400. -300. T CM103 MCGV 1100. -300. T CM104 MCGV 1800. -300. T 41 'Tabk:833(¢onflkb. c3105 300v 2500. -300. 1 CM106 300v 3200. -300. 1 1 310v 2400. 300. 1 02 300v 2400. 400. 1 102 310v 2400. 500. 1 ISPG 310v 2600. 500. 1 103 310v 2300. 400. 1 aspc 330v 2200. 500. 1 0530 300v 2200. 300. 1 003330103 1333 3303 10 vznrrcss 53101 30 v SM101 03101 13101 30 v 03101 13101 13102 30 v 03101 13102 13103 30 v 03101 13103 13104 30 v 03101 13104 13105 30 v 03101 13105 T8106 30 v 03101 TF106 13125 30 v 03105 13125 T8126 30 v 03105 TF126 13127 30 v 03105 13127 T8128 30 v 03105 13123 13129 30 v 03105 13129 13130 30 v 03105 13130 13101 30 v 13101 13101 13102 30 v 13102 13102 13103 30 v 13103 13103 13104 30 v 13104 13104 13105 30 v 13105 13105 13106 30 v TF106 13106 13125 30 v 13125 13101 13126 30 v TF126 13102 13127 30 v 13127 13103 18128 30 v 13123 13104 13129 30 v 13129 13105 13130 30 v 13130 1M106 13101 30 v 13101 13101 13102 30 v 13102 13102 13103 30 v 13103 13103 13104 30 v 13104 13104 13105 30 v 13105 13105 18106 30 v 13106 IM106 03101 30 v 13101 c3101 c3102 30 v 13102 c3102 c3103 30 v 13103 c3103 c3104 30 v 13104 03104 03105 30 v 13105 c3105 08106 30 v 13106 CM106 v22 30 v 1 02 v0132 30 v 02 103 v3 30 v 02 102 vrspc 30 v 102 1630 vspc 30 v 103 aspc vspcz 30 v 103 0530 v1 30 v 1 03105 42 Table B-3 (cont'd). NODE EQUATIONS Named_parameters: 0 Number of outputs: 28 Node: SM101 Connectors: 88101 Equation: Y SIN ( X, P ) 1 1 2 X_list X_list Parameters E88101 TIME 1.0000E+00 4.2190E+01 Node: TF101 Connectors: T8101 18101 FT8101 - MTF101 * F18101 E18101 8 MTF101 * ET8101 Equation: Y CON ( X, P ) 1 0 1 X_list X_list Parameters MTF101 1.0000E+00 Node: TF102 Connectors: T8102 18102 FT8102 - MTF102 * F18102 E18102 - MTF102 * ET8102 Equation: Y CON ( X, P ) 1 0 1 X_list X_list Parameters MTF102 1.0000E+00 Node: TF103 Connectors: T8103 18103 FT8103 - MTF103 * F18103 818103 - MTF103 * ET8103 Equation: Y CON ( X, P ) 1 0 1 X_list X_list Parameters MTF103 1.0000E+00 Node: TF104 Connectors: T8104 18104 FT8104 - MTF104 * F18104 E18104 - MTF104 * ET8104 Equation: Y CON ( X, P ) 1 0 1 X_list X_list Parameters MTF104 1.0000E+00 Node: TF105 Connectors: T8105 18105 FT8105 - MTF105 * F18105 E18105 s MTF105 * ET8105 Equation: Y CON ( X, P ) 1 0 1 X_list X_list Parameters MTF105 1.0000E+00 Node: TF106 Connectors: T8106 18106 FT8106 - MTF106 * F18106 E18106 8 MTF106 * ET8106 Equation: Y CON ( X, P ) 1 0 1 Y list X list Parameters 313106 ‘ 1 . 00003+00 Index Index Index Index Index Index Index Table 8-3 (cont'd). Node: Equation: X_list MTF125 Node: Equation: X_list MTF126 Node: Equation: X_list MTF127 Node: Equation: X_list MTF128 Node: Equation: X_list MTF129 Node: Equation: Y_'_1 ist MT3130 Node: Equation: X_list F18101 Node: Equation: X_list F18102 Node: Equation: X_list F18103 T3125 3T8125 818125 T3126 3T8126 E18126 T3127 3T8127 E18127 T3128 3T8128 E18128 T3129 3T8129 E18129 T3130 3T8130 E18130 1M101 1M102 IM103 Connectors: I MTF125 I MTF125 con ( x, X_list Connectors: I MTF126 I MTF126 CON ( X, X_list Connectors: I MTF127 I MTF127 CON ( X, X_list Connectors: I MTF128 I MTF128 003 ( x, X_list Connectors: I MTF129 I MTF129 003 ( x, X_list Connectors: I MTF130 I MTF130 003 ( x, X_list Connectors: ATT ( X, X_list P18101 Connectors: ATT ( X, X_list PI8102 Connectors: ATT ( X, X_list PI8103 43 T8125 18125 * F18125 * ET8125 P ) 1 0 1 Parameters 8.3144E+00 T8126 18126 * F18126 * ET8126 P ) 1 0 1 Parameters -3.7879E+00 T8127 18127 * F1812? * ET8127 P ) 1 0 1 Parameters -3.9697E+00 T8128 18128 * F18128 * ET8128 P ) 1 0 1 Parameters 1.3440E+00 T8129 18129 * F18129 * ET8129 P ) 1 0 1 Parameters -1.6953E+00 T8130 18130 * F18130 * ET8130 P ) 1 0 1 Parameters 6.04128+00 18101 P ) 1 1 1 Parameters 5.196lE+04 I8102 P ) 1 1 1 Parameters 3.8072E+04 18103 P ) 1 1 1 Parameters 4.883lE+04 Index Index Index Index Index Index Index Index Index Thbk:8#3(confld). Node: 18104 Equation: X_list FI8104 Node: IMIOS Equation: X_list FI8105 Node: 1M106 Equation: X_list FI8106 Node: CM101 Equation: X_list 808101 Node: CM102 Equation: X_list E08102 Node: CM103 Equation: X_list E08103 Node: CM104 Equation: X_list E08104 Node: CM105 Equation: X_list 808105 Node: 0M106 Equation: X_list E08106 Node: ISPG Equation: X_list FVISPG Node: RSPG Equation: X_list EVSPG Connectors: ATT ( X, X_list P18104 Connectors: ATT ( X, X_list P18105 Connectors: ATT ( X, X_list P18106 Connectors: GAIN ( X, X_list 908101 Connectors: 0313 ( x, X_list 908102 Connectors: 0313 ( x, X_list 908103 Connectors: GAIN ( X, X_list 908104 Connectors: 0313 ( x, X_list 908105 Connectors: 0313 ( x, X_list 908106 Connectors: ATT ( X, X_list PVISPG Connectors: GAIN ( X, X_list FVSPG 13104 P ) 13105 P ) 18106 03101 P ) 03102 P ) 08103 C8104 P ) 08105 08106 1 1 1 Parameters 6.4808E+03 1 1 1 Parameters 1.0284E+04 1 1 1 Parameters 1.32158+05 1 1 1 Parameters 9.2496E+07 1 1 1 Parameters 1.7051E+07 1 1 1 Parameters 6.1746E+06 1 1 1 Parameters 1.6159E+05 1 1 1 Parameters 3.2115E+04 1 1 1 Parameters 1.0442E+04 1 1 1 Parameters 1.00008+01 1 1 1 Parameters 1.00008+01 Index Index Index Index Index Index Index Index Index Index Index Table 8-3 (cont'd). Node: CSPG Equation: X_list EVSPGZ END-3ILE 45 Connectors: VSPG2 ! - 0313 ( x, 3 ) 1 1 1 X_list Parameters Index 9VSP02 5.00008+02 0 APPENDIX C ORGANIZATION OF THE FORTRAN SOURCE CODE The FORTRAN source code has been placed into three files. The first file, "MBMCKFOR", contains file processing, flow control, and user dialog support subroutines. The second file, "MBMCKG.FOR" , contains the subroutines which control the creation of the modal and multiport topologies. The third file, ”MCKMTH.FOR" , contains the subroutines which perform the mathematical manipulations necessary to construct the modal and multiport topologies. The subroutines contained within the three files are supported by a common-block structure contained in the files "MCKHDR.CBK" and "MCKSIZ.C8K". The source code developed for this study may be considered as a "stand alone" module. The module has a single entry point (subroutine MCKLOD) which is called from a single location within the ENPORT source code (subroutine GFGNOC). Further information regarding the organization of the source code is provided in Appendix Cl and Appendix CZ. A complete listing of the FORTRAN source code is provided in Appendix C3. 46 APPENDD( Cl SUBPROGRAM CALLING TREE Table 01 . The subprogram calling tree. 030300 (ENPORT) MCKLOD MCKGFN MCKFRD MCKHDR MCKDMN MCKFRC MCKMAT MCKMCR MCKSHO MCKRST MCKBLD MCKMOD MCKEIG INVMAT LUDCMP LUBKSB MTXMUL 8ALAN2 31.31352 3033 EVECTS MTXCML MTXADD DETCPY DETMTX MODDAT SETVAL MTXTRN MTXMUL MCKVIB INVMAT LUDCMP LUBKSB VIBDAT SETVAL 47 APPENDIX C2 SUBPROGRAM LIST Table 02. The subprogram list and associated source files. BALAN2 DETCPY DETMTX ELMHS2 EQNINI EVECTS GETNOD HQR3 INVMAT LUBKSB LUDCMP MCKBLD MCKDMN MCKEIG MCKFRC MCKFRD MCKGFN MCKHDR MCKLOD MCKMAT MCKMCR MCKMOD MCKRST MCKSHO MCKVIB I MODDAT MTXADD MTXCML MTXMU L MTXTRN SETVAL VIBDAT (MCKMTI-I.FOR) (MCKMTHFOR) (MCKMTHFOR) (1100113303) (311313030303) (110311111303) (31313030303) (310103111303) (MCKMTHFOR) (MCKMTH.FOR) (110313111303) (MBMCKGFOR) (M8MCK.FOR) (MBMCKG.FOR) (MBMCKFOR) (M8MCK.FOR) (MBMCK.FOR) (MBMCK.FOR) (3133103303) (MBMCKFOR) (M8MCK.FOR) (MBMCKGFOR) (31313031303) (M8MCK.FOR) (31313030303) (MBMCKGFOR) (130313111303) (MCKMTHFOR) (MCKMTHFOR) (MCKMTHFOR) (MBMCKGFOR) (MBMCKG.FOR) 48 APPENDIX C3 FORTRAN SOURCE CODE LISTINGS This appendix includes the FORTRAN source code for the software utility created for ENPORT. 49 50 CCOMMONFILE:MCKSIZ Last Change: 09/19/91 RM g---- MCK Reader File 5---- Components 0 MCXMAX, Maximum dimension of the MCK model. 3---- Declarations. C INTEGER MCXMAX : PARAMETER (303333 - 10) CCOMMONEO38MCKHDR * 51 CCOMMONFILE:MCKMDR Last Change: 09/09/91 RM C C—--- MCK Reader File 0 C---- Components 0 MCXNAM, mode1_name C MCXFNM, model_file_name C MCKTTL, model_title C MCXDSC, model_description. C MCKDIM, Dimension of the MCX model. C MCKNLD, Number of description lines. 0 MCKMCT, Number of elements counted in the mass matrix. 0 MCXCCT, Number of elements counted in the damping matrix. C MCKKCT, Number of elements counted in the stiffness matrix. C NUMNOD, Number of nodes required for the macro. C NUMCON, Number of connectors required for the macro. C NUMMAC, Number of macros added to the graph (for names only). C FRCTOX, Token value for force (0 I ignore, 1 I include). 0 FRCVAL, Force value at the node (constant) used if FRCTOXIl. C MASMAT, Mass matrix C STFMAT, Stiffness matrix C EIGMAT, Matrix of eigenvalues for the system. C DMPMAT, Damping matrix C MCKMAC, Macro option - TRUE I modal, FALSE I vibrations. C C---- Include the size specifications. 0 INCLUDE 'MCXSIz.08X' 0 C---- Declarations CHARACTER MCXNAM*8, MCKFNM*32, MOXTTL*72, MCXDSC(10)*72 INTEGER MCXDIM, MCXNLD, MCXMCT, MCXCCT, MCKRCT INTEGER NUMNOD, NUMCON, NUMMAC, 3ROTOX(MOXMAX) REAL MASMAT(MCXMAX,MCXMAX), STFMAT(MCXMAX,MCKMAX) REAL DMPMAT(MCXMAX,MCXMAX), EIGMAT(MCKMAX,MOXMAX) REAL FRCVAL(MCXMAX) LOGICAL MCXMAC 0 COMMON /MCKHD1/MCXNAM,MCXFNM,MCXTTL,MCXDSC COMMON /MCXHD2/MCXDIM,MCXNLD,MCXMCT,MCXCCT,MCKXCT,NUMNOD,NUMCON COMMON /MCXHD3/NUMMAC,FRCTOX COMMON [MCXHD4/MASMAT,STFMAT,DMPMAT,EIGMAT,FRCVAL COMMON [MCXHDSIMCXMAC C CCOMMONEO3zMORHDR —* 52 031LE:M8MOR.30R 0 C---- M8MCR.FOR: Mode1_build M,C,X file load/manipulation support. 0 C---- PURPOSE: This file contains all the code required to load 0 MCK matrix models from file. 0 C---- Contents: 0 MCKLOD, Load M,C,E matrices from file. 0 MCXRST, Restores the graph screen 0 MCXGFN, Get file name from user by dialog. 0 MCKFRD, Controls the MCX data file read. 0 MCXHDR, Reads MCK header from file. 0 MCKDMN, Reads MCK model dimension from file. 0 MCRFRC, Reads MCK force info from file. 0 MCXMAT, Reads MCK matrices from a file. 0 MCKMCR, Allows the user to change macro types. 0 MCKSHO, Determines number of nodes/connectors. 0 C---- Last Change: September 9, 1991. RM 0 CEOFE 0 SMESSAGEz'MCRLOD' CMCXLOD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/9/91 RM #1}. filtfi filifi *1}! filti NIPfi filtfi * 0 SUEROUTINE MCKLOD C 0---— PURPOSE: Loads a M,C,X set of matrices from file. 0 C---- Inputs: 0 0---- Outputs: 0 CHARACTER EVTP*4, FILNAM*12 INTEGER IR, 10, IPAG LOGICAL TXTMOD 0 EXTERNAL MODSET, SPXEYL, MOVCUR, GETXEY, EVTTYP, MCXRST EXTERNAL MCXBLD C C***MCKLOD************************************************************** 0 C---- Set text mode IPAGI 0 TXTMODI .TRUE. CALL MODSET(TXTMOD) CALL SPREYL 0 C---- Get the MCK data from file. 0 100 CONTINUE IRI 2 ICI 6 FILNAM I '*.MCX' CALL MCXGFN(IR,IC,FILNAM,EVTP) C C---- Get the macro option (MODAL or VIBRATIONS). 0 CALL MCKMCR C C---- Calculate and display required nodes and connectors for macro. 0 CALL MCKSHO 53 0 CALL GETREY(0,0) C C---- Return section 800 CONTINUE C C---- Restore the graph screen. 0 CALL MCXRST C C---- Build the macro. 0 CALL MCX8LD RETURN 0 END 0 CEND:MCKLOD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCXRST' CMCXRST>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/9/91 RM 0 SUEROUTINE MCKRST C C---- PURPOSE: Restores the graph window. 0 C---- Inputs: 0 0---- Outputs: 0 INCLUDE 'BGFXBX.08X' INCLUDE 'VIEWEX.08X' C CHARACTER STRING*80 REAL VX, VY, X: Y INTEGER IPAG, IX, 1!, I LOGICAL TXTMOD C EXTERNAL MODSET, SPKEYL, PCWIND, NEWPLT, MOVCUR, WRTSTG EXTERNAL CXY2IJ, PLTPXL, SYSDRW, GFXCUR, DRBOX, WRTCAT C C***Mcnsri******************************************t****************** C C---- Reset to graphics mode and set up screen coordinates IPAG I O TXTMODI .FALSE. CALL 300$31(1x1300) CALL PCWIND(IPAG,XMNPXL,XMXPXL,YMNPXL,YMXPXL) CALL NEWPLT(0,1,VPXMN,VPXMX,VPYMN,VPYMX) C C---- The following redraw sequence should not be herell It is here 0 because the redraw sequence is attached to the menu handler C in MBVGED of M8MENU.FOR. C 810 13 (GRDVIS) 1333 vx= VPXMN +0.5*030151 815 v1: VPYMN +0.5*GRDIST 820 CALL 0x2210(vx,vx,rx,11) CALL PLTPXL(IPAG,IX,IY,15) vx- vy +GRDIST 13 (VY.LT.VPYMX) 0010 820 vx- vx +0301s1 13 (VX.LT.VPXMX) 0010 815 33013 54 I3 (3RMVIS) CALL DRBOX(VPXMN,VPYMN,VPXMX,VPYMX) CALL SYSDRW C---- Clear the dialog region (23-24) DO 840 1- 23,24 CALL MOVCUR(IPAG,I,1) 840 CALL WRTCAT(IPAG,32,ICLR8,80) 0---- Put up a graphics cursor XI VPXMN +GRDIST*0.5 YI VPYMN +GRDIST*0.5 CALL GFXCUR(X,Y,'P') C---- Put up label and set field 1 (col 13) with default of 'N' 813130: ' Nod/Con/M: ' CALL WRTSTG(0,23,1,ICLRL,STRING,12) C---- Put up the special key list. CALL SPXEYL C RETURN 0 END 0 CEND:MCXRST<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCXGFN' CGETFNM>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 04/13/91 RR SUEROUTINE MCXG3N(1RS,ICS,3ILNAM,EVTP) C C---- PURPOSE: Get file name from user by dialog. 0 0---- Inputs: IRS, start row for dialog area 0 ICS, start col for dialog area 0 FILNAM, default file name (may be changed) 0 C---- Outputs: EVTP, I CANC or CRET C FILNAM, name of file selected (iff EVTPICRET) 0 . INCLUDE 'COMMEX.CBX' INCLUDE 'VIEWBX.08X' C CHARACTER FILNAM*12, EVTP*4, STRING*80 CHARACTER DFTNAM*12 INTEGER IRS, ICS, IR, L LOGICAL YES 0 EXTERNAL LNMSGD, MOVCUR, WRTCAT, WRTSTG, GETSTR, LJSTR, UPCASE EXTERNAL YES 0 c***ucxcm************************************************************** C C---- Convert to actual dialog start location IRSI IRS +1 ICSI 108 +1 C-—-- Put up dialog box DO 10 IRI IRS,IRS+2 CALL MOVCUR(0,1R,ICS) 10 CALL 331031(0,32,0,31) DO 15 13: IRS-1,IRS+1 CALL MOVCUR(0,IR,ICS-l) 15 CALL WRTCAT(0,32,ICLRL,31) STRING= 'Enter file name:' CALL WRTSTG(0,1RS,ICS,ICLRL,STRING,16) D3TNAMI FILNAM 55 C---- Get file name from user 100 FILNAMI DFTNAM CALL GETSTR(IRS,ICS+17,12,3ILNAM,EVTP) 13 (31LNAM.EQ.' ') EVTPI 'CANC' C C---- Crunch the input 0 IF (EVTP.EQ.'CANC') THEN GOTO 800 ELSEIF (EVTP.EQ.'CRET'.OR.EVTP.EQ.'DONE') THEN CALL LJSTR(FILNAM,STRING,L) 31LNAMI STRING CALL UPCASE(FILNAM) CALL MCXFRD(31LNAM) ELSE GOTO 100 ENDIF C C---- Time to return 0 800 CONTINUE RETURN 0 END CEND:MCRGFN<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 0 $MESSAGE:'MOXFRD' CMCRFRD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/09/91 RM 0 SUEROUTINE MCXFRD(FILNAM) C 0---- PURPOSE: Controls the MCK data file read. 0 C---- Inputs: FILNAM, default file name (may be changed) 0 C---- Outputs: 0 INCLUDE 'COMMBX.08R' INCLUDE 'VIEWEX.08X' INCLUDE 'MCXHDR.08K' C CHARACTER FILNAM*12, STRING*80, NXTCOM*S, NXTCML*40 INTEGER LCS, LN C EXTERNAL LNMSGD, NEWLF, MCKHDR, MCXDMN, MCXMAT C c***um************************************************************** C C---- Open the specified file. 0 STRING I '*** Error opening file : ' MESSAGE I STRINGl/FILNAM OPEN(PRUNIT,FILEIFILNAM,STATUSI'OLD',ERRI900, *' FORMI'FORMATTED',ACCESSI‘SEQUENTIAL') C C---- Locate the first command string. 0 CALL NEWLF(STRING,LCS) NXTCOM I STRING IF (LCS.LE.0) THEN MESSAGI ' *** Fatal error while reading file.‘ GOTO 900 ELSE LNI 7 c-—-— 20 c---- C c-——- 0 c ..... c ..... c ..... c ..... c ————— 56 MESSAGI ' Processing file command: ' CALL WRTSTG(0,LN,7,ICLRM,MESSAG,SS) ENDIF Interpret the string as a command CONTINUE IF (NXTCOM.EQ.' HEAD') THEN NXTCMLI' HEADING' ELSEIF (NXTCOM.EQ.' DIME') THEN NXTCMLI' DIMENSION' ELSEIF (3x1003.30.' 3030') 1333 NXTCMLI' FORCE INFORMATION' ELSEIF (NXTCOM.EQ.' MASS') THEN NXTCMLI' MASS MATRIX' ELSEIF (NXTCOM.E9.' STIF') THEN NXTCMLI' STIFFNESS MATRIX' ELSEIF (NXTCOM.E9.' DAMP') THEN NXTCMLI' DAMPING MATRIX' ELSEIF (NXTCOM.EQ.' END-') THEN NXTCMLI' END-FILE' ELSE MESSAGI ' *** Bad command in file: '//NXTCOM GOTO 900 ENDIF Inform user of file read status 13 (LN.LE.21) 1333 LNI LN+1 MESSAGI NXTCML - CALL NRTSTG(0,LN,7,ICLRM,MESSAG,55) ENDIF All routines below return MESSAG filled in if OXAYI.FALSE. IF (NXTCOM.EQ.' HEAD') THEN - Read the MCK file header. CALL 303333( 3x1co3 ) ELSEIF (NXTCOM.EQ.' DIME') THEN - Read the MCR matrix dimensions from file and post results. CALL MCKDMN( NXTCOM ) WRITE(STRING,100) 303313 CALL WRTSTG(0,LN,25,ICLRM,STRING,4) ELSEIF (NXTCOM.EQ.' FORC') THEN - Read the force info from file and post the results. CALL MCRFRC( NXTCOM ) 33113(s13130,100) 330103(1) CALL WRTSTG(0,LN,25,ICLRM,STRING,4) 33113(s13130,110) FRCVAL(1) CALL WRTSTG(0,LN,30,ICLRM,STRING,13) ELSEIF (3x1003.30.' 33ss') 1333 - Read the MCK mass matrix from file and post results. CALL MCRMAT( 'MASS',NXTCOM ) WRITE(STRING,100) MCXMCT CALL WRTSTG(0,LN,25,ICLRM,STRING,4) 33113(s13130,110) 330331(1,1) CALL WRTSTG(0,LN,30,ICLRM,STRING,13) 33113(513130,110) 33s331(303013,303313) CALL WRTSTG(0,LN,45,ICLRM,STRING,13) ELSEIF (NXTCOM.EQ.' STIF') THEN - Read the MCK stiffness matrix from file and post results. CALL MCKMAT( 'STIF',NXTCOM ) WRITE(STRING,100) MCKKCT CALL WRTSTG(0,LN,25,ICLRM,STRING,4) 33113(s13130,110) STFMAT(1,1) CALL WRTSTG(0,LN,30,ICLRM,STRING,13) 57 WRITE(STRING,110) STFMAT(HCRDIH,HCKDIH) CALL WRTSTG(O,LN,45,ICLRH,STRING,13) ELSEIF (NXTCOH.EQ.' DAMP') THEN C ------ Read the MCK damping matrix from file and post results. CALL HCKHAT( 'DAMP',NXTCOH ) WRITE(STRING,100) 3cxcc1 CALL WRTSTG(O,LN,25,ICLRH,STRING,4) 13(3c3cc1.33.0) 1333 WRITE(STRING,110) DHPMAT(1,1) CALL WRTSTG(O,LN,30,ICLRH,STRING,13) WRITE(STRING,110) DHPHAT(HCXDIM,HCKDIH) CALL WRTSTG(O,LN,45,ICLRH,STRING,13) ENDIF ELSEIF (NXTCOH.EQ.' END-') THEN C ------ Successful completion of file read MESSAG- ' Model has been loaded from file.‘ GOTO 900 ENDIF 100 RORHAT(I4) 110 FORMAT(1P,E13.4) C C---- Crunch on the next command if possible. C 11 (OKAY) 6010 20 C C---- Write message and quit. C 900 00311333 CALL WRTSTG(O,24,l,ICLRH,HESSAGE,80) cc CALL GETREY(0,0) 910 CONTINUE REWIND(PRUNIT) CLOSE(PRUNIT) RETURN C END CEND:HCKPRD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SHESSAGE:'HCKHDR' CHCKPRD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/09/91 RM C SUBROUTINE HCKHDR( NXTCOM ) C C---- PURPOSE: Reads the MCK header from file. C C---- Inputs: C C---- Outputs: OKAY, logical flag for operation status. C MESSAGE, status message. C NXTCOM, next command in file. C INCLUDE 'COHHBK.CBK' INCLUDE 'HCXHDR.CBK' C CHARACTER STRING*80, NXTCOH*S INTEGER LCS, LEN, NCHARS C EXTERNAL NCHARS , NEWLF C C***ucxHDR********************************ttt*************************** C OKAY-.FALSE. C C---- Get the file name. 58 CALL NEWLF(STRING,LCS) IP(LCS.GE.5) oo1o 900 3x1c03 - STRING(1:S) 13 (3x1c03.3q.' 11') 1333 C ------ Get the file name from the file. c---- CALL NEWLE(STRING,LCS) 13 (LCS.GE.8) co1o 900 3cxr33 - STRING(7:18) ELSE 6010 900 ENDIF Get the MCK macro name. CALL NEWLF(STRING,LCS) IE(LCS.GE.5) 0010 900 3x1cou . STRING(1:S) Ir (3x1con.3g.' NA') 1333 C ------ Get the macro name from the file. C--—- c ..... c---- c ..... 50 C c--_- C CALL NEWLF(STRING,LCS) 11 (LCS.GE.8) 6010 900 HCNNAH . STRING(7:14) ELSE 3010 900 33013 Get the title. CALL NEWLP(STRING,LCS) IE(LCS.GE.5) GOTO 900 NXTCOM 8 STRING(1:S) 13 (NXTCOH.EQ.' TI') THEN - Get the mck title from the file. CALL NEWLP(STRING,LCS) IF (LCS.LT.7) GOTO 900 HCKTTL - ' ' LEN z NCHARS(STRING) IF (LEN.GE.7) HCKTTL 8 STRING(7:LEN) ELSE GOTO 900 ENDIF Get the description. MCRNLD - 0 CALL NEWLP(STRING,LCS) IF(LCS.GE.5) GOTO 900 NXTCOM = STRING(1:5) IF (NXTCOH.EQ.' DE') THEN - Get the ka description from the file. 'CALL NEWLF(STRING,LCS) IE (LCS.GE.7) THEN HCKNLD = MCKNLD+1 HCKDSC(MCKNLD)=' ' LEN . NCHARS(STRING) IF (LEN.GE.7) HCKDSC(HCKNLD) - STRING(7:LEN) GOTO 50 ENDIF NXTCOM 8 STRING(1:S) ENDIF All done. 59 OKAY-.TRUE. RETURN C C---- Trouble. C 900 CONTINUE MESSAG - ' *** Error while reading HEADING data.’ 910 OKAY-.PALSE. RETURN C END CEND:MCKHDR<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCRDMN' CMCKDIM>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/09/91 RM C SUEROUTINE MCKDMN( NXTCOM ) C C---- PURPOSE: Reads MCK model dimension from file. C C---- Inputs: C C---- Outputs: OKAY, logical flag for operation status. C MESSAGE, status message. C NXTCOM, next command in file. C INCLUDE 'COHHBK.CBK' INCLUDE 'HCKHDR.CEX' C CHARACTER STRING*80, NXTCOM*5 INTEGER LCS C EXTERNAL NEWLE C CtitnchMN***tttittttttttt*ttt********t********************************t C OKAY=.PALSE. C c---— Get the dimension of the MCK model. C READ(PRUNIT,200,ERR=9OO,END89OO) 3c3013 200 FORMAT(6X,I4) C C---- Advance to the next command. C CALL NEWLF(STRING,LCS) IF(LCS.GE.3) GOTO 900 NXTCOM s STRING(l:5) C C---- All done. C OKAYs.TRUE. RETURN C C—--- Trouble. C 900 CONTINUE MESSAG 8 ' *** Error while reading DIMENSION data.’ 910 OKAY=.FALSE. RETURN C END CEND:MCKDMN<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C 60 SNESSAGEz'MCRFRC' CMCKPRC)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 10/21/91 RM C SUBROUTINE HCKERC( NXTCOM ) C C---- PURPOSE: Reads force information from a file. C C---- Inputs: None. C C---- Outputs: OKAY, logical flag for operation status. C MESSAGE, status message. C NXTCOM, next command in file. C INCLUDE 'COMMBK.CBK' INCLUDE 'MCKHDR.CBK' C CHARACTER STRING*80, NXTCOM*5, SEORCE*13, SFRCTK*1 INTEGER LCS, IP, ICOUNT C EXTERNAL NEWLP C cxsencxfncsseeeeeeeeeeee*eeeeee*e**************sees********************* C OKAY-.PALSE. g---- Read the [ start specifier. C CALL NEWLP(STRING,LCS) IE (STRING(3:3).NE.'[') GOTO 900 §---- Read the matrix data. ICOUNT 8 O 100 CONTINUE CALL NEWLP(STRING,LCS) 11 (STRING(3:3).EQ.']') 1333 GOTO 210 ELSEIF (LCS.LE.3) THEN MESSAG 8 STRING GOTO 910 ENDIF C---- Parse the string into numbers and tokens. IP 8 7 333013 . $13130(19:19) IP 8 18 830303 . STRING(IP:IP+12) ICOUNT 8 ICOUNT + 1 C---- Store the number in the proper place. 33An(srnc1x,'(14)') rac1ox<100031) READ(SFORCE,'(1P,E13.4)') FRCVAL(ICOUNT) GOTO 100 C C---- Advance to the next command. C 210 00311303 CALL NEWLF(STRING,LCS) IF(LCS.GE.3) 0010 900 3x1003 . STRING(1:5) C C---- All done. C OKAY8.TRUE. RETURN 61 C---— Trouble. C 900 CONTINUE MESSAG 8 ' *** Error while reading FORCE data.’ 910 OKAY8.EALSE. RETURN C END CEND:MCKPRC<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCKMAT' CMCKMAT>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/09/91 RM C SUBROUTINE HCKMAT( STG, NXTCOM ) C C---- PURPOSE: Reads MCK matrices from a file. C C---- Inputs: STG, String to define action (MASS, STIE, DAMP). C C-—-- Outputs: OKAY, logical flag for operation status. C MESSAGE, status message. C NXTCOM, next command in file. C INCLUDE 'COMMBK.CBK' INCLUDE 'MCKHDR.CBK' C CHARACTER STG*4, STRING*80, NXTCOM*5, STRNUM*13, TOK*1 INTEGER LCS, I, IP, ICOUNT, IRON, ICOL C EXTERNAL NEWLY C C***Mcmr***************i*****fl******t********************************* C OKAY-.PALSE. C C---- Read the [ matrix start specifier. C CALL NEWLF(STRING,LCS) IF (STRING(3:3).NE.'[') GOTO 900 C C---- Read the matrix data. C ICOUNT 8 0 ICOL 8 0 IRON 8 l 100 CONTINUE CALL NEWLF(STRING,LCS) IF (STRING(3:3).EQ.')') THEN GOTO 210 ELSEIF (LCS.LE.3) THEN MESSAG 8 STRING GOTO 910 ENDIF C---- Parse the string into numbers and tokens. IP 8 4 DO 110 I81, 5 STRNUM 8 STRING(IP:IP+12) C ------ Check for a blank spot. I? (STRNUM.EQ.' ') GOTO 100 ICOUNT 8 ICOUNT + l ICOL 8 ICOL + l C ------ Increment the row and column counter. IF (ICOL.EQ.MCKDIM+1) THEN ICOL 8 l 62 IROW 8 IRON + 1 ENDIF C ------ Store the number in the proper matrix. IE (STG.EQ.'MASS') THEN READ(STRNUM,'(lP,El3.4)') 3A33A1(1303,100L) ELSEIF(STG.EQ.'STIP') THEN READ(STRNUM,'(lP,El3.4)') STFMAT(IROW,ICOL) ELSEIF(STG.EQ.'DAMP') 1333 READ(STRNUM,'(1P,El3.4)') DMPMAT(IROW,ICOL) ENDIF C ------ Check for an end of row token. 103 . STRING(IP+13:IP+13) IP (TOK.EQ.';') GOTO 100 IP 8 IP + 14 110 CONTINUE GOTO 100 C C---- Advance to the next command. C 210 00311303 CALL NEWLP(STRING,LCS) IE(LCS.GE.3) 0010 900 3x1003 - s1313c¢1:5) C C---- Store the number of elements counted. C IF (STG.EQ.'MASS') THEN MCKMCT 8 ICOUNT ELSEIF(STG.EQ.'STIF') THEN MCKKCT 8 ICOUNT ELSEIP(STG.EQ.'DAMP') THEN MCKCCT 8 ICOUNT ENDIF C C---— All done. C OKAY8.TRUE. RETURN C C---- Trouble. C 900 CONTINUE MESSAG 8 ' *** Error while reading MASS MATRIX data.‘ 910 OKAY8.FALSE. RETURN C END CEND:MCKMAT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCKMCR' CMCKMCR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/10/91 RM C SUBROUTINE MCKMCR C C---- PURPOSE: Allows the user to change macro types. C INCLUDE 'SIZEMB.CBK' INCLUDE 'BGFXBK.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'VIEWBK.CBK' INCLUDE 'MCKHDR.CBK' C CHARACTER STRING*80, EVTTYP*4, EVTP*4 INTEGER IR, IC, 11, 12, ICE, 1, IATT, IPAG, ICS, IFl, IF2 C 63 LOGICAL ANSI EXTERNAL MODSET, WRTSTG, MOVCUR, GETCUR, EVTTYP, SPREYL EXTERNAL PCWIND, NEWPLT INTRINSIC MAX, MIN C***Mcmcn*************fit*********************************************** C c---- C c---- c---- 100 c--—— c ----- c---- 800 Set up the screen label fields. IR 8 16 ICS 8 6 STRING8 ' Macro type? _ Modal _ Vibrations' CALL WRTSTG(IPAG,IR,ICS,ICLRL,STRING,42) Set up the data fields with the default values. Fields 1 and 2: Line 20, cols ICS+18 and ICS+27 CONTINUE IP18 ICS+18 IP28 ICS+27 STRING8 'X' CALL WRTSTG(IPAG,IR,IF1,ICLRD,STRING,1) STRING8 ' ' CALL WRTSTG(IPAG,IR,IF2,ICLRD,STRING,1) Position the cursor initially. IC8 131 Read the selection here CALL MOVCUR(IPAG,IR,IC) CALL 031x32(11,12) 3v1P- 3v111p(11,12) Process the selection IF (EVTP.EQ.'CANC') THEN GOTO 800 ELSEIF (EVTP.EQ.'DONE') THEN CALL MOVCUR(IPAG,IR,IF1) CALL GETCAT(IPAG,I,IATT) ANSl8 CHAR(I).EQ.'X' MCKMAC8 ANSI GOTO 800 ELSEIF (EVTP.EQ.'DATA'.OR. EVTP.EQ.'CRET') THEN - Blank the unmarked field and mark the selected field ICB8 IF1+IF2 -IC STRING8 ' ' CALL WRTSTG(IPAG,IR,ICB,ICLRD,STRING,1) STRING8 'X' CALL WRTSTG(IPAG,IR,IC,ICLRD,STRING,1) ELSEIF (EVTP.EQ.'MOVE') THEN IF (12.EQ.75) THEN ! Left IC8 IFl ELSEIF (12.EQ.77) THEN ! Right IC8 IF2 ENDIF ENDIF GOTO 100 Return section CONTINUE RETURN C END CEND:MCKMCR<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGEz'MCXSHO' CMCKSHO >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/10/91 RM C SUBROUTINE MCKSHO C C---- PURPOSE: Shows the user the required number of nodes and C connectors for the desired macro type. C INCLUDE 'MCKHDR.CBK' INCLUDE 'VIEWBK.CBK' C CHARACTER STRING*80, STR1*5, STR2*S INTEGER I, NUMPRC C EXTERNAL NRTSTG C ceeeucxsaoessseeesesstas*eaaaeeeeeeeeeaetteeeat«at*******e************** C C---- Determine the number of forces. C NUMFRC 8 0 DO 10 I81, MCKDIM IP (FRCTOK(I).EQ.1) NUMFRC 8 NUMFRC + 1 10 CONTINUE C C---- Determine the number of nodes and connectors. C I! (MCKMAC) THEN 303300 - (4*303013) + (303330)*(2+303013) 303003 . (3 . 303013) + (((2t303013)+1) * 303330) I!" (MCKCCT.EQ.O) THEN NUMNOD 8 NUMNOD - MCKDIM NUMCON 8 NUMCON - MCKDIM ENDIF ELSE NUMNOD 8 3 + MCKDIM + NUMFRC NUMCON 8 3 * MCKDIM + NUMFRC IF (MCKCCT.EQ.O) THEN NUMNOD 8 NUMNOD - l NUMCON 8 NUMCON - MCKDIM ENDIF ENDIF C C---- Show the results. C 33113(s131,100) 303300 33113(s132,100) 303003 100 FORMAT(I4) STRING 8 ' Nodes required : '//STRl CALL WRTSTG(O,18,7,ICLRM,STRING,28) STRING 8 ' Connectors required : '//STR2 CALL WRTSTG(O,19,7,ICLRM,STRING,28) C C--—- Return section 800 CONTINUE C RETURN C END 65 CEND:MCKSHO<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C CPILE:MEMCKG.POR C C---- MBMCK.FOR: M,C,K model builder support. C C---- PURPOSE: This file contains all the code required to build C MCK modal and vibrations models automatically. C C---- Contents: C MCKELD, Controls automatic building process. C MCKMOD, Controls building of MODAL macro. C MCKVIB, Controls building of VIBRATIONS macro. C GETNOD, Finds node index from a grid location. C EQNINI, Init. equations for automatic assignment. C VIBDAT, Guides change in equations for nodes. C MCKEIG, Controls eigen. eval. of M,K matrices. C MODDAT, Guides change in equations for modal mac. C SETVAL, Guides change in equations for nodes. C C---- Last Change: September 11, 1991. RM C CEOPH C SMESSAGEz'MCKBLD' CMCKBLD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/11/91 RM *IIU ill} Ilffi fill} filtfi filtfi filtfi C SUEROUTINE MCKBLD C C---- PURPOSE: Controls the automatic building process. C C---- Inputs: C C---- Outputs: C INCLUDE 'SIZEMB.CEK' INCLUDE 'SIZESL.CEK' INCLUDE 'GREDBK.CEK' INCLUDE 'VIEWEK.CEK' INCLUDE 'COMMBK.CEK' INCLUDE 'GPSTBK.CBK' INCLUDE 'MCKHDR.CBK' C CHARACTER STRING*80, EVTP*4 INTEGER INOD, I, J, INDX(MCKMAX) REAL X, Y, ANS(MCKMAX,MCKMAX) C EXTERNAL WRTSTG, LNMSGD, NODPIK C C***MCKBLD*************t******************ttt*************************** C C---- Clear the text field in the graph window. C STRING8' ' k CALL WRTSTG(O,23,l,ICLRL,STRING,80) C C---- Check that there is enough room in the data base to hold the macro. C 11 ( (INELS+NUMNOD).GE.MNEL) 1333 3355A0-' 33035s1vz 303333 or NODES...CANNOT BUILD MACRO!‘ CALL L33300(24) GOTO 800 ELSEIF ( (13305+303003).03.3330) 1333 MESSAG8' EXCESSIVE 303333 or CONNECTORS...CANNOT BUILD MACRO!‘ CALL LNMSGD(24) c--_- 40 C c---— C C c ..... C C c ..... C C C—-—— C---— c---- C c ..... C C C-_—_ c_-_- CCCCC c---- C_—-— 500 510 67 GOTO 800 ENDIF Get the position for adding the macro. x-xc 1-10 CALL NODPIK(24,'ADD',EVTP,X,Y,INOD) 13 (EVTP.EQ.'DATA') 1333 13 (1300.33.0) 1333 CALL LNMSGD(24) 0010 40 33013 ELSEIF (EVTP.EQ.'CANC') 1333 0010 800 33013 Build the proper macro using X,Y as upper left corner. 13 (MCKMAC) 1333 - Build the graph. CALL 303300(x,1) - Perform the eigen analysis. CALL MCKEIG Set the flag to say, ”There is now a system graph" E7SFLG(1)8.TRUE. E7CFLG(1)8.TRUE. Assign causality silently (sets E7SFLG(2), E7CFLG(2)). CALL ASSCAU(.TRUE.,.FALSE.) Initialize the equations for automatic assignment. CALL EQNINI E7CFLG(4)8.FALSE. E7CFLG(5)8.PALSE. - Set the proper values. CALL MODDAT ELSE CALL MCKVIB(X,Y) Set the flag to say, ”There is now a system graph” E7SFLG(1)=.TRUE. E7CFLG(1)8.TRUE. Assign causality silently (sets E7SFLG(2), E7CFLG(2)). CALL SSAVE CALL ASSCAU(.TRUE.,.FALSE.) Initialize the equations for automatic assignment. CALL EQNINI E7CFLG(4)8.FALSE. E7CFLG(S)8.FALSE. Get the inverse of the mass matrix. CALL INVMAT(MASMAT,MCKDIM,MCKMAX,INDX,ANS) 00 510 181,303013 00 500 J=l,MCKDIM MASMAT(I,J)8ANS(I,J) 00311303 00311303 68 C C-—-- Fill in the source values and the matrix table for R,C,I nodes. C CALL VIBDAT('SRCE') CALL VIBDAT('MASS') CALL VIBDAT('STIF') 13(303001.33.0) 1333 CALL VIBDAT('DAMP') ENDIF ENDIF C C---- Return section C 800 CONTINUE C RETURN C END CEND:MCKBLD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MCKMOD' CMCKMOD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/17/91 RM C SUBROUTINE MCKMOD(X, Y) C C---- PURPOSE: Controls the automatic building OF MODAL macro. C C---- Inputs: X, Y - Upper left corner of macro box. C C---- Outputs: C INCLUDE 'SIZEMB.CBK' INCLUDE 'SIZESL.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'VIEWBK.CBK' INCLUDE 'COMMBK.CBK' INCLUDE 'GFSTBK.CBK' INCLUDE 'BGEXBK.CBK' INCLUDE 'MCKHDR.CBK' C REAL X, Y, XPOS, YPOS, POINTS(2,10) CHARACTER ST1*1, ST2*2, TYPE*4, NAME*8 INTEGER*2 I, J, ISTART, IEND, INPTCT C EXTERNAL GFXCUR, DRNOD, ADDNOD, GETNOD, ADDBND, DRBND C c***MCKMOD************************************************************** C C---- Get rid of the graphics cursor. C CALL GFXCUR(X,Y,'R') 3---- Increment the number of macros count to insure unique names. C NUMMAC 8 NUMMAC + 1 5---- Build the name constant string C WRITE(ST1,690) NUMMAC §---- Build the source nodes. TYPE 8 'MEG ' DO 150 I81,MCKDIM 150 c---- 160 c---- 170 180 c---- 190 c---- 69 13(330103(1).3Q.1) 1333 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') 312(1:1)8'o' NAME 8 's3'//s11(1:1)//s12(1:2) 3305 8 X+(MCKDIM+l)*(I-l)*GRDIST 3303 8 3 CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) 33013 00311303 Build the O junctions (input ports). 1333 8 '300 ' 00 160 181,303013 13(330103(1).3Q.1) 1333 33113(s12,700) 1 13 (s12(1:1).3o.' ') ST2(1:1)8'O' NAME 8 '03'//s11(1:1)//s12(1:2) 3303 8 X+(MCKDIM+1)*(I-l)*GRDIST 1303 8 3-0301s1 CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) 33013 00311303 Build the transformers. 1333 8 '310 ' 00 180 181,303013 13(330103(1).3Q.1) 1333 00 170 381,303013 33113(s12,700) J + ( (1-1) . 303013 ) 13 (ST2(1:1).EQ.' ') 512(1:1)8'o' NAME 8 '13'//s11(1:1)//s12(1:2) 3305 8 X+((J-l)+( (1-1)*(303013+1) ))*030151 YPOS 8 Y-2*GRDIST CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) 00311303 33013 00311303 Build the l junctions. 1133 8 '310 ' 00 190 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') s12(1:1)8'o' NAME 8 '13'//s11(1:1)//s12(1:2) 330s 8 x+(303013+1)*(1-1)*0301$1 130s 8 184*030151 CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) 00311303 Build the I junctions. 1333 8 '310 ' 00 200 181,303013 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') 512(1:1)8'o' 3A33 8 '13'//s11(1:1)//s12(1:2) 3305 8 x+(303013+1)*(1-1)*0301s1 200 c---- 210 c---- 220 C-—-- 230 c--—— 70 YPOS 8 Y-5*GRDIST CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) CONTINUE Build the C junctions. 1133 8 '300 ' 00 210 181,303013 33113(s12,700) 1 13 (s12(1:1).39.' ') 312(1:1)8'o' NAME 8 '03'//s11(1:1)//s12(1:2) 3305 8 X+((MCKDIM+l)*(I-l)*GRDIST) + 0301s1 3305 8 3-5*030151 CALL DRNOD(NAME,XPOS,YPOS,TYPE) CALL ADDNOD(NAME,TYPE,XPOS,!POS) 00311303 Build the R junctions. 13(303001.33.0) 1333 1133 8 '330 ' 00 220 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') 512(1:1)8'o' NAME 8 '33'//s11(1:1)//s12(1:2) XPOS 8 x+((303013+1)*(1-1)8030151) + 0301s1 3305 8 Y-4*GRDIST CALL 03300(3333,33os,130s,1133) CALL ADDNOD(NAME,TYPE,XPOS,YPOS) 00311303 33013 Add the connectors from effort sources to O-junctions. 133101 8 o 1333 8 '30 ' 00 230 181,303013 13(330103(1).3Q.1) 1333 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') ST2(l:l)8'O' NAME 8 'ss'//s11(1:1)//s12(1:2) x3os 8 x+(303013+1)*(1-1)*030151 3308 8 1 CALL GETNOD(XPOS,YPOS,ISTART) 330s 8 X+(MCKDIM+1)*(I-l)*GRDIST 3305 8 1-030151 CALL GETNOD(XPOS,YPOS,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:1),1) 33013 00311303 Add the connectors from O-junctions to transformers. 00 250 181,303013 13(330103(1).3Q.1) 1333 3303 8 x+(303013+1)*(1-1)*030151 330s 8 3-030131 CALL GETNOD(XPOS,YPOS,ISTART) 00 240 J81,MCKDIM 33113(s12,700) J + ( (1-1) * 303013 ) 13 (ST2(l:l).EQ.' ') 512(1:1)8'o' 3A33 8 '1s'//s11(1:1)//s12(1:2) 240 250 c-_—- 260 270 C---- 280 c-_-_ 290 c---_ 71 3308 8 X+((J-l)+( (181)8(303013+1) ))*030151 130s 8 1-2*030131 CALL GETNOD(XPOS,YPOS,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:l),l) 00311303 33013 00311303 Add the connectors from transformers to 1-junctions. 00 270 181,303013 13(33C1o3(1).3o.1) 1333 00 260 J81,MCKDIM 33113(s12,700) J + ( (1-1) . 303013 ) 13 (ST2(1:1).EQ.' ') 512(1:1)8'o' NAME 8 '1s'//s11(1:1)//s12(1:2) 3303 8 X+(MCKDIM+l)*(J-l)*GRDIST 1305 8 Y-4*GRDIST CALL 031300(xpos,330s,1330) 3305 8 X+((J-l)+( (181)8(303013+1) ))*030151 3305 8 Y-2*GRDIST CALL GETNOD(XPOS,YPOS,ISTART) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(l:l),l) 00311303 33013 00311303 Add the connectors from l-junctions to I nodes. 00 280 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') 512(1:1)8'o' NAME 8 '13'//s11(1:1)//s12(1:2) XPOS 8 x+(303013+1)*(1-1)*030151 YPOS 8 384*0301s1 CALL GETNOD(XPOS,YPOS,ISTART) 3308 8 x+(303013+1)*(1-1)*030151 230s 8 Y-S*GRDIST CALL GETNOD(XPOS,YPOS,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:1),1) 00311303 Add the connectors from l-junctions to C nodes. 00 290 181,303013 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') 512(1:1)8'0' 3A33 8 '03'//s11(1:1)//s12(1:2) 3303 8 X+(MCKDIM+1)*(I-l)*GRDIST 330s 8 3-4*030151 CALL GETNOD(XPOS,YPOS,ISTART) 3305 8 X+((MCKDIM+l)*(I-l)*GRDIST) + GRDIST 1305 8 y-s*030151 CALL GETNOD(XPOS,YPOS,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:1),1) 00311303 Add the connectors from l-junctions to R nodes. 13(303001.33.0) 1333 72 DO 300 I8I,MCKDIM WRITE(ST2,700) I I! (ST2(l:l).EQ.' ') ST2(1:1)8'0' NAME 8 'RB'l/STl(1:1)//ST2(1:2) XPOS 8 X+(MCKDIM+1)*(I-l)*GRDIST YPOS 8 Y-4*GRDIST CALL GETNOD(XPOS,YPOS,ISTART) XPOS 8 X+((MCKDIM+1)*(I-l)*GRDIST) + GRDIST YPOS 8 Y-4*GRDIST CALL GETNOD(XPOS,YPOS,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:l),1) 300 CONTINUE ENDIF C 690 EORMAT(II) 700 EORMAT(12) C C---- Return section C 800 CONTINUE C RETURN 0 END CEND:MCKMOD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGEz'MCKVIB' CMCKVIB>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/11/91 RM C SUBROUTINE MCKVIB(X, Y) C C---- PURPOSE: Controls the automatic building or VIBRATIONS macro. C C---- Inputs: X, Y - Upper left corner of macro box. C C---- Outputs: C INCLUDE 'SIZEMB.CBK' INCLUDE 'SIZESL.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'VIEWBK.CBK' INCLUDE 'COMMBK.CBK' INCLUDE 'GFSTBK.CBK' INCLUDE 'BGFXBK.CBK' INCLUDE 'MCKHDR.CBK' C REAL X, Y, POINTS(2,10) CHARACTER NAME*8, STl*l, ST2*2, TYPE*4 INTEGER*2 I INTEGER ISTART, IEND, INPTCT C . EXTERNAL GFXCUR, DRNOD, ADDNOD, GETNOD, ADDBND, DRBND C C***”CKVIB********************itt*************************************** C C---- Get rid of the graphics cursor. C CALL GFXCUR(X,Y,'R') C C---- Increment the number of macros count to insure unique names. C NUMMAC 8 NUMMAC + 1 C c---- c--—- 150 c---_ 160 c---— c---- c---- c--_- 73 Build the name constant string 33113(s11,690) NUMMAC Build the source nodes. 1133 8 '330 ' 00 150 181,303013 13(330103(1).3Q.1) 1333 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') ST2(l:l)8'0' NAME 8 'sv'//s11(1:1)//s12(1:2) CALL DRNOD(NAME,X+(I-l)*GRDIST,Y,TYPE) CALL ADDNOD(NAME,TYPE,X+(I-l)*GRDIST,Y) 33013 00311303 Build the l junctions (input ports). 1133 8 '310 ' 00 160 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') ST2(l:l)8'0' NAME 8 '1v'//s11(1:1)//s12(1:2) CALL DRNOD(NAME,X+(I-l)*GRDIST,Y-GRDIST,TYPE) CALL ADDNOD(NAME,TYPE,X+(I-l)*GRDIST,Y-GRDIST) 00311303 Build the "I” multi-port. NAME 8 '1'//s11(1:1) 1333 8 '310 ' CALL DRNOD(NAME,X,Y-3*GRDIST,TYPE) CALL ADDNOD(NAME,TYPE,X,Y-3*GRDIST) Build the 'C' multi-port. NAME 8 'C'//STl(l:l) 1333 8 '300 ' CALL DRNOD(NAME,X+2*GRDIST,Y-3*GRDIST,TYPE) CALL ADDNOD(NAME,TYPE,X+2*GRDIST,Y-3*GRDIST) Build the "R” multi-port. 13 (303001.33.0) 1333 NAME 8 '3'//s11(1:2) 1233 8 '330 ' CALL DRNOD(NAME,X+4*GRDIST,Y-3*GRDIST,TYPE) CALL ADDNOD(NAME,TYPE,X+4*GRDIST,Y-3*GRDIST) 33013 Add the connectors from effort sources to 1-junctions. 133101 8 o 1333 8 '30 ' 00 170 181,303013 13(330103(1).3Q.1) 1333 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') 512(1:1)8'0' 3A33 8 'ss'//s11(1:1)//s12(1:2) CALL GETNOD(X+(I-l)*GRDIST,Y,ISTART) CALL GETNOD(X+(I-l)*GRDIST,Y-GRDIST,IEND) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:1),l) 74 ENDIF 170 CONTINUE C C---- Add the connectors from l-junctions to I,C, and R nodes. C CALL GETNOD(X,Y-3*GRDIST,IEND) 00 180 181,303013 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') 312(1:1)8'o' 3A33 8 '10'//s11(1:1)//s12(1:2) CALL GETNOD(X+(I-1)*GRDIST,Y-GRDIST,ISTART) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(l:l),l) 180 00311303 CALL GETNOD(X+2*GRDIST,Y-3*GRDIST,IEND) 00 190 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') ST2(1:1)8'0' NAME 8 'CB'//STl(l:1)//ST2(1:2) CALL GETNOD(X+(I-l)*GRDIST,Y-GRDIST,ISTART) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:1),1) 190 00311303 13(303001.33.0) 1333 CALL GETNOD(X+4*GRDIST,Y-3*GRDIST,IEND) 00 200 181,303013 33113(s12,700) 1 13 (ST2(1:1).EQ.' ') ST2(l:l)8'O' 3A33 8 '33'//s11(1:1)//s12(1:2) CALL GETNOD(X+(I-l)*GRDIST,Y-GRDIST,ISTART) CALL ADDBND(NAME,ISTART,IEND,TYPE,POINTS,INPTCT) CALL DRBND(NAME,ISTART,IEND,TYPE(1:l),l) 200 00311303 33013 690 3033A1(11) 700 3033A1(12) C C---- Return section C 800 CONTINUE C CALL GFXCUR(X,Y,'P') RETURN C END CEND:MCKVIB<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGE:'GETNOD' CGETNOD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/11/91 RM C SUBROUTINE GETNOD(X, Y, INOD) C C---- PURPOSE: Finds the node array index based on a grid location. C C---- Inputs: X, Y - Grid location of node to find. C C---- Outputs: INOD - Array index of the located node. C INCLUDE 'SIZEMB.CBK' INCLUDE 'SIZESL.CBK' INCLUDE 'GREDBK.CBK' 75 INCLUDE 'COMMEK.CEK' INCLUDE 'BGEXEK.CBR' C REAL X, Y, GRDISZ INTEGER I, INOD INTRINSIC ABS C EXTERNAL ACTNOD C c***GETNOD************************i*************************fi*********** C C C---- Identify node by grid location INOD8 0 GRDISZ8 GRDIST/2.0 DO 20 I8 l,INELS IP (ABS(X-NXLOC(I)).LT.GRDISZ) THEN 13 (ABS(Y-NYLOC(I)).LT.GRDISZ) 1333 C ---------- A node has been found INOD8 I I? (ACTND(INOD)) THEN MESSAG8' Active node found.‘ RETURN ENDIF C Node is not active, save it and seek active one INOD8 -INOD ENDIF ENDIF 20 CONTINUE C C---- Return section C C RETURN C END CEND:GETNOD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< gMESSAGEz'EQNINI' CEQNINI>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/13/91 RM C SUBROUTINE EQNINI §---- PURPOSE: Initialize equations for automatic assignment. C---- INPUTS: none C C---- OUTPUTS: E7SFLG(3),E7CFLG(3) set to show eqn status C INCLUDE 'COMMBK.CBK' INCLUDE 'VIEWBK.CBK' C INTEGER IR, IPAG C EXTERNAL DEFEQS, REDOEQ, CHGFCN, LSTEQS, LSTLBI, MBVNPR EXTERNAL LNMSGD, MOVCUR, WRTCAT, MNUSEL, SHOHLP C c***EQNINI****************************t********************************* C IPAG8 O C---- Check status of data base IF (.NOT.E7CFLG(1)) THEN MESSAG8 ' *** There is no system graph.’ CALL LNMSGD(24) 76 RETURN ENDIF IF (.NOT.E7CPLG(2)) THEN MESSAG8 ' *** Causality does not match the graph.‘ CALL LNMSGD(24) RETURN ENDIF C---- Check on equation status next 13 (.NOT.E7SELG(3)) THEN C ----- Set all node equations to their default status E7CELG(4)8.FALSE. E7CFLG(5)8.FALSE. IR8 1 CALL DEFEQS(IR) 37s3LC(3)8 OKAY 3703LC(3)8 OKAY IE (.NOT.OKAY) THEN MESSAG8 ' *** Unable to set default equations.‘ CALL LNMSGD(24) RETURN ENDIF ELSE 13 (.301.3703LC(3)) 1333 C ------- Recover the equations to the maximum extent possible E7CFLG(4)8.FALSE. 37C3LC(5)8.3ALs3. CALL REDOEQ 37C3LC(3)8 OKAY 13 (.NOT.OKAY) 1333 MESSAG8 ' *** Unable to recover equations.’ CALL LNMSGD(24) ' RETURN ENDIF ENDIF ENDIF C C---- Get next option selection. C E7CELG(4)8 .PALSE. E7CELG(5)8 .FALSE. C RETURN C END CEND:EQNINI<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGE:'VIBDAT' CVIBDAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/13/91 RM 0 SUBROUTINE VIBDAT(MATRX) C . C---- PURPOSE: Guides Change in existing equations for nodes. C C---- INPUTS: MATRX - Matrix to fill in ('SRCE', 'MASS', 'STIF' or 'DAMP') C C---- OUTPUTS: none C C-—-- NOTES: Equation structure can be Changed for a multiple-output C node, either NYL sgl-out eqns or 1 NYL-out eqn. C All change data is held on a working basis until it is C complete. Then it is stored if it fits into the eqn d-b. C INCLUDE 'COMMBR.CBK' INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE 'VIEWBK.CBK' 'EQVUBK.CEK' 'SIZEMB.CBK' 'SIZESL.CBK' 'GREDBK.CBK' 'MCXHDR.CBK' 77 C c***VIBDAT*****************************fi******************************** C CHARACTER MATRX*4, ELSEL*8, ST1*10, ST2*10 CHARACTER NVOTL(MXVOTQ)*12, NVINL(MXVINQ)*12, EVTTYP*4 CHARACTER ST11*1, ST22*2, NAME*8 INTEGER NODE, IQ, IQl, IQZ, I, NUMOUT, INTEGER NPR, FNCZI, NCHARS, IDX REAL VAL NUMIN, J EXTERNAL EXTERNAL EXTERNAL FNDISP, EXTERNAL NCHARS, INTRINSIC MAX, LNMSGD, LSTLST, MOVCUR, EQNLST, EDTILQ, GETRL, MIN, WRTCAT, TRPQDT, PTPLST, GETKEY, INT, WRTSTG, GETSTR, FNCZI, EVTTYP, REAL CLEARS, GETINT, MTXDSP, SETVAL C---- Get the node name. C 10 15 C—-—— 20 30 c--_- 33113(s11,10) NUMMAC 3033A1(11) 13 (MATRX.EQ.'MASS') 1333 ELSEL 8 '1'//s11(1:1) 3Ls313 (MATRX.EQ.'STIF') 1333 ELSEL 8 'C'//STl(l:1) 3Ls313 (MATRX.EQ.'DAMP') 1333 ELSEL 8 '3'//s11(1:1) 3Ls313 (MATRX.EQ.‘SRCE') 1333 WRITE(ST11,690) NUMMAC 00 15 181,303013 13(330103(1).3Q.1) 1333 33113(s122,700) 1 13 (ST22(l:1).EQ.' ') 5122(1:1)8'0' NAME 8 'sv'//s111(1:1)//s122(1:2) VAL 8 33CVAL(1) CALL SETVAL('CON 33013 00311303 0010 800 33013 ',NAME,VAL) Get the node index. 00 20 30038 l,INELS 13 (ELNAM(NODE).EQ.ELSEL) 0010 30 NODE8INELS CONTINUE Check on validity of node request CALL EQNLST(NODE,'U',IQl,IQZ,NUMOUT,NVOTL,NUMIN,NVINL) 13 (.NOT.OKAY) 1333 CALL LNMSGD(24) 0010 800 33013 00 4o 18 1,303001 YL(I)=NVOTL(I) 00311303 DISPAG, TBLDSP, PLYDSP 78 C---- Do each eqn of this node C 198 I01 200 CONTINUE 3---- Fill in the equation_view data base from the model db. C CALL TREQDT('GET',IQ) §---- Get the (new) function type. 300 CONTINUE ENAM8 'MATRIX' I! (FNAM.EQ.'MATRIX'.AND.NUMOUT.EQ.1) THEN MESSAG8 ' *** Use SUM, not MATRIX, for single outputs.’ CALL LNMSGD(24) GOTO 800 ENDIF C C---- (Re-)set the number of outputs C NYL8 NUMOUT C 00 310 18 1,303001 33113(s12,315) 1 315 3033A1(12) 13 (ST2(1:1).EQ.' ') 512(1:1)8'o' 13 (MATRX.EQ. 'MASS') 1333 XL(I) 8 '313'//s11(1:1)//s12(1:2) ELSEIF (MATRX.EQ.'STIF') 1333 XL(I) 8 'ch'//s11(1:1)//s12(1:2) 3Ls313 (MATRX.EQ.'DAMP') 1333 xL(1) 8 '333'//s11(1:1)//s12(1:2) ENDIF 310 CONTINUE C C---- Set the number of inputs. C NXL8 MCKDIM C C---- Set the number of parameters. C NPR8 NYL*NXL NPL8NPR C C---- Set parameter values. C DO 332 I 8 1,NYL DO 331 J81,NXL IDX 8 J + (MCKDIM*(I-l)) IF (MATRX.EQ.'MASS') THEN WRITE(PL(IDX),333) MASMAT(I,J) ELSEIF (MATRX.EQ.'STIF') THEN WRITE(PL(IDX),333) STFMAT(I,J) ELSEIF (MATRX.EQ.'DAMP') THEN 13 (MCKCCT.EQ.O) 1333 PL(IDX) 8 ' 0.00003+oo' ELSE WRITE(PL(IDX),333) DMPMAT(I,J) ENDIF ENDIF 331 CONTINUE 332 00311303 333 3033A1(13,312.4) 79 C C---- Equation completed C 500 CONTINUE CALL TRPQDT('PUT',IQ) I? (.NOT.OKAY) THEN CALL LNMSGD(24) GOTO BOO ENDIF C C---- Modify the equation data base (delete excess equations). C FNAM 8 'NULL' NYL 8 O NXL 8 O NPL 8 0 DO 540 IQ 8 IQI+1,IQ2 540 CALL TRPQDT('PUT',IQ) C 690 PORMAT(Il) 700 PORMAT(I2) C 800 CONTINUE RETURN END CEND:VIBDAT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C C SMESSAGE:'MCKEIG' CMCKEIG>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/20/91 RM C_--- SUBROUTINE MCKEIG PURPOSE: Controls the eigen evaluation of M,K matrices. The results are used to automatically assign parameters to a modal vibration macro. MASMAT STFMAT MCKMAX MCKDIM The (NxN) mass matrix. The (NxN) stiffness matrix. Allocated size of the above matrices. The working dimension of the above matrices. Inputs: Outputs: ANS - The inverted matrix. Note: The A matrix is destroyed in this routine! Include the MCK stuff. INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE 'COMMBK.CBX' 'VIEWBK.CBK' 'SIZEMB.CBK' 'SIZESL.CBX' 'EIGNBK.CBK' 'LINZEK.CBK' 'SOLNBK.CBK' 'MCKHDR.CBX' REAL REAL INTEGER 0031(3033Ax,3033Ax), ANS(MCKMAX,MCKMAX) MINVK(MCKMAX,MCKMAX) 1, J, INDX(MCKMAX) EXTERNAL INVMAT, MTXMUL, BALANZ, ELMHSZ, HQR3 80 C C***MCKBIG************************************************************** C C---— Duplicate the MASMAT matrix so as not to destroy it. C DO 6 I81,MCKDIM DO 5 J81,MCRDIM DUM1(I,J)8MASMAT(I,J) CONTINUE CONTINUE ---- Get the inverse of the mass matrix. CALL INVMAT(DUM1,MCXDIM,MCKMAX,INDX,ANS) ---- Form the inv(M)*K matrix CALL MTXMUL(ANS,MCKDIM,MCKMAX,STFMAT,MCKDIM,MCKMAX,MINVK) 888- Set up the AMX matrix. GOO 000 060mm 00 31 181,303013 00 30 J81,303013 AMX(I,J) 8 0.0 AMX(I+MCKDIM,J+MCKDIM)8O A3x(1,J+3C3013)8 -1 * 313V3(1,J) AMX(I+MCKDIM,J) 8 0 30 00311303 AMX(I+MCKDIM,I) 8 1.0 31 00311303 C C---- Balance the AMX matrix. C CALL BALAN2(AMX,MCKDIM*2,MAXXI) C C---- Put matrix in Hessenberg form. C CALL ELMHSZ(AMX,MCKDIM*2,MAXXI) C C---- Get the eigen values. C CALL HQR3(AMX,MCKDIM*2,MAXXI,WR,WI) C DO 45 J81,MCKDIM*2 C PRINT *,NI(J) C PRINT *,WR(J) 45 CONTINUE C C---- Find the eigenvectors. C CALL EVECTS(WI,MAXXI) C RETURN END C CEND:MCKEIG<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:‘MODDAT' CMODDAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/24/91 RM C SUBROUTINE MODDAT C C---- PURPOSE: Guides change in existing equations for nodes of a modal C macro. C 81 C---- INPUTS: C C---- OUTPUTS: none C INCLUDE 'COMMBX.CEX' INCLUDE 'VIEWBK.CBX' INCLUDE 'EQVUBX.CBX' INCLUDE 'SIZEMB.CBX' INCLUDE 'SIZESL.CBX' INCLUDE 'GREDBK.CBK' INCLUDE 'MCKHDR.CEX' C CHARACTER ST1*1, ST2*2, NAME*8 INTEGER I, J REAL EIGTRN(MCKMAX,MCXMAX), TEMP(MCKMAX,MCRMAX), VAL C EXTERNAL MTXTRN, SETVAL C c***HODDAT************************************************************** C C---- Build the name constant string C WRITE(ST1,690) NUMMAC C C---- Set the source node values. C DO 150 I81,MCKDIM IP(FRCTOK(I).EQ.1) THEN HRITE(ST2,700) I 13 (ST2(1:1).EQ.' ') ST2(l:l)8'O' 3A33 8 's3'//s11(1:1)//s12(1:2) VAL 8 PRCVAL(I) CALL SETVAL('CON ',NAME,VAL) ENDIF 150 CONTINUE C C---- Set the transformer node values. C DO 180 I81,MCKDIM IF(PRCTOK(I).EQ.1) THEN DO 170 J81,MCKDIM WRITE(ST2,700) J + ( (I-l) * MCKDIM ) IF (ST2(1:1).EQ.' ') ST2(1:1)8'O' NAME 8 'TF'l/ST1(1:1)//ST2(1:2) VAL 8 EIGMAT(I,J) CALL SETVAL('CON ',NAME,VAL) 170 CONTINUE ENDIF 180 CONTINUE C C---- Set the inertia elements (get R'*M*R). C CALL MTXTRN(EIGMAT,MCKDIM,MCKMAX,EIGTRN) CALL MTXMUL(EIGTRN,MCKDIM,MCKMAX,MASMAT,MCKDIM,MCKMAX,TEMP) CALL MTXMUL(TEMP,MCXDIM,MCKMAX,EIGMAT,MCKDIM,MCKMAX,EIGTRN) C 00 200 181,303013 33113(s12,700) 1 13 (ST2(l:l).EQ.' ') 512(1:1)8'0' 3A33 8 '13'//s11(1:1)//s12(1:2) VAL 8 310133(1,1) CALL SETVAL('ATT ',NAME,VAL) 200 00311303 82 C C---- Set the compliance elements (get R'*C*R). C CALL MTXTRN(EIGMAT,MCKDIM,MCKMAX,EIGTRN) CALL MTXMUL(EIGTRN,MCKDIM,MCKMAX,STFMAT,MCKDIM,MCKMAX,TEMP) CALL MTXMUL(TEMP,MCKDIM,MCKMAX,EIGMAT,MCKDIM,MCKMAX,EIGTRN) C DO 210 I81,MCKDIM WRITE(ST2,700) I 13 (ST2(1:1).EQ.' ') ST2(1:1)8'0' NAME 8 '03'//s11(1:1)//s12(1:2) VAL 8 EIGTRN(I,I) CALL SETVAL('GAIN ',NAME,VAL) 210 CONTINUE C C---- Set the dissipation elements (get R'*r*R). C I1"(MCKCCT.NE.O) THEN CALL MTXTRN(EIGMAT,MCKDIM,MCKMAX,EIGTRN) CALL MTXMUL(EIGTRN,MCKDIM,MCKMAX,DMPMAT,MCKDIM,MCKMAX,TEMP) CALL MTXMUL(TEMP,MCKDIM,MCKMAX,EIGMAT,MCXDIM,MCKMAX,EIGTRN) C DO 220 I81,MCKDIM WRITE(ST2,700) I I? (ST2(1:1).EQ.' ') ST2(1:1)8'O' 3A33 8 '33'//s11(1:1)//s12(1:2) VAL 8 EIGTRN(I,I) CALL SETVAL('GAIN ',NAME,VAL) 220 CONTINUE ENDIF C 690 3033A1(11) 700 3033A1(12) RETURN END C CEND:MODDAT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'SETVAL' CSETVAL >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 09/23/91 RM C SUBROUTINE SETVAL(FTYPE,ELSEL,VAL) C C---- PURPOSE: Guides change in existing equations for nodes. C C---- INPUTS: PTYPE - Function type for the node. C ELSEL - Name of the node to modify. C VAL - Value for the node. C C---- OUTPUTS: none C INCLUDE 'COMMBK.CBK' INCLUDE 'VIENBK.CBK' INCLUDE 'EQVUBK.CBR' INCLUDE 'SIZEMB.CBK' INCLUDE 'SIZESL.CBK' INCLUDE 'GREDBK.CBK' INCLUDE 'MCKHDR.CBK' C CHARACTER ELSEL*8, PTYPE*8 REAL VAL C CHARACTER PNMOLD*8, STRING*80 C 83 CHARACTER NVOTL(MXVOTQ)*12, NVINL(MXVINQ)*12, EVTTYP*4 INTEGER INTEGER LOGICAL EXTERNAL EXTERNAL EXTERNAL NODE, NPR, SGLOLD, LNMSGD, LSTLST, FNDISP, IQ: IQI, NEWPCN MOVCUR, EQNLST, EDTILQ, IQZ, 1: WRTCAT, TRPQDT, PTPLST, NUMOUT, PNCZI, NCHARS, NXLOLD, NXLOLD, NPLOLD NUMIN, NIV SPKEYL TBZDSP NRTSTG, GETSTR, FNCZI, CLEARS, GETINT, MTXDSP, DISPAG, TBLDSP, PLYDSP EXTERNAL NCHARS, INTRINSIC MAX, GETRL, MIN, GETXEY, INT, EVTTYP REAL c***SETVAL****************************fi********************************* C c---- C 20 30 C c---- C C---- 200 C“--- c---- c---_ 300 Get the node index. DO 20 NODE8 l,INELS IP (ELNAM(NODE).EQ.ELSEL) GOTO 30 NODE8INELS CONTINUE Check on validity of node request. CALL EQNLST(NODE,'U',IQl,IQZ,NUMOUT,NVOTL,NUMIN,NVINL) 13 (.NOT.OKAY) 1333 CALL L33500(24) 0010 800 33013 303138 313(30313,303001) Do each eqn of this node IQ8 IQI CONTINUE Fill in the equation_view data base from the model db. CALL TRFQDT('GET',IQ) Mark state of model eqn_data_base for later use SGLOLD8 PNMOLD8 NYLOLD8 NXLOLD8 NPLOLD= Get the CONTINUE NYL.EQ.1 FNAM NYL NXL NPL (new) function type PNAM 8 PTYPE PNAM 8 13 (33A3.3Q.' ImNI ') 0010 800 IF (FNAM.NE.PNMOLD) THEN C ------ Check the changed function type CALL LJSTR(FNAM,STRING,I) FNAM= STRING CALL 030A53(33A3) 13 (33021(33A3).3Q.0) 1333 MESSAG8 ' *** Invalid function type: '//FNAM CALL LNMSGD(24) GOTO 800 ELSE IE (FNAM.EQ.'MATRIX'.AND.NUMOUT.EQ.1) THEN MESSAG8 ' *** Use SUM, not MATRIX, for single outputs.‘ CALL LNMSGD(24) GOTO 300 ENDIF ENDIF ENDIF NEWPON- ENAM.NE.ENMOLD C C---- (Re-)set the number of outputs. C NYL8 1 C C---- Get the number of inputs and parameters for this function C CALL PTPLST(PNAM,NIV,NPR) C NXL8 NIV NPL8 NPR C C---- Set parameter values. C 33113(3L(1),333) VAL 333 3033A1 (13,312.4) C---- Equation completed. 500 00311303 CALL 133001('301',10) 13 (.NOT.OKAY) 1333 CALL LNMSGD(24) GOTO 800 ENDIF C 800 CONTINUE RETURN END C CEND 3 SETVAL<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C CPILE:MCXMTH.FOR C 85 C---- MCKMTH.FOR: Math support for building M,C,K macros. C C---- PURPOSE: C C.) 0 l I I 0 0 3 fl’ 0 5 ('1’ I 0000000000000 This file contains math functions required to build MCK macros. INVMAT, LUDCMP, LUBXSB, MTXMUL, MTXCML, MTXTRN, MTXADD, DETCPY, DETMTX, BALANZ, ELMHSZ, HQR3, Finds inverse of a matrix. Performs a LU decomposition of a matrix. Performs back substitution on LU matrix. Multiplies two square matrices. Multiplies a matrix by a constant. Finds transpose of matrix (square only). Adds two matrices. Copies reduced matrix for finding det. Finds the determinant of a matrix. Balances a square matrix. Puts square matrix in Hessenberg form. Finds eigenvalues of matrix in Hess. form C---- Last Change: September 19, 1991. RM C CEOPH C SMESSAGEz'INVMAT' CINVMAT>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/19/91 RM SUBROUTINE INVMAT(A,N,NP,INDX,ANS) Inverts a matrix. - The (NxN) matrix to be inverted. - The dimension of the matrix to be inverted. Physical size of the incoming matrix. Index matrix (Nle). The inverted matrix. The A matrix is destroyed in this routine! A(NP,NP), ANS(NP, NP), 1303(3) LUBKSB Ififitfit‘fifiifiiifitififitfifiififi c***1m1‘*************************************tit********************** C C C---- PURPOSE: C C---- Inputs: A C N C NP - C INDX - C C---- Outputs: C ANS - C C---- Note: C DIMENSION INTEGER N, NP REAL D INTEGER I, J C EXTERNAL LUDCMP, C C C---- Set up the identity matrix. C DO 12 I81,N DO 11 J81,N ANS(I,J)8O.O ll CONTINUE ANS(I,I) 8 1.0 12 CONTINUE C C---- Perform a LU - decomposition of the marix. C CALL LUDCMP(A,N,NP,INDX,D) 86 C C---- Invert by back substitution. C DO 13 J81,N CALL LUBKSB(A,N,NP,INDX,ANS(1,J)) 13 CONTINUE C RETURN END C CEND:INVMAT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'LUDCMP' CLUDCMP>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/19/91 RM SUBROUTINE LUDCMP(A,N,NP,INDX,D) C---- PURPOSE: Performs a LU decomposition of a matrix. C---— Inputs: A - The (NxN) matrix to be decomposed. C N - The dimension of the matrix to be inverted. C NP - Physical size of the incoming matrix. C C---- Outputs: C ANS - The inverted matrix. C C---- Note: The A matrix is destroyed in this routine! C C---- Note: The source code has been omitted from this listing. C See reference [8] for details. C 1313033 NMAX REAL VV PARAMETER (NMAX8100,TINY81.OE-2O) 013335103 A(NP,NP),INDX(N),VV(NMAX) REAL D, AAMAX, SUM, DUM INTEGER I, J, K, IMAX C C***LUDCHP***************itt*****************tttt***************t******t C See reference [8] RETURN END C CEND:LUDCMP<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'LUBKSB' CLUBKSB>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/19/91 RM C SUBROUTINE LUBKSB(A,N,NP,INDX,B) C C---- PURPOSE: Performs back substitution on LU matrix. C C---- Inputs: A - The (NxN) matrix to be decomposed. N - The dimension of the matrix to be inverted. NP Physical size of the incoming matrix. INDX Permutation list from LUDCMP. B - + or - for odd or even number of exchanges. ---- Outputs: 0000000 87 C---- Note: The A matrix is destroyed in this routine! C C---- Note: The source code has been omitted from this listing. C See reference [8] for details. C 1313033 NMAX PARAMETER (NMAX8100,TINY81.OE-20) 013333103 A(NP,NP),INDX(N),B(N) INTEGER I, J, II, LL REAL SUM C C***LUBKSB*******i*****************t'k*t********i************************ C See reference [8] RETURN END C CEND:LUBKSB<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MTXMUL' CMTXMUL>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 R3 C SUBROUTINE MTXMUL(MX1,NI,NP1,MX2,NZ,NP2,ANS) C C---- PURPOSE: Multiplies two matrices (square only). C C---- Inputs: MXl, MX2 - The matrices to be multiplied. C N1, N2 - The working dimension of the matrix (square). C NPl, NP2 - Physical size of the incoming matrices. C C---- Outputs: C ANS - The resulting matrix. C INTEGER N1, N2, NPl, NP2 REAL MXl, MX2, ANS DIMENSION MX1(NP1,NP1), MX2(NP2,NP2), ANS(NP1,NP1) C INTEGER I, J, K C c***MTXHUL*************e*******************8**8*8*********************** C C---- Multiply the matrices. C 00 18 181,31 00 17 J81,N2 ANS(I,J) 8 0.0 00 16 381,32 ANS(I,J)8 ANS(I,J) + MX1(I,K)*MX2(K,J) 16 00311303 17 00311303 18 00311303 0 331033 330 C CEND:MTXMUL<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'MTXCML' CMTXCML>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C 88 SUBROUTINE MTXCML(MX,N,NP,CONST,ANS) C C---- PURPOSE: Multiplies a matrix by a constant (square only). C C---- Inputs: MX, C N The matrices to be multiplied. The working dimension of the matrix (square). C NP Physical size of the incoming matrices. C CONST Constant multiplier. C 0---- Outputs: C ANS - The resulting matrix. C INTEGER N, NP REAL MX, ANS 013333103 33(33,33), ANS(NP,NP) REAL CONST INTEGER I, J C Cti*MTXCML************************************t************************* C C---- Multiply the matrices. C 00 1s 181,3 00 17 381,3 ANS(I,J)8 00351 . MX(I,J) 17 00311303 18 00311303 0 331033 330 C CEND:MTXCML<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< gMESSAGE:'MTXTRN' CMTXTRN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C SUBROUTINE MTXTRN(MX,N,NP,ANS) g---- PURPOSE: Finds the transpose of a matrix (square only). g---- Inputs: MX - The matrices to take transpose of. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrix. C 0---- Outputs: C ANS - The resulting matrix. C INTEGER N, NP REAL MX, ANS DIMENSION MX(NP,NP), ANS(NP,NP) C INTEGER I, J C Cti*HTXTRN************************************************************t* C C---- Multiply the matrices. C DO 18 I81,N DO 17 J81,N ANS(I,J) 8 MX(J,I) 17 CONTINUE 18 CONTINUE 89 RETURN END C CEND:MTXTRN<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGEx'MTXADD' CMTXADD>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C SUBROUTINE MTXADD(MX1,N,NP,MX2,ANS) C C---- PURPOSE: Adds two matrices (square only). C C---- Inputs: MX1, MX2 - The matrices to be added. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C C---- Outputs: C ANS - The resulting matrix. C INTEGER N, NP REAL MX1, MX2, ANS 013335103 331(33,33), 332(33,33), A35(33,33) C INTEGER I, J C C***MTKADD****************tt‘tt***********************t****************** C C---- Add the matrices. C 00 18 181,3 00 17 381,3 ANS(I,J)8 MX1(I,J) + MX2(I,J) 17 00311303 18 00311303 0 331033 330 C CEND:MTXADD<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGE:'DETCPY' CDETCPY>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C SUBROUTINE DETCPY(IDX,N,NP,MTX1,MTX2) C C---- PURPOSE: Copies the appropriate submatrix from MTXl to MTX2 based C on the index. For example, if the index is 1, MTX2 will C contain all of MTXl except row 1 and col 1. If index is C 2, all but row 1 col 2 will be in MTX2 etc. C C---- Inputs: MTXl, MTX2 - The matrices to be copied. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C IDX - Column index to be struck out. C C---- Outputs: C MTX2 - The reduced (N-lxN-l) matrix. C INTEGER N, NP, IDX REAL MTXl, MTX2 DIMENSION MTX1(NP,NP), MTX2(NP,NP) C INTEGER I, J, K, L 9O c***DETCPY*************************************t**************i********* C C 00 10 181,3-1 3 8 1 L 8 1 00 9 381,3 13 (3.30.103) 1333 383+1 3L53 MTX2(I,L) 8 3131(1+1,3) 383+1 L 8 L+1 33013 9 00311303 10 00311303 0 331033 330 C CEND:DETCPY<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C CDETMTX>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C SUBROUTINE DETMTX(MTX,N,NP,DET) C C---- PURPOSE: Determines the determinate of MTX. C C---- Inputs: MTX - Mantrix to find determinant of. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C C---- Outputs: C DET - The determinant. C INCLUDE 'MCKHDR.CBK' C INTEGER N, NP REAL MTX, DET DIMENSION MTX(NP,NP) C INTEGER J, INDX(MCKMAX) C C***DETMTX***************************ttt*t*********t******************** C C CALL LUDCMP(MTX,N,NP,INDX,DET) 00 11 381,3 031 8 DET*MTX(J,J) 11 00311303 RETURN END C CEND:DETMTX<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SMESSAGE:'BALAN2' CBALAN2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM C SUBROUTINE BALAN2(A,N,NP) C C---- PURPOSE: Balances a matrix (square only). C C-—-- Inputs: A, - The matrix to be balanced. 91 C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C C---- Outputs: C A - The balanced matrix. C C---- Note: The source code has been omitted from this listing. C See reference [8] for details. C REAL RADIX, SQRDX PARAMETER (RADIX816.,SQRDX8256.) INTEGER N, NP DIMENSION A(NP,NP) C INTEGER I, J, LAST REAL C, R! cl ’08 C cstngALanzessstseseeesassestaeesssssssssssswswssssatsauss*estssttssssass C See reference [8] RETURN END C CEND:BALANz<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'ELMH82' CELMHSZ>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM SUBROUTINE 3L3352(A,3,33) C---- PURPOSE: Puts A matrix in Hessenberg form (square only). C---- Inputs: A, The matrix to be balanced. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C C---- Outputs: C A - The balanced matrix. C C---- Note: The source code has been omitted from this listing. C See reference [8] for details. C C INTEGER N, NP REAL A DIMENSION A(NP,NP) INTEGER I, J, M REAL X, Y C Ctt*ELMH32****************twtttttttttttittt*ttttttttttti**************** C See reference [8] RETURN END C CEND : ELHHSZ<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'HQR3' 92 03933>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 33 5033001133 HQR3(A,N,NP,WR,WI) C---- PURPOSE: Finds the eigenvalues of A matrix (square only). C---- Inputs: A, - The matrix to be balanced. C N - The working dimension of the matrix (square). C NP - Physical size of the incoming matrices. C C---- Outputs: C - Real parts of the eigenvalues. C WI - Imaginary parts of eigenvalues. C C---- Note: C WR AND WI CONTAIN THE REAL AND IMAGINARY PARTS, C RESPECTIVELY, OF THE EIGENVALUES. COMPLEX CONJUGATE C PAIRS OF EIGENVALUES APPEAR CONSECUTIVELY WITH THE C EIGENVALUE HAVING THE POSITIVE IMAGINARY PART LAST. C C---- Note: The source code has been omitted from this listing. C See reference [8] for details. C 1313033 3, 33 REAL A, 33, 31 013335103 A(NP,NP),WR(NP),WI(NP) INTEGER I, J, M, NN, ITS, L, R REAL ANORM, X, Y, T, S, W, P, Q, 2, R, U, V C c***HQR3*ewas*ettteeesewss*easseetsttasseeesssesesssaeetw*sststswttsssss C See reference [8] RETURN END C CEND:HQR3<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C $MESSAGE:'EVECTS' CEVECTS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Last Change: 9/23/91 RM SUBROUTINE EVECTS(WI,NP) C C---- PURPOSE: Finds the eigenvectors of M,K matrices. C C---- Inputs: WI - Eigenvalue corresponding to the eigenvector. NP - Physical size of the incoming matrices. MASMAT - Mass matrix. STFMAT - Stiffness matrix. ---- Outputs: EIGMAT - Matrix of eigenvectors. ---- Note: WI CONTAINS THE REAL AND IMAGINARY PARTS, RESPECTIVELY, OF THE EIGENVALUES. COMPLEX CONJUGATE PAIRS OF EIGENVALUES APPEAR CONSECUTIVELY WITH THE EIGENVALUE HAVING THE POSITIVE IMAGINARY PART LAST. INCLUDE 'MCXHDR.CEX' 0 00000000000000 9: 93 REAL 31 1313033 33 013335103 31(33) C INTEGER I, J, R REAL DUM1(MCRMAX,MCRMAX), ZDUM(MCXMAX,MCRMAX), DETVAL REAL RNORM C EXTERNAL MTXCML, MTXADD, DETCPY, DETMTX C C***MCTS************************************************************** C C---- Build the eigenvector matrix. C J80 DO 200 I 8 l,MCKDIM*2-1,2 J 8 J + 1 C C ------ Form the z 8 (K - WI‘2*M] matrix. C CALL MTXCML(MASMAT,MCXDIM,MCXMAX,-1.0*WI(I)*WI(I),DUMl) CALL MTXADD(STFMAT,MCXDIM,MCRMAX,DUMl,ZDUM) C C ------ Get the normalized eigenvector for WI(J). C RNORM 8 0.0 DO 30, K 8 1,MCKDIM CALL DETCPY(K,MCXDIM,MCKMAX,2DUM,DUM1) CALL DETMTX(DUM1,MCXDIM-1,MCKMAX,DETVAL) 3103A1(3,J)8 ((-1)**3) * DETVAL IF (RNORM.EQ.0.0.AND.EIGMAT(K,J).NE.0.0) THEN RNORM 8 EIGMAT(K,J) EIGMAT(K,J) 8 3103A1(3,J) / 33033 ELSEIF(RNORM.NE.0.0) THEN 3103A1(3,J) 8 EIGMAT(K,J) / 33033 ENDIF 30 CONTINUE C 200 CONTINUE C RETURN END C CEND:EVECTS<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C “3300?S