Download Programer's manual for ANSYS.pdf PDF

TitleProgramer's manual for ANSYS.pdf
File Size1.3 MB
Total Pages312
Table of Contents
                            Programmer's Manual for ANSYS
Table of Contents
Preface
Part I, Guide to Interfacing with ANSYS
	Chapter 1: Format of Binary Data Files
		1.1. What Are ANSYS Binary Files?
			1.1.1. Conventions Used to Describe Binary Files
			1.1.2. The Standard Header for ANSYS Binary Files
		1.2. Format of the Results File
			1.2.1. Nomenclature
			1.2.2. Standard ANSYS File Header
			1.2.3. Results File Format
		1.3. Description of the Reduced Displacement File
			1.3.1. Standard ANSYS File Header
			1.3.2. RDSP File Format
		1.4. Description of the Reduced Complex Displacement File
			1.4.1. Standard ANSYS File Header
			1.4.2. RFRQ File Format
		1.5. Description of the Modal Results File
			1.5.1. Standard ANSYS File Header
			1.5.2. MODE File Format
		1.6. Description of the Element Matrices File
			1.6.1. Standard ANSYS File Header
			1.6.2. EMAT File Format
		1.7. Description of the Substructure Matrices File
			1.7.1. Standard ANSYS File Header
			1.7.2. SUB File Format
		1.8. Description of the Component Mode Synthesis Matrices (CMS) File
			1.8.1. Standard ANSYS File Header
			1.8.2. CMS File Format
		1.9. Description of the Triangularized Stiffness File
			1.9.1. Standard ANSYS File Header
			1.9.2. TRI File Format
		1.10. Description of the Full Stiffness-Mass File
			1.10.1. Standard ANSYS File Header
			1.10.2. FULL File Format
	Chapter 2: Accessing Binary Data Files
		2.1. Accessing ANSYS Binary Files
			2.1.1. Access Routines to Results and Substructure Files
			2.1.2. Characteristics of ANSYS Binary Files
			2.1.3. Viewing Binary File Contents
			2.1.4. Abbreviations
			2.1.5. binini (Initializing Buffered Binary I/O Systems)
			2.1.6. Function sysiqr (Retrieving the Status of a File)
			2.1.7. Function biniqr8 (Retrieving System-Dependent Parameters)
			2.1.8. Function binset (Opening a Blocked Binary File or Initializing Paging Space)
			2.1.9. Subroutine bintfo (Defining Data for a Standard ANSYS File Header)
			2.1.10. Subroutine binhed (Writing the Standard ANSYS File Header)
			2.1.11. Subroutine binrd8 (Reading Data from a Buffered File)
			2.1.12. Subroutine binwrt8 (Writing Data to a Buffered File)
			2.1.13. Subroutine exinc4 (Decoding an Integer String into a Character String)
			2.1.14. Subroutine inexc4 (Coding a Character String into an Integer String)
			2.1.15. Subroutine binclo (Closing or Deleting a Blocked Binary File)
			2.1.16. Subroutine largeIntGet (Converting Two Integers into a Pointer)
		2.2. Demonstration Routines
			2.2.1. Program bintst (Demonstrates Dumping a Binary File and Copying It for Comparison Purposes)
				2.2.1.1. Common Variables:
			2.2.2. Subroutine bintrd (Demonstrates Printing a Dump of File Contents)
			2.2.3. Subroutine bintwr (Demonstrates Copying Binary File Contents)
			2.2.4. Program wrtsub (Demonstrates Writing an ANSYS Substructure File)
			2.2.5. Program rdsubs (Demonstrates Reading a Substructure File)
			2.2.6. Program rdfull (Demonstrates Reading and Reformatting the .FULL File)
			2.2.7. Program ResRdDemo (Demonstrates Reading a Results File)
			2.2.8. Program ResWrDemo (Demonstrates Writing a Results File)
		2.3. Results File Access Routines
			2.3.1. Overview of the Routines
			2.3.2. ResRdBegin (Opening the File and Retrieving Global Information)
			2.3.3. ResRdGeomBegin (Retrieving Global Geometry Information)
			2.3.4. ResRdType (Retrieving Element Types)
			2.3.5. ResRdReal (Retrieving Real Constants)
			2.3.6. ResRdCsys (Retrieving Coordinate Systems)
			2.3.7. ResRdNode (Retrieving Nodal Coordinates)
			2.3.8. ResRdElem (Retrieving Elements)
			2.3.9. ResRdSolBegin (Retrieving Result Set Location)
			2.3.10. ResRdDisp (Retrieving Nodal Solution)
			2.3.11. ResRdRfor (Retrieving Reaction Solution)
			2.3.12. ResRdFix (Retrieving Applied Nodal Constraints)
			2.3.13. ResRdForc (Retrieving Applied Nodal Loads Solution)
			2.3.14. ResRdEstr (Retrieving Element Solutions)
	Chapter 3: Using CDREAD and CDWRITE
		3.1. Using the CDREAD Command
			3.1.1. Tips for Reading Files with CDREAD
		3.2. Using the CDWRITE Command
			3.2.1. Customizing Degree of Freedom Labels: the /DFLAB Command
		3.3. Coded Database File Commands
			3.3.1. CE Command
			3.3.2. CP Command
			3.3.3. CMBLOCK Command
			3.3.4. EBLOCK Command
			3.3.5. EDCADAPT Command
			3.3.6. EDCGEN Command
			3.3.7. EDCURVE Command
			3.3.8. EDDRELAX Command
			3.3.9. EDLCS Command
			3.3.10. EDLOAD Command
			3.3.11. EDPREAD Command
			3.3.12. EDWELD Command
			3.3.13. EN Command
			3.3.14. LOCAL Command
			3.3.15. M Command
			3.3.16. MPDATA Command
			3.3.17. MPTEMP Command
			3.3.18. N Command
			3.3.19. NBLOCK Command
			3.3.20. R Command
			3.3.21. RLBLOCK Command
			3.3.22. SECBLOCK Command
			3.3.23. SFBEAM Command
			3.3.24. SFE Command
	Chapter 4: ANSYS Graphics File Format
		4.1. Modifying ANSYS Graphics Files
		4.2. Pixmap Format for Graphic Display Files
		4.3. Neutral Graphics File Format
			4.3.1. Characters the Graphics File Uses
			4.3.2. Graphics File Directives
				4.3.2.1. Parameter Types for Graphics File Directives
				4.3.2.2. Directive Descriptions
				4.3.2.3. Color Specification
		4.4. Decoding a Graphics File: an Example
			4.4.1. The Example Command Stream
			4.4.2. Example Graphics File Contents
Part II, Guide to ANSYS User Programmable Features
	Chapter 5: Using User Programmable Features (UPFs)
		5.1. What Are UPFs?
		5.2. What You Should Know Before Using UPFs
		5.3. Planning Your UPFs
		5.4. Studying the ANSYS User Routines
		5.5. Programming in Languages Other than FORTRAN
		5.6. Developing UPFs: a Suggested Strategy
		5.7. Include Decks
		5.8. Linking User Routines
		5.9. Compiling and Linking UPFs on UNIX Systems
		5.10. Compiling and Linking UPFs on Windows Systems
		5.11. Activating UPFs
		5.12. Running Your Custom Executable
		5.13. Verifying Your Routines
		5.14. Debugging Commands
			5.14.1. Tracking the Path of Program Logic
			5.14.2. Debugging Elements and Solutions
				5.14.2.1. Solution Debug Format
				5.14.2.2. Element Debug Format
				5.14.2.3. General Debug Format
		5.15. Other Useful Commands
		5.16. Generating Output
		5.17. Reading Large Data Files More Rapidly
	Chapter 6: UPF Routines and Functions
		6.1. Creating a New Element
			6.1.1. Creating a New Element via the User-Defined Element API
				6.1.1.1. Subroutine UserElem (Writing Your Own Elements)
				6.1.1.2. Subroutine ElemGetMat (Calling the ANSYS Standard Structural Material Library)
			6.1.2. Creating a New Element by Directly Accessing the ANSYS Database
				6.1.2.1. Input and Output Abbreviations
				6.1.2.2. User Routines
				6.1.2.3. Subroutine uec100 (Defining Characteristics of the usr100 Routine)
				6.1.2.4. Subroutine uex100 (Overriding Element Characteristic Defaults)
				6.1.2.5. Subroutine uel100 (Computing Element Matrices, Load Vectors, and Results)
				6.1.2.6. Subroutine uep100 (Printing Output for User Elements in POST1 via PRESOL,ELEM)
				6.1.2.7. Subroutine usertr (Adjusting the Nodal Orientation Matrix)
				6.1.2.8. Subroutine userac (Accessing Element Information)
		6.2. Supporting Subroutines for Element Creation
			6.2.1. Subroutine nminfo (Returning Element Reference Names)
			6.2.2. Subroutine svgidx (Fetching the Index for Saved Variables)
			6.2.3. Subroutine svrget (Fetching Saved Variable Data for an Element)
			6.2.4. Subroutine svrput (Writing an Element's Saved Variable Set)
			6.2.5. Subroutine svpidx (Writing the Saved Variable Element Index to a File)
			6.2.6. Subroutine mreuse (Determining Which Element Matrices Can Be Reused)
			6.2.7. Subroutine subrd (Reading Element Load Data for a Substructure Generation Run)
			6.2.8. Subroutine subwrt (Writing an Element Load Vector to a File for a Substructure Generation Run)
			6.2.9. Subroutine rvrget (Fetching Real Constants for an Element)
			6.2.10. Subroutine propev (Evaluating a Group of Material Properties)
			6.2.11. Subroutine prope1 (Evaluating One Material Property)
			6.2.12. Subroutine pstev1 (Evaluating Material Properties for 1-D Elements)
			6.2.13. Subroutine tbuser (Retrieving User Table Data)
			6.2.14. Subroutine plast1 (Updating an Element's Plastic History)
			6.2.15. Subroutine plast3 (Updating an Element's Plastic History, 4 or 6 components)
			6.2.16. Subroutine creep1 (Updating an Element's Creep History)
			6.2.17. Subroutine creep3 (Updating an Element's Creep History, 3-D Elements)
			6.2.18. Subroutine swell1 (Updating an Element's Swelling History)
			6.2.19. Subroutine swell3 (Updating an Element's Swelling History, 3-D Elements)
			6.2.20. Function elLenPsvrBuf (Determining additional ESAV Record for Plasticity)
			6.2.21. Function nlget (Retrieving Material Nonlinear Property Information)
			6.2.22. Subroutine usereo (Storing Data in the nmisc Record)
			6.2.23. Subroutine eldwrtL (Writing Element Data to a File)
			6.2.24. Subroutine eldwrnL (Writing Element Nonsummable Miscellaneous Data to the Results File)
			6.2.25. Subroutine trrot (Computing the Rotation Vector)
			6.2.26. Subroutine rottr (Computing the Transformation Matrix)
			6.2.27. Subroutine xyzup3 (Updating an Element's 3-D Nodal Coordinates)
			6.2.28. Subroutine updrot (Updating the Rotation Pseudovector)
			6.2.29. Subroutine tmpget (Defining Current Temperature Loads)
			6.2.30. Subroutine prsget (Defining Current Pressure Loads)
			6.2.31. Subroutine cnvget (Defining Current Convection Loads)
			6.2.32. Subroutine hgnget (Defining Current Heat Generation Loads)
			6.2.33. Subroutine prinst (Computing principal stress and stress intensity)
		6.3. Routines for Modifying and Monitoring Existing Elements
			6.3.1. Subroutine userfd (Computing the Complex Load Vector for Frequency Domain Logic)
			6.3.2. Subroutine userou (Storing User-Supplied Element Output)
			6.3.3. Subroutine useran (Modifying Orientation of Material Properties)
			6.3.4. Subroutine usanly (Modifying Orientation of Material Properties and Stresses of Layers)
			6.3.5. Subroutine userrc (Performing User Operations on COMBIN7 and COMBIN37 Parameters)
			6.3.6. Function userpe (Calculating Rotation Caused by Internal Pressure)
			6.3.7. Subroutine UElMatx (Accessing Element Matrices and Load Vectors)
			6.3.8. Subroutine UTHICK (Getting User-defined Initial Thickness)
			6.3.9. Subroutine USTRESS (Getting User-defined Initial Stress)
			6.3.10. Subroutine UsrFictive (Providing User-defined Fictive Temperature Relationship)
			6.3.11. Subroutine UsrViscEl (Performs Viscoelastic Computation)
			6.3.12. Subroutine usrsurf116 (Modifying SURF151 and SURF152 Film Coefficients and Bulk Temperatures)
			6.3.13. Subroutine User116Cond (Computes the conductance coefficient for FLUID116)
			6.3.14. Subroutine User116Hf (Computes the film coefficient for FLUID116)
			6.3.15. Subroutine Us_Surf_Str (Captures surface stresses)
			6.3.16. Subroutine usflex (Computes the flexibility factor for PIPE16, PIPE17, PIPE18, and PIPE60)
			6.3.17. Subroutine UsrShift (Calculates pseudotime time increment)
		6.4. Routines for Customizing Material Behavior
			6.4.1. Subroutine usermat (Writing Your Own Material Models)
			6.4.2. Subroutine userpl (Writing Your Own Plasticity Laws)
			6.4.3. Subroutines usercreep and usercr (Defining Viscoplastic/Creep Material Behavior)
				6.4.3.1. Creep Subroutine usercreep
				6.4.3.2. Creep Subroutine usercr
			6.4.4. Subroutine usersw (Writing Your Own Swelling Laws)
			6.4.5. Subroutine UserHyper (Writing Your Own Hyperelasticity Laws)
			6.4.6. Subroutine uservp (Updating Nonlinear Strain History for Materials)
			6.4.7. Subroutine userck (Checking User-Defined Material Data)
			6.4.8. Subroutine usermc (Controlling Hygrothermal Growth)
			6.4.9. Subroutine usrfc6 (Defining Custom Failure Criteria)
			6.4.10. Subroutines usrfc1 through usrfc5
			6.4.11. Subroutine UserVisLaw (Defining Viscosity Laws)
			6.4.12. Supporting Function egen
		6.5. Routines for Customizing Loads
			6.5.1. Subroutine usrefl (Changing Scalar Fields to User-Defined Values)
			6.5.2. Subroutine userpr (Changing Element Pressure Information)
			6.5.3. Subroutine usercv (Changing Element Face Convection Surface Information)
			6.5.4. Subroutine userfx (Changing Element Face Heat Flux Surface Information)
			6.5.5. Subroutine userch (Changing Element Face Charge Density Surface Information)
		6.6. Running ANSYS as a Subroutine
		6.7. Defining Your Own Commands
			6.7.1. Function user01
			6.7.2. Function user02 (Demonstrates Offsetting Selected Nodes)
			6.7.3. Function user03 (Demonstrates Using ANSYS Memory)
			6.7.4. Function user04
			6.7.5. Functions user05 through user10
		6.8. Supporting Subroutines
			6.8.1. Function GetRForce (Getting Nodal Reaction Force values)
			6.8.2. Function GetStackDisp (Getting Current Displacement Values)
			6.8.3. Subroutine ElResultStrt (Getting Load Data from Analysis Results)
			6.8.4. Subroutine ElResultGet (Getting Results Values at Selected Points)
			6.8.5. Subroutine ElInterp (Finding Element Coordinates)
		6.9. Access at the Beginning and End of Various Operations
		6.10. Creating Your Own Optimization Routine
			6.10.1. Linking a Custom Optimization Program to ANSYS
			6.10.2. Subroutine userop (Defining a Custom Optimization Routine)
			6.10.3. Structuring Your Input
		6.11. Memory Management Routines
			6.11.1. Using the Memory Management Routines
			6.11.2. Function fAnsMemAlloc (Allocating Space and Returning a Pointer)
			6.11.3. Subroutine fAnsMemFree (Deallocating Space)
		6.12. Parameter Processing Routines
			6.12.1. Subroutine pardim (Creating a Dimensioned Parameter)
			6.12.2. Function parevl (Finding and Evaluating a Parameter)
			6.12.3. Subroutine pardef (Adding a Parameter)
		6.13. Miscellaneous Useful Functions
			6.13.1. Using Function RunCommand
			6.13.2. Using the /UNDO Command
			6.13.3. Using the /HOLD command
	Chapter 7: Accessing the ANSYS Database
		7.1. Inputs and Outputs for Database Access Routines
		7.2. Types of Database Access Routines
		7.3. Routines for Selecting and Retrieving Nodes and Elements
			7.3.1. ndnext Function (Getting the Next Node Number)
			7.3.2. ndprev Function (Getting the Number of the Previous Selected Node)
			7.3.3. ndnxdf Function (Getting the Number of the Next Defined Node)
			7.3.4. ndsel Function (Selecting, Unselecting, Deleting, or Inverting a Node)
			7.3.5. elnext Function (Getting the Number of the Next Element)
			7.3.6. elprev Function (Getting the Number of the Previous Selected Element)
			7.3.7. elnxdf Function (Getting the Number of the Next Defined Element)
			7.3.8. elsel Subroutine (Selecting, Unselecting, Deleting, or Inverting an Element)
		7.4. Node Information Routines
			7.4.1. ndinqr Function (Getting Information About a Node)
			7.4.2. getnod Function (Getting a Nodal Point)
			7.4.3. putnod Function (Storing a Node)
			7.4.4. ndgall Function (Getting the XYZ/Rotation Coordinates Vector for a Node)
			7.4.5. ndspgt Subroutine (Getting the Nodal Solution for a Node of an Element)
		7.5. Element Attribute Routines
			7.5.1. elmiqr Function (Getting Information About an Element)
			7.5.2. elmget Function (Getting an Element's Attributes and Nodes)
			7.5.3. elmput Subroutine (Storing an Element)
			7.5.4. etyiqr Function (Getting a Data Item About an Element Type)
			7.5.5. etyget Function (Getting Information About an Element Type)
			7.5.6. etyput Subroutine (Storing Element Type Data)
			7.5.7. echrtr Subroutine (Getting Information About Element Characteristics)
			7.5.8. etysel Subroutine (Selecting, Unselecting, Deleting, or Inverting an Element Type)
			7.5.9. mpinqr Function (Getting Information About a Material Property)
			7.5.10. mpget Function (Getting a Material Property Table)
			7.5.11. mpput Subroutine (Storing a Material Property Table)
			7.5.12. mpdel Subroutine (Deleting a Material Property Table)
			7.5.13. rlinqr Function (Getting Information About a Real Constant Set)
			7.5.14. rlget Function (Getting Real Constant Data)
			7.5.15. rlsel Subroutine (Selecting or Deleting a Real Constant Set)
			7.5.16. csyiqr Function (Getting Information About a Coordinate System)
			7.5.17. csyget Function (Getting a Coordinate System)
			7.5.18. csyput Subroutine (Storing a Coordinate System)
			7.5.19. csydel Subroutine (Deleting a Coordinate System)
			7.5.20. userac Subroutine (Demonstrates Use of Element Attribute Routines)
		7.6. Coupling and Constraint Routines
			7.6.1. cpinqr Function (Getting Information About a Coupled Set)
			7.6.2. cpget Function (Getting a Coupled Set)
			7.6.3. cpput Subroutine (Storing a Coupled Set)
			7.6.4. cpsel Subroutine (Selecting or Deleting a Coupled Set)
			7.6.5. ceinqr Function (Getting Information About a Constraint Equation Set)
			7.6.6. ceget Function (Getting an Constraint Equation)
			7.6.7. ceput Subroutine (Storing a Constraint Equation)
			7.6.8. cesel Subroutine (Deleting or Selecting a Constraint Equation)
		7.7. Nodal Loading Routines
			7.7.1. disiqr Function (Getting a Information About Constraints)
			7.7.2. disget Function (Getting a Constraint from the Database)
			7.7.3. disput Subroutine (Storing a Constraint at a Node)
			7.7.4. disdel Subroutine (Deleting a Constraint at a Node)
			7.7.5. foriqr Function (Getting Information About Nodal Loads)
			7.7.6. forget Function (Getting a Constraint from the Database)
			7.7.7. forput Subroutine (Storing a Nodal Load at a Node)
			7.7.8. fordel Subroutine (Deleting a Nodal Load at a Node)
			7.7.9. ntpiqr Function (Getting Information About a Nodal Temperature)
			7.7.10. ntpget Function (Getting a Specified Nodal Temperature)
			7.7.11. ntpput Subroutine (Storing a Nodal Temperature)
			7.7.12. ntpdel Subroutine (Deleting a Nodal Temperature)
			7.7.13. nhgiqr Function (Getting Information About Nodal Heat Generations)
			7.7.14. nhgget Function (Getting a Nodal Heat Generation)
			7.7.15. nhgput Subroutine (Storing Nodal Heat Generation)
			7.7.16. nhgdel Subroutine (Deleting a Nodal Heat Generation)
			7.7.17. nfuiqr Function (Getting Information About Nodal Fluences)
			7.7.18. nfuget Function (Getting a Nodal Fluence)
			7.7.19. nfuput Subroutine (Storing a Nodal Fluence)
			7.7.20. nfudel Subroutine (Deleting a Nodal Fluence)
			7.7.21. ndciqr Function (Getting Information About Nodal Current Densities)
			7.7.22. ndcget Function (Getting a Nodal Current Density)
			7.7.23. ndcput Subroutine (Storing a Nodal Current Density)
			7.7.24. ndcdel Subroutine (Deleting a Nodal Current Density)
			7.7.25. nvdiqr Function (Getting Information About Nodal Magnetic Virtual Displacements)
			7.7.26. nvdget Function (Getting a Nodal Magnetic Virtual Displacement)
			7.7.27. nvdput Subroutine (Storing a Nodal Virtual Displacement)
			7.7.28. nvddel Subroutine (Deleting a Nodal Virtual Displacement)
		7.8. Element Loading Routines
			7.8.1. epriqr Function (Getting Information About Element Pressure/Convection)
			7.8.2. eprget Function (Getting an Element Face Pressure)
			7.8.3. eprput Subroutine (Storing an Element Face Pressure)
			7.8.4. eprdel Subroutine (Deleting an Element Pressure/Convection)
			7.8.5. ecviqr Function (Getting Information About Element Convections)
			7.8.6. ecvget Function (Getting an Element Face Convection)
			7.8.7. ecvput Subroutine (Storing an Element Face Convection)
			7.8.8. ecvdel Subroutine (Deleting a Convection on an Element)
			7.8.9. etpiqr Function (Getting Information About Element Temperatures)
			7.8.10. etpget Function (Getting an Element Temperature)
			7.8.11. etpput Subroutine (Storing an Element Temperature)
			7.8.12. etpdel Subroutine (Deleting an Element Temperature)
			7.8.13. ehgiqr Function (Getting Information About Element Heat Generation)
			7.8.14. ehgget Function (Getting an Element Heat Generation)
			7.8.15. ehgput Subroutine (Storing an Element Heat Generation)
			7.8.16. ehgdel Subroutine (Deleting an Element Heat Generation)
			7.8.17. efuiqr Function (Getting Information About Element Fluences)
			7.8.18. efuget Function (Getting an Element Fluence)
			7.8.19. efuput Subroutine (Storing an Element Fluence)
			7.8.20. efudel Subroutine (Deleting an Element Fluence)
			7.8.21. edciqr Function (Getting Information About Element Current Densities)
			7.8.22. edcget Function (Getting Element Current Densities)
			7.8.23. edcput Subroutine (Storing an Element Current Density)
			7.8.24. edcdel Subroutine (Deleting an Element Current Density)
			7.8.25. evdiqr Function (Getting Information About Element Virtual Displacements)
			7.8.26. evdget Function (Getting an Element Virtual Displacement)
			7.8.27. evdput Subroutine (Storing an Element Virtual Displacement)
			7.8.28. eimiqr Function (Getting Information About Element Impedances)
			7.8.29. eimget Function (Getting an Element Face Impedance)
			7.8.30. eimput Subroutine (Storing an Element Impedance)
			7.8.31. eimdel Subroutine (Deleting an Element Impedance)
			7.8.32. esfiqr Function (Getting Information About Element Surface Stress Data)
			7.8.33. esfget Function (Getting Element Surface Stress Data)
			7.8.34. esfput Subroutine (Storing Element Surface Stress Data)
			7.8.35. esfdel Subroutine (Deleting an Element's Surface Stress Data)
			7.8.36. efsdel Subroutine (Deleting a Flagged Surface on an Element)
			7.8.37. efsget function (Getting Element Face Flagged Surfaces)
			7.8.38. efsiqr function (Getting Information About Flagged Surfaces)
			7.8.39. efsput Subroutine (Storing an Element Face Flagged Surface)
		7.9. Results Information Routines
			7.9.1. dspiqr Function (Getting Information About Nodal Results)
			7.9.2. dspget Function (Getting a Nodal Result from the Database)
			7.9.3. dspput Subroutine (Storing a Constraint at a Node)
			7.9.4. dspdel Subroutine (Deleting a Result at a Node)
			7.9.5. emsiqr Function (Getting Information About an Element's Miscellaneous Summable Data)
			7.9.6. emsget Function (Getting an Element's Miscellaneous Summable Data)
			7.9.7. emsput Subroutine (Storing an Element's Miscellaneous Summable Data)
			7.9.8. emsdel Subroutine (Deleting an Element's Miscellaneous Summable Data)
			7.9.9. enfiqr Function (Getting Information About Element Nodal Forces)
			7.9.10. enfget Function (Getting an Element's Nodal Forces)
			7.9.11. enfput Subroutine (Storing an Element's Nodal Forces)
			7.9.12. enfdel Subroutine (Deleting an Element's Nodal Forces)
			7.9.13. ensiqr Function (Getting Information About an Element's Nodal Stresses)
			7.9.14. ensget Function (Getting an Element's Nodal Stresses)
			7.9.15. ensput Subroutine (Storing Nodal Stresses at an Element)
			7.9.16. ensdel Subroutine (Deleting an Element's Nodal Stresses)
			7.9.17. engiqr Function (Getting Information About an Element's Energies)
			7.9.18. engget Function (Getting an Element's Energies)
			7.9.19. engput Subroutine (Storing an Element's Energies and Volume)
			7.9.20. engdel Subroutine (Deleting an Element's Energies)
			7.9.21. egriqr Function (Getting Information About an Element's Nodal Gradients)
			7.9.22. egrget Function (Getting an Element's Nodal Gradients)
			7.9.23. egrput Subroutine (Storing an Element's Nodal Gradients)
			7.9.24. egrdel Subroutine (Deleting an Element's Nodal Gradients)
			7.9.25. eeliqr Function (Getting Information About an Element's Nodal Elastic Strains)
			7.9.26. eelget Function (Getting an Element's Nodal Elastic Strains)
			7.9.27. eelput Subroutine (Storing an Element's Nodal Elastic Strains)
			7.9.28. eeldel Subroutine (Deleting an Element's Nodal Elastic Strains)
			7.9.29. epliqr Function (Getting Information About an Element's Nodal Plastic Strains)
			7.9.30. eplget Function (Getting an Element's Nodal Plastic Strains)
			7.9.31. eplput Subroutine (Storing an Element's Nodal Plastic Strains)
			7.9.32. epldel Subroutine (Deleting an Element's Nodal Plastic Strains)
			7.9.33. ecriqr Function (Getting Information About an Element's Nodal Creep Strains)
			7.9.34. ecrget Function (Getting an Element's Nodal Creep Strains)
			7.9.35. ecrput Subroutine (Storing an Element's Nodal Creep Strains)
			7.9.36. ecrdel Subroutine (Deleting an Element's Nodal Creep Strains)
			7.9.37. ethiqr Function (Getting Information About an Element's Nodal Thermal Strains)
			7.9.38. ethget Function (Getting an Element's Nodal Thermal Stresses)
			7.9.39. ethput Subroutine (Storing an Element's Nodal Thermal Stresses)
			7.9.40. ethdel Subroutine (Deleting an Element's Thermal, Initial, and Swelling Strains)
			7.9.41. euliqr Function (Getting Information About an Element's Euler Angles)
			7.9.42. eulget Function (Getting an Element's Nodal Euler Angles)
			7.9.43. eulput Subroutine (Storing an Element's Euler Angles)
			7.9.44. euldel Subroutine (Deleting an Element's Euler Angles)
			7.9.45. efxiqr Function (Getting Information About Element Fluxes)
			7.9.46. efxget Function (Getting an Element Flux)
			7.9.47. efxput Subroutine (Storing an Element's Fluxes)
			7.9.48. efxdel Subroutine (Deleting Element Fluxes)
			7.9.49. elfiqr Function (Getting Information About Element Local Forces)
			7.9.50. elfget Function (Getting an Element Local Force)
			7.9.51. elfput Subroutine (Storing an Element's Local Forces)
			7.9.52. elfdel Subroutine (Deleting Element Local Forces)
			7.9.53. emniqr Function (Getting Information About Element Miscellaneous Non-summable Data)
			7.9.54. emnget Function (Getting an Element's Miscellaneous Non-summable Data)
			7.9.55. emnput Subroutine (Storing an Element's Miscellaneous Non-summable Data)
			7.9.56. emndel Subroutine (Deleting an Element's Miscellaneous Non-summable Data)
			7.9.57. ecdiqr Function (Getting Information About Element Current Densities)
			7.9.58. ecdget Function (Getting an Element Current Density)
			7.9.59. ecdput Subroutine (Storing an Element's Current Densities)
			7.9.60. ecddel Subroutine (Deleting Element Current Densities)
			7.9.61. enliqr Function (Getting Information About Element Nonlinear Tables)
			7.9.62. enlget Function (Getting Element Nonlinear Tables)
			7.9.63. enlput Subroutine (Storing an Element's Nonlinear Tables)
			7.9.64. enldel Subroutine (Deleting Element Nonlinear Tables)
			7.9.65. ehciqr Function (Getting Information About Calculated Element Heat Generations)
			7.9.66. ehcget Function (Getting a Calculated Element Heat Generation)
			7.9.67. ehcput Subroutine (Storing an Element's Calculated Heat Generations)
			7.9.68. ehcdel Subroutine (Deleting Element Calculated Heat Generations)
	Chapter 8: Subroutines for Users' Convenience
		8.1. Input and Output Abbreviations
		8.2. General Subroutines
			8.2.1. dptoch Subroutine (Retrieve Eight Characters From a Double Precision Variable)
			8.2.2. wrinqr Function (Obtain Information About Output)
			8.2.3. erinqr Subroutine (Obtaining Information from the Errors Common)
			8.2.4. TrackBegin Subroutine (Beginning Tracking for a Subroutine Call)
			8.2.5. TrackEnd Subroutine (Ending Tracking for a Subroutine Call)
			8.2.6. erhandler Subroutine (Displaying ANSYS Errors)
			8.2.7. intrp Subroutine (Doing Single Interpolation)
			8.2.8. tranx3 Subroutine (Processing Geometry for 3-D Line Elements)
			8.2.9. systop Subroutine (Stopping an ANSYS Program Run)
		8.3. Vector Functions
			8.3.1. vdot Function (Computing the Dot Product of Two Vectors)
			8.3.2. vsum Function (Summing Vector Components)
			8.3.3. vmax Function (Retrieving the Maximum Vector Value at a Given Location)
			8.3.4. lastv Function (Retrieving the Position of the Last Nonzero Term in a Double Precision Vector)
			8.3.5. izero Function (Setting an Integer Vector to Zero)
			8.3.6. imove Function (Assigning Equal Values to Two Integer Vectors)
			8.3.7. vzero Subroutine (Initializing a Vector to Zero)
			8.3.8. vmove Subroutine (Moving One Vector into Another)
			8.3.9. vimove Subroutine (Moving One Vector into Another Incrementally)
			8.3.10. vinit Subroutine (Assigning a Scalar Constant to a Vector)
			8.3.11. viinit Subroutine (Assigning a Scalar Constant to a Vector Incrementally)
			8.3.12. vapb Subroutine (Setting a Vector to Sum of Two Vectors)
			8.3.13. vapb1 Subroutine (Combining Two Vectors in One)
			8.3.14. vapcb1 Subroutine (Multiplying a Vector to a Constant)
			8.3.15. vamb Subroutine (Gets a Third Vector by Subtracting One Vector from Another)
			8.3.16. vamb1 Subroutine (Subtracting One Vector from Another)
			8.3.17. vmult Subroutine (Multiplying a Vector by a Constant)
			8.3.18. vmult1 Subroutine (Multiplying a Vector by a Constant)
			8.3.19. vcross Subroutine (Defining a Vector via a Cross Product)
			8.3.20. vnorme Subroutine (Normalizing a Three-Component Vector)
			8.3.21. vnorm Subroutine (Normalizing a Vector to Unit Length)
			8.3.22. ndgxyz Function (Getting the X,Y,Z Vector for a Node)
			8.3.23. ndpxyz Subroutine (Storing X,Y,Z for a Node)
		8.4. Matrix Subroutines
			8.4.1. maxv Subroutine (Multiplying a Vector by a Matrix)
			8.4.2. maxv1 Subroutine (Multiplying a Vector by a Matrix)
			8.4.3. matxv Subroutine (Multiplying a Vector by a Full Transposed Matrix)
			8.4.4. matxv1 Subroutine (Multiplying a Vector by a Full Transposed Matrix)
			8.4.5. matxb Subroutine (Transposing a matrix)
			8.4.6. maat Subroutine (Changing a Matrix Value via Addition, Multiplication, and Transposition)
			8.4.7. matsym Subroutine (Filling the Upper Triangle from the Lower Triangle)
			8.4.8. mctac Subroutine (Transposing a symmetric matrix)
			8.4.9. tran Subroutine (Transposing a matrix)
			8.4.10. symeqn Subroutine (Solving Simultaneous Linear Equations)
	Appendix A. Creating External Commands in UNIX
		A.1. Tasks in Creating an External Command
			A.1.1. Creating Compatible Code
			A.1.2. Creating a Shared Library
			A.1.3. Creating an External Table File
			A.1.4. Setting the ANSYS_EXTERNAL_PATH Environment Variable
			A.1.5. Using External Commands
			A.1.6. Checking External Command Status
			A.1.7. Resetting External Commands
	Appendix B. Creating External Commands in Windows
		B.1. Tasks in Creating an External Command
			B.1.1. Creating Compatible Code
			B.1.2. Creating a New Project
			B.1.3. Creating an External Definition File
			B.1.4. Creating a Shared Library
			B.1.5. Creating an External Table File
			B.1.6. Setting the ANSYS_EXTERNAL_PATH Environment Variable
			B.1.7. Using External Commands
			B.1.8. Checking External Command Status
			B.1.9. Resetting External Commands
Index
                        
Document Text Contents
Page 1

Programmer's Manual for

ANSYS

ANSYS Release 11.0

002328

January 2007

ANSYS, Inc. and

ANSYS Europe,

Ltd. are UL

registered ISO

9001:2000

Companies.

Page 2

ANSYS, Inc.

Southpointe

275 Technology Drive

Canonsburg, PA 15317

[email protected]

http://www.ansys.com

(T) 724-746-3304

(F) 724-514-9494

Page 156

c dens (dp,sc,in) - material density
c flu (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,sc,inout) - modified total strain (trial strain)
c eppl (dp,sc,inout) - plastic strain at previous substep
c statev (dp,ar(6),inout) - state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for userpl)
c epeq (dp,sc,inout) - effective plastic strain at prev substep
c plwork (dp,sc,inout) - accumulated plastic work at prev substep

c output arguments:
c epel (dp,sc,inout) - elastic strain
c eppl (dp,sc,inout) - updated plastic strain
c statev (dp,ar(6),inout) - updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c epeq (dp,sc,inout) - updated effective plastic strain
c plwork (dp,sc,inout) - updated accumulated plastic work
c sigepl (dp,sc,out) - stress value on stress-strain curve
c sigrat (dp,sc,out) - ratio of trial stress to yield stress
c et (dp,sc,out) - tangent modulus

c internal variables:
c deppl (dp,sc) - equivalent plastic strain increment

6.2.15. Subroutine plast3 (Updating an Element's Plastic History, 4 or 6 components)

*deck,plast3
subroutine plast3 (option,elem,intpt,mat,kstartL,ncomp,tem,dtem,
x prop,d,ktform,dens,flu,dflu,epel,eppl,statev,usvr,epeq,plwork,
x sigepl,sigrat,dt,kplst,dtt,cmel)
c *** primary function: to update the plastic history (for 4 or 6 components)
c used by: PLANE02, PLANE13, PIPE20, SHELL43, SHELL51, PIPE60,
c SOLID62, SOLID65, SHELL91, SHELL93, SHELL143, SOLID191
c and by way of plast3creep : PLANE42, SOLID45, PLANE82, SOLID92, SOLID95

c *** secondary functions: to compute the material tangent matrix if requested

c *** Notice - This file contains ANSYS Confidential information ***

c input arguments:
c option (int,sc,in) - plasticity option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c ncomp (int,sc,in) - number of stress/strain components (4 or 6)
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c prop (dp,ar(9),in) - material property array (ex,ey,ez,
c gxy,gyz,gxz, uxy,uyz,uxz)
c d (dp,ar(ncomp,ncomp),in) - elastic stress-strain matrix
c ktform (int,sc,in) - request key for tangent matrix formation
c dens (dp,sc,in) - material density
c flu (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,ar(ncomp),inout)- modified total strain (trial strain)
c eppl (dp,ar(ncomp),inout)- plastic strain at previous substep
c statev (dp,ar(ncomp,6),inout)- state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for pluser)
c epeq (dp,sc,inout) - effective plastic strain at prev substep
c plwork (dp,sc,inout) - accumulated plastic work at prev substep
c kplst (int,sc,in) - plane stress key (form dtt if kplst=1)

c output arguments:
c epel (dp,ar(ncomp),inout)- elastic strain
c eppl (dp,ar(ncomp),inout)- updated plastic strain
c statev (dp,ar(ncomp,6),inout)- updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c epeq (dp,sc,inout) - updated effective plastic strain
c plwork (dp,sc,inout) - updated accumulated plastic work

Programmer's Manual for ANSYS . ANSYS Release 11.0 . 002328 . © SAS IP, Inc. All rights reserved.
Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.138

Chapter 6: UPF Routines and Functions

Page 157

c sigepl (dp,sc,out) - stress value on stress-strain curve
c sigrat (dp,sc,out) - ratio of trial stress to yield stress
c dt (dp,ar(ncomp,ncomp),out)- material modulus modified by dscpar
c dtt (dp,ar(ncomp,ncomp),out)- consistent tangent modulus
c (formed only if kplst=1)

c internal variables:
c deppl (dp,sc) - equivalent plastic strain increment

6.2.16. Subroutine creep1 (Updating an Element's Creep History)

*deck,creep1
subroutine creep1 (option,elem,intpt,mat,kstartL,epel,e,epcrp,
x statev,usvr,tem,dtem,fluen,dflu,sig)
c *** primary function: to update the creep history for 1-d elements
c used by: LINK1, LINK8, BEAM23, BEAM24, and
c SOLID65(reinforcing)

c *** Notice - This file contains ANSYS Confidential information ***

c input arguments:
c option (int,sc,in) - creep option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c epel (dp,sc,inout) - elastic strain
c e (dp,sc,in) - elastic modulus
c epcrp (dp,sc,inout) - creep strain at previous substep
c statev (dp,ar(7),inout) - state variables at previous substep
c usvr (dp,ar(*),inout) - user-defined state variables (for usercr)
c tem (dp,sc,in) - temperature at the end of this substep
c dtem (dp,sc,in) - temperature increment over this substep
c fluen (dp,sc,in) - fluence at the end of this substep
c dflu (dp,sc,in) - fluence increment over this substep
c epel (dp,sc,inout) - elastic strain adjusted for creep increment
c sig (dp,sc,inout) - stress (not really used)

c output arguments:
c epcrp (dp,sc,inout) - updated creep strain
c statev (dp,ar(7),inout) - updated state variables
c usvr (dp,ar(*),inout) - updated user-defined state variables
c sig (dp,sc,inout) - stress (recomputed if requested)

6.2.17. Subroutine creep3 (Updating an Element's Creep History, 3-D Elements)

*deck,creep3
subroutine creep3 (option,elem,intpt,mat,kstartL,ncomp,epel,e,
x posn,d,epcrp,statev,usvr,tem,dtem,fluen,dflu,kplst,sig,hsig)
c *** primary function: to update the creep history for 3-d elements
c used by: PLANE02, PLANE13, PIPE20, PLANE42, SHELL43, SOLID45,
c SHELL51, PIPE60, SOLID62, SOLID65, PLANE82, SHELL91,
c SOLID92, SHELL93, SOLID95, SHELL143, SOLID191

c *** Notice - This file contains ANSYS Confidential information ***

c input arguments:
c option (int,sc,in) - creep option
c elem (int,sc,in) - element number (label)
c intpt (int,sc,in) - element integration point number
c mat (int,sc,in) - material reference number
c kstartL (intL,sc,in) - virtual starting address of the data table
c ncomp (int,sc,in) - number of stress/strain components (4 or 6)
c epel (dp,ar(ncomp),inout)- elastic strain
c e (dp,sc,in) - elastic young'S MODULUS
c posn (dp,sc,in) - poisson'S RATIO
c d (dp,ar(ncomp,ncomp),in) - elastic stress-strain matrix

139
Programmer's Manual for ANSYS . ANSYS Release 11.0 . 002328 . © SAS IP, Inc. All rights reserved.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

6.2.17. Subroutine creep3 (Updating an Element's Creep History, 3-D Elements)

Page 311

linking subroutines to user routines, 105

planning, 103

running your executable, 108

understanding, 103

verifying your routines, 108

user subroutines

for creating new elements, 113, 126

User subroutines, 127

user-defined commands, 174

making available to all ANSYS sessions, 174

user-defined elements, 113

User-defined variable storage, 104

user-programmable features

user-defined elements, 113

user01 command, 174–175

user02 command, 176

user03 command, 177

USER300 user-defined element, 114

userac, 209

userac subroutine, 127, 130

useran subroutine, 149

userch subroutine, 173

userck subroutine, 167

usercr subroutine, 161

usercreep subroutine, 161

usercv subroutine, 171

UserElem subroutine, 115

usereo subroutine, 142

userfd subroutine, 147

userfx subroutine, 172

UserHyper subroutine, 165

usermat subroutine, 157

usermc subroutine, 167

userop subroutine, 101, 185

userou subroutine, 148

userpe function, 150

userpl subroutine, 160

userpr subroutine, 171

userrc subroutine, 150

usersw subroutine, 164

usertr subroutine, 127, 130

UserVisLaw subroutine, 168

uservp subroutine, 166

USolBeg subroutine, 183

USolFin subroutine, 183

USRCAL command, 170, 183

usrefl subroutine, 170

usrfc6 subroutine, 168

UsrFictive subroutine, 152

usrsurf116 subroutine, 154

UsrViscEl subroutine, 153

USsBeg subroutine, 183

USsFin subroutine, 183

USTRESS subroutine, 152

usvrcm.inc file, 104

UTHICK subroutine, 151

V
vamb subroutine, 267

vamb1 subroutine, 267

vapb subroutine, 267

vapb1 subroutine, 267

vapcb1 subroutine, 267

variables

defining additional, 111

fetching the index for saved, 131

optimization, 104

writing saved element index, 133

Variables

retrieving characters from, 259

vcross subroutine, 268

vdot function, 264

Vector functions, 264

Vectors

assigning equal values to two vectors, 265

assigning scalar constants to, 266

assigning scalar constants to incrementally, 266

combining two in one, 267

defining by a cross product, 268

getting the difference of two, 267

getting XYZ vector for a node, 269

initializing to zero, 265

moving one into another, 266

moving one into another incrementally, 266

multiplying a matrix by, 270

multiplying by a full transposed matrix, 271

multiplying one by a constant, 268

multiplying to a constant, 267

normalizing a three-component vector, 268

normalizing to unit length, 269

setting integer vector to zero, 265

setting one to be the sum of two vectors, 267

storing XYZ vector for a node, 269

subtracting one from another, 267

velocity information, 104

viinit subroutine, 266

vimove subroutine, 266

vinit subroutine, 266

viscoplastic/creep material behavior, 161

viscosity laws

defining, 168

vmax function, 265

vmove subroutine, 266

vmult subroutine, 268

293
Programmer's Manual for ANSYS . ANSYS Release 11.0 . 002328 . © SAS IP, Inc. All rights reserved.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Index

Page 312

vmult1 subroutine, 268

vnorm subroutine, 269

vnorme subroutine, 268

vsum function, 264

vzero subroutine, 265

W
wavefront reordering debugging, 111

Weld

defining, 81

Windows systems

compiling and linking UPFs on, 106

wrinqr function, 259

Writing an ANSYS substructure file, 63

wrtsub subroutine, 63

X
xyzup3 subroutine, 144

Z
Z-buffered graphics, 89

Programmer's Manual for ANSYS . ANSYS Release 11.0 . 002328 . © SAS IP, Inc. All rights reserved.
Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.294

Index

Similer Documents