Home
Autodyn User`s Subroutines Tutorial
Contents
1. NTEGER INT4 PARAMETER NSMGVR 19 TYPE REAL ARRAY POINTER DIMENSION LIMSUB NSMGVR SGRID TEMPORARY 2D POINTER ARRAYS FOR TRANSPORTS TYPE REAL ARRAY2 POINTER DIMENSION LIMSUB TRVOL TYPE REAL ARRAY2 POINTER DIMENSION LIMSUB GRDTMS POINTER ARRAYS TO BEAM OBJECT LISTS TYPE CHARACTER 10 POINTER DIMENSION LIMSUB NAMEBM TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB NBASBM TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB IDIABB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB IBMXBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB JBMXBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB KBMXBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB INCXBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB NCYBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB INCZBB TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB NBOJTB NTEGER INT4 DIMENSION POINTER NBSBOJ IDIAGB NTEGER INT1 DIMENSION POINTER IBMXBM JBMXBM KBMXBM NTEGER INT1 DIMENSION POINTER INCXBM INCYBM INCZBM NTEGER INT1 DIMENSION POINTER NBOJTY CHARACTER LEN 10 DIMENSION POINTER NAMBOJ NTEGER INT4 IMDUM NTEGER PARAMETER NXN 1 NYN 2 NZN 3 NTEGER PARAMETER NUXN 4 NUYN 5 NUZN 6 NTEGER PARAMETER NFX 7 NFY 8 NFZ 9 NTEGER PARAMETER NPMASS 10 NBMAREA 11 NVOLN 12 NTE
2. able 8 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 73 Autodyn Variable Listings Internal Array Euler Shell Godun FCT Description VARO9 VARO10 User defined vari able 9 User defined vari able 10 VARO11 User defined vari able 11 VARO12 User defined vari able 12 VARO13 User defined vari able 13 VARO14 User defined vari able 14 VARO15 User defined vari able 15 VARO16 VARO17 User defined vari able 16 User defined vari able 17 VARO18 User defined vari able 18 VARO19 User defined vari able 19 VARO20 User defined vari able 20 The index value for a given grid variable is Nname where name is the internal variable name For ex ample if you wanted the index for x velocity UXN it would be NUXN This index could then be used in the various Autodyn functions for example GV NUXN UK 6 2 Autodyn 3D Structured IJK Solvers Autodyn Internal Lag Shell Euler Euler SPH Beam Description Note Output Array ALE Godun4FCT Name ov X XN Node Node Node Node Particle Node X space coordinate Y YN Node Node Node Node Particle Node Y space coordinate Z ZN Node Node Node_ Node Particle Node Z space coordinate X VELOCITY UXN Node No
3. 25 4 2 Linking your own User Subroutines on Linux Platforms seeeeeeseeeeeeeeeeeeeeeen nennen 26 5 Autodyn User Subroutine Modules eed et irure uae n ei ked ea palo RR NE PF R testy ORE puo ak 29 5 1 BNDDEF Boundary Definitions esee eene eene eene nnn nnne sese ee nennen nennen eee ne nnn 29 5 2 CYCVAR Cycle Variables 2 2 15 ire oe eot e Fa EENE NEATE ed aee Pate pe oak ge eae nea ren ugue 29 5 3 FIELDER File D finitiOniS torri rr erre e erre ner he erre eere erre der IV erre ES 30 5 4 GLOOPT Global Opti Nsure 5 n ei e eoe e nete e Poor e ee SOG IS Ced ee Pee te e ER Eee 31 5 5 JKNOW Cell IndiCes cre oett tr REP ete Rer aae REP hee Tra PERRO e eR 32 5 6 JETDEF Jetting Variables 5 eter toe edet E a Pene aeo co nU de HERR Ve pus 32 5 7 KINDEF Constant Variable Definitions eese ne enne nennt enn rht sena n essen 33 5 8 LOCEEM Element Quantities 5 oderam d d vU epulae car ei ed puri ipi bua Ue del oc e pl b 34 5 9 MATDEF Material Definitions cccccecccccseecccceescccscseeecessueeecsseueeecsseuueecsseuuuesssuueessseueeesessueeesesens 35 5 10 MATERIAL Local Material Data cccccccccssccccsssecsccsesecsceseecesseuscessueeecesseuecsssueecesseuecsseueneceseues 38 5 11 Equation of State EOS Variables cccccccccccccccceceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 41 STENENE EOS REA 41 5 M2 POL
4. SAVE HISTORY DISPLAY ETC SO IT MAY ALSO BE USED TO SET UP DATA TO BE PROCESSED BY OTHER EDIT TYPES CK Ck Ck Ck kk Ck Sk Ck kk kk Ck kk kk kk Sk kk Sk kk kk Sk kk kk Sk kk kk ko kk kk ko kk kk ko kk ko ko kk ko Sk ko k Sk ko ko ko ko kok KK KK USE mdgrid USE ranges USE kindef USE cycvar USE wrapup USE subdef IMPLICIT NONE INTEGER INT4 I gs NS IJK REAL REAL8 PRESSURE CK Ck Ck kk kk kk Ck kk kk ck kk kk Sk kk kk Sk kk kk ko kk kk ko kk kk Sk kk kk Sk kk kk Sk kk Sk ko Sk kk ko ko KKK k ko KKK KK KK THIS SUBROUTINE ATTAINS MAXIMUM PRESSURE FOR EACH CELL 2D i VARO1 ARRAY STORING MAXIMUM PRESSURE VARO2 ARRAY STORING TIME WHEN MAXIMUM PRESSURE OCCURS CK Ck kk Ck kk Ck Sk Ck kk kk Ck kk kk ko kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk Sk kk KKKKKKKKKKKKKKKK KKK KK INITIALIZATION OF ARRAYS IF NCYCLE 1 THEN LOOP OVER ALL PARTS DO NS 1 NUMSUB NSUB NS CALL GETSUB LOOP OVER ALL CELLS DO I 1 IMAX DO J 1 JMAX IJK IJSET I J VARO1 IJK BIG VARO2 IJK BIG END LOOP ON CELLS END DO END DO END LOOP ON PARTS END DO END IF GET MAXIMUM PRESSURE LOOP OVER ALL PARTS IF NCYCLE 1 THEN DO NS 1 NUMSUB IF NS NSUB THEN NSUB NS CALL GETSUB END IF LOOP OVER ALL CELLS DO I 1 IMAX DO J 1 JMAX GET MAXIMUM PRESSURE FOR EACH CELL IJK IJSET I J PRESSURE PN IJK IF PRESSURE gt VARO1 IJK THEN VARO1 IJK P
5. Cell dimension used to calculate timestep X velocity of I J at start of cycle Y velocity of I J at start of cycle Increment of distortional energy Cell area components at end of cycle Total cell area at end of cycle 5 9 MATDEF Material Definitions Module matdef includes global material data variables MODULE matdef USE kindef 1 ckokokck ok kk ck ck ck kk ke ck ckck ck ckck kk ck ck ck ckckckck kk kk kk kk oe THIS MODULE DEFINES ALL MATERIAL MODELING FLAGS OPTIONS MAIN BASIC MATERIAL FLAGS AND OPTIONS THESE DEFINE THE TOP LEVEL STRUCTURE OF A MATERIAL MODEL AND MUST ALWAYS BE SET FOR A GIVEN MATERIAL THESE DEFINE MATERIAL MODELING OPTIONS THAT CAN BE USED TO RECURSIVELY ACCESS MATERIAL MODELING OPTION INPUT AND EQUATIONS IN PARTICULAR THEY ARE USED IN THE GENERIC MATERIAL MODEL BUILDER ADDITIONAL MATERIAL FLAGS OPTIONS 1 ckokokck ok ck ck ck ck ck ckok ck ck ck ck ck ckck kk ck ck ck ckckckck ck ck ck ckckckckckckockckckckckockckockckckockckockckokckckokckokckckokckok IMPLICIT NONE SAVE INTEGER PARAMETER LIMMAT 100 LIMMAP LIMMAT 1 INTEGER INT4 IFUPDATE 0 FLAG TO INDICATE IF MATERIAL IS BEING UPDATED IN GET VIS INTEGER INT4 PARAMETER LIMSOL 8 INTEGER INT4 IFSPH INTEGER INT4 NUMMAT NUMMAP MATNO MATOLD NEOS NSTR NFAI INTEGER INT4 MUNTYP KUNTYP IFOUT MATNOP Release 15 0 SA
6. jul po Now select the Materials menu and Review the material data for TANTALUM You will notice that a Von Mises yield model has been specified for this material This model allows you to define a constant yield stress Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 3 How to Invoke User Subroutines LI ANSYS AUTODYN Materials in model click for shortcut mecum o0 LE bL bL bL Material Name TANTALUM Ewwondiae iow Cd seen ive Suppose that instead of keeping it constant Von Mises you want to make the yield stress a function of the effective plastic strain First click Modify In the resulting dialog expand the Strength section and inspect the available options for yield models The option Piecewise exists which could be used to describe such a relationship However in the interests of illustrating user subroutines you will create your own subroutine that has the same effect Therefore you will supply your own custom yield model To do this change the selected yield option from Von Mises to User Strength 1 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 4 of ANSYS Inc and its subsidiaries and affiliates R Material Data Input TANTALUM Name TANTALUM F Reference Density wv 16 660000 g cm3 Bulk
7. Contains proprietary and confidential information 14 of ANSYS Inc and its subsidiaries and affiliates Timing of Calls to User Subroutines Routine Description solve_nam_USER_1 A subroutine in which the user writes his material modeling al gorithm Further details on how to implement material modeling user subroutines are given in the example user subroutine in Subroutine MDSTR_USER_1 p 87 3 8 Timing of Calls to User Subroutines Depending upon the user subroutine the routine may be called once per problem for example EXLOAD once per specified cycle for example EXEDIT or many times for each cycle and each cell It is important to understand this calling sequence if you are to be successful in implementing your user subroutines The calling sequence of the user subroutines may be classified according to type as outlined in the table below Table 3 1 User Subroutine Calling Sequence Types Timing of calls Called once each time a Load or Save is requested Called at each user specified cycle Called for user specified material each cell each cycle Called for particular boundary conditions each cell on boundary each cycle Called for each cell each cycle Called for each fill initialization region during problem set up Called for each EXZONE menu selection Part Zoning Import For Types 3 7 a current Part NSUB is defined such that variables may be directly refere
8. INTEGER PARAMETER NUT11 41 NUT12 42 NUT13 43 NUT14 44 NUT15 45 INTEGER PARAMETER NUT16 46 NUT17 47 NUT18 48 NUT19 49 NUT20 50 INTEGER PARAMETER NUT21 51 NUT22 52 INTEGER PARAMETER NOLD 0 NNEW 1 NAPP 2 NUNF 0 UNFORMATTED FILE FORMATS NUNF 0 DEFAULTS TO BIG ENDIAN l NULND 1 LITTLE_ENDIAN Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 30 of ANSYS Inc and its subsidiaries and affiliates GLOOPT Global Options NUCRY 2 CRAY NUFDX 3 FDX NUFGX 4 FGX NUIBM 5 IBM NUVXD 6 VAXD NUVXG 7 VAXG NUNAT 8 NATIVE INTEGER PARAMETER NULND 1 NUCRY 2 NUFDX 3 NUFGX 4 INTEGER PARAMETER NUIBM 5 NUVXD 6 NUVXG 7 NUNAT 8 INTEGER PARAMETER NFOR 1 NUNK 2 NSEQ 0 NDIR 1 INTEGER INT4 IFBINI IFBINO LOGFILE NUNIT IRDOLY CHARACTER LEN 4 PARAMETER ADHLP1 AD21 ADHLP2 AD22 CHARACTER LEN 9 PARAMETER FNEW unknown FOLD old FAPP append CHARACTER LEN 1 SLASH CHARACTER LEN 3 FEXT CHARACTER LEN 256 FNID CHARACTER LEN 6 IOUNIT CHARACTER LEN 10 FNREST FNHIST FNPRNT PRT WRITESW CHARACTER LEN 80 FDPLOT FDREST FDHIST FDPRNT FDSLID CHARACTER LEN 80 FDHELP FDMTRL FDMCRO FDTEMP FDBIN CHARACTER LEN 256 FNAME FDUMMY FDADI FNUNIT END MODULE fildef 5 4 GLOOPT Global Options MODULE gloopt USE kindef
9. This sets up the pointer ML to look at the material data for the current cell This data can be accessed and set directly by addressing the appropriate index of the ML pointer array For example to set mater ial damage to one and internal energy to zero we could now use ML NCDM ML NCEN 1 0 0 0 This direct method of access is significantly more efficient than using the GETMLT3 PUTMLTS calls in Autodyn 3D 3 7 Material Modeling User Subroutines The main material modeling user subroutines MD EOS USER 1 F90 MD STR USER 1 F90 MD FAI USER 1 F90 MD ERO USER 1 F90 have been updated and modularized to allow more flexibility The table below shows the general description of the usage of the routines and also the four basic components of each routine Routine Description Nam USER 1 A module to allow the user to define variables that can be defined and accessed in any of the routines below or anywhere with the USE nam USER 1 statement Init nam USER 1 A subroutine that allows the user to define the input parameters for the material modeling option check nam USER 1 A subroutine that allows the user to perform checks on the input data for the user model during input of the data Set nam USER 1 A subroutine to get the material input data from the internal Autodyn data structures and assign local variables as required Release 15 0 SAS IP Inc All rights reserved
10. NAME IACTIVE VISIBLE Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 39 Autodyn User Subroutine Modules INTEGER INT4 DIMENSION LIMSOL IFSOLVER INTEGER INT4 EQTYPE FLAG INTEGER INT4 NPAR NUMOPT NDEPFLG INTEGER INT4 DIMENSION POINTER IPOS INTEGER INT4 DIMENSION POINTER DEPFLG TYPE PRMT DIMENSION POINTER PAR TYPE OPTION LIST DIMENSION POINTER OPTION END TYPE PARAMLIST Within a PARAMLIST the real parameters and options are defined through the types given below TYPE PRMT TYPE DEFINITION FOR A SINGLE MATERIAL INPUT PARAMETER NAME NAME OF PARAMETER AS DISPLAYED IN UI D L POWER OF LENGTH UNIT D T POWER OF TIME UNIT DM POWER OF MASS UNIT DH POWER OF TEMEPRATURE UNIT VAL CURRENT VALUE MIN MINIMUM ALLOWABLE VALUE MAX MAXIMUM ALLOWABLE VALUE DEFAULT DEFAULT VALUE VISIBLE VISIBILITY OF PARAMETER SWITCH REQUIRED REQUIRED PARAMETER SWITCH CHARACTER LEN 50 NAME INTEGER INT4 DL INTEGER INT4 ioo INTEGER INT4 DM INTEGER INT4 DH REAL REAL8 2 VAL REAL REAL8 2 MIN REAL REAL8 MAX REAL REAL8 DEFAULT INTEGER INT4 VISIBLE INTEGER INT4 REQUIRED END TYPE PRMT TYPE OPTION TYPE DEFINITION FOR A SINGLE MATERIAL INPUT OPTION I NAME OPTIONS NAME I AUTH AUTHORI
11. NTEMP19 NTEMP01 18 NTEMP20 NTEMP01 19 NTEMP21 NTEMP01 20 NTEGER PARAMETER NTEMP22 NTEMP01 21 NTEMP23 NTEMP01 22 NTEMP24 NTEMP01 23 NTEGER PARAMETER NTEMP25 NTEMP01 24 NTEMP26 NTEMP01 25 NTEMP27 NTEMP01 26 NTEGER PARAMETER NTEMP28 NTEMP01 27 NTEMP29 NTEMP01 28 NTEMP30 NTEMP01 29 REAL REAL8 DIMENSION POINTER XN YN UXN UYN REAL REAL8 DIMENSION POINTER FX FY PMASS RINTER REAL REAL8 DIMENSION POINTER VOLN CMASS XMU EN REAL REAL8 DIMENSION POINTER PN Q PLWK DEN REAL REAL8 DIMENSION POINTER TEMP EPS EPSDOT EFS REAL REAL8 DIMENSION POINTER SSPD DAM DIV ALPHA REAL REAL8 DIMENSION POINTER Ti T22 T12 TXX REAL REAL8 DIMENSION POINTER TYY TXY TTT TVM REAL REAL8 DIMENSION POINTER YIELD EXXD EYYD EXYD REAL REAL8 DIMENSION POINTER STN11 STN22 STN33 STN12 REAL REAL8 DIMENSION POINTER PSANG VOID FCOVRV FCOVR REAL REAL8 DIMENSION POINTER FCOVRd DPDX DPDY DRDX REAL REAL8 DIMENSION POINTER DRDY DUXDX DUXDY DUYDX REAL REAL8 DIMENSION POINTER DUYDY STN1 STN2 STR REAL REAL8 DIMENSION POINTER STR2 SRES1 SRES2 BMOM REAL REAL8 DIMENSION POINTER BMOM2 TSHEAR THICK SML REAL REAL8 DIMENSION POINTER VOR DENNM1 RCUT RNON REAL REAL8 DIMENSION POINTER ABSVEL HNORM TFAIL PDIL REAL REAL8 DI
12. VTXY VTXY Cell Particle Viscoelastic stress VTYZ VTYZ Cell Particle Viscoelastic stress VTZX VTZX Cell Particle Viscoelastic stress IGTIME IGTIME Cell Particle Slow burn ignition time SBRCRT SBRCRT Cell Particle Slow burn reaction ratio ABS VEL ABSVEL Node Node Cell Cell Particle Node Absolute velocity EDGE MASS FMASS Node Particle SPH joined face mass JOIN CELLS NUMCEL Node Particle SPH joins number of joined cells INITIAL X XNO Node Node Particle Node Original X space coordinate INITIAL Y YNO Node Node Particle Node Original Y space coordinate Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 81 Autodyn Variable Listings Autodyn Output Name Internal Array Euler ov Euler Godun FCT Description INITIAL Z GAS PRESS ZNO PGAS Particle Particle Node Original Z space coordinate Slow burn gas pressure FILL DENS FILDEN Particle Slow burn fill dens ity VARO1 User defined vari able 1 VARO2 User defined vari able 2 VARO3 User defined vari able 3 VARO4 User defined vari able 4 VARO5 User defined vari able 5 VAR 6 VARO6 X X X X X User defined vari able 6 VAR 7 VARO7 X X X X X User defined vari able 7 VAR 8 VARO8 X X X X X User defined vari able 8 VAR
13. also referred to as EPS1 Plastic strain at which damage reaches its maxim See Cumulative Damage Model in um also referred to as EPS2 the Autodyn User s Manual Maximum damage value between 0 0 and 1 0 also referred to as Dmax 5 14 4 Johnson Holmquist Damage Model To access local data USE matdef USE fai jh2 Damage constant D1 Damage exponent D2 Bulking constant BETA Failure type 5 14 5 RHT Damage Model To access local data Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 50 of ANSYS Inc and its subsidiaries and affiliates MDGRID Autodyn 2D Grid Variable Definitions USE matdef USE str_rht Damage constant 1 Damage constant 2 Minimum Strain to Failure Residual Shear Modulus Fraction Failure Type 5 14 6 Orthotropic Softening Model To access local data USE matdef USE fai_orthodam Fracture energy 11 Fracture energy 22 Fracture energy 33 Fracture energy 23 Fracture energy 31 Fracture energy 12 5 15 MDGRID Autodyn 2D Grid Variable Definitions Module mdgrid contains the definitions for the grid variables The various pointers and arrays to be used in accessing the grid variables are provided For a description of the available grid variables see Autodyn Variable Listings p 69 MODULE mdgrid USE cycvar USE gloopt USE subdef USE materia
14. EOS USER 3 MF EOS USER 4 IMF EOS USER 5 MF LIMEOS HYDRO ELASTIC VONMISES DRUCKERP 19 192 193 194 IMF EOS LINEAR 20 202 203 204 205 206 207 208 209 210 21 212 213 214 215 290 29 292 293 294 IMF STR HYDRO 220 MF FAI NONE 30 MF_FAI_HYDRO 302 MF_FAI_PLSTN 303 MF FAI PSTRESS 304 MF FAI PSTRAIN 305 MF FAI PSS 306 MF FAI MSTRESS 307 MF FAI MSTRAIN 308 MF FAI MSS 309 MF_FAI_CUMDAM 310 MF FAI JH2 31 MF_FAI_RHT 312 MF_FAI_TSHOFF 313 MF_FAI_GRADY 314 MF FAI JNCOOK 315 MF FAI USER 1 390 MF_FAI_USER_2 39 MF_FAI_USER_3 392 MF_FAI_USER_4 393 MF_FAI_USER_5 394 MF LIMFAI IMF FAI NONE 301 MF POR NONE 40 MF POR SIMPLE 402 MF POR GENERIC 403 MF POR USER 490 MF_POR_USER_2 49 MF_POR_USER_3 492 MF_POR_USER_4 493 MF_POR_USER_5 494 MF LIMPOR IMF POR NONE 404 MF ERO NONE 50 MF_ERO_GEOMETRIC 502 MF ERO PLASTIC 503 MF ERO USER 590 MF_ERO_USER_2 59 MF_ERO_USER_3 592 MF_ERO_USER_4 593 MF_ERO_USER_5 594 MF LIMERO IMF ERO NONE 508 123 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 37 Autodyn User Subroutine Modules INTEGER INT4 LIMPARAM DEFINED IN GET_EQ PARAM END OF MAIN BASIC FLAGS EOS DEPENDENT FLAGS INTEGER INT4 PARAMETER IMF TEMPERATURE 600 INTEGER INT4
15. IMPLICIT NONE SAVE INTEGER INT4 NETTYP NTALG IFMULT NELPMX NELOVF NHRVER INTEGER INT4 IFSMLS IFDIMS IFCUT IFDIV IFFOR IFDEV INTEGER INT4 IFDEN IFSPHA IFSPHD IFVISS IFALLQ IFSMLD INTEGER INT4 IFNOD IFSPHK NIMSTP NLOEXP IDENUP IFSUB IFREADSUB REAL REAL8 HE GRAVX GRAVY GRAVZ QQUAD OLIN CHOUR CTANG REAL REAL8 RADCUT VELCUT SSPCUT FVCUT RHOCUT PRESCUT VELLIM REAL REAL8 EE RELAX VTSF RHOMN SPHDLT VELCOR SSPMAX REAL REAL8 QQUADS OLINS QCORRS SMLFAC RHOMAX TEMLIM JOITOL END MODULE gloopt Type of Energy Transport ALE Euler Type of Mass Transport algorithm Euler X component of gravity Y component of gravity Quadratic viscosity coefficient Linear viscosity coefficient Hourglass viscosity coefficient Anti tangle constant Radius cutoff axial symmetry only Velocity minimum cutoff Soundspeed minimum cutoff Covered volume fraction cutoff rezone Velocity maximum limit Relaxation parameter quasi static damping Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 31 Autodyn User Subroutine Modules 5 5 IKNOW Cell Indices Module ijknow provides the I J index and Part number for the current cell being processed Applicable to type 3 and type 5 subroutines MODULE ijknow USE kindef IMPLIC
16. MF EOS TILLOTSON MF EOS PUFF MF_EOS_POROUS MF_EOS_ORTHO MF_EOS_TWOPHASE MF_EOS_LEETARVER MF_EOS_SESAME MF_EOS_COMPACTION MF_EOS_PALPHA MF_EOS_GRUN MF_EOS_GEN xi MF EOS HJC MF_EOS_SLOWBURN MF_EOS_USER_1 ll CS SS CO x eS QO i000 J10 Ui 4 C hN OWN DU i0 MN EF o 36 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates MATDEF Material Definitions s Ni Ni Ni aig Ni Ni Ni Ni NA 3 s Ni NA 3 s Ni NA 3 S a Na Ni N Ni xia Ni Ni Ni Ni N Ni Na Ni N Ni Na Ni N Ni Na Ni N Ni Ni 3 Wa NI s ai xia 3 s Ni NA Ni m e a Ni Ni Ni Ni Ni Ni TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER TEGER NI TEGER NT4 NT4 NT4 NT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 NT4 INT4 NT4 NT4 INT4 NT4 NT4 NT4 INT4 NT4 NT4 NT4 INT4 NT4 NT4 NT4 INT4 NT4 NT4 NT4 I
17. NCMU Material internal energy CEN 1 matno NCEN Material temperature CTP 1 matno NCTP Material alpha CAL 1 matno NCAL Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 13 Writing Your Own User Subroutines Multi material variable Internal Array ML Index Material burn fraction CBF 1 matno NCBF Material damage CDM 1 matno Material plastic strain CPS 1 matno Autodyn 3D only where matno is the material number for a given material These material numbers are assigned in sequence when defining your problem starting with 1 You can determine what the material number is for a given material name by testing against the MA TERIALS matno NAME array see the examples in User Subroutine Examples p 87 In Autodyn 3D the GETV3 function provides a functional method for accessing multi material variables without use of GETMLT3 This is discussed in Autodyn Utility Functions Subroutines p 18 Note that to save updated values of multi material variables a call PUTMLT3 UK O must be made after setting the data in the internal arrays listed above For Lagrange ALE Shell SPH and Beam solvers of Autodyn 3D it is also possible to access and set data in the material arrays directly using the following procedure after setting IJK for each cell use the call ML gt MTSUB IJK V 1 NUMMLV
18. PARAMETER IMF ORTHO MODULI 60 INTEGER INT4 PARAMETER IMF ORTHO STIFFMAT 602 INTEGER INT4 PARAMETER IMF ORTHO IJKSPACE 603 INTEGER INT4 PARAMETER IMF ORTHO XYZSPACE 604 STRENGTH DEPENDENT FLAGS INTEGER INT4 PARAMETER IMF_YP_PCWISE 70 INTEGER INT4 PARAMETER IMF_YP_LINEAR 702 INTEGER INT4 PARAMETER IMF YP STASSI 703 INTEGER INT4 PARAMETER IMF_YD_PCWISE 704 INTEGER INT4 PARAMETER IMF_GD_PCWISE 705 FAILURE DEPENDENT FLAGS INTEGER INT4 PARAMETER IMF FAI CRACKSOFT 80 INTEGER INT4 PARAMETER IMF FAI ORTHODAM 802 INTEGER INT4 PARAMETER IMF_FAI_STOCHASTIC 803 END MODULE matdef Number of materials for problem Current material number not available Current equation of state number Current strength model number Current failure model For each cell the following variables are defined according to the material in that cell For all materials RHOREF Reference density Reference temperature Specific heat constant volume Shear modulus initial Yield stress initial Erosion model type Erosion model parameter Hydrodynamic tensile limit pmin EPSLIM Effective plastic strain limit 5 10 MATERIAL Local Material Data Contains all data for each defined material The material data is stored in the structure TYPE MAT DIMENSION POINTER MATERIALS MATERIALS_TMP TYPE MAT POINTE
19. 29 To use a particular module in a user subroutine insert the statement USE XXXXXX where xxxxxx is the name of the appropriate module The dummy subroutines have USE statements already defined for the most often required global data Also the comments indicate which variables in these modules are likely to be of use Caution Be extremely careful if you modify variables other than the user variables VARO1 through VAR20 and that the modified values are consistent with the use of the variables Global variables are used by other routines and assigning bad values to them could cause Autodyn to terminate unexpectedly Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 10 of ANSYS Inc and its subsidiaries and affiliates Autodyn Variables 3 5 Autodyn Variables Autodyn uses the dynamic array allocation features available through Fortran 90 95 As such there are no fixed limits on the size of the model that you can generate However your computing time may be greatly limited by such factors as your machine memory There are two basic types of data storage and access used in Autodyn depending on whether you are using the IJK based or Unstructured solvers These are described in the sections 3 5 1 JK Solvers 3 5 2 Unstructured Solvers Elements 3 5 3 Notes About Autodyn Variables 3 5 1 IJK Solvers For the IJK based solvers Lagrange ALE Shell Beam Euler E
20. 9 VARO9 X X X X X User defined vari able 9 VAR 10 VARO10 X X X X X User defined vari able 10 VAR 11 VARO11 X X X X X User defined vari able 11 VAR 12 VARO12 X X X X X User defined vari able 12 VAR 13 VARO13 X X X X X User defined vari able 13 VAR 14 VARO14 X X X X X User defined vari able 14 VAR 15 VARO15 X X X X X User defined vari able 15 VAR 16 VARO16 X X X X X User defined vari able 16 VAR 17 VARO17 X X X X X User defined vari able 17 VAR 18 VARO18 X X X X X User defined vari able 18 82 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Notes Internal Euler Euler Description Array Godun4FCT VARO19 User defined vari able 19 VARO20 User defined vari able 20 TEMPxx Not available The index value for a given grid variable is Nname where name is the internal variable name For ex ample if you wanted the index for x velocity UXN it would be NUXN This index could then be used in the various Autodyn functions for example GV NUXN UK 6 3 Notes A ALPHA is a material model dependent variable which can have the following meanings for the specified material models JWL Burn fraction Porous Compaction defined as current density solid density Tillotson Current phase of material Puff Current phase of material See
21. Guinan Strength Model erts eet eet eo RU pend GP eh rU 47 5 12 5 Cowper Symonds Strength Model 4 4 eterne an hn ek eR eR E DEREN ERR V EA e ei uu 47 5 12 6 Piecewise Linear Strength Model 15 5 aperto prit mereri antra locii Ru Ra P ERE Xen RR 48 5 12 7 Johnson Holmquist Strength Model i adsiecdervase ptra e tuta dn denas d Neve lp trat 48 5 12 8 RHT Concrete Strength Modeb odas tae tedo eder etoile eda tep el deu RI pe metr e te 48 5 12 9 Orthotropic Yield Strength Model tit or o CORP RD END RE UNDO SPEEUG T ER NON TUR 49 5 13 Cr shable Foam IsotropiC e treu RE RITE ERE EHE E EGRE INNER eae TU et 49 5 14 Failure Model Variabl s 5 nitet retinet tee etta erneute e ee Ra D e eh nte eei taadedelonds 49 5 14 1 Hydro PMIN Failure Model cceceesssscccccceeessessnececeeeeceeeeenseeeeeeeeeeeseessnaseeeeeeeeseeessnaeeeeeees 49 5 14 2 Directional Failure Model ccccccccceessssssnceceeeeessseesnneceeeeceeseeessaeeeeeeeeseeecsnaaaeeeeeseeeeeeenaees 50 5 14 3 Cumulative Failure Model ccccccccsseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeess 50 5 14 4 Johnson Holmquist Damage Modell eire rra E resa ripa dita eda ete o rap 50 5 T4 S RHT Damage Model 55355 dried oa tob iste lo n DURER o SETO o manna Y REESE ep E RENE 50 5 14 6 Orthotropic Softening Model hte eu ven Rea peel S ER HAB Cre dons rr RR 51 5 15 MDGRID Autodyn 2D Grid Variable Defin
22. IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 11 Writing Your Own User Subroutines Where NUXN is the pointer index for the X velocity array GV3 is an Autodyn 3D function which retrieves the specified variable value from the current Part the equivalent Autodyn 2D function is simply GV The various Autodyn functions such as IJKSET3 and GV3 are described in detail in Autodyn Utility Functions Subroutines p 18 Normally the direct reference approach is recommended This works best when there is a current Part NSUB see Timing of Calls to User Subroutines p 15 For references to Parts other than current use of the functions is recommended In the Euler Godunov processor in 3D the access to the dynamic memory management is slightly dif ferent than the other processors While the function GV3 can be called as described before the direct access method uses Fortran90 pointers Thus to reference the x velocity for a 3D Euler Godunov cell Direct XVEL MTSUB IJK V NNUXN The variable NNUXN is contained in the module mdgrid3 Any specific Euler Godunov variable index is defined by NNname where name is the Autodyn 3D internal variable name see Autodyn 3D Structured IJK Solvers p 74 3 5 2 Unstructured Solvers Elements For the unstructured solvers variables associated with nodes and elements can be accessed and stored using speci
23. LIMPPD KKSPAT 5 17 MDPP Parallel Calculation Variables The module MDPP contains variables relating to the execution of parallel simulations IFPP 1 if Autodyn is running in parallel Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 59 Autodyn User Subroutine Modules MYTASK Slave task number 0 is master process 5 18 MDSOLV Unstructured Entity Types MODULE MDSOLV USE mdvar_all IMPLICIT NONE THIS MODULE CONTAINS SOLVER DATA FOR EACH PART COMMON FLAGS NTEGER INT4 PARAMETER ISF_SOLVER 1 NODE TYPES NTEGER INT4 PARAMETER NDTYPE_BASIC 1 NTEGER INT4 PARAMETER NDTYPE_3DOF 2 NTEGER INT4 PARAMETER NDTYPE_6DOF_SHELL 3 NTEGER INT4 PARAMETER NDTYPE_6DOF_BEAM 4 NTEGER INT4 PARAMETER NDTYPE_6DOF_SHELL_BEAM 5 NTEGER INT4 PARAMETER NDTYPE_3DOF_ANP 6 NTEGER INT4 PARAMETER NDTYPE_6DOF_ANP 7 NTEGER INT4 PARAMETER NDTYPE_ORIENT_BEAM 80 NTEGER INT4 PARAMETER NDTYPE_EXTERNAL 99 NTEGER INT4 PARAMETER NDTYPE_ALL 100 ALL ELEMENTS FOR PRE PROCESSING NTEGER INT4 PARAMETER ELTYPE BASIC 99 SOLID ELEMENT TYPES NTEGER INT4 PARAMETER ELTYPE_HEX8 100 NTEGER INT4 PARAMETER ELTYPE_HEX8FE 101 NTEGER INT4 PARAMETER ELTYPE_PENTA6 102 NTEGER INT4 PARAMETER ELTYP
24. MODULE PROCEDURE MEMDEALLOC MICARRAY POINTER3 END INTERFACE INTEGER INT4 DIMENSION POINTER MVAR MTS TYPE MULTI MATERIAL POINTERS DIMENSION LIMSUB MTGRID MTTEMP TYPE MULTI ARRAY 3D DIMENSION POINTER MTSUB REAL REAL8 DIMENSION POINTER ML MLX TYPE REAL ARRAY2 POINTER DIMENSION LIMMLV CMLT MULTIMATERIAL VARIABLES STORED FOR EACH MAT IN ZONE 1 CVF RELATIVE VOLUME 2 CMS MASS 3 CEN 4 CMU RHO RHOREF 1 5 CTP TEMPERATURE 6 CAL GBP 8 CDM DAMAGE 9 CPS 10 CCC C ZERO 11 CSS S 12 CSN STORED IN MTGRID NSUB MTS IJK V NNMZVR 1 9 INTEGER PARAMETER NCVF 1 NCMS 2 NCEN 3 INTEGER PARAMETER NCTP 5 NCAL 6 NCBF 7 INTEGER PARAMETER NCPS 9 NCCC 10 NCSS 11 ZONAL VARIABLES DEFINED FOR NON VOID ZONES ENERGY REACTION RATE PLASTIC STRAIN PLASTIC STRAIN NCMU 4 NCDM 8 NCSN 12 NNVOLN NOFMV NVOLN ETC NOFMV DEFINED IN INIT NTEGER INT4 NNUXN NNUYN NNUZN NTEGER INT4 NNVOLN NNPN NNPLWK NNDEN NTEGER INT4 NNEPSD NNEFS NNSSPD NNDIV NTEGER INT4 NNTXX NNTYY NNTZZ NNTXY NTEGER INT4 NNTYZ NNTZX NNIVM NNYLD NTEGER INT4 NNEXXD NNEYYD NNEZZD NTEGER INT4 NNEXYD NNEYZD NNEZXD NNVOID NTEGER INT4 NNSLP1 NNDPDX NNDPDY NNDPDZ NTEGER INT4 NNDRDX NNDRDY NNDRDZ NTEGER INT4 NNUXDX NNUXDY NNUXDZ NTEGER INT4 NNUYDX NNUYDY NNUYDZ NTEGER INT4 NNUZD
25. PARAMETER NTEMP25 NSTRT 25 NTEMP26 NSTRT 26 NTEGER PARAMETER NTEMP27 NSTRT 27 NTEMP28 NSTRT 28 NTEGER PARAMETER NTEMP29 NSTRT 29 NTEMP30 NSTRT 30 NTEGER PARAMETER NTEMP31 NSTRT 31 NTEMP32 NSTRT 32 NTEGER PARAMETER NTEMP33 NSTRT 33 NTEGER INT4 NTTAL 0 NBLAL 0 NBLRL 0 NNALL 0 NMTPAR 0 LIST OF EUL ZONE VARIABLES DEFINED IN GRID NTEGER INT4 NGDVAR 0 NTEGER DIMENSION LIMVAR LGDVAR LIST OF TEMP EUL ZONE VARIABLES DEFINED FOR NON VOID ZONES NTEGER INT4 PARAMETER NVRNVZ 14 NTEGER DIMENSION NVRNVZ LVRNVZ IL IL NTEMPO1 NTEMP14 REAL REAL8 DIMENSION POINTER XN YN ZN UXN REAL REAL8 DIMENSION POINTER UYN UZN FX FY REAL REAL8 DIMENSION POINTER FZ PMASS BMAREA VOLN REAL REAL8 DIMENSION POINTER PN Q PLWK DEN REAL REAL8 DIMENSION POINTER EPSDOT EFS SSPD DIV REAL REAL8 DIMENSION POINTER T1 322 T33 TXX REAL REAL8 DIMENSION POINTER TYY TZ TXY TYZ REAL REAL8 DIMENSION POINTER TZX TVM YIELD EXXD REAL REAL8 DIMENSION POINTER EYYD EZZD EXYD EYZD REAL REAL8 DIMENSION POINTER EZXD WXN WYN WZN REAL REAL8 DIMENSION POINTER RIl1l RI22 RI33 VOID REAL REAL8 DIMENSION POINTER DPDX DPDY DPDZ DRDX REAL REAL8 DIMENSION POINTER DRDY DRDZ DUXDX DUXDY REAL REAL8 DIMENSION POINTER DUXDZ DUYDX DUYDY DUYDZ REAL REAL8 DI
26. UNCOMMENT THE NEXT LINE TO USE OLD V4 3 USER SUBROUITNE CALL EXEROD2 ISTAT RETURN END SUBROUTINE S USE USE USE USE USE USE USE USE SUBROUT material ero user mdgrid3 wrapup mdvar al mdstring mdsolv cycvar NE SOLVE_ERO_USER_1_2D OLVE_ERO_USER_1_3D ISTAT E T IMPLICIT NONE INTEGER INT4 ISTAT N ELTYPE NBS_TET_HGMODEL INTEGER INT4 LOCMAT INTEGER INT4 IDNODEEPS INTEGER INT4 DIMENSION 4 NODENM MATLOCL 102 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Unstructured Element Data Access 100 RE RE Is IF AL REAL8 PUSOELEM_EPS ELEM_EPS TET_HG_COEFF AL REAL8 DIMENSION 4 NODEEPS KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK H HIS IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO ERODE THE URRENT CELL ACCORDING TO ANY CRITERIA THE USER DECIDES Q OUTPUT PARAMETER ISTAT EROSION SWITCH ASSIGN TO NON ZERO TO ERODE THE CURRENT CELL IN ADDITION TO THE FORMAL PARAMETERS MODULE MATDEF CONTAINS THE FOLLOWING INFORMATION MATNO THE MATERIAL NUMBER OF THE MATERIAL BEING PROCESSED MTL NAME THE MATERIAL NAME OF THE MATERIAL BEING PROCESSED AN EXAMPLE OF USING USER EROSION WITH NBS TETRAHEDRA CAN BE FOUND IN THE APPENDIX OF THE USER SUBROUTINE MANUAL KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
27. X direction DUZDY DUZDY Cell Z velocity slope in Y direction DUZDZ DUZDZ Cell Z velocity slope in Z direction STRAIN 1 STN1 Ele Ele Total strain 1 ment ment STRAIN 2 STN2 Ele Total strain 2 ment STRAIN 12 STN12 Ele Total strain 12 ment STRESS 1 STRS1 Ele Ele Total stress 1 ment ment STRESS 2 STRS2 Ele Total stress 2 ment STRESS 12 STRS12 Ele Total stress 12 ment Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 77 Autodyn Variable Listings Internal Array Description STR RES 2 SRES1 SRES2 Stress resultant in direction 1 Stress resultant in direction 2 BEND MOM 1 BMOM1 Bending moment in direction 1 BEND MOM 2 BMOM2 Bending moment in direction 2 BEND MOM 12 BMOM12 Bending moment in direction 12 THICK Thickness of shell DIRNX Particle Principal direction x Ortho and direc tional failure Particle Particle Principal direction y Ortho and direc tional failure Principal direction z Ortho and direc tional failure T12 Particle Stress 12 T23 Particle Stress 23 T31 Particle Stress 31 STN11 Particle Strain 11 STN22 STN22 Particle Strain 22 STN33 STN33 Particle Strain 33 STN12V STN12V Particle Strain 12 STN23 STN
28. YS 1 PLASTIC STRAIN GREATER THAN EP 3 ELSE IF EPST gt EP 3 THEN YIELDT YS 3 INTERPOLATE YIELD STRESS FROM YP VS EP CURVE ELSE DONS 233 IF EPST EP I THEN IM I 1 YIELDT YS IM YS I YS IM EPST EP IM EP I EP IM EXIT END IF END DO END IF 900 RETURN END SUBROUTINE SOLVE STR USER 1 2D SUBROUTINE SOLVE STR USER 1 3D PRES TT1 TT2 TT3 XMUT EPST EPSD TEMPT DAMAGE YIELDT IFAIL USE material USE str user 1 USE cycvar USE edtdef USE ijknow USE wrapup USE mdgrid3 IMPLICIT NONE INTEGER INT1 IFAIL INTEGER INT4 IJK REAL REAL8 EPSD EPST PRES TEMPT TTi TT2 REAL REAL8 S TT3 XMUT YIELDT DAMAGE CK Ck Ck Ck Ck Ck Ck kk kk ck kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk kk kk ko Sk ko kk ko Sk ko kk ko ko ko KKK KK KK THIS IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO COMPUTE HE YIELD STRESS FOR A MATERIAL H INPUT PARAMETER PRES PRESSURE Tnn PRINCIPAL STRESSES XMUT COMPRESSION EPST EFFECTIVE PLASTIC STRAIN EPSD EFFECTIVE PLASTIC STRAIN RATE TEMP TEMPERATURE DAMAGE DAMAGE IFAIL STRESS STATE INDICATOR 0 HYDRO 1 ELASTIC 2 PLASTIC 3 BULK FAILURE WITH HEAL 4 BULK FAILURE NO HEAL OUTPUT PARAMETERS YIELDT YIELD STRESS FOR CURRENT MATERIAL IFAIL STRESS STATE INDICATOR SEE ABOVE THE FOLLOWING MODULES CONTAIN INFORMATION WHICH MAY BE USEFUL FOR COMPUTING THE OU
29. and confidential information 6 of ANSYS Inc and its subsidiaries and affiliates 1 771e 01 1 181e 01 5 903e 02 0 000e 00 user_strength_example Cycle 600 Time 5 474E 001 ps Units cm g us H x Axial symmetry USER SUBROUTINE TUTORIAL EXAMPLE NO 1 Gauge History Ident 0 user_strength_example 0 6 EFF PL STN eo Co o TIME ps Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Chapter 3 Writing Your Own User Subroutines There are no absolute rules for writing your own user subroutines What we will do here is to outline some of the techniques that may be used and the tools that are available to help create user subroutines If we look at the examples given in User Subroutine Examples p 87 we will see some of the common techniques and tools used to create user subroutines These include Formal parameters passed to and from the user subroutine Accessing global variables in the Autodyn modules for example time material data cycle number and so on Accessing Part grid variables for example pressure density velocity and so on Calling Autodyn utility functions subroutines Terminating execution from a user subrou
30. buttons may not display correctly when running a customized version of Autodyn If the user observes this behavior moving the user subroutine folder to a location with a shorter pathname will resolve the issue Once the solution is loaded into the development environment changes to the user subroutine files can be made and the release and debug customized Autodyn versions can be compiled In order to run your customized Autodyn version from within Workbench you should set the preferences within Workbench as follows Right click on Autodyn system s Setup cell and from the drop down menu that appears choose Select User Executable Navigate to the user compiled executable you wish to use for this Autodyn system To deselect your own user executable and to run the standard Autodyn release version again right click the Setup cell of the Autodyn system and from the drop down menu that appears choose Remove user executable Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 25 Compiling and Running Your User Subroutines 1 AD AUTODYN Transfer Data From New Update Transfer Data From New Update Rename Properties Properties You can confirm which executable will be used for a given Autodyn system by right click on the system Setup cell and select Properties Properties of Schematic A2 Setup m Solver
31. ee eee ee ee ee e A ck ee eee eee k k k k eee ck k k k k k k k ck ckck ck ck k k k THIS SUBROUTINE ATTAINS MAXIMUM MOMENTUM FOR EACH CELL 3D VAR01 ARRAY STORING MAXIMUM MOMENTUM VARO2 ARRAY STORING TIME WHEN MAXIMUM MOMENTUM OCCURS KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK INITIALIZATION OF ARRAYS CYCLE 1 THEN OVER ALL PARTS 1 NUMSUB NS GETSUB3 P OVER ALL CELLS 1 IMAX 1 JMAX 1 KMAX IJKSET3 I J K O1 IJK BIG 02 IJK BIG 96 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates T3 F90 used to store the maximum momentum Unstructured Element Data Access ENDDO END DO END DO END DO END LOOP ON PARTS END IF GET MAXIMUM MOMENTUM LOOP OVER ALL PARTS IF NCYCLE 1 THEN DO NS 1 NUMSUB NSUB NS CALL GETSUB3 LOOP OVER ALL CELLS DO I 1 IMAX DO J 1 JMAX DO K 1 KMAX GET MAXIMUM MOMENTUM FOR EACH CELL IJK IJKSET3 I J K SET UP POINTER TO MULTI MATERIAL ARRAYS ML gt MTSUB IJK V 1 NUMMLV MASS ML NCMS RES VEL SORT UXN IJK UXN IJK amp UYN IJK UYN IJK amp UZN IJK UZN IJK MOM MASS RES VEL IF MOM gt VARO1 IJK THEN VARO1 IJK MOM VARO2 IJK TIME END IF END DO END DO END DO END LOOP ON PARTS END DO END IF RETURN END SUBROUTINE EXEDIT 7 6 Unstructured Element Data A
32. eye c e ee e tear e hr nte ne dee ee Ee nne heb esee 9 3 3 Formal Palam etel SA d ccce e ie par t polar bo eoi dorsa added dea RD vn dado do ee eiu 10 3 4 Autodyn Modules Non Parameter Data cesses eee nnne 10 3 5 Autodyn Variables spear APRES exp ER a EUH S ERN EARNED ARR RACER SR IR Fe HORS UR 11 SS eK rel cc EE 11 3 5 2 Unstructured Solvers Elements saca veas coh e me eR EVEN R RR RQU IR SIN ERE NC ACTOR Ron CIE 12 3 5 3 Notes About Autodyn Vartables u cocco o eor rr oo YER EU n AUR Ubi ehe ab e 13 3 6 Accessing Multiple Material Data All IJK Solvers ssseeeeeeeeeeeeeenn nene 13 3 7 Material Modeling User Subroutines suis oos doxes eri rim pa gremios genio niea qna gu gU reu a 14 3 8 Timing of Calls to User Subroutines sessssssssssssseeseeeeeeeeeeennne nennen nennen nennen nennen eene 15 3 9 Autodyn Utility Functions SUBrOUtin s seio eir ovans cotra sd c s diy ees Ley dr pd 18 3 10 Terminating Execution from a User Subroutine eese eene eene eene enne 23 3 11 How to Determine the Part Number from the Part Name ssccccccccsssessssteeeeeeeceeseessneeeeeeeeeeeees 23 12 Variables Available through E90 MOGSUGS scr la nen rm ERR n Ee Er hr PX a EROR 24 4 Compiling and Running Your User Subroutines seeesseeeeeeeeeeeeeene nennen nnne 25 4 1 Compiling Debugging and Running your Customized Autodyn Version on Microsoft Windows
33. index of the current element will be available via USE mdstring Index elem ELEM NOW For other cases there are a number of ways in which one can obtain the internal index for an element for example direct access looping over Parts looping over a Group Examples of various types of ele ment node access are given by example in Unstructured Element Data Access p 97 3 6 Accessing Multiple Material Data All IJK Solvers Depending upon the Autodyn processor solver being used it is possible for a single cell element to contain more than one type of material This is primarily applicable to Euler and Euler Godunov pro cessors In Autodyn 2D for multiple material cells the standard cell values of compression internal energy temperature and alpha are mass weighted averages of multiple material values In Autodyn 3D plotting options allow you to plot multiple material values for a specific material or for mass weighted values as in 2D Normally if you wish to access the individual cell values of these variables for each material in the cell you must make the following subroutine call CALL GETMLT IJK 0 or GETMLT3 IJK 0 Where IJK is the index of the cell After the call is made the cell variables may be accessed according to the following table Multi material variable Internal Array ML Index Material volume fraction CVF 1 matno NCVF Material mass CMS 1 matno NCMS Material compression CMU 1 matno
34. material would subsequently be available as MTL NAME 5 11 Equation of State EOS Variables The following types of Equation of State variables can be accessed 5 11 1 Linear EOS 5 11 2 Polynomial EOS 5 11 3 Ideal Gas EOS 5 11 4 Shock EOS 5 11 5 JWL EOS 5 11 6 Tillotson EOS 5 11 7 PUFF EOS 5 11 8 Porous EOS 5 11 9 Orthotropic EOS 5 11 10 Two Phase EOS 5 11 11 Lee Tarver EOS 5 11 12 P a EOS 5 11 13 Rigid EOS 5 11 1 Linear EOS To access local data USE matdef ID Al parameter in linear EOS bulk modulus 5 11 2 Polynomial EOS To access local data USE matdef USE eos polynomial Ai parameters in polynomial EOS Bi parameters Ti parameters 5 11 3 Ideal Gas EOS To access local data USE eos_idealgas GAMMA Ideal gas constant gamma GMCON Adiabatic constant Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 41 Autodyn User Subroutine Modules 5 11 4 Shock EOS To access local data USE matdef USE eos_shock C1 parameter in shock EOS 1 parameter Gruneisen gamma VE relative volume VB relative volume C2 parameter 2 parameter 5 11 5 JWL EOS To access local data USE eos_jwl Chapman Jouguet C J energy unit volume in JWL EOS A parameter B parameter R1 parameter R2 parameter W parameter C J
35. ment plastic strain D E E P S RATE EPSDOT Cell Ele Cell Particle Ele Effective plastic C ment ment strain rate EFFECT STN EFS Cell Ele Cell Particle Ele Effective strain C ment ment SOUNDSPEED SSPD Cell Ele Cell Cell Particle Cell Local sound speed ment DIVERGENCE DIV Cell Cell Particle Divergence ALPHA CAL Cell Cell Cell Particle Material Alpha D E P STRESS 1 T11 Cell Particle Total principal stress 1 P STRESS 2 T22 Cell Particle Total principal stress 2 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 75 Autodyn Variable Listings Autodyn Internal Euler Euler Description Output Array Godun4FCT Name ov P STRESS 3 T33 Particle Total principal stress 3 STRESS TXX Particle Total stress tensor XX component STRESS TYY Particle Total stress tensor YY component STRESS TZZ Particle Total stress tensor ZZ component STRESS TXY Particle Total stress tensor XY component STRESS TYZ Particle Total stress tensor YZ component STRESS TZX Particle Total stress tensor ZX component MIS STRESS Particle Von Mises stress YLD STRESS YIELD Cell Ele Cell Particle Ele Current yield stress ment ment EXXDOT EXXD Cell Cell Particle Total strain rate XX component EYYDOT EYYD Cell Cell Pa
36. polgon USE kindef IMPLICIT NONE SAVE INTEGER PARAMETER INTEGER INT4 INTEGER INT4 LIMPOL 100 LIMPPT 4000 LIMINB 100 NUMPOL NPOLY NSPOLY IFBLEN NUMINB NINB IFEULC IFFCTC IFGODC INTEGER INT4 INTEGER INT4 INTEGER INT4 DIMENSION LIMPOL DIMENSION LIMPPT DIMENSION LIMINB 2 NBPOL NUMPPT INTPOL IVRPOL IPOL JPOL MPOL INBVAR REAL REAL8 DIMENSION LIMPOL PVPOR REAL REAL8 DIMENSION LIMPPT TARGET XPOL YPOL REAL REAL8 DIMENSION LIMINB VARINB CHARACTER LEN 10 DIMENSION LIMPOL CHARACTER LEN 10 DIMENSION LIMINB END MODULE polgon NAMPOL NAMINB LIMPOL not available LIMPPT not available LIMINBLIMINB not available NUMPOLNUMPOL not available Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 61 Autodyn User Subroutine Modules not available not available IFBLEN not available NBPOL not available NUMPPT not available INTPOLINTPOL not available not available not available not available not available not available not available not available Polygon points X array Polygon points Y array not available Polygon porosity array Polygon name array Eul Lag boundary name array 5 20 RUNDEF Run Variable Definitions Module rundef contains several run vari
37. so on for current Part Maximum l index for current Part Maximum J index for current Part Not used in 2D Number of sublayers shell Parts Material location shell Parts IMAX 1 JMAX 1 I line spacing ratio ALE Parts J line spacing ratio ALE Parts Relaxation coefficient ALE Parts Limit on number of Parts Number of Parts in problem Number of Euler Parts in problem Current data page Processor types for Parts Maximum index for Parts Maximum J index for Parts Base addresses for Parts Order of printout for each Part Index ranges for Part prints IEPRT Index ranges for Part prints JBPRT Index ranges for Part prints JEPRT Index ranges for Part prints XSUBMN X Y ranges for Parts YSUBMN X Y ranges for Parts XSUBMX X Y ranges for Parts YSUBMX X Y ranges for Parts USUBMX Maximum velocity in Part ASUBMX Maximum cell area in Part VARSB1 not available VARSB2 not available VARSB3 not available Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 64 of ANSYS Inc and its subsidiaries and affiliates SUBDEF Global Part Variable Definitions ACTIME Activity times array by Part NAMSUB Part names Indicates if Part is newly created Total energy Total work Total X impulse Total Y impulse Total hoop impu
38. subroutines are invoked in Autodyn we will look at a specific example Most user subroutines require a specification of user for a particular input specification However some user sub routines are always called as discussed in Timing of Calls to User Subroutines p 15 Tantalum Bar Example Start Autodyn on your computer and from the main menu load cycle zero of the problem user_strength_example_0 ad found in the folder ANSYS Inc v150 aisol Samples AUTODYN Use the options on the Plots menu to see the material locations and boundary conditions for the problem You will see that the problem consists of a tantalum cylinder impacting a rigid wall File Import Setup Execution View Options Help 2 ea 8s 25 ta a amp 9 men elk e E o s i E 0 View 2 Plots z Plots Select Parts Cycle 0 5 History mins Select plot type for selected part s Fill type I i lv iv v iv IsList tsis Additional components Vectors Boundaries Joins Gauges Detonation Eroded nodes Unused regions Axes Polygons Gid Beam sections Shel thickness Profile Legend Mat direction Marker Shel normals Node Element Scale Part Highlight lv view Wi iwvvvvviiviv 7 a user_strength_example L plane x 0 Fa Cycle 0 ita B Time 0 000E 000 ps ig Maternal locator v Units cm g ps IL oo deg Axial symmetry USER SUBROUTINE TUTORIAL EXAMPLE NO 1 Extrude 1 000000 ied
39. to the current Part Function IJKSETL I J K can also be used with the same effect FUNCTION USET 2D only Usage IJSET I J Purpose Gets the IJ index of node zone I J relative to the current Part FUNCTION IJKSETS3 3D only Usage IJKSETS3 IJ K N Purpose Gets the IJK index of node zone I J K relative to all Parts where N is the Part number in order of definition starting with 1 See How to Determine the Part Number from the Part Name p 23 for example of how to obtain Part number from a Part name FUNCTION IJSETS 2D only Usage IJ SETS N I J Purpose Gets the IJ index of node zone I J relative to all Parts where N is the Part number in order of definition starting with 1 See How to Determine the Part Number from the Part Name p 23 for example of how to obtain Part number from a Part name SUBROUTINE IJANDK3 inverse of IJKSET 3D only Usage CALL IJANDK3 UKIN I J K UKIN is input I J and K are output Purpose Gets the I J and K indices for IJK relative to the current Part Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 18 of ANSYS Inc and its subsidiaries and affiliates Autodyn Utility Functions Subroutines SUBROUTINE IANDJ inverse of IJSET 2D only Usage CALL IANDJ UIN LJ IJIN is input 7 and J are output Purpose Gets the 7 and J indices for IJ relative to the current Part SUBROUTINE IJANDKS
40. variables see Autodyn Variable Listings p 69 MODULE mdgrid3 USE kindef Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 53 Autodyn User Subroutine Modules USE USE USE USE USE USE USE USE USE USE USE USE memory cycvar gloopt ijknow subdef mltmat3 microz3 prodef3 euldef eulmem verdef fctshl IMPLICIT NONE SAVE CHARACTER LEN 1 DIMENSION LIMSUB LIMVAR TARGET IDRVAR CHARACTER LEN 1 DIMENSION LIMSUB LIMIVR TARGET IDIVAR CHARACTER LEN 1 DIMENSION LIMSUB TARGET IZONE TMP NTEGER INT1 DIMENSION 1 TARGET APSNL 99 NTEGER INT1 DIMENSION 1 1 1 TARGET AP3NL 99 NTEGER INT4 DIMENSION 1 TARGET APNUL 999999 NTEGER INT4 DIMENSION 1 1 TARGET AP2NL 999999 REAL REALS8 DIMENSION 1 TARGET RAPNUL 999999 0 TYPE JOIN POINTERS DIMENSION LIMSUB JNGRID JNTEMP TYPE INTEGER ARRAY POINTER DIMENSION POINTER JNSUB TYPE INTEGER ARRAY POINTER DIMENSION 1 TARGET JNNUL TYPE WET PAR REAL REAL8 DIMENSION 6 FR REAL REAL8 SC REAL REAL8 DIMENSION 3 GD INTEGER INT1 M1 M2 END TYPE WET PAR TYPE SCPT REAL REAL8 POINTER PT END TYPE SCPT TYPE TRANS VAR INTEGER INT1 NMP INTEGER INT4 DIMENSION POINTER MT REAL REAL8 DIMENSION POINTER VR REAL REAL8 DIMENSION POINTER VTR1 REAL REAL8 DIMENSION POINTER VTR2 REAL REA
41. wrapup Wrapup switch Energy reference cycle Time limit for wrapup Energy fraction for wrapup index for degenerate cell on wrapup J index for degenerate cell on wrapup Not used for 2D Part number for degenerate cell on wrapup 5 23 OBJECT SPH Object Definitions Module object contains data pertaining to SPH objects that are used for initializing the model MODULE object USE kindef MPLICIT NONE SAVE NTEGER PARAMETER LIMOBJ 100 NTEGER PARAMETER LIMPTS 112 NTEGER PARAMETER LIMOBC 6 NTEGER PARAMETER LIMSET 100 NTEGER PARAMETER LIMSPH 500000 NTEGER INT4 NUMOBJ NTEGER INT4 DIMENSION LIMOBJ NOBJC NOBJT NOBJP NOBJS NTEGER INT4 DIMENSION LIMOBJ NSPHOB MATOBJ IFACOB MATSET NTEGER INT4 DIMENSION LIMOBJ NTRIOB OBJBND NTEGER INT4 NOBJ NOBTYP NOBCOL MAXOB MAXSET NUMSET NTEGER INT4 OSIM REAL REAL8 DIMENSION LIMOBJ ACTOBJ DCTOBJ REAL REAL8 DIMENSION LIMOBJ OBJA RPSZOB REAL REAL8 DIMENSION LIMOBJ 3 OBJO OBJN REAL REAL8 DIMENSION LIMOBJ 10 OBJS REAL REAL8 DIMENSION LIMOBJ LIMPTS XOBJ YOBJ ZOBJ REAL REAL8 DIMENSION LIMSET UXNOBJ UYNOBJ UZNOBJ REAL REAL8 DIMENSION LIMSET URNOBJ RHOOBJ ENOBJ REAL REAL8 XORG YORG ZORG XSIZ YSIZ ZSIZ RSIZ THETA THETAO REAL REAL8 XDIRN YDIRN ZDIRN ANGOBJ ROUT1 RIN1 ROUT2 RIN2 REAL REAL8 ROUT1Y
42. 0 NTEGER PARAMETER NBMLENZ 91 NSPARE2 92 NRJJ 93 NTEGER PARAMETER NFAXI 94 NFTOR 95 NBMOMYI 96 NTEGER PARAMETER NBMOMYJ 97 NBMOMZI 98 NBMOMZJ 99 NTEGER PARAMETER NBBV11 100 NBBV12 101 NBBV13 102 NTEGER PARAMETER NBBV21 103 NBBV22 104 NBBV23 105 NTEGER PARAMETER NBBV31 106 NBBV32 107 NBBV33 108 NTEGER PARAMETER NEBV11 109 NEBV12 110 NEBV13 111 NTEGER PARAMETER NEBV21 112 NEBV22 113 NEBV23 114 NTEGER PARAMETER NEBV31 115 NEBV32 116 NEBV33 117 NTEGER PARAMETER NVARO1 118 NVARO2 119 NVARO3 120 NTEGER PARAMETER NVARO4 121 NVARO5 122 NVARO6 123 NTEGER PARAMETER NVARO7 124 NVARO8 125 NVARO9 126 NTEGER PARAMETER NVAR10 127 NVARI11 128 NVAR12 129 NTEGER PARAMETER NVAR13 130 NVAR14 131 NVAR15 132 NTEGER PARAMETER NVAR16 133 NVAR17 134 NVAR18 135 NTEGER PARAMETER NVAR19 136 NVAR20 137 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 57 Autodyn User Subroutine Modules NTEGER PARAMETER NSML 138 NDENNM1 139 NRNON 140 NTEGER PARAMETER NVORX 141 NVORY 142 NVORZ 143 NTEGER PARAMETER NHOMI 144 NHQM2 145 NHQB1 146 NTEGER PARAMETER NHQB2 147 NHQB3 148 NFCOVRI 149 NTEGER PARAMETER NFCOVRJ 150 N
43. 100 Copies the data from main storage into local vector RVL real data IVL integer data accessible via USE mdvar all To find the index of the variable in these vectors see Autodyn Variable Listings p 69 See also Un structured Solvers Elements p 12 for more information SUBROUTINE PUT NODE VAR Usage CALL PUT NODE VAR INDEX NODE INDEX MATERIAL Purpose INDEX NODE is the current global node number which can be retrieved via ELEM NOW see Access to Nodal Variables for NBS Tetrahedral Elements p 100 TNDEX MATERIAL is normally set to either 0 or 1 For NBS nodes this indicates the material that is being referred to on this specific node see the example Access to Nodal Variables for NBS Tetrahedral Elements p 100 Copies the data to main storage from local vector RVL real data IVL integer data accessible via USE mdvar all To find the index of the variable in these vectors see Autodyn Variable Listings p 69 See also Unstructured Solvers Elements p 12 for more information Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 21 Writing Your Own User Subroutines SUBROUTINE GETMLT Usage CALL GETMLT IK O GETMLT3 UK O Purpose Gets the individual cell values of the multi material variables for each material in the cell for the node IJK See Accessing Multiple Material Data All IJK Solv
44. 23 Particle Strain 23 STN31 STN31 Particle Strain 31 RIJOIN RIJOIN join RJJOIN RJJOIN J join RKJOIN RKJOIN K join COSFI COSFI Rotation correction cosine SINFI SINFI Rotation correction sine PSANG PSANG Particle Principal angle BEAM AREA BMAREA Beam cross section al area 78 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Autodyn 3D Structured IJK Solvers Internal Array Description AXIAL FRC RJJ FAXI Beam 11 inertia Beam axial force TORT FRC FTOR Beam torsion mo ment B MOM YI BMOMYI Moment about 22 at node IJK 1 B MOM YJ BMOMY J Moment about 22 at node IJK B MOM ZI BMOMZI Moment about 33 at node IJK 1 B MOM ZJ BMOMZJ Moment about 33 at node IJK BOD B V 11 BBV11 Body base vector 1 component x BOD B V 12 BBV12 Node Node Body base vector 1 component y BOD B V 13 BBV13 Node Node Body base vector 1 component z BOD B V 21 BBV21 Node Node Body base vector 2 component x BOD B V 22 BBV22 Node Node Body base vector 2 component y BOD B V 23 BBV23 Node Node Body base vector 2 component z BOD B V 31 BBV31 Node Node Body base vector 3 component x BOD B V 32 BBV32
45. 3 inverse of IJKSETS 3D only Usage CALL IJANDKS3 UKSIN IJ K TZKSIN is input I J and K are output Purpose Gets the I J and K indices for IJK relative to the all Parts SUBROUTINE IANDJS inverse of IJSETS 2D only Usage CALL IANDJS JSIN I J M UKL I JS IN is input Z Z M and IJKL are output Purpose Gets the and J indices for IJK relative to the all Parts Also output is the Part number M and the local IJK for that Part FUNCTION GV Usage GV NV IJK GV3 NV IJK Purpose Gets the value of Part variable NV for the node IJK relative to current Part See modules mdgrid and mdgrid3 for a list of values for NV FUNCTION GVS Usage GVS NV UJKS GVS3 NV KS Purpose Gets the value of Part variable NV for the node rJKS relative to all Parts See module mdgrid for a list of values for NV SUBROUTINE PUTGVS Usage CALL PUTGVS NV JKS VALUE CALL PUTGVS3 NV UKS VALUE Purpose Puts stores the VALUE of Part variable NV for the node zone IUKS relative to all Parts in the dy namic storage arrays Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 19 Writing Your Own User Subroutines FUNCTION GETV3 3D only Usage GETV3 NV IJK MODE Purpose This is a general function that gets the variable NV for zone IJK for the current Part Depending on the value of MODE the foll
46. 8 DIMENSION POINTER TEMP29 TEMP30 TEMP31 TEMP32 REAL REAL8 DIMENSION POINTER TEMP33 REAL REAL8 DIMENSION POINTER GVAR GTVR UNIJK REAL REAL8 DIMENSION POINTER DVOL REAL REAL8 DIMENSION POINTER ULN DPDL DRDL REAL REAL8 DIMENSION POINTER DUXDL DUYDL DUZDL DULDL REAL REAL8 DIMENSION POINTER XPP YPP ZPP REAL REAL8 DIMENSION POINTER UXREL UYREL UZREL REAL REAL8 DIMENSION POINTER BX BY BZ REAL REAL8 DIMENSION POINTER EB11 EB12 EB13 EB21 EB22 EB23 REAL REAL8 DIMENSION POINTER EB31 EB32 EB33 REAL REAL8 DIMENSION POINTER CAREA CDIMT NTEGER INT4 PARAMETER LIMSBL 3 LIMSBT 100 LIMSHV 19 TYPE SHELL VAR TYPE REAL ARRAY POINTER DIMENSION POINTER P END TYPE TYPE SHELL VAR DIMENSION LIMSUB GRIDSH TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB LIMSBT NSMAT NSFAIL TYPE REAL ARRAY POINTER DIMENSION LIMSUB ZZTP HHTP REAL REAL8 DIMENSION POINTER ZZT HHT NTEGER PARAMETER LIMPPD 10 NTEGER INT4 NUMPPD NPPD CHARACTER LEN 8 DIMENSION LIMPPD NAMPPD NTEGER INT4 DIMENSION LIMSUB LIMPPD IPPD JPPD KPPD IPPBAS TYPE SMALL INTEGER ARRAY3 POINTER DIMENSION LIMSUB LIMPPD PPPROC TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB LIMPPD IISPAT TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB LIMPPD JJSPAT TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB
47. AL REAL8 PARAMETER TWO70 THREE NINE TEN REAL REAL8 PARAMETER THREE60 TWO ONE80 REAL REAL8 PARAMETER THRHUN THREE HUNDRED REAL REAL8 PARAMETER THOUSAND HUNDRED TEN REAL REAL8 PARAMETER TENTHOUS HUNDRED HUNDRED REAL REAL8 PARAMETER PI 3 14159265358979 real8 REAL REAL8 PARAMETER SMALL 1 0E 20 real18 REAL REAL8 PARAMETER BIG 1 01E20 real8 REAL REAL8 PARAMETER BIG2 TWO BIG REAL REAL8 PARAMETER UNDEF 1 01E11 real8 REAL REAL8 PARAMETER UNDEFP TWO UNDEF REAL REAL8 PARAMETER CUTOFF 1 0E 10 real8 REAL REAL8 PARAMETER COMP MAX 3 0 real8 REAL REAL8 PARAMETER K VOID 1 E 5 real8 REAL REAL8 PARAMETER HALF ONE TWO REAL REAL8 PARAMETER THIRD ONE THREE REAL REAL8 PARAMETER TWTHRD TWO THREE REAL REAL8 PARAMETER QUART ONE FOUR REAL REAL8 PARAMETER FIFTH ONE FIVE REAL REAL8 PARAMETER FRTHRD FOUR THREE REAL REAL8 PARAMETER SIXTH ONE SIX REAL REAL8 PARAMETER OVER7 ONE SEVEN REAL REAL8 PARAMETER OVER8 ONE EIGHT REAL REAL8 PARAMETER OVER9 ONE NINE REAL REAL8 PARAMETER TENTH ONE TEN REAL REAL8 PARAMETER ONEME ONE SMALL REAL REAL8 PARAMETER EPSCNV EPSPP2 END MODULE kindef 5 8 LOCELM Element Quantities Module locelm includes variables for the currently calculated cell Applicable to user subroutines types 3 and 5 MODU
48. AL8 DIMENSION TARGET TARGET TARGET MMC LIMMC LIMMC NTER END TYPE MICRO ARRAY 3D POINTER TER END TYPE MICROZONE_POINTERS_3D DIMENSION LIMSUB TYPE MICRO_ARRAY_3D POINTER POI POINT MAR DIMENSION MCCEL NTER ER POINTER ARRAY TO ALL STANDARD AND TEMPORARY CVF CMS CAL CBF CEG S87 GVARM TARGET TARGET IDRESM IDEXMM MAT UX UY POINTER CEN CMU CTP CDM CPS CSN IDHISM IDPRTM IDCONM IDREZM IDNOCM UZ RHO SIE MCR MCGRID POINTER ARRAY TO ALL STANDARD AND TEMPORARY SUBGRID SMALL INTEGER VARIABLES TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB LIMIVR 3 NPACK NTEGER PARAMETER KMT 1 KMN 2 KMS 3 KBX 4 KBY 5 NTEGER PARAMETER KBZ 6 KBI 7 KBJ 8 KBK 9 KRX 10 NTEGER PARAMETER KRY 11 KRZ 12 KNW 13 KAL 14 KED 15 NTEGER PARAMETER KIC 16 NTEGER PARAMETER K01 17 NTEGER PARAMETER K02 KO1 1 K03 K0142 K04 K0143 K05 KO1 4 NTEGER PARAMETER K06 K0145 K07 KO1 6 K08 K0147 K09 K0148 NTEGER PARAMETER K10 K0149 NTEGER INT1 DIMENSION POINTER NPKMT NPKMN NPKMS NPKBX NTEGER INT1 DIMENSION POINTER NPKBY NPKBZ NPKBI NPKBJ NTEGER INT1 DIMENSION POINTER NPKBK NPKRX NPKRY NPKRZ NTEGER INT1 DIMENSION POINTER NPKNW NPKAL NPKO1 NPK02 NTEGER INT1 DIMENSION POINTER NPK03 NPK04 NPK05 NPK06 NTEGER I
49. ANSYS Inc and its subsidiaries and affiliates 71 Autodyn Variable Listings Internal Lag Euler Shell Description Array ALE STR1 Hoop stress LONG STR STR2 Longitudinal stress STR RES 1 SRES1 Stress resultant in direction 1 STR RES 2 SRES2 Stress resultant in direction 2 BEND MOM 1 BMOM1 Bending moment in direction 1 BEND MOM 2 BMOM2 Bending moment in direction 2 TSHEAR Transverse shear THICK Thickness of shell SMOOTH LEN SML Particle SPH smoothing length VORTICITY VOR Particle SPH vorticity OLDDENSITY DENNM1 Particle Previous density for SPH CUTOFF RAD RCIT Particle SPH cutoff radius NO NEIGH RNON Particle Number of SPH neighbors ABS VEL ABSVEL Node Cell Node Cell Cell Particle Absolute velocity magnitude SOFT SLOPE HNORM Cell Particle Crack softening slope FAIL STRES TFAIL Cell Particle Crack softening failure stress DIL PRESS PDIL Cell Cell Cell Particle Johnson Holmquist dilatation press DIL ENERGY EDIL Cell Cell Cell Particle Johnson Holmquist dilatation energy EPSPRE EPSPRE Cell Cell Cell Particle RHT pre softening plastic strain FRATE FRATE Cell Cell Cell Particle RHT strain rate en hancement RTHIRD RTHIRD Cell Cell Cell Particle RHT lode angle FCAP FCAP Cell Cell Cell Particle RHT elastic cap factor Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential inf
50. ATYPE_INTERNAL 2 NTEGER INT4 PARAMETER FATYPE_PLOAD 3 NTEGER INT4 PARAMETER FATYPE_TRANSMIT 4 NTEGER INT4 PARAMETER FATYPE_BASIC 99 FACE TOPOLOGY AS IN OPT 2 OPT FC_SOPT_TRIAQUAD NTEGER INT4 PARAMETER FATYPE_PLOAD3 3 NTEGER INT4 PARAMETER FATYPE_PLOAD4 4 NTEGER INT4 PARAMETER FATYPE_PLOAD2 5 JOIN TYPES NTEGER INT4 PARAMETER JOINTYPE_BASIC 1 NTEGER INT4 PARAMETER JOINTYPE IJKUS 2 RIGID BODY TYPES NTEGER INT4 PARAMETER RBODTYPE MATRIG 1 NTEGER INT4 PARAMETER RBODTYPE_BASIC 99 NOT REALLY USED CLASSIFICATION FLAGS NTEGER INT4 PARAMETER CLASS_VOLUME 1 NTEGER INT4 PARAMETER CLASS_SHELL 2 NTEGER INT4 PARAMETER CLASS_BEAM 3 NTEGER INT4 PARAMETER CLASS_POINT 4 TOPOLOGY FLAGS NTEGER INT4 PARAMETER TOPO_NODE 1 NTEGER INT4 PARAMETER TOPO_LINE 2 NTEGER INT4 PARAMETER TOPO_TRI 3 NTEGER INT4 PARAMETER TOPO_QUAD 4 NTEGER INT4 PARAMETER TOPO_TET 5 NTEGER INT4 PARAMETER TOPO_PYRAMID 6 NTEGER INT4 PARAMETER TOPO_PENTA 8 NTEGER INT4 PARAMETER TOPO_HEX 9 TYPE SOLVER_DEF CHARACTER LEN 12 NAME INTEGER INT4 CLASS SOLID ELEM SHELL ELEM BEAM ELEM INTEGER INT4 TOPOLOGY HEX TET QUAD INTEGER INT1 DIMENSION NUM_RVAR_ALL AVAILABLE RVAR 1 AVAILABLE O NOT END TYPE 5 19 POLGON Polygon Variable Definitions Module polgon contains several polygon variables defined for the current problem MODULE
51. All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 87 User Subroutine Examples SUBROUTINE INIT_STR_USER_1 IFACT USE material USE str user 1 IMPLICIT NONE INTEGER INT4 IFACT CK Ck Ck Ck kk kk Ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ko kk ck kk kk kk ko kk kk ko kk kk kk ko Sk ko kk ko ko ko kckokckokokok THIS SUBROUTINE INITIALIZES ALLOCATES PARAMETERS AND DATA FLAG IMF STR USER 1 INPUT IFACT IFACT 0 JUST GET NAME OF EQUATION AND DEPENDANT FLAGS 1 EQUATION IS ACTIVE HENCE ALLOCATE CK Ck Ck Ck kk kk ck kk kk ck kk kk ck kk kk ko kk kk Sk kk kk ck kk kk ko kk kk Sk kk kk ko kk Sk ko kk ko Sk kc kk ko KKK KKK KKK DEFINE PARAMETERS TO ALLOW ALLOCATION EQSEQTYPE IMF STR USER 1 DO NOT MODIFY THIS LINE EQSNAME User Strength 41 EQSNPAR 7 NUMBER OF REAL INPUT PARAMETER MINIMUM OF 1 EQ SNUMOPT 0 NUMBER OF OPTION LISTS EQSNDEPFLG 0 NUMBER OF NON OPTIONAL DEPENDANT CHILD FLAGS MODEL OPTION IF IFACT 1 THEN CALL ALLOC_EQ DO NOT MODIFY THIS LINE ALLOCATES MEMORY FOR EACH REAL INPUT PARAMETER ASSIGN DATA name j L T M H val min max default 0 required EQSPAR 1 PRMT 1 Shear Modulus 1 2 1 0 ZERO ZERO BIG ZERO 0 1 THIS LINE MUST ALWAYS EXIST EQS PAR 2 PRMT 2 EPS 1 0 0 0 0 ZERO ZERO BIG ZERO 0 0 EQS PAR 3 PRMT 3 EPS 2 0 0O 0 0 ZERO ZERO BIG ZERO 10 0 E
52. B LIMVAR GRID NTEGER PARAMETER NXN 1 NYN 2 NUXN 3 NTEGER PARAMETER NUYN 4 NFX 5 NFY 6 NTEGER PARAMETER NPMASS 7 NRINTER 8 NVOLN 9 NTEGER PARAMETER NCMASS 10 NXMU 11 NEN 12 NTEGER PARAMETER NPN 13 NO 14 NPLWK 15 NTEGER PARAMETER NDEN 16 NTEMP 17 NEPS 18 NTEGER PARAMETER NEPSDOT 19 NEFS 20 NSSPD 21 NTEGER PARAMETER NDAM 22 NDIV 23 NALPHA 24 NTEGER PARAMETER NT11 25 NT22 26 NT12 27 NTEGER PARAMETER NTXX 28 NTYY 29 NTXY 30 NTEGER PARAMETER NTTT 31 NTVM 32 NYIELD 33 NTEGER PARAMETER NEXXD 34 NEYYD 35 NEXYD 36 NTEGER PARAMETER NSTN11 37 NSTIN22 38 NSTN33 39 NTEGER PARAMETER NSTN12 40 NPSANG 41 NVOID 42 NTEGER PARAMETER NFCOVRV 43 NFCOVRI 44 NFCOVRJ 45 NTEGER PARAMETER NDPDX 46 NDPDY 47 NDRDX 48 NTEGER PARAMETER NDRDY 49 NDUXDX 50 NDUXDY 51 NTEGER PARAMETER NDUYDX 52 NDUYDY 53 NSTN1 54 NTEGER PARAMETER NSTN2 55 NSTR1 56 NSTR2 57 NTEGER PARAMETER NSRES1 58 NSRES2 59 NBMOM1 60 NTEGER PARAMETER NBMOM2 61 NTSHEAR 62 NTHICK 63 NTEGER PARAMETER NSML 64 NVOR 65 NDENNM1 66 NTEGER PARAMETER NRCUT 67 NRNON 68 NABSVEL 69 NTEGER PARAMETER NHNORM 70 NTFAIL 71 NPDIL 72 NTEGER PARAMETER NEDIL 73 NVARO1 74 NVARO2 75 Release 15 0 SAS IP Inc All rights rese
53. Character array with mass unit names Character array with length unit names Character array with time unit names Character array with abbreviated mass unit names Character array with abbreviated length unit names Character array with abbreviated time unit names Character array pressure velocity and so on names 5 21 SUBDEF Global Part Variable Definitions Module subdef contains global variables pertaining to Parts MODULE subdef USE kindef IMPLICIT NONE SAVE INTEGER INT4 NUMSUB NUMEUL NSP NUMJON MAXIJK NNMZVR NUMZNS NDAT1 INTEGER INT4 NUMBOJ IFIMPT NERODED INTEGER INT4 DIMENSION LIMSUB 1 IJKBAS INTEGER INT4 DIMENSION LIMSUB NUMPRO NUMI NUMJ NUMK MATSV INTEGER INT4 DIMENSION LIMSUB IDN JDN ISIZ JSIZ KSIZ IJKSIZ INTEGER INT4 DIMENSION LIMSUB NSPACK IOPRT NUMEUP NUMLAP NMZNS INTEGER INT4 DIMENSION LIMSUB IBPRT IEPRT JBPRT JEPRT IJKBAZ INTEGER INT4 DIMENSION LIMSUB KBPRT KEPRT IFEBVL NPLTSL INTEGER INT1 DIMENSION LIMSUB LIMSUB TARGET JONSUB MAPPED INTEGER INT4 DIMENSION 3 IJKMAX INTEGER INT1 DIMENSION LIMSUB IACTIV IVOLOP INTEGER INT1 DIMENSION LIMSUB LIMSUB IFSLAV REAL REAL8 TOLJON TOTMAX TOTWRK TOTXIM TOTYIM TOTZIM TOTHI REAL REAL8 TOTMSB TOTVLB TOTIEB TOTKEB TOTDEB REAL REAL8 TOTMS TOTVL TOTIE TOTKE TOTDE REAL R
54. D AUTODYN To run a customized parallel Autodyn simulation the parallel configuration file parallel cfg should contain the paths for the customized Autodyn executables Located in the same directory as the cus tomized Autodyn executables is a script called ads1ave150 This script sets up the environment variables at runtime required for the slave to execute For further information regarding the parallel configuration files please see the Autodyn Parallel Processing Tutorial Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 27 28 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Chapter 5 Autodyn User Subroutine Modules Autodyn modules contain most of the problem variables that a user might require in order to write a user subroutine The sections below provide a listing and description of the primary variables of interest Note that the listing below is not inclusive of all the Autodyn modules in the program Also note that the modules are delivered in compiled form and therefore cannot be read as text Caution The user should be very careful about changing the values contained in the standard Autodyn modules Such actions may cause unpredictable results 5 1 BNDDEF Boundary Definitions MODULE bnd
55. EAL REAL8 TIMBEUL TIMEEUL DLTBEUL DLTHEUL DLTEEUL DLTMINEUL DLTMAXEUL REAL REAL8 DTFRACEUL SSSTEPEUL SSSTABEUL DRSTABEUL VLSTABEUL DVSTABEUL REAL REAL8 DLTHOLEUL CSSTEPEUL DTMINEUL Current cycle number Not available Part number controlling timestep l index controlling timestep J index controlling timestep Not used in 2D Starting cycle for current segment of calculation Cycle number for which SAVE file is to be loaded passed to GETRST Time at beginning of cycle t n Time at end of cycle t n 1 Timestep from t n 1 2 to t n 1 2 Timestep from t n to t n 1 Timestep from t n 1 2 to t n 3 2 Minimum timestep Maximum timestep Timestep stability factor Stability timestep Soundspeed in cell controlling timestep Cell dimension in cell controlling timestep Cell velocity in cell controlling timestep Cell divergence in cell controlling timestep Previous timestep DLTH 5 3 FILDEF File Definitions Module fildef defines the various file unit numbers Typically the only information important for the user is that NUT8 is the Autodyn log file in case the user wishes to write something to the log file MODULE fildef USE kindef IMPLICIT NONE SAVE INTEGER PARAMETER LIMUNT 3 INTEGER PARAMETER NUT1 31 NUT2 32 NUT3 33 NUT4 34 NUT5 35 INTEGER PARAMETER NUT6 36 NUT7 37 NUT8 38 NUT9 39 NUT10 40
56. EAL8 TOTXMB TOTYMB TOTZMB TOTXM TOTYM TOTZM REAL REAL8 DIMENSION LIMSUB TARGET XSUBMN YSUBMN ZSUBMN REAL REAL8 DIMENSION LIMSUB TARGET XSUBMX YSUBMX ZSUBMX REAL REAL8 DIMENSION LIMSUB TARGET USUBMX ASUBMX SUBMS SUBVL REAL REAL8 DIMENSION LIMSUB TARGET VARSB1 VARSB2 VARSB3 VARSB4 SUBDE REAL REAL8 DIMENSION LIMSUB TARGET SUBMSB SUBVLB SUBDEB SUBIE REAL REAL8 DIMENSION LIMSUB TARGET SUBKE SUBXM SUBYM SUBZM SUBIEB REAL REAL8 DIMENSION LIMSUB TARGET SUBKEB SUBXMB SUBYMB SUBZMB REAL REAL8 DIMENSION LIMSUB TARGET ACTIME DCTIME TSTPFC REAL REAL8 DIMENSION LIMSUB TARGET XNMIN XNMAX YNMIN YNMAX ZNMIN ZNMAX REAL REAL8 DIMENSION LIMSUB AVLEN REAL REAL8 AVLENL CHARACTER LEN 10 DIMENSION LIMSUB NAMSUB CHARACTER LEN 1 DIMENSION LIMSUB NEWSUB Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 63 Autodyn User Subroutine Modules INTEGER INT4 NSUB NPROC IMAX JMAX KMAX NWRKSB NPLTSB NZSUB NSHTYP INTEGER INT4 NSBBEG NSBEND NSBLAY MATLOC IMAXP JMAXP KMAXP KMAXBM INTEGER INT4 NPROE NPROL NUMIJK NSBOLD IFDEZN REAL REAL8 DUMMYV ALERTI ALERTJ ALERTK ALEFRX CHARACTER LEN 10 DUMMYN END MODULE subdef Current Part number Processor type Lagrange Euler and
57. ER INT4 IJK REAL REAL8 EPSD EPST PRES TEMPT TTi TT2 REAL REAL8 z TT3 XMUT YIELDT DAMAGE INTEGER INT4 d IM CK Ck Ck kk kk kk Ck kk kk ck kk kk ck kk kk Sk kk kk ko kk kk ko kk kk Sk kk kk Sk kk kk Sk kk Sk ko Sk Sk ko Sk ko ko k ko ko ko ko KKK kokok Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 89 User Subroutine Examples IE THIS THE NPU PRES Tnn XMUT EPST EPSD TEMP DAMA FAI 0 I GSC NOH OUTP YIEL IFAI THE USEF MODU INOW JNOW KNOW MNOW MODU MATN MATE MODU NCYC TIME DLTH MODU NTCO EN I DAM TO O IJ THE KKKK SUBR NS TO A IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO COMPUTE YIELD STRESS FOR A MATERIAL T PARAMETER PRESSURE PRINCIPAL STRESSES COMPRESSION EFFECTIVE PLASTIC STRAIN EFFECTIVE PLASTIC STRAIN RATE TEMPERATURE GE DAMAGE L STRESS STATE INDICATOR HYDRO ELASTIC PLASTIC BULK FAILURE WITH HEAL BULK FAILURE NO HEAL UT PARAMETERS DT YIELD STRESS FOR CURRENT MATERIAL L STRESS STATE INDICATOR SEE ABOVE FOLLOWING MODULES CONTAIN INFORMATION WHICH MAY BE UL FOR COMPUTING THE OUTPUT PARAMETERS LE IJKNOW I INDEX FOR CURRENT CELL J INDEX FOR CURRENT CELL K INDEX FOR CURRENT CELL CURRENT SUBGRID NUMBER LE MATDEF Q THE MATERIAL NUMBER OF THE CURRENT
58. E_TET4 103 NTEGER INT4 PARAMETER ELTYPE_TET4_ANP 104 NTEGER INT4 PARAMETER ELTYPE_PYRAMID5 105 SHELL BEAM ELEMENT TYPES NTEGER INT4 PARAMETER ELTYPE_SHL4 200 NTEGER INT4 PARAMETER ELTYPE_SHL3 201 NTEGER INT4 PARAMETER ELTYPE_SHL4BLT 202 NTEGER INT4 PARAMETER ELTYPE_BEAM2 203 EULER ELEMENT TYPES NTEGER INT4 PARAMETER ELTYPE_HEX8_EUL 300 NTEGER INT4 PARAMETER ELTYPE_PENTA6_EUL 301 NTEGER INT4 PARAMETER ELTYPE_TET4_EUL 302 NTEGER INT4 PARAMETER ELTYPE_HEX8_FCT 303 ALE ELEMENT TYPES NTEGER INT4 PARAMETER ELTYPE_HEX8_SALE 400 NTEGER INT4 PARAMETER ELTYPE_HEX8_ALE 401 NTEGER INT4 PARAMETER ELTYPE_PENTA6_ALE 402 NTEGER INT4 PARAMETER ELTYPE_TET4_ALE 403 STRUCTURED MESH SOLVERS NTEGER INT4 PARAMETER ELTYPE_LAG NTEGER INT4 PARAMETER ELTYPE_EUL 2 NTEGER INT4 PARAMETER ELTYPE_ALE 3 NTEGER INT4 PARAMETER ELTYPE_SHL 4 NTEGER INT4 PARAMETER ELTYPE_FCT 5 NTEGER INT4 PARAMETER ELTYPE_SPH 6 NTEGER INT4 PARAMETER ELTYPE_BEAM 7 NTEGER INT4 PARAMETER ELTYPE_RB 8 NTEGER INT4 PARAMETER ELTYPE_ALL 8 FACE TYPES AS IN OPT 3 OPT FC_SOPT_FACETYPE Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 60 of ANSYS Inc and its subsidiaries and affiliates POLGON Polygon Variable Definitions NTEGER INT4 PARAMETER FATYPE_EXTERNAL 1 NTEGER INT4 PARAMETER F
59. Equation of State in the Autodyn User s Manual Twophase Current phase of material B Damage is not used in standard material models It will only be non zero if defined in user subroutines for example EXDAM C An explanation and the derivation of the equations for effective plastic strain effective plastic strain rate and effective strain are given below The plane which makes equal angles with each of the principal directions is called the octahedral plane The shear stress on this plane is given by 2b 3 Toct where the second invariant of the stress deviators is given by 1 2 2 2 b 9117022 922 933 933 011 where oj is the total stress tensor in the ij direction Directions 11 22 and 33 are the principal stress directions The Von Mises yield criterion states that yielding begins when the octahedral shearing reaches a critical value defined by Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 83 Autodyn Variable Listings 2 toa k where k is the yield stress in pure shear and the yield criterion is f J5 Jo k 0 Yielding will occur in a uniaxial tension test when 01 Oy 02 03 0 Substituting these values in the above equations gives the uniaxial yield stress as oy 43k 355 In Autodyn at each cycle the stress state is checked against the yield criterion and if the yield criter
60. FCOVRK 151 NFCOVRV 152 NTEGER PARAMETER NRBLEND 153 NPDIL 154 NEDIL 155 NTEGER PARAMETER NEPSPRE 156 NFRATE 157 NFCAP 158 NTEGER PARAMETER NEPSDO 159 NRTHIRD 160 NTFAIL 161 NTEGER PARAMETER NHNORM 162 NPCOR11 163 NPCOR22 164 NTEGER PARAMETER NPCOR33 165 NVTXX 166 NVTYY 167 NTEGER PARAMETER NVTZZ 168 NVIXY 169 NVTYZ 170 NTEGER PARAMETER NVTZX 171 NIGTIME 172 NSBRCRT 173 NTEGER PARAMETER NABSVEL 174 NFMASS 175 NNUMCEL 176 NTEGER PARAMETER NSPDMMS 177 NDTMPDX 178 NDTMPDY 179 NTEGER PARAMETER NDTMPDZ 180 NTHMENG 181 NXNO 182 NTEGER PARAMETER NYNO 183 NZNO 184 NPGAS 185 NTEGER PARAMETER NFILDEN 186 NMOTT 187 NTEGER PARAMETER NSTRT 187 NTEGER PARAMETER NTEMPO1 NSTRT 01 NTEMP02 NSTRT 02 NTEGER PARAMETER NTEMPO3 NSTRT 03 NTEMP04 NSTRT 04 NTEGER PARAMETER NTEMPO5 NSTRT 05 NTEMP06 NSTRT 06 NTEGER PARAMETER NTEMPO7 NSTRT 07 NTEMPO08 NSTRT 08 NTEGER PARAMETER NTEMP09 NSTRT 09 NTEMP10 NSTRT 10 NTEGER PARAMETER NTEMP11 NSTRT 11 NTEMP12 NSTRT 12 NTEGER PARAMETER NTEMP13 NSTRT 13 NTEMP14 NSTRT 14 NTEGER PARAMETER NTEMP15 NSTRT 15 NTEMP16 NSTRT 16 NTEGER PARAMETER NTEMP17 NSTRT 17 NTEMP18 NSTRT 18 NTEGER PARAMETER NTEMP19 NSTRT 19 NTEMP20 NSTRT 20 NTEGER PARAMETER NTEMP21 NSTRT 21 NTEMP22 NSTRT 22 NTEGER PARAMETER NTEMP23 NSTRT 23 NTEMP24 NSTRT 24 NTEGER
61. GER PARAMETER NPN 13 NO 14 NPLWK 15 NTEGER PARAMETER NDEN 16 NEPSDOT 17 NEFS 18 NTEGER PARAMETER NSSPD 19 NDIV 20 NT11 21 NTEGER PARAMETER NT22 22 NT33 23 NTXX 24 NTEGER PARAMETER NTYY 25 NTZZ 26 NTXY 27 NTEGER PARAMETER NTYZ 28 NTZX 29 NTVM 30 NTEGER PARAMETER NYIELD 31 NEXXD 32 NEYYD 33 NTEGER PARAMETER NEZZD 34 NEXYD 35 NEYZD 36 NTEGER PARAMETER NEZXD 37 NWXN 38 NWYN 39 NTEGER PARAMETER NWZN 40 NRI11 41 NRI22 42 NTEGER PARAMETER NRI33 43 NVOID 44 NDPDX 45 NTEGER PARAMETER NDPDY 46 NDPDZ 47 NDRDX 48 NTEGER PARAMETER NDRDY 49 NDRDZ 50 NDUXDX 51 NTEGER PARAMETER NDUXDY 52 NDUXDZ 53 NDUYDX 54 NTEGER PARAMETER NDUYDY 55 NDUYDZ 56 NDUZDX 57 NTEGER PARAMETER NDUZDY 58 NDUZDZ 59 NSTN1 60 NTEGER PARAMETER NSTN2 61 NSTN12 62 NSTRS1 63 NTEGER PARAMETER NSTRS2 64 NSTRS12 65 NSRES1 66 NTEGER PARAMETER NSRES2 67 NBMOM1 68 NBMOM2 69 NTEGER PARAMETER NBMOM12 70 NTHICK 71 NDIRNX 72 NTEGER PARAMETER NDIRNY 73 NDIRNZ 74 NT12 75 NTEGER PARAMETER NT23 76 NT31 77 NSTIN11 78 NTEGER PARAMETER NSTN22 79 NSTIN33 80 NSTN12V 81 NTEGER PARAMETER NSTN23 82 NSTIN31 83 NRIJOIN 84 NTEGER PARAMETER NRJJOIN 85 NRKJOIN 86 NCOSFI 87 NTEGER PARAMETER NSINFI 88 NPSANG 89 NSPARE1 9
62. IGID_IYZ Initial moment of inertia about YZ RIGID_IZX Initial moment of inertia about ZX IF_RIGID_CONSTRAINT Rigid body constraint switch Constrained X velocity Constrained Y velocity Constrained Z velocity Constrained URX velocity Constrained URY velocity Constrained URZ velocity 5 12 Strength Model Variables Variables from the following types of strength models can be accessed 5 12 1 Drucker Prager Strength Model 5 12 2 Johnson Cook Strength Model 5 12 3 Zerilli Armstrong Strength Model 5 12 4 Steinberg Guinan Strength Model 5 12 5 Cowper Symonds Strength Model 5 12 6 Piecewise Linear Strength Model 5 12 7 Johnson Holmquist Strength Model 5 12 8 RHT Concrete Strength Model 5 12 9 Orthotropic Yield Strength Model 5 12 1 Drucker Prager Strength Model To access local data USE matdef USE yp linear USE yp pcwise USE yp stassi Piecewise Linear PRETAB n Tabular pressure values 1 to 10 YLDTAB n Tabular yield stress values 1 to 10 Linear Hardening Hardening slope Stassi Hardening Yield in uniaxial strain compressive Yield in uniaxial strain tension Ratio YLDSTC YLDSTT Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 46 of ANSYS Inc and its subsidiaries and affiliates Strength Model Variables 5 12 2 Johnson Cook Strength Model To access local data USE
63. IN UYT 0 0 THEN al THEN UYT LSE WRITE TEXT40 3A SError EXVEL is called as CALL USR MESSAG TEXT40 NSWRAP 99 F TERMINATION OF SUBROUTINE EXVEL RETURN NAMVEL Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 93 User Subroutine Examples END SUBROUTINE EXVEL 7 3 Subroutine EXALE The listing below shows the contents of the file EXALE F 90 used to define the ALE motion of a part whereby each I column remains parallel to the Y axis and the nodes are equally spaced along the column SUBROUTINE EXALE IREZ JREZ NREZ XREZ YREZ USE mdgrid USE kindef USE locsub USE wrapup IMPLICIT NONE INTEGER INT4 IREZ JREZ NREZ REAL REAL8 EIE XREZ YREZ INTEGER INT4 IJMAX IJ REAL REAL8 S DYB ck ck ck ck ck ck ck ck ck ck ck ck ck ck ok ck kk kk kk kk kk kk kk kk kk kk kk kk kk kk kk kk kk ko ko ko ko ko ko ko kockckckckckck ck THIS SUBROUTINE COMPUTES THE CONSTRAINED GRID VELOCITIES FOR VERTICES ASSIGNED THE USER MOTION CONSTRAINT INPUT PARAMETERS IREZ I INDEX FOR VERTEX TO BE CONSTRAINED JREZ J INDEX FOR VERTEX TO BE CONSTRAINED NREZ PART FOR VERTEX TO BE CONSTRAINED XREZ CURRENT X COORDINATE OF VERTEX YREZ CURRENT Y COORDINATE OF VERTEX OUTPUT PARAMETERS XREZ CONSTRAINED X COORDINATE OF VERTEX YREZ CONSTRAINED Y COORDINATE OF VER
64. IST NN IJKBAS NUMSUB 1 COPY ELEMENT VARIABLES INTO LOCAL VARIABLE VECTOR NINST 0 CALL GET_ELEM_VAR NEL NINST Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 99 User Subroutine Examples CALCULATE IMPEDANCE RVL IVR_VARO1 RVL IVR DENSITY RVL IVR SOUNDSPEED COPY UPDATED LOCAL ELEMENT DATA BACK TO MAIN STORAGE CALL PUT ELEM VAR NEL NINST ELSE GET STRUCTURED IJK INDEX IJKS GRP SIJKS LIST NN CALL IJANDKS3 IJKS I J K M NSUB M CALL GETSUB3 IJK IJKSET3 I J K IF ASSOCIATED VARO1 THEN VARO1 IJK DEN IJK SSPD IJK END IF END IF END DO END LOOP ON ELEMENTS END DO END LOOP ON GROUPS 7 6 5 Access to Nodal Variables for NBS Tetrahedral Elements The following is an example of how erosion of NBS tetrahedral elements based on the effective plastic strain at the nodes might be achieved This serves as an example of how to obtain data from unstructured nodes and elements The example can be found in your distribution in file MDERO USER 1 TUT KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKKKKKKKK KKK KKK KKK THIS MODULE IS A CONTAINER FOR THE INITIALISATION AND SOLUTION OF A MATERIAL MODELLING EQUATION OPTION THE FOLLOWING ROUTINES ARE INCLUDED MODULE ERO_USER_1 DEFINE COMMON PARAMETERS TO BE ACCESSED IN ROUTINES BELOW
65. IT NONE SAVE INTEGER INT4 INOW JNOW KNOW LYNOW MNOW END MODULE ijknow Current l index Current J index Not used in 2D Current Part number 5 6 JETDEF Jetting Variables Module jetdef includes variables associated with the jetting option Autodyn 2D only MODULE jetdef USE kindef IMPLICIT NONE SAVE INTEGER PARAMETER LIMJET 100 INTEGER PARAMETER MAXJVR 21 INTEGER INT4 NUMJET NXTJET JETSUB JETRAP INTEGER INT4 DIMENSION LIMJET TARGET NPJET JPJET REAL REAL8 VSLBAR PMSLUG XMOMSL REAL REAL8 DIMENSION LIMJET TARGET TIMJET PMJET XZJET REAL REAL8 DIMENSION LIMJET TARGET YZJET REAL REAL8 DIMENSION LIMJET TARGET XJET YJET UXJET UYJET REAL REAL8 DIMENSION LIMJET TARGET DXJET DYJET VLJET REAL REAL8 DIMENSION LIMJET TARGET THKJET END MODULE jetdef LIMJET Limit on number of jetting points NUMJET Number of jetting points NXTJET Next point to jet JETSUB Part containing jetting points JETRAP Wrapup indicator NPJET Array of jetted points JPJET Jetting point index VSLBAR Mean slug velocity PMSLUG Total slug mass XMOMSL Total slug momentum TIMJET Time of jetting PMJET Jet mass Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 32 of ANSYS Inc and its subsidiaries and affiliates KINDEF Constant Variable Definitions
66. Initial X coordinate Initial Y coordinate X coordinate at jet formation Y coordinate at jet formation X component of collapse velocity Y component of collapse velocity DX of segment at jet formation DY of segment at jet formation Initial volume THKJET Initial thickness 5 7 KINDEF Constant Variable Definitions Module kindef includes a number of commonly used constants for example PI that can be used in user subroutines The variable descriptions are self explanatory MODULE kindef USE precision SAVE INTEGER PARAMETER INT1 SELECTED INT KIND 2 INTEGER PARAMETER INT2 SELECTED INT KIND 4 INTEGER PARAMETER REAL4 SELECTED REAL KIND 6 30 INTEGER PARAMETER REAL8H SELECTED REAL KIND 12 300 INTEGER INT4 PARAMETER LARGE 999999 INTEGER INT4 PARAMETER IUNDEF 1111 INTEGER INT4 PARAMETER MAXINT 30000 INTEGER INT4 PARAMETER MAXEXP 20 REAL REAL8 PARAMETER EPSLN1 1 0E 1 real8 REAL REAL8 PARAMETER EPSLN2 1 0E 2 real8 REAL REAL8 PARAMETER EPSLN3 1 0E 3 real8 REAL REAL8 PARAMETER EPSLN4 1 0E 4 real8 REAL REAL8 PARAMETER EPSLN5 1 0E 5 real8 REAL REAL8 PARAMETER EPSLN6 1 0E 6 real8 REAL REAL8 PARAMETER EPSLN7 1 0E 7 real8 REAL REAL8 PARAMETER EPSLN8 1 0E 8_real8 REAL REAL8 PARAMETER EPSLN9 1 0E 9_real8 REAL REAL8 PARAMETER EPSLN10 1 0E 10
67. KKKKKKKKKKKKKKKKKKKKKKK THE FOLLOWING ERODES NBS ELEMENTS BASED ON PLASTIC STRAIN IT WILL DO NOTHING FOR OTHER ELEMENT TYPES TAT 0 ELEM_NOW 0 GO TO 100 CALL GET_ELEM_VAR ELEM_NOW 0 EL IF NB TE PU NO NO NO NO MA MA MA MA DO EN EL EL IF CO ASSESS WHETHER NBS ELEMENT OR NOT AND IF NOT RETURN TYPE DATA STR NSTRING S PS SOPT EL SOPT ELEMTYPE ELTYPE ELTYPE TET4 ANS GO TO 100 DETERMINE IF PUSO STABILISATION IS USED AND THE PUSO COEFFICIENT IF NECESSARY S TET HGMODEL DATA STR NSTRING P OPT EL SOPT NBS HGMODEL T HG COEFF DATA STR NSTRING PS SRPARAM RPAR NBS HGCOEFF GET EFFECTIVE PLASTIC STRAIN IN THE PUSO MATERIAL SOELEM EPS RVL IVR NBS EPS GET GLOBAL NODE NUMBERS CONNECTED TO ELEMENT DENM 1 IVL IVI_CON1 DENM 2 IVL IVI CON2 DENM 3 IVL IVI_CON3 DENM 4 IVL IVI_CON4 NBS NODES HAVE A LAYERED STORAGE STRUCTURE FOR VARIABLES DUE TO MULTI MATERIALS ON THE NODES THE FOLLOWING GETS THE LAYER NUMBER OF THE CURRENT ELEMENT MATERIAL FOR EACH NODE TLOCL 1 IVL IVI_NBS_MATLOC1 TLOCL 2 IVL IVI_NBS_MATLOC2 TLOCL 3 IVL IVI_NBS_MATLOC3 TLOCL 4 IVL IVI_NBS_MATLOC4 GET THE PLASTIC STRAIN AT THE NODES N 1 4 CALL TO GET NODE VAR NODENO MATLOC RETRIEVES NODAL DATA FOR FOR NODE WITH GLOBAL NODE NUMBER NODENO AND LAYER NUMBER MATLOC CALL GET NODE VAR NODENM N MATLOCL N RETRIEVE EFFECTIVE
68. L8 DIMENSION POINTER VTR3 END TYPE TRANS VAR TYPE MULTI ARRAY 3D NTEGER INT4 NUMLT NTEGER INT4 NUMDT NTEGER INT4 DIMENSION POINTER M REAL REALS8 DIMENSION POINTER V TYPE TRANS VAR POINTER TRNS TYPE WET PAR POINTER WFRV END TYPE MULTI_ARRAY_3D TYPE TRMEM TYPE TRANS VAR DIMENSION POINTER TR NTEGER INT4 DIMENSION POINTER IV REAL REAL8 DIMENSION POINTER RV REAL REAL8 DIMENSION POINTER VTR1 REAL REAL8 DIMENSION POINTER VTR2 REAL REAL8 DIMENSION POINTER VTR3 END TYPE TRMEM TYPE MULTI MATERIAL POINTERS Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 54 MDGRID3 Autodyn 3D Grid Variable Definitions TYPE MULTI_ARRAY_3D DIMENSION POINTER END TYPE MULTI MATERIAL POINTERS NTEGER INT1 TARGET DIMENSION 1 NULIAP REAL REAL8 TARGET DIMENSION 1 NULRAP TYPE TRANS VAR DIMENSION POINTER TRANS TYPE TRANS VAR TARGET NULTRN TYPE WET PAR DIMENSION POINTER WETPT NTERFACE MEMALLOC MODULE PROCEDURE MODULE PROCEDURE MODULE PROCEDURE MODULE PROCEDURE END INTERFACE MEMALLOC MULTMAT POINTER3 MEMALLOC MULTI ARRAY3 3D MEMALLOC TRANS VAR ARRAY3 MEMALLOC MICARRAY POINTER3 INTERFACE MEMDEALLOC MODULE PROCEDURE MEMDEALLOC MULTMAT POINTER3 MODULE PROCEDURE MEMDEALLOC MULTI ARRAY3 3D MODULE PROCEDURE MEMDEALLOC TRANS VAR ARRAY3
69. LE locelm USE kindef IMPLICIT NONE SAVE INTEGER INT4 IJK IMJMKM IJMKM IJKM IMJKM IMJMK INTEGER INT4 IJMK IIJK IMJK IMJ IMJM ISTATE INTEGER INT4 DIMENSION 8 LELM INTEGER INT4 DIMENSION 4 IJKA REAL REAL8 XEl XE2 XE3 XE4 YE1 YE2 YE3 YEA REAL REAL8 REAL REAL8 REAL REAL8 REAL REAL8 REAL REAL8 REAL REAL8 REAL REAL8 UX1 UX2 UX3 UX4 UY1 UY2 UY3 UY4 YBAR STHETA CELMAS CDIAG UXB UYB TAE1 TAE2 TAE3 TAE4 AREAE EDIM DVOV WXROT WYROT WZROT QOLD VOLH URMAX UXBEG UYBEG UZBEG VDOV DSDE PSAV ESAV REAL REAL8 DIMENSION 4 TARGET XEA YEA REAL REAL8 DIMENSION 8 XELM YELM ZELM REAL REAL8 DIMENSION 8 3 AELM BELM CELM UELM REAL REAL8 DIMENSION 4 3 WELM END MODULE locelm IJ index of I J IJ index of I 1 J Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 34 of ANSYS Inc and its subsidiaries and affiliates MATDEF Material Definitions IJ index of I 1 J 1 IJ index of I J 1 Coordinates of four corners of cell I J at t n 1 anti clockwise from IJ Velocity components of four corners of cell I J at t n 1 2 anti clockwise from IJ Average Y of four corners DV V for cell DV DT V for cell Angle of rotation of cell Artificial viscosity Cell volume at t n 1 2 Cell mass Longest diagonal of cell
70. MATERIAL RIALS MATNO SNAME THE MATERIAL NAME OF THE CURRENT MATERIAL LE CYCVAR LE CURRENT CYCLE NUMBER CURRENT TIME TIME STEP FOR CURRENT CYCLE LE EDTDEF DE DIMENSIONS 2 2D 3 3D JK CELL SPECIFIC INTERNAL ENERGY JK DAMAGE BTAIN THE VALUE OF THE INDEX IJK FOR THE CURRENT CELL USE K IJKSET INOW JNOW KNOW NDEX IJK MUST ALSO BE DEFINED AS AN INTEGER INTEGER INT4 IJK KKKKKKKKKKKKKKKKKKKKKKKKK kk kk kk Sk kk kk Sk kk kk kk kk kk kk Sk ke Sk kk kk kk ko ko ko ko ko ko ko kc ko OUTINE CALLED BY ALL STRENGTH MODELS SO SKIP OUT BY DEFAULT TR IMF STR USER 1 GO TO 900 CCESS A V4 3 USER SUBROUITNE FOR AUTODYN 2D UNCOMMENT THE NEXT LINE CALL EXYLD PRES TT1 TT2 TT3 XMUT EPST EPSD TEMPT YIELDT IFAIL LE EN THIS CHEC NSW PROB MT CALL NSWR YIEL GO T DIE ROUTINE IS ONLY WRITTEN FOR TANTALUM K THAT NO OTHER MATERIAL TRIES TO USE THIS ROUTINE RAP 99 WRAPS UP THE CALCULATION WITH MESSAGE THAT LEM HAS BEEN TERMINATED DUE TO USER DETECTED ERROR LSNAME 1 8 TANTALUM THEN USR_MESSAG USER STRENGTH MODEL called for invalid material AP 99 DT ZERO O 900 90 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Subroutine MDSTR_USER_1 SET CURRENT YIELD STRESS PLASTIC STRAIN LESS THAN EP 1 IF EPST EP 1 THEN YIELDT
71. MENSION POINTER DUZDX DUZDY DUZDZ STN1 REAL REAL8 DIMENSION POINTER STN2 STN12 STRS1 STRS2 REAL REAL8 DIMENSION POINTER STRS12 SRES1 SRES2 BMOM1 REAL REAL8 DIMENSION POINTER BMOM2 BMOM12 THICK DIRNX REAL REAL8 DIMENSION POINTER DIRNY DIRNZ TI 2 T23 REAL REAL8 DIMENSION POINTER T31 STN11 STN22 STN33 REAL REAL8 DIMENSION POINTER STN12V STN23 STN31 RIJOIN REAL REAL8 DIMENSION POINTER RJJOIN RKJOIN COSFI SINFI REAL REAL8 DIMENSION POINTER PSANG BMLENZ REAL REAL8 DIMENSION POINTER RJJ FAXI FTOR BMOMYI Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 58 of ANSYS Inc and its subsidiaries and affiliates MDPP Parallel Calculation Variables REAL REAL8 DIMENSION POINTER BMOMYJ BMOMZI BMOMZJ BBV11 REAL REAL8 DIMENSION POINTER BBV12 BBV13 BBV21 BBV22 REAL REAL8 DIMENSION POINTER BBV23 BBV31 BBV32 BBV33 REAL REAL8 DIMENSION POINTER EBV11 EBV21 EBV31 EBV12 REAL REAL8 DIMENSION POINTER EBV22 EBV32 EBV13 EBV23 REAL REAL8 DIMENSION POINTER EBV33 REAL REAL8 DIMENSION POINTER VARO1 VARO2 VARO3 VARO4 REAL REAL8 DIMENSION POINTER VARO5 VARO6 VARO7 VARO8 REAL REAL8 DIMENSION POINTER VARO9 VAR10 VAR11 VA
72. MENSION POINTER EDIL VARO1 VARO2 VARO3 REAL REAL8 DIMENSION POINTER VARO4 VARO5 VARO6 VARO7 REAL REAL8 DIMENSION POINTER VARO8 VARO9 VAR10 VARI REAL REAL8 DIMENSION POINTER VAR12 VAR13 VAR14 VAR15 REAL REAL8 DIMENSION POINTER VAR16 VAR17 VAR18 VAR19 REAL REAL8 DIMENSION POINTER VAR20 EPSPRE FRATE RTHIRD REAL REAL8 DIMENSION POINTER FCAP EPSDO PCOR11 PCOR22 REAL REAL8 DIMENSION POINTER PCOR33 MASFAC VTXX VTYY REAL REAL8 DIMENSION POINTER VTXY IGTIME SBRCRT XNO REAL REAL8 DIMENSION POINTER YNO PGAS FILDEN MOTT REAL REAL8 DIMENSION POINTER TEMPO1 TEMPO2 TEMP03 REAL REAL8 DIMENSION POINTER TEMP04 TEMPO05 TEMP06 TEMPO7 REAL REAL8 DIMENSION POINTER TEMPO8 TEMPO9 TEMP10 TEMP11 REAL REAL8 DIMENSION POINTER TEMP12 TEMP13 TEMP14 TEMP15 REAL REAL8 DIMENSION POINTER TEMP16 TEMP17 TEMP18 TEMP19 REAL REAL8 DIMENSION POINTER TEMP20 TEMP21 TEMP22 TEMP23 REAL REAL8 DIMENSION POINTER TEMP24 TEMP25 TEMP26 TEMP27 REAL REAL8 DIMENSION POINTER TEMP28 TEMP29 TEMP30 5 16 MDGRID3 Autodyn 3D Grid Variable Definitions Module mdgrid3 contains the definitions for the grid variables The various pointers and arrays to be used in accessing the grid variables are provided For a description of the available grid
73. MENT COPY ELEMENT VARIABLES INTO LOCAL VARIABLE VECTOR NINST 0 CALL GET_ELEM_VAR NEL NINST CALCULATE IMPEDANCE RVL IVR_VARO1 RVL IVR DENSITY RVL IVR SOUNDSPEED COPY UPDATED LOCAL ELEMENT DATA BACK TO MAIN STORAGE CALL PUT ELEM VAR NEL NINST END DO END LOOP ON ELEMENTS ELSE STRUCTURED IJK PART NSUB NPART CALL GETSUB3 LOOP OVER ELEMENTS IN PART DO I 1 IMAX DO J 1 JMAX DO K 1 KMAX IJK IJKSET3 I J K IF ASSOCIATED VARO1 THEN VARO1 IJK DEN IJK SSPD IJK END IF END DO END DO END DO END IF END DO END LOOP ON PARTS END DO END LOOP ON COMPONENTS 7 6 4 Access to All Elements in a Group The following code loops over all Groups in a model and for element Group Proj defines and stores the impedance of each element in the group in user variable VARO1 The code works for both Structured and Unstructured Parts Solvers USE mdvar_all USE mdsolv USE mdgrid3 USE mdgroups IMPLICIT NONE INTEGER INT4 NEL NINST N NN INTEGER INT4 I J K IJK IJKS M DO N 1 NUM_GROUPS GRP gt GROUPS N P F GRPSNAME Proj CYCLE SKIP ALL BUT ELEMENT GROUPS OPTIONS GRPTYP NODE GRPTYP ELEM GRPTYP FACE F GRPSGRPTYP GRPTYP ELEM CYCLE LOOP OVER ELEMENTS IN GROUP DO NN 1 GRPSGRP SIZE CHECK IF ELEMENT IS FROM STRUCTURED OR UNSTRUCTURED SOLVER IF GRPSIJKS_LIST NN gt IJKBAS NUMSUB 1 THEN GET UNSTRUCTURED ELEMENT INDEX NEL GRPSIJKS L
74. Modulus v 1 963000 Mbar Reference Temperature 0 000000 9 Specific Heat 0 000000 Terg ak Thermal Conductivity 0 000000 Terg cmKus Strength User Strength 1 Shear Modulus 0 000000 Mbar SC 2 0 000000 Mbar SC 3 0 000000 Mbar sc 4 0 000000 Mbar SC 5 0 000000 Mbar SC 6 0 000000 Mbar Sc 7 0 000000 Mbar SC 8 0 000000 Mbar SC 9 0 000000 Mbar SC 10 0 000000 Mbar SC 11 0 000000 Mbar Failure None 2 d 4 n p You can now input the variables Shear Modulus SC 1 and SC 2 through SC 11 to be used in the MD_STR_USER_1 module Note that these predefined parameters are only present for demonstration and can be tailored in terms of number of parameters names and units It is also possible to add your own option list and parameters from many of the existing standard Autodyn strength models The use of the input parameters allows you to code and link your user subroutine once and then change variable input values through Autodyn input The user specifies the usage of these parameters in the MD_STR_USER_1 module For the moment enter a Shear Modulus of 0 692 as before with the Von Mises model so that you can close and save the data for the Tantalum material If you save the example database as example usersub 1 and click Run you see the error dialog Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and i
75. NSYS Inc and its subsidiaries and affiliates Chapter 1 User Subroutine Tutorial Introduction This manual shows you how to create and use your own user subroutines in Autodyn Topics covered include How to invoke the user subroutines from Input Compiling and linking user subroutines Writing your own user subroutines Description of Autodyn module variables Autodyn provides you with a number of standard alternatives for options such as Equations of State Yield Models Boundary Conditions and so on However you may wish to use your own custom models for these options Autodyn allows you to do this by including your own subroutines written in Fortran This tutorial shows you how to include these subroutines in your calculations and offers guidelines on writing user subroutines Table 1 1 Material Modeling User Subroutines p 1 and Table 1 2 Additional User Subroutines p 1 show the user subroutines that are available for use with Autodyn Table 1 1 Material Modeling User Subroutines MDEOS USER 1 Custom equation of state Previously EXEOS MDSTR USER 1 Custom yield and or shear model Previously EXYLD MDFAI USER 1 Custom failure criteria Previously EXFAIL EXFAILS MDERO USER 1 Custom erosion criteria Previously EXEROD EXBULK Custom bulk modulus for a linear EOS EXCOMP Custom porous compaction curve P a equation of state EXCRCK Custom tensile crack softening rate EXDAM Custom dam
76. NT1 DIMENSION POINTER NPK07 NPK08 NPK09 NPK10 NTEGER INT1 DIMENSION POINTER NPKED NPKIC NTEGER INT1 DIMENSION POINTER NVAR NTVR KBIJK POINTER ARRAY TO ALL TEMPORARY SUBGRID INTEGER VARIABLES NTEGER PARAMETER LIMILT 10 TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB LIMILT IGRID NTEGER PARAMETER NITMPO1 NTEGER PARAMETER NITMP02 2 NTEGER PARAMETER NITMP03 3 NTEGER PARAMETER NITMP04 4 NTEGER PARAMETER NITMP05 5 NTEGER PARAMETER NITMP06 6 NTEGER PARAMETER NITMP07 7 NTEGER PARAMETER NITMP08 8 NTEGER PARAMETER NITMP09 9 NTEGER PARAMETER NITMP10 10 NTEGER INT4 DIMENSION POINTER ITMPO1 ITMP02 ITMP03 NTEGER INT4 DIMENSION POINTER ITMP04 ITMP05 ITMP06 NTEGER INT4 DIMENSION POINTER ITMP07 ITMP08 ITMP09 NTEGER INT4 DIMENSION POINTER ITMP10 ITMP11 ITMP12 SUBGRID REAL VARIABLES DIMENSION LIMSUB LIMVAR YPP_TMP GRID GRID_TMP LIMSUB 2 NPACK TMP NPKMN TMP ZPP POINTER ARRAY TO ALL TEMPORARY SUBGRID COORDINATES FOR SAVE RESTORE FACILITY DIMENSION LIMSUB 3 TYPE SMALL_INTEGER_ARRAY_POINTER DIMENSION NPKMT_TMP XPP_TMP TMP Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 56 MDGRID3 Autodyn 3D Grid Variable Definitions POINTER ARRAY FOR TEMPORARY REAL VARIABLES IN EUL3P3
77. NT4 NT4 NT4 INT4 NT4 NT4 NT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 NT4 NT4 NT4 INT4 NT4 INT4 NT4 INT4 NT4 NT4 PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET PARAMET TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER TER PARAMET TER MF_STR MF_L MF STR IME STR IME STR MF STR JNCOOK IMF STR ZERARM MF STR STEINB IMF STR PCWISE MF STR JH2 IMF STR RHT MF STR GRANULAR IMF STR GENERIC MF STR VISCOEL IMF STR RJC MF STR HJC MF STR USER MF STR USER 2 MF STR USER 3 MF STR USER 4 MF STR USER 5 MF STR BEAMRESIST 295 MSTR MF EOS USER 2 MF
78. Node Node Body base vector 3 component y BOD B V 33 BBV33 Node Node Body base vector 3 component z ELM B V 11 EBV11 Node Element base vec tor 1 component x ELM B V 12 EBV12 Node Element base vec tor 1 component y ELM B V 13 EBV13 Node Element base vec tor 1 component z ELM B V 21 EBV21 Node Element base vec tor 2 component x ELM B V 22 EBV22 Node Element base vec tor 2 component y Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 79 Autodyn Variable Listings Internal Euler Euler Description Array Godun4FCT ov EBV23 Element base vec tor 2 component z ELM B V 31 EBV31 Element base vec tor 3 component x ELM B V 32 EBV32 Element base vec tor 3 component y ELM B V 33 EBV33 Element base vec tor 3 component z SMOOTH LEN SML Particle Smoothing length OLDDENSITY DENNM1 Particle Previous density for SPH NON Particle Number of neigh bors VORX Particle Vorticity around X axis VORTICITY Y VORY Particle Vorticity around Yaxis VORTICITY Z VORZ Particle Vorticity around Z axis HOM 1 HOM1 Ele Ele Hourglass damping ment ment moment about 11 axis HOM 2 HOM2 Ele Ele Hourglass damping ment ment moment about 22 axis HOB 1 HOB1 Ele Ele Hourglass damping ment ment force 1 HQB 2 HOB2 Ele Ele Hourg
79. Options o Webeube O OO If you require debugging of your customized Autodyn version you must run the program from outside of the Workbench environment The development environment solution is setup to allow debugging of the executables Ensure that the solution configuration is set to Debug and select Start debugging from the Debug drop down window 4 2 Linking your own User Subroutines on Linux Platforms The user subroutine directory of the Linux installation package can be found under the platform specific directory in the autodyn usrsub directory For example if Autodyn has been installed into the default directory then the files required to create a customized version would be found in Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 26 of ANSYS Inc and its subsidiaries and affiliates Linking your own User Subroutines on Linux Platforms ansys inc vi150 autodyn usrsub linx64 We recommend that this whole directory and its subdirectories are copied to your home directory to avoid any permissions conflicts when editing and compiling the customized versions on Linux Note On Red Hat 6 x Linux systems you must install the following compatibility package in order for the user subroutines to be compiled and linked correctly compat libstdct 33 3 2 3 69 e16 x86 64 This compatibility package can be found on your Linux distribution disk The files for e
80. PLASTIC STRAIN FOR NODE N NODEEPS N RVL IVR NBS EPS D DO SET ELEMENT TO FAILED IF PLASTIC STRAIN EXCEEDED EM EPS MINVAL NODEEPS EM EPS MAX ELEM EPS PUSOELEM EPS ELEM EPS MAX EPS ISTAT 1 NTINUE Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 103 User Subroutine Examples RETURN END SUBROUTINE SOLVE_ERO_USER_1_3D 7 7 Subroutine EXFOR3 The subroutine EXFOR3 may be used to apply an external force on structured or unstructured nodes The direction of the force can be manipulated by modification of the variables COSX_USER COSY_USER COSZ_USER module bnddef mdcom 90 The calling routines check if they are modified they are set to BIG before entering if so we use them they all have to be modified If not modified the direction defined on input in the graphical user interface will be used Please refer to the current and latest listing of the code in the routine usrsub33 f90 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 104 of ANSYS Inc and its subsidiaries and affiliates
81. QSPAR 4 PRMT 4 EPS 43 0 0 0 0 ZERO ZERO BIG ZERO 0 0 EQSPAR 5 PRMT 5 YIELD 1 1 2 1 0 Z2ERO ZERO BIG ZERO 0 0 EQSPAR 6 PRMT 6 YIELD 2 1 2 1 0 Z2ERO ZERO BIG ZERO 0 0 EQSPAR 7 PRMT 7 YIELD 3 1 2 1 0 ZERO ZERO BIG ZERO 0 0 FOR EACH OPTION LIST ASSIGN DATA FOR EXAMPLE EQSOPTION 1 NAME Strain rate dependant OPTION LIST NAME EQSOPTION 1 NUMOPT 2 NUMBER OF OPTIONS IN THE LIST EQSOPTION 1 DEFAULT 1 DEFAULT OPTION EQSOPTION 1 S SSELECTED 1 SELECTED OPTION CALL ALLOC OPTION 1 ALLOCATE THE MEMORY DEFINE OPTIONS name active 0 Dependant child flag EQSOPTION 1 SOPTS 1 OPTION Yes Y 0 EQSOPTION 1 OPTS 2 OPTION No Y 0 FOR EACH NON OPTIONAL DEPENDANT CHILD FLAG MODEL OPTION ASSIGN DEPENDANT FLAG EQSDEPFLG 1 IMF YP PCWISE ENDIF SET IN ACTIVE SWITCH FOR APPROPRIATE PROCESSOR TYPE ALL ON BY DEFAULT EQSIFSOLVER ISLV_FCT 0 RETURN END SUBROUTINE INIT_STR_USER_1 SUBROUTINE SET_STR_USER_1 USE material USE str user 1 IMPLICIT NONE CK Ck Ck Ck kk Ck Ck kk kk ck kk kk ck kk kk ck kk kk ck kk ck kk kk ck kk kk ck kk kk kk Sk kk Sk ko kk ko ko ko k k KKK KKK KK KK 88 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Subroutine MDSTR_USER_1 THIS SUBROUTINE ASSIGNS SHORTCUTS FOR DI
82. QUATION IS ACTIVE HENCE ALLOCATE CK Ck Ck kk kk Ck kk kk kk Ck kk kk Sk kk kk Sk kk kk ck kk kk ko kk kk Sk kk kk Sk kk kk ko ko ko ko kk ko ko Sk ko k Sk ko ko ko KKK KK KK DEFINE PARAMETERS TO ALLOW ALLOCATION EQSEQTYPE IMF ERO USER 1 EQSNAME User Erosion 1 EQSNPAR 1 EQ SNUMOPT 0 EQSNDEPFLG 0 EQSNCHAR 0 EQSNPAR_VEC 0 IF IFACT 1 THEN ALLOCATE ARRAYS FOR EQUATION FLAG CALL ALLOC EQ SET PARAMETER NAMES EQSPAR 1 PRMT 1 Erosion Plastic Strain 0 0 0 0 BIG SMALL BIG BIG 0 1 ENDIF SET IN ACTIVE SWITCH FOR APPROPRIATE PROCESSOR TYPE ALL ON BY DEFAULT EQSIFSOLVER ISLV FCT 0 EQSIFSOLVER ISLV_EULER 0 EQSIFSOLVER ISLV_EULER_GOD 0 RETURN END SUBROUTINE INIT_ERO_USER_1 SUBROUTINE SET ERO USER 1 USE material USE ero user 1 USE mdvar all IMPLICIT NONE CK Ck Ck kk kk kk Ck kk kk ck kk kk Sk kk kk ko kk kk ko kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk Sk kc k Sk kk ko KKK ko ko ko ko ko ko KKK THIS SUBROUTINE ASSIGNS EOS CONSTANTS FOR DIRECT USE IN THE SOLVER DO KK KK kk IO Kok ok ok ko kk kk kk kk kk kk kk kk kk ko KK IO ok ok ok ok ek ek ek EROMOD 5 DO NOT MODIFY THIS LINE MAX_EPS EOSPAR 1 VAL IF_IVAR_ALL IVI_EROSION 2 RETURN END SUBROUTINE SET_ERO_USER_1 SUBROUTINE CHECK_ERO_USER_1 USE material USE ero user 1 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and
83. R MIL MTL TMP The array MATERIALS is allocated when a new model is loaded into the application and is dimensioned by LIMMAT Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 38 of ANSYS Inc and its subsidiaries and affiliates MATERIAL Local Material Data The data for each material is stored in a type MAT contained in MODULE material This contains the following data TYPE MAT KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK DESCRIBES A SET OF EQUATIONS FLAGS FOR ONE MATERIAL NAME REFERENCE NOTES TYP a RHOREF STIFFMAT FLAGS MAIN IFSOLVER MATERIAL NAME A REFERENCE FOR THE MATERIAL ADDITIONAL NOTES ON THE MATERIAL TYPE CLASSIFICATION OF MATERIAL ISOTROPIC ORTH GAS ETC SOLID REFERENCE DENSITY FOR MATERIAL THE MATERIAL STIFFNESS MATRIX ISOTROPIC MATERIALS ONLY LIST OF POSSIBLE FLAGS MATERIAL MODELLIGN OPTIONS ASSOCIATED WITH A MATERIAL PROPERTIES FOR MAIN MODELING OPTIONS USED TO ASSIST IN UI GENERATION FLAG TO INDICATE WHICH SOLVERS A MATERIAL CAN BE USED WITH THIS IS GENERATED AS A SUPERSET OF ALL THE SELECTED MATERIAL MODELING OPTION FLAGS KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK CHARACTER LEN 30 NAME CHARACTER LEN 256 REFERENCE NOTES INTEGER INT4 EP REAL REAL8 RHOREF REAL REAL8 DIMENSION 3 STIFFMAT TYPE PARAMLIST DIMENSION NUMFLAGS FLAGS
84. R NODE I J FOR NODE IS DEFINED BY INOW AND JNOW IN MODULE IJKNOW lt 0 INTERACTIVE NODE K IS THE INTERACTIVE NODE f XB X COORDINATE OF NODE AT BEGINNING OF CYCLE YB Y COORDINATE OF NODE AT BEGINNING OF CYCLE UXT TENTATIVE X VELOCITY BEFORE CONSTRAINTS UYT TENTATIVE Y VELOCITY BEFORE CONSTRAINTS OUTPUT PARAMETERS UXT UYT NOTE AFTER RETURNING FROM THIS END OF CYCLE COORDINATES WILL XE XB UXT DLTH YE YB ROUTINE UYT DLTH SO YOU CAN CONSTRAIN THE DOMAIN MODIFYING UXT AND UYT TO ENSURE WITHIN CERTAIN BOUNDS OF X AND Y X VELOCITY AFTER CONSTRAINT HAS BEEN APPLIED Y VELOCITY AFTER CONSTRAINT HAS BEEN APPLIED BE COMPUTED USING BY DIRECTLY THAT XE AND OR YE REMAIN THE FOLLOWING MODULES CONTAIN INFORMATION WHICH MAY BE USEFUL FOR COMPUTING THE VELOCITY CONSTRAINTS MODULE IJKNOW INOW I INDEX FOR CURRENT CELL JNOW J INDEX FOR CURRENT CELL MNOW CURRENT PART NUMBER MODULE BNDDEF LIMBDY Limit on number of boundary conditions LIMBDC Limit on number of parameters stored for each boundary condition NUMBDY Number of boundary conditions MODULE KINDEF PI THIRD SMALL ZERO ONE 3 1415927 1 0 3 0 1 0E 20 0 0 1 0 CK Ck Ck kk kk kk Sk kk kk Sk kk kk Sk kk kk ko kk kk ko kk kk ko kk kk ko kk kk ko kk Sk ko Sk kk Sk kc k k ko kck KKK ko kk E END CHARACTER 40 TEXT40 IF NAMVEL EQ V POSITIVE UYT MAX UYT 0 0 LSE IF NAMVEL EQ V NEGATIVE M
85. RECT USE IN THE SOLVER CK Ck Ck Ck kk Ck Sk Ck kk kk Ck kk kk Ck kk kk Sk kk kk Sk kk kk ko kk kk ko kk kk Sk kk kk Sk kk Sk ko kk ko Sk ko kk ko ko ko ko KKK KKK FOR EXAMPLE SHRMDZ EOSPAR 1 VAL THIS LINE MUST BE PRESENT EP 1 EQSPAR 2 SVAL EP 2 EQSPAR 3 SVAL EP 3 EOSPAR 4 SVAL YS 1 EOSPAR 5 S VAL YS 2 EQSPAR 6 SVAL YS 3 EQSPAR 7 SVAL r ISEL OPT EQ OPTION 1 SSELECTED RETURN END SUBROUTINE SET_STR_USER_1 SUBROUTINE CHECK_STR_USER_1 USE material USE str user 1 IMPLICIT NONE INTEGER INT4 IERROR CK Ck Ck kk kk kk Ck kk kk Ck kk kk Sk kk kk Sk kk kk ko kk kk ko kk kk ck kk kk ko kk kk kk ko Sk kk kk Sk ko ko Sk k ko ko ko kok ko KKK THIS SUBROUTINE CHECKS EOS INPUT DATA CK Ck Ck kk kk kk Ck kk kk Ck kk kk Sk kk kk ck kk kk ko kk kk ko kk kk Sk kk kk ko kk kk kk ko Sk ko kk ko ko k Sk k ck ko ko ko kokckokokok PLACE USER CHECKS HERE CHECK THAT EPS IS MONOTONICALLY INCREASING IERROR 0 IF EP 1 gt EP 2 OR EP 1 gt EP 3 IERROR 1 IF EP 2 gt EP 3 IERROR 1 IF IERROR 1 THEN CALL USR ERROR ERROR USER STRENGTH MODEL Plastic strain must be monotonically increasing END IF RETURN END SUBROUTINE CHECK_STR_USER_1 SUBROUTINE SOLVE STR USER 1 2D PRES TT1 TT2 TT3 XMUT EPST EPSD TEMPT DAMAGE YIELDT IFAIL USE material USE str user 1 USE cycvar USE edtdef USE ijknow USE wrapup USE mdgrid IMPLICIT NONE INTEGER INT1 IFAIL INTEG
86. RESSURE VARO2 IJK TIME Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 95 User Subroutine Examples END END END END D END END DO END I RE EN IF LOOP ON CELLS DO O LOOP ON PARTS P TURN D SUBROUTINE EXEDIT 7 5 Subroutine EXEDIT3 3D The listing below shows the contents of the file EXED1 over time for all cells in the problem except Euler The example is for Autodyn 3D SUBROUTINE EXEDIT3 US US US US US US IM IN RE IF N LOOP DO NS NSUB CALL LOO DO I DO J DO K IJK VAR VAR KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK THIS IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO PROVIDE SPECIAL CUSTOM EDITING THE FREQUENCY AT WHICH THIS SUBROUTINE IS CALLED IS DEFINED THROUGH INPUT GLOBAL EDIT USER WHEN REQUESTED IT IS CALLED BY THE EDIT PROCESSOR AT THE END OF A COMPUTATIONAL CYCLE THE ROUTINE IS CALLED BEFORE ANY OTHER TYPES OF STANDARD EDITS ARE CALLED FOR THAT CYCLE EG PRINT SAVE HISTORY DISPLAY ETC SO IT MAY ALSO BE USED TO SET UP DATA TO BE PROCESSED BY OTHER EDIT TYPES KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK E mdgrid3 E ranges E kindef E cycvar E wrapup E subdef PLICIT NONE TEGER INT4 E J k NS IJK AL REAL8 MOM RES_VEL MASS kk ckck kk eee eee eee
87. RI12 REAL REAL8 DIMENSION POINTER VAR13 VAR14 VAR15 VARI16 REAL REAL8 DIMENSION POINTER VAR17 VAR18 VAR19 VAR20 REAL REAL8 DIMENSION POINTER SML DENNM1 RNON VORX REAL REAL8 DIMENSION POINTER VORY VORZ HOM1 HOM2 REAL REAL8 DIMENSION POINTER HOB1 HOB2 HQB3 FCOVRI REAL REAL8 DIMENSION POINTER FCOVRJ FCOVRK FCOVRV RBLEND REAL REAL8 DIMENSION POINTER PDIL EDIL EPSPRE HNORM REAL REAL8 DIMENSION POINTER FRATE FCAP EPSDO RTHIRD REAL REAL8 DIMENSION POINTER TFAIL PCOR11 PCOR22 PCOR33 REAL REAL8 DIMENSION POINTER VTXX VTYY VTZZ2 VTXY REAL REAL8 DIMENSION POINTER VTYZ VTZX IGTIME SBRCRT REAL REAL8 DIMENSION POINTER ABSVEL FMASS NUMCEL SPDMMS REAL REAL8 DIMENSION POINTER DTMPDX DTMPDY DTMPDZ THMENG REAL REAL8 DIMENSION POINTER XNO YNO ZNO PGAS REAL REAL8 DIMENSION POINTER FILDEN MOTT REAL REAL8 DIMENSION POINTER TEMPO1 TEMPO2 TEMP03 TEMP04 REAL REAL8 DIMENSION POINTER TEMPO5 TEMP06 TEMPO7 TEMPO8 REAL REAL8 DIMENSION POINTER TEMPO9 TEMP10 TEMP11 TEMP12 REAL REAL8 DIMENSION POINTER TEMP13 TEMP14 TEMP15 TEMP16 REAL REAL8 DIMENSION POINTER TEMP17 TEMP18 TEMP19 TEMP20 REAL REAL8 DIMENSION POINTER TEMP21 TEMP22 TEMP23 TEMP24 REAL REAL8 DIMENSION POINTER TEMP25 TEMP26 TEMP27 TEMP28 REAL REAL
88. RIN1Y ROUT2Y RIN2Y ROUT1Z RIN1Z ROUT2Z RIN2Z REAL REAL8 RSIZIN RCOUT RCIN CLEN CTHICK CHARACTER LEN 1 DIMENSION LIMOBJ YONO CHARACTER LEN 10 DIMENSION LIMSET NAMSET Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 66 of ANSYS Inc and its subsidiaries and affiliates OBJECT SPH Object Definitions CHARACTER LEN 12 DIMENSION LIMOBJ NAMOBJ CHARACTER LEN 12 NAMEO NAMOBJ LIMOBJ object NAME NAMEO CURRENT object NAME NUMOBJ NUMBER OF objectS IN SPH SUBGRID NOBJ CURRENT object NUMBER NOBJT LIMOBJ object TYPE NOBTYP CURRENT object TYPE NOBJC LIMOBJ object COLOUR NOBCOL CURRENT object COLOUR NOBJP LIMOBJ NUMBER OF POINTS IN object POLYGON IFACOB LIMOBJ object ACTIVE PACK INDICATOR OBJO LIMOBJ 2 object ORIGIN COORDS XORG YORG ZORG CURRENT object X Y AND Z ORIGIN OBJS LIMOBJ 3 MAXIMUM object SIZE XSIZ YSIZ ZSIZ CURRENT object MAXIMUM SIZES OBJN LIMOBJ 3 object PRINCI3PAL DIRECTION OBJA LIMOBJ 3 object ANGLE PRINCI3PAL DIRECTION XOBJ LIMOBJ LIMPTS X COORD OF POINTS IN object POLYGON YOBJ LIMOBJ LIMPTS Y COORD OF POINTS IN object POLYGON ZOBJ LIMOBJ LIMPTS Z COORD OF POINTS IN object POLYGON NSPHOB LIMOBJ NUMBER OF SPH NODES PACKED IN object RPSZOB LIMOBJ PARTICLE SIZE IN object MAXOB TOTAL NUMBER OF SPH o
89. S IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 35 Autodyn User Subroutine Modules INTEGER INT4 NUMMAT LOGICAL DIMENSION LIMMAT REAL REAL8 DIMENSION L REAL REAL8 DIMENSION L MODEL PARAMETERS COMMON INTEGER INT4 NSBSLD REAL REAL8 RHOREF A REAL REAL8 TPREF S REAL REAL8 EY1 EY2 REAL REAL8 OAN OXC REAL REAL8 cll 0622 REAL REAL8 SHRMDZ Y REAL REAL8 DERIV1 REAL REAL8 FT11 FT2 REAL REAL8 FE23 FE3 REAL REAL8 OMTY OMA REAL REAL8 GF CCD REAL REAL8 CC SS DEFINE PROCESSOR FLAGS NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER DEFINE PARAMETERS OF MA NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER COMPLETE LIST OF MODEL NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER IN
90. SUBROUTINE INIT ERO USER 1 ALLOCATE SPACE AND DEFINE THE PARAMETERS FOR A GIVEN FLAG SUBROUTINE CHECK ERO USER 1 CHECK PARAMETERS ARE VALID FOR flagname SUBROUTINE SET ERO USER 1 optional SET PARAMETERS FOR SUBSEQUENT USE IN THE SOLVER n UBROUTINE SOLVE_ERO_USER_1_2D UBROUTINE SOLVE_ERO_USER_1_3D SOLVE EQUATION CALLED FROM SOLVER n BEFORE EACH ROUTINE IS CALLED THE FOLLOWING POINTERS ARE SET UP MTL POINTER TO THE CURRENT MATERIAL EQ POINTER TO THE CURRENT FLAG EQUATION MATERIAL OPTION KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK MODULE ERO_USER_1 USE kindef IMPLICIT NONE SAVE SPECIFY COMMON VARIABLES TO BE ACCESSED BY ROUITNES BELOW HERE INTEGER INT4 REAL REAL8 MAX EPS END MODULE ERO USER 1 SUBROUTINE INIT ERO USER 1 IFACT Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 100 of ANSYS Inc and its subsidiaries and affiliates Unstructured Element Data Access USE material USE ero user 1 IMPLICIT NONE INTEGER INT4 IFACT CK Ck Ck kk kk kk Ck kk kk ck kk kk ck kk kk Sk kk kk Sk kk kk Sk kk kk Sk kk Sk kk kk kk kk ko Sk ko Sk ko ko Sk ko k k ko ko ko ko kok ko kokok THIS SUBROUTINE INITIALIZES ALLOCATES PARAMETERS AND DATA FLAG IMF ERO USER 1 INPUT IFACT IFACT 0 JUST GET NAME OF EQUATION AND DEPENDANT FLAGS 1 E
91. T1 DIMENSION POINTER NPKJN NPKOV NPKIF NPKNW NTEGER INT1 DIMENSION POINTER NPKO1 NPK02 NPK03 NPKO4 NTEGER INT1 DIMENSION POINTER NPKO5 NPK06 NPK07 NPKO8 NTEGER INT1 DIMENSION POINTER NPKO9 NPK10 NPKIC NTEGER INT1 DIMENSION POINTER NVAR POINTER ARRAY TO ALL TEMPORARY SUBGRID INTEGER VARIABLES NTEGER PARAMETER LIMILT 10 TYPE INTEGER ARRAY POINTER DIMENSION LIMSUB LIMILT IGRID NTEGER PARAMETER NITMPO1 NTEGER PARAMETER NITMP02 2 NTEGER PARAMETER NITMP03 3 NTEGER PARAMETER NITMP04 4 NTEGER PARAMETER NITMP05 5 NTEGER PARAMETER NITMP06 6 NTEGER PARAMETER NITMP07 7 NTEGER PARAMETER NITMP08 8 NTEGER PARAMETER NITMP09 9 NTEGER PARAMETER NITMP10 10 NTEGER INT4 DIMENSION POINTER ITMPO1 ITMPO2 ITMPO3 NTEGER INT4 DIMENSION POINTER ITMP04 ITMPO05 ITMP06 NTEGER INT4 DIMENSION POINTER ITMPO7 ITMPO08 ITMP09 NTEGER INT4 DIMENSION POINTER ITMP10 ITMP11 ITMP12 POINTER ARRAY TO ALL TEMPORARY SUBGRID COORDINATES FOR SAVE RESTORE FACILITY TYPE REAL ARRAY POINTER DIMENSION LIMSUB 3 GRID TMP TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB 2 NPACK TMP NTEGER INT1 DIMENSION POINTER NPKMT_TMP NPKMN TMP REAL REAL8 DIMENSION POINTER XPP TMP YPP TMP POINTER ARRAY TO ALL STANDARD AND TEMPORARY SUBGRID REAL VARIABLES TYPE REAL ARRAY POINTER DIMENSION LIMSU
92. T2 TT3 XMUT EPST EPSD TEMPT YIELDT IFAIL ALSO NOTE USE mdgrid3 AND NOT mdgrid for AUTODYN 3D 900 RETURN END SUBROUTINE SOLVE STR USER 1 3D 7 2 Subroutine EXVEL The listing shown below is for a user supplied EXVEL subroutine which is used for two user defined velocity constraints V POSITIVE and V NEGATIVE which are used to constrain the y component of velocity SUBROUTINE EXVEL NAMVEL RBC K XB YB UXT UYT USE kindef USE bnddef USE ijknow USE wrapup IMPLICIT NONE INTEGER INT4 K REAL REAL8 S UXT UYT XB YB REAL REAL8 DIMENSION 5 RBC CHARACTER LEN 10 NAMVEL kk Ck kk ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ko kk kk ko kk kk ko Sk ko Sk kv Sk k ko k ko KK KK KK THIS IS A USER SUPPLIED SUBROUTINE WHICH APPLIES VELOCITY CONSTRAINTS TO NODES THE ROUTINE IS CALLED ONCE PER CYCLE FOR Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 92 of ANSYS Inc and its subsidiaries and affiliates Subroutine EXVEL EACH NODE ASSIGNED WITH THE USER VELOCITY CONSTRAINT THROUGH INPUT THE USER VELOCITY CONSTRAINT IS USED WHEN THE X AND Y VELOCITY CONSTRAINTS CANNOT BE DESCRIBED BY A COMBINATION OF THE STANDARD VELOCITY CONSTRAINTS AVAILABLE IN AUTODYN INPUT PARAMETERS INPUT PARAMETERS NAMVEL BOUNDARY CONDITION NAME SUPPLIED BY USER DURING INPUT RBC 1 5 INPUT PARAMETERS FOR BOUNDARY CONDITION K 0 REGULA
93. T4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER NTEGER INT4 PARAMETER TMP LSMTPL IMMAT IMMAT RMATIE RMATKE RMATDE RMATVL RMATXM RMATYM RMATZM RMATMS TO SEVERAL FLAGS IFSTOCH 1 Cl HCV EY3 OYC C33 LDSTZ DERIV2 2 FT33 FT12 X11M Y11M Z11M N OMXC OMYC OMZC AG CCOUP CSHR OPTIONS v12 OZC G12 23 EROMOD V2i35 7V31 7612 G23 631 C31 KEFF EROSON PMIN EPSLIM FE11 FE22 FE33 FE12 FT31 FT23 FTYPE THESE SHOULD GO IN COMMON GRID MODULE WHEN INTEGRATED ISLV LAG ISLV EULER ISLV ALE ISLV SHELL ISLV EULER GOD ISLV FCT ISLV SPH ISLV BEAM co 120 01 CO N20 ES TERIAL TYPES MATTYP ISO MATTYP ORTHO MATTYP GAS uo dog C ND e FLAGS INCLUDING FUTURE FLAGS NUMFLAGS 1000 NFLAGS MAIN 100 MF EQUATION 1 MF_EOS 2 MF_STR 3 MF FAI 4 MF_POR e MF ERO 6 MF CUTOFFS 7 MF_OPTIONS 8 MF_USER_MAT_1 90 MF_USER_MAT_2 91 MF_USER_MAT_3 92 MF_USER_MAT_4 93 MF_USER_MAT_5 94 MF_EOS_LINEAR 101 MF_EOS_POLYNOMIAL MF EOS IDEALGAS MF EOS SHOCK MF_EOS_JWL E
94. TEX ck ck ck ck ck ck ck ck ck ck ck ck ck ck ok ck kk kk kk kk ke kk kk kk kk kk kk kk kk kk kk kk ke kk ko ko ko ko ko ko ko kckckck kc kc kk THIS LOGIC SETS THE X COORDINATE OF EACH VERTEX I J TO THE X VALUE AT VERTEX I JMAX AND EQUALLY SPACES THE Y COORDINATES BETWEEN I 1 AND I JMAX IJMAX IJSET IREZ JMAX IJ IJSET IREZ JREZ XREZ XN IJMAX DYB YN IJMAX FLOAT JMAX 1 YREZ DYB FLOAT JREZ 1 TERMINATION OF SUBROUTINE EXALE RETURN END SUBROUTINE EXALE 7 4 Subroutine EXEDIT 2D The listing below shows the contents of the file EXEDIT F90 used to store the maximum pressure over time for all cells in the problem The example is for Autodyn 2D but 3D would be analogous by simply including logic for the K index SUBROUTINE EXEDIT KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KK KKK KKK KKK KKK KKK KKK KKK KKK ko ko kk kc KKK KKK KKK Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 94 of ANSYS Inc and its subsidiaries and affiliates Subroutine EXEDIT 2D THIS IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO PROVIDE SPECIAL CUSTOM EDITING THE FREQUENCY AT WHICH THIS SUBROUTINE IS CALLED IS DEFINED THROUGH INPUT GLOBAL EDIT USER WHEN REQUESTED IT IS CALLED BY THE EDIT PROCESSOR AT THE END OF A COMPUTATIONAL CYCLE THE ROUTINE IS CALLED BEFORE ANY OTHER TYPES OF STANDARD EDITS ARE CALLED FOR THAT CYCLE EG PRINT
95. TPUT PARAMETERS Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 91 User Subroutine Examples MODULE IJKNOW INOW I INDEX FOR CURRENT CELL JNOW J INDEX FOR CURRENT CELL KNOW K INDEX FOR CURRENT CELL MNOW CURRENT SUBGRID NUMBER MODULE MATDEF MATNO THE MATERIAL NUMBER OF THE CURRENT MATERIAL MATERIALS MATNO lt NAME THE MATERIAL NAME OF THE CURRENT MATERIAL MODULE CYCVAR NCYCLE CURRENT CYCLE NUMBER TIME CURRENT TIME DLTH TIME STEP FOR CURRENT CYCLE MODULE EDTDEF NTCODE DIMENSIONS 2 2D 3 3D THE FOLLOWING GRID VARIABLES MAY ALSO BE USEFUL ML NCEN CELL SPECIFIC INTERN3AL ENERGY XMU IJK CELL COMPRESSION RHO RHOREF ONE ML NCDM DAMAGE TO OBTAIN THE VALUE OF THE INDEX IJK FOR THE CURRENT CELL USE l IJK IJKSET INOW JNOW KNOW THE INDEX IJK MUST ALSO BE DEFINED AS AN INTEGER INTEGER INT4 IJK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKKKKKKK KKK KK KK SUBROUTINE CALLED BY ALL STRENGTH MODELS SO SKIP OUT BY DEFAULT IF NSTR IMF_STR_USER_1 GO TO 900 TEMPORARY ERROR MESSAGE REPLACE WITH YOUR OWN CODE CALL USR MESSAG User subroutine STR USER 1 3D missing NSWRAP 9 TO ACCESS A V4 3 USER SUBROUITNE FOR AUTODYN 3D UNCOMMENT THE NEXT LINE ICALL EXYLD PRES TT1 T
96. TS LOOP OVER ELEMENTS IN PART DO N 1 PARTSNUMELM NEL PARTSELEMENT_LIST N OBTAIN GLOBAL INTERNAL INDEX IF ELEMENT COPY ELEMENT VARIABLES INTO LOCAL VARIABLE VECTOR NINST 0 CALL GET_ELEM_VAR NEL NINST CALCULATE IMPEDANCE RVL IVR_VARO1 RVL IVR DENSITY RVL IVR SOUNDSPEED COPY UPDATED LOCAL ELEMENT DATA BACK TO MAIN STORAGE CALL PUT ELEM VAR NEL NINST END DO END LOOP ON ELEMENTS END DO END LOOP ON PARTS 7 6 3 Access to All Elements in a Component The following code loops over all Components in a model and for component Solid defines and stores the impedance of each element in the component in user variable VARO1 The code works for both Structured and Unstructured Parts Solvers USE mdpart USE mdvar all USE mdsolv USE mdcomponents USE mdgrid3 IMPLICIT NONE INTEGER INT4 NPART NEL NINST N NN NNN INTEGER INT4 I J K IJK DO N 1 NUM_COMPONENTS COMP gt COMPONENTS N P IF COMPSNAME Solid CYCLE DO NN 1 COMP SNUM_PART NPART COMP SPART_LIST NN IF NPART gt NUMSUB THEN UNSTRUCTURED PART NPART NPART NUMSUB PART gt PARTS NPART P Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 98 of ANSYS Inc and its subsidiaries and affiliates Unstructured Element Data Access LOOP OVER ELEMENTS IN PART DO NNN 1 PARTSNUMELM NEL PARTSELEMENT_LIST NNN OBTAIN GLOBAL INTERNAL INDEX IF ELE
97. TYPE MAINFLAG DIMENSION NFLAGS_MAIN MAIN INTEGER INT4 DIMENSION LIMSOL IFSOLVER END TYPE MAT Within each material definition the array FLAGS contains data for all material modeling options available NUMFLAGS The index of all material modeling options flags is specified in matdef Each option flag has a module associated with it which defines provides input parameters variables checks equation solution for that option For example IMF EOS LINEAR is the flag index in the FLAGS array for a linear equation of state The input parameters variables checks and equation solution for the linear equation of state are contained within the module mdeos linear f90 The data for each flag is stored in TYPE PARAMLIST TYPE PARAMLIST TYPE DEFINITION FOR A LIST OF PARAMETERS NAME NAME ASSOCIETD WITH LIST IACTIVE INDICTES IF LIST FLAG IS ACTIVE VISIBLE INDICATES IF LIST IS VISIBLE IN UI IFSOLVER INDICATES SOLVER TYPES FOR WHICH FLAG IS AVAILABLE EOTYPE FLAG INDEX NPAR NUMBER OF REAL PARAMETERS IN LIST NUMOPT NUMBER OF OPTIONS IN LIST NDEPFLG NUMBER OF DEPENDANT FLAGS THAT ARE ALWAYS USED WITH THIS FLAG CHILDREN IPOS ARRAY INDICATING POSITION OF REAL PARAMETERS TO BE DISPLAYED IN UI DEPFLG LIST OF DEPENDANT CHILD OPTIONS FLAGS PAR REAL PARAMETER DEFINITIONS OPTION OPTION LIST S DEFINITIONS CHARACTER LEN 30 INTEGER INT4 INTEGER INT4
98. X NNUZDY NNUZDZ NNSLP2 NTEGER INT4 NNRIJN NNRJJN NNRKJN NNZVAR NTEGER INT4 DIMENSION 6 NNSTRS NTEGER PARAMETER NNMXVR 50 NNMZVR NNZVAR FOR NPROC 5 0 FOR OTHERS NNMZVR 41 NDAT1 NNMZVR 1 NO PARAMETER AS GETMLT USED BY OTHER PROC TOO NTEGER INT4 IL NTEGER INT4 DIMENSION LIMVAR NOFMV NTEGER INT4 DIMENSION 1 TARGET UNUSED 99 REAL REAL8 DIMENSION NNMXVR TARGET VOIDTG REAL REAL8 DIMENSION 1 TARGET NULLTG REAL REAL8 TARGET ZEROTG ZERO REAL REAL8 DIMENSION NNMXVR 2 TARGET ZVBUFF REAL REAL8 DIMENSION POINTER VARS VARSP SLOPES Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 55 Autodyn User Subroutine Modules REAL REAL8 REAL REAL8 REAL REAL8 DIMENSION DIMENSION 2 LIMMAP REAL REAL8 DIMENSION 2 LIMMAP DIMENSION 2 LIMMAP POI NTER CHARACTER LEN 1 DIMENSION LIMMLV CHARACTER LEN 1 DIMENSION LIMMLV TYPE MICRO ARRAY 3D INTEGER INT1 DIMENSION LIMMC LIMMC LIMMC REAL REAL8 DIMENSION L END TYPE MICRO ARRAY 3D TYPE MICRO ARRAY 3D POINTER TYPE MICRO ARRAY 3D PO TYPE MICROZONE POINTERS 3D TYPE MICRO ARRAY 3D POIN TYPE MICROZONE POINTERS 3D TYPE REAL ARRAY POINTER TYPE REAL ARRAY POINTER NTEGER INT1 DIMENSION REAL RE
99. YM al EOS ussen itn Cepeda bota EE utes eae tags opal bg spp planete ee t E 41 5 11 3 1deal Gas EOS 4 2 iit ee te ee RU e ER e PU E RR EC EVITER PCS AREE ERE alive 41 E Miedo 42 Bel VUE Sich deco va ni adea du esse Ha pt cit maldad tnu G an eode tuat oa gd is qu ade INANE 42 5 TLG Tillotson EOS 3i e epo Seat enean todo eau deae eR RA ETO T AE aAa NEE RR TERRENOS Be 42 5 EZ PUFEEOS iere ie p EVER UN Bre RE wien IR MAREM RE NCHO ERA RR ENCORE SEA E a ENT OR ARN TENER EA UTERE 43 5 11 8 Porous EOS eoe ert ie Pr Pe ie le bute o ERE EP DEP eR 43 5 1 1 9 Orthotropic EOS 2 teeth deor a eed d ees Saves heeds de ee oae y eun ue da d ees uoc eal eed d eee ode eel ee da d rues 43 5 THETO TWo PhaseEOS oa eo etre re eei er retrace ree eere ei c aeree e MAY ini AEE aE 44 5211 11 Lee Tarver EOS DET EE 44 MNA udo ECCE 45 X RESI EOS T n Weeder aiia 45 5 12 Strength Model Variables s oii ieie iiaee em eodera pl e agus tpe Ru onte du 46 5 12 1 Dr cker Prager Strength Model pn REED NAR TR ERRARE REANO AEE EUM QNIN MEAE YER UgE 46 5 12 2 Johnson Cook Strength Model 4 riori tarn re YER e YER rd RR eo PEERS RAS BR DECYV EY Edd ya 47 5 12 3 Zerilli Armstrong Strength Model er rhon avi qan udi o Prob a ep PR 47 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates iii User Subroutines Tutorial 5 12 4 Steinberg
100. YS Inc and its subsidiaries and affiliates 43 Autodyn User Subroutine Modules 5 11 10 Two Phase EOS To access local data USE matdef USE eos_twophase CMPEOS Compression EOS switch linear polynomial shock user Number of points in table XNT Pointer to model data 5 11 11 Lee Tarver EOS To access local data USE matdef USE eos_leetarver Chapman Jouguet C J energy unit volume in JWL EOS A parameter B parameter R1 parameter R2 parameter W parameter C J detonation velocity C J pressure Reaction zone width Maximum change in reaction ratio Ignition parameter Ignition reaction ratio exponent Ignition critical compression Ignition compression exponent Growth parameter G1 RRC Growth reaction ratio exponent c RRD Growth reaction ratio exponent d RRY Growth pressure exponent y RRG2 Growth parameter G2 RRE Growth reaction ratio exponent e RRG Growth reaction ratio exponent g RRZ Growth pressure exponent z FIGMAX Maximum reaction ratio ignition FG1MAX Maximum reaction ratio growth G1 FG2MIN Minimum reaction ratio growth G2 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 44 of ANSYS Inc and its subsidiaries and affiliates Equation of State EOS Variables LTUEOS Unreacted Lee Tarver EOS switch shock JWL Maximum relative volume
101. ZATION CODE I REF NAME OF THE REFERENCE FILE ABOUT THIS OPTION ID INTEGER ID USED FOR DIFFERENT PURPOSES FOR EXAMPLE i IT CAN BE THE ID NUMBER FOR A DEPENDANT CHILD FLAG CHARACTER LEN 80 NAME CHARACTER LEN 10 AUTH CHARACTER LEN 10 REF INTEGER INT4 ID END TYPE OPTION TYPE OPTION_LIST TYPE DEFINITION FOR AN OPTION LIST NAME OPTION LIST NAME NUMOPT NUMBER OF OPTIONS IN THE LIST OPTS DETAILS OF EACH OPTION DEFAULT DEFAULT OPTION IN THE LIST SELETCED CURRENT SELECTED OPTION IPOS POSITION OF OPTION LIST WITHIN PARAMLIST REQUIRED INDICATES WHETHER AN OPTION MUST BE SPECIFIED OR NOT CHARACTER LEN 30 zi NAME INTEGER INT4 NUMOPT TYPE OPTION DIMENSION POINTER OPTS INTEGER INT4 DEFAULT SELECTED INTEGER INT4 IPOS VISIBLE REQUIRED END TYPE Local pointers used extensively throughout the code to create temporary shortcuts to the material data The most common are Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 40 of ANSYS Inc and its subsidiaries and affiliates Equation of State EOS Variables MTL gt MATERIALS MATNO POINTER TO CURRENT MATERIAL EQ gt MTLSFLAGS IMF_ POINTER TO PARAMETER LIST FLAG OF MATERIAL MATNO Both these pointers are referenced in module material Subroutine GETMAT sets up the pointer MTL to the current material MATNO The name of a
102. a IVL integer data accessible via Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 20 of ANSYS Inc and its subsidiaries and affiliates Autodyn Utility Functions Subroutines USE mdvar_all To find the index of the variable in these vectors see Autodyn Variable Listings p 69 See also Un structured Solvers Elements p 12 for more information SUBROUTINE PUT_ELEM_VAR Usage CALL PUT_ELEM_VAR INDEX_ELEM INDEX_LAYER Purpose INDEX ELEM is the current global element number normally available via ELEM NOW TNDEX_LAYER is the current element layer for the current element For solid elements this number is ignored and can be set to either 0 or 1 Copies the data to main storage from local vector RVL real data IVL integer data accessible via USE mdvar all To find the index of the variable in these vectors see Autodyn Variable Listings p 69 See also Unstructured Solvers Elements p 12 for more information SUBROUTINE GET NODE VAR Usage CALL GET NODE VAR INDEX NODE INDEX MATERIAL Purpose INDEX NODE is the current global node number which can be retrieved via ELEM NOW see Access to Nodal Variables for NBS Tetrahedral Elements p 100 TNDEX MATERIAL is normally set to either 0 or 1 For NBS nodes this indicates the material that is being referred to on this specific node see the example Access to Nodal Variables for NBS Tetrahedral Elements p
103. ables defined for the current problem MODULE rundef USE kindef IMPLICIT NONE SAVE INTEGER INT4 ISYM IFINC IFIMP IFDATA IFBAT IFLOG NUNITM INTEGER INT4 NUNITL NUNITT NUNITD ISYMX ISYMY ISYMZ IFIDNT INTEGER INT4 IFSEC MAXEXEC 99 MAXPCS 99 MAXSLV 99 NUMPCS INTEGER INT4 LDEBUG 0 INTEGER INT4 SVLSCYC 0 INTEGER PARAMETER NUNTYP 20 NUNITS 21 INTEGER INT4 DIMENSION NUNTYP IPOWER INTEGER INT4 DIMENSION NUNTYP NUNITS IUNITN CHARACTER LEN 100 ITEMS DESCR CHARACTER LEN 40 Ss WITLBBE HEAD CHARACTER LEN 40 DIMENSION 4 TARGET COMENT CHARACTER LEN 10 DIMENSION 3 UNITM UNITL UNITT CHARACTER LEN 2 DIMENSION 3 UNITMS UNITLS UNITTS CHARACTER LEN 8 DIMENSION NUNTYP NUNITS UNITTX END MODULE rundef ISYM Symmetry switch IFINC Incompressible switch future use IFIMP Implicit time integration switch future use IFDATA Indicates if data has been modified IFBAT Batch mode switch Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 62 of ANSYS Inc and its subsidiaries and affiliates SUBDEF Global Part Variable Definitions Log file write switch Mass unit Length unit Time unit Display Units Switch not available not available Heading title for calculation Heading for top right of screen Text array used to hold menus and so on
104. affiliates 101 User Subroutine Examples IMPLICIT NONE CK Ck Ck Ck kk kk Ck kk Ck kk kk kk ck kk kk ck kk kk ck kk kk ck kk kk ko kk kk Sk kk kk ko kk kk kk ko Sk kc k KKK KKK KKK KK THIS SUBROUTINE CHECKS EOS INPUT DATA CK Ck Ck Ck kk Ck Sk Ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ko kk ck kk kk kk ko kk kk Sk kk kk ko ko ko Sk ko kk ko kckockckck ck KKK NO CHECKS REQUIRED RETURN END SUBROUTINE CHECK ERO USER 1 SUBROUTINE SOLVE ERO USER 1 2D ISTAT USE USE USE USE material ero user 1 mdgrid wrapup IMPLICIT NONE INTEGER INT4 ISTAT Ck ck ck ck ck ck kk kk kk kk kk Sk Sk Sk Sk kk kk kk kk kk Sk kk kk kk kk kk kk kk kk kk kk kk Sk Sk kk kk ko ko ko ko ko ko ko k ck kk ok THIS IS A USER SUPPLIED SUBROUTINE WHICH CAN BE USED TO ERODE THE CURRENT CELL ACCORDING TO ANY CRITERIA THE USER DECIDES OUTPUT ISTAT l PARAMETER EROSION SWITCH ASSIGN TO NON ZERO TO ERODE THE CURRENT CELL IN ADDITION TO THE FORMAL PARAMETERS MODULE MATDEF CONTAINS THE FOLLOWING INFORMATION MATNO THE MATERIAL NUMBER OF THE MATERIAL BEING PROCESSED MTL NAME THE MATERIAL NAME OF THE MATERIAL BEING PROCESSED CK Ck Ck ck Ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ck kk kk ko kk ck kk kk kk Sk kk kk Sk kk kk kk ko Sk ko kk ko ko ko ko kokckokokok TEMPORARY ERROR MESSAGE REPLACE NEXT TWO LINES WITH YOUR OWN CODE CALL USR MESSAG User subroutine SOLVE ERO USER 1 2D missing NSWRAP 9
105. age parameter EXPLRN Custom plastic flow return algorithm EXSHR Custom shear modulus EXSTIF Custom stiffness matrix orthotropic elastic with failure EXTAB Custom tabulated saturation curve for two phase EOS Table 1 2 Additional User Subroutines EXACC Apply user defined acceleration to a Lagrangian node EXALE Custom ALE Arbitrary Lagrange Euler grid motions EXEDIT Custom edits EXFLOW Custom Euler flow boundary EXFOR3 Custom Force Boundary on structured and unstructured nodes EXFRICTION User defined friction Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 1 User Subroutine Tutorial Introduction Loading additional non standard data from SAVE files EXSAVE Custom variable polygon porosity Saving additional non standard data to SAVE files EXSIE Custom energy deposition EXSTR Custom stress boundary condition EXVAL Custom initial conditions EXVEL Custom velocity boundary condition EXZONE Custom nodal coordinates EXORTHO_AXES Custom define initial material axes for orthotropic materials Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Chapter 2 How to Invoke User Subroutines To explain how user
106. bjects MATERIAL SET VARIBALES MATSET LIMOBJ MATERIAL SET FOR object MAXSET NUMBER OF MATERIAL SETS MATOBJ LIMSET MATERIAL NUMBER FOR MATERIAL ASSIGNED TO SET UXNOBJ LIMSET INITIAL X VELOCITY ASSIGNED TO MATERIAL SET UYNOBJ LIMSET INITIAL Y VELOCITY ASSIGNED TO MATERIAL SET UZNOBJ LIMSET INITIAL Z VELOCITY ASSIGNED TO MATERIAL SET URNOBJ LIMSET INITIAL R VELOCITY ASSIGNED TO MATERIAL SET RHOOBJ LIMSET INITIAL DENSITY ASSIGNED TO MATERIAL SET ENOBJ LIMSET END MODULE object NAMOBJ LIMOBJ INITIAL INTERN3AL ENERGY ASSIGNED TO MATERIAL SET Object name NAMEO Current object name NUMOBJ Number of objects in sph Part NOBJ Current object number NOBJT LIMOBJ Object type NOBTYP Current object type NOBJC LIMOBJ Object color NOBCOL Ourrent object color NOBJP LIMOBJ Number of points in object polygon IFACOB LIMOBJ Object active pack indicator OBJO LIMOBJ 2 Object origin coords XORG YORG Current object x and y origin OBJS LIMOBJ 2 Maximum object size XSIZ YSIZ Current object maximum sizes XOBJ LIMOBJ LIMPTS X coord of points in object polygon YOBJ LIMOBJ LIMPTS Y coord of points in object polygon NSPHOB LIMOBJ Number of sph nodes packed in object MAXOB Total number of sph objects Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS I
107. ccess The following examples demonstrate different methods for obtaining the unique internal index of an unstructured element and subsequent data access storage Examples are given for 7 6 1 Direct Access through User Element Number 7 6 2 Access to All Elements in a Part 7 6 3 Access to All Elements in a Component 7 6 4 Access to All Elements in a Group 7 6 5 Access to Nodal Variables for NBS Tetrahedral Elements 7 6 1 Direct Access through User Element Number The following code provides an example of how to directly access store information for a single entity node or element knowing the user number USE mdstring IMPLICIT NONE INTEGER INT4 NEL USER NEL N NEL 0 DO N 1 NUM_ENTITY_ENTRIES TYPE_ELEM Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 97 User Subroutine Examples IF ENTITY TYPES TYPE ELEM S ID N NEL USER THEN NEL N EXIT END IF END DO 7 6 2 Access to All Elements in a Part The following code loops over all Unstructured Parts in a model and defines the value of user variable VARO1 to be the impedance of the material for all Parts containing volume elements USE mdpart USE mdvar_all USE mdsolv IMPLICIT NONE INTEGER INT4 NPART N NEL NINST DO NPART 1 NUM_PARTS PART gt PARTS NPART P IF PARTSELEM_CLASS ICLASS_VOLUME CYCLE SKIP NON SOLID ELEMEN
108. de Cell Cell Particle Node X component of velocity Y VELOCITY UYN Node Node Cell Cell Particle Node Y component of velocity Z VELOCITY UZN Node Node Cell Cell Particle Node Z component of velocity 74 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Autodyn 3D Structured IJK Solvers Internal Array Euler Euler Godun FCT ov Description Y FORCE FX Particle Particle X component of force Y component of force Z FORCE Particle Z component of force NODE MASS Particle Nodal mass VOLUME Particle Volume VOLUME Material volume D FRACTION fraction E MASS Particle Material mass in D cell E COMPRESS Particle Material compres D sion E INT ENERGY CEN Cell Cell Cell Particle Ele Material internal D ment energy E PRESSURE PN Cell Cell Cell PParticle Pressure PSEUDO V O Q Cell Particle Artificial viscosity DIS ENERGY ADE Cell Seg Cell Particle Cell Specific distortional ment energy PLASTIC WK PLWK Cell Ele Cell Particle Ele Specific plastic ment ment work DENSITY DEN Cell Cell Cell Particle Cell Density TEMP CTP Cell Ele Cell Cell Particle Ele Material temperat D ment ment ure E EFF PL STN CPS Cell Ele Cell Particle Ele Material effective C ment
109. def USE kindef IMPLICIT NONE SAVE INTEGER PARAMETER LIMBDY 200 INTEGER PARAMETER LIMBDC 20 INTEGER INT4 NUMBDY INTEGER INT4 IFLIMX IFLIMY IFLIMZ INTEGER INT4 DIMENSION LIMBDY TARGET NBDTYP IVB REAL REAL8 XMIND XMAXD YMIND YMAXD ZMIND ZMAXD REAL REAL8 DIMENSION LIMBDC LIMBDY TARGET RVB CHARACTER LEN 10 DIMENSION LIMBDY TARGET NAMBDY END MODULE bnddef Limit on number of boundary conditions Limit on number of parameters stored for each boundary condition Number of boundary conditions Boundary condition types Material number for Euler Flow and Transmit boundaries Boundary condition parameters Boundary condition names 5 2 CYCVAR Cycle Variables MODULE cycvar USE kindef IMPLICIT NONE SAVE INTEGER INT4 NCYCLE IDTCAL MTSTEP ITSTEP JTSTEP KTSTEP INTEGER INT4 NCYBEG NRSCYC MDELS JDELS REAL REAL8 TIMB TIME DLTB DLTH DLTE DLTMIN DLTMAX REAL REAL8 DTFRAC SSSTEP SSSTAB DRSTAB VLSTAB DVSTAB REAL REAL8 DLTHOL CSSTEP DTMIN INTEGER INT4 FCTSTEP Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 29 Autodyn User Subroutine Modules INTEGER INT4 NCYCLEEUL IDTCALEUL MTSTEPEUL ITSTEPEUL JTSTEPEUL KTSTEPEUL INTEGER INT4 NCYBEGEUL NRSCYCEUL MDELSEUL JDELSEUL R
110. detonation velocity C J pressure Burn on compression fraction Pre burn bulk modulus Adiabatic constant 5 11 6 Tillotson EOS To access local data USE eos_tillotson AU Parameter A in Tillotson EOS BU Parameter B AL Parameter a BL Parameter b ALP Parameter alpha BETA Parameter beta 42 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Equation of State EOS Variables Parameter eO Parameter es Parameter esd 5 11 7 PUFF EOS To access local data USE eos puff Parameters Ai in Puff EOS Gruneisen coefficient Expansion coefficient Sublimation energy Parameter T1 Parameter T2 5 11 8 Porous EOS To access local data USE matdef USE eos porous C1 Solid sound speed CPOR Porous sound speed RTBL 1 to RTBL 10 Tabular density values 1 PTBL 1 to Tabular pressure values PTBL 10 5 11 9 Orthotropic EOS To access local data USE matdef EY1 Youngs modulus 1 EY2 Youngs modulus 2 EY3 Youngs modulus 3 V12 Poissons ratio 12 V23 Poissons ratio 23 V31 Poissons ratio 31 OTY Material axes option OAN Rotation angle OXC X origin Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANS
111. diting are contained within this directory and the libraries needed for compilation contained in the Module subdirectory A script is supplied for compilation of customized Autodyn executables to execute the script type autolnk within the user subroutine directory This will compile each user subroutine FORTRAN file in turn and then link with the Autodyn library to produce a customized Autodyn executable and slave executable Before running the autolnk script the environment variable MPI_ROOT should be set or the path to the Platform MPI directory set in the script By default Platform MPI is installed into the directory ansys_inc v150 commonfiles MPI Platform 9 1 lt platform gt In order to run your customized Autodyn executable you should set the environment variable CUSTOM IZED AUTODYN to be the full path to the location of the customized Autodyn executables For example for a customized Autodyn executable created in a user s directory home auto dyn user autodyn customize using the C shell the environment variable is defined by setenv CUSTOMIZED AUTODYN home autodyn user autodyn customize Once this environment variable is set run the standard Autodyn script located by default in an sys inc vi150 autodyn bin and the customized executable will be run from the path defined by the variable In order to return to the standard Autodyn executable you should be sure to unset the variable by typing unsetenv CUSTOMIZE
112. e following Intel NET project files should be used MAUTODYNN platform ad_usrsub sIn Intel NET Solution ad_usrsub vfproj Intel NET Fortran project 3 3 Formal Parameters Most of the user subroutines have formal parameters There are comments at the head of the subroutines defining each parameter stating whether the parameter is an input parameter an output parameter or both In the simplest case the writing of a user subroutine might consist of computing the output parameter s from the input parameter s as in the MD STR USER 1 example in How to Invoke User Subroutines p 3 If the user subroutine requires the use of other variables that are not formal para meters then we must obtain them in some other manner If a variable is global in nature for example cycle number material data time this information is obtained through the USE statement referencing the appropriate Autodyn module If the desired variable is associated with a Part for example cell pressures velocities and so on these are obtained most readily by using Autodyn supplied functions to retrieve Part data 3 4 Autodyn Modules Non Parameter Data If you need data in addition to that supplied as formal parameters to a user subroutine you can usually get this data directly from the Autodyn modules which follow the naming conventions mod The Autodyn modules for Autodyn 2D and Autodyn 3D are described in Autodyn User Subroutine Mod ules p
113. e with exporting laws warranties disclaimers limitations of liability and remedies and other provisions The software products and documentation may be used disclosed transferred or copied only in accordance with the terms and conditions of that software license agreement ANSYS Inc is certified to ISO 9001 2008 U S Government Rights For U S Government users except as specifically granted by the ANSYS Inc software license agreement the use duplication or disclosure by the United States Government is subject to restrictions stated in the ANSYS Inc software license agreement and FAR 12 212 for non DOD licenses Third Party Software See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software and third party software If you are unable to access the Legal Notice please contact ANSYS Inc Published in the U S A Table of Contents 1 User Subroutine Tutorial Introduction ccccesssccccccecesssessneccececeesseessnaaeeeeeeeceseeesnseeeeeeseseqeeeaaes 1 2 How to Invoke User Subroutin s said asi ces rn einer ts d c Yee aod ed re ebrei Ri Eo ed meee a p S 3 3 Writing Your Own User Subroutines seesesssseeeeeeeeeeneeene nennen enne nennen ee nn nenne enne 9 3 1 Compilers Required to Work with User Subroutines ceceeseseccceeeeeseeessnaceceeeceeseeesnneeeeeeeeseeesennaees 9 32 User Subroutine File Siseseinte tert ret heres
114. eam SPH and FCT solvers these variables are most efficiently accessed from the multi material array structure using the direct method For each cell set the material variable array pointer using ML gt MTSUB IJK 96V 1 NUMMLV Then access set the material data using ML index For example to set the cell damage to one and internal energy to zero use 6 4 Unstructured Solvers The complete list of unstructured variables for both 2D and 3D can be obtained through the Output Save Review variables option in the interface Both the real and integer variables can be viewed by se lecting to review all unstructured variables Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 85 86 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Chapter 7 User Subroutine Examples The following sections provide selected examples and information about the use of Autodyn user sub routines 7 1 Subroutine MDSTR USER 1 7 2 Subroutine EXVEL 7 3 Subroutine EXALE 7 4 Subroutine EXEDIT 2D 7 5 Subroutine EXEDIT3 3D 7 6 Unstructured Element Data Access 7 7 Subroutine EXFOR3 7 1 Subroutine MDSTR USER 1 The listing below shows the contents of the file MDSTR USER 1 TUT used for the example User Subrou
115. ers p 13 for more information SUBROUTINE PUTMLT Usage CALL PUTMLT UK O PUTMLT3 UK O Purpose Stores the updated cell values of the multi material variables for each material in the cell for the node IJK See Accessing Multiple Material Data All IJK Solvers p 13 for more information SUBROUTINE ADQUIT Usage CALL ADQUIT Message to be displayed CALL ADQUIT TEXT TEXT is a declared text string Purpose Terminates Autodyn execution immediately Example CALL ADQUIT Error 1 in routine EXEOS SUBROUTINE GETYON Usage CALL GETYON YON Question CALL GETYON YON TEXT TEXT is a declared text string Purpose Presents a question in the message area and awaits a yes no answer YON is the answer Y or N no other input is accepted Maximum text length is 80 characters Example CHARACTER 1 YON CALL GETYON YON Stop run are you sure IF YON Y STOP SUBROUTINE USR MESSAG Usage CALL USR_MESSAG message to be displayed CALL USR MESSAG TEXT TEXT is a declared text string Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 22 of ANSYS Inc and its subsidiaries and affiliates How to Determine the Part Number from the Part Name Purpose Displays a message in the message window SUBROUTINE USR_ERROR Usage CALL USR ERROR ttitle message to be displayed CALL USR ERROR TITLE TEXT TITLE TEXT are dec
116. eu de too ege oe eee Reap eade dy auge 85 7 User Subroutine Examples esses eene nennen enne eene nnnnn nnns essen nnne ren innen eene 87 7 1 Subroutine MDSTR USER I onirin ee a Ae EEEE AAT EE S 87 7 2 S bro tinie EXVE ern nena re ve e OT re OV T A rer e TEETH HERE ON TS 92 7 3 Subro tirie EXALE 3i rebar dete edere oie re ede certe aedes a cee edet a Ee Genes 94 PA Subroutine EXEDIT 2D reete nto eo eere ota eee ee Cre se eaae eve t ea E EE kao aee Meteo ees tremo ean Ue 94 7 5 Subroutine EXEDIT3 3D sis m 96 7 6 Unstructured Element Data Access ccccscsessssssssessesesesseseseseeeseseeeeeeeeeeeeeeseseeeeeeeseseeeseeeeeeeeeeeeeeeees 97 7 6 1 Direct Access through User Element Number ccccccccesesessnstccceeeeceseesnseeeeeeceseseeessnneeeeeeees 97 7 6 2 Access to All Elements in a Part leise eene enne nennen eere eren nennen 98 7 6 3 Access to All Elements in a Component sess nennen nennen nennen enis 98 7 6 4 Access to All Elements in a Group cscccccccceessesssseececcecesseessnsneceeeeecesseesnaeeeeeeecesseessnnaeeeees 99 7 6 5 Access to Nodal Variables for NBS Tetrahedral Elements eeesseeeeeeeene 100 ZT Subroutine EXEOR3 55 ecce o tee A eso edo ea etae rao desis ae tae ee Nye ees costs ea eden eo rae ee NS e co saves 104 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of A
117. fic functions developed for the user CALL GET ELEM VAR index elem index layer CALL GET NODE VAR index node index material where index elemis the internal index for a given element index node is the internal index for a given node index layer is the layer integration point number for each element node index material indicates the material that is being referred to on a given node These functions copy data from the underlying data structures to local arrays These arrays contain the values of all possible variables Only the variables used by the element node identified in the above calls will actually be set To access these local arrays you will need to include USE mdvar all RVL index var will contain all real variables for the element node IVL index var will contain all integer variables for the element node The values of index var required to access a particular variable can be can be obtained through the Output Save Review variables option in the interface For example to retrieve the pressure for an element you could use the statement PRESSURE RVL IVR PRES The values of user variables VARO1 to VAR20 can be updated stored by first setting the updated value in the RVL array for example RVL IVR_VARO1 VARO1VAL Then use the functions Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 12 of ANSYS Inc and its subsidiaries and affiliates Accessing Mult
118. in tension Parameter C1 unreacted shock EOS Parameter S1 unreacted shock EOS Gruneisen coefficient unreacted shock EOS Unreacted JWL coefficient A Unreacted JWL coefficient B Unreacted JWL coefficient R1 Unreacted JWL coefficient R2 Unreacted JWL coefficient W Unreacted JWL internal energy unit volume Unreacted JWL Von Neumann spike volume 5 11 12 P o EOS To access local data USE matdef USE eos palpha Porous density Initial compaction pressure Solid compaction pressure Porous soundspeed Compaction exponent Switch for solid EOS linear polynomial shock Solid EOS A1 parameter for linear polynomial bulk modulus Solid EOS Parameters for polynomial EOS Solid EOS Parameters for shock EOS 5 11 13 Rigid EOS To access local data USE matdef USE eos rigid C OF MASS X Initial X position of center of mass C OF MASS Y Initial Y position of center of mass C OF MASS Z Initial Z position of center of mass RIGID_MASS Mass of rigid body Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 45 Autodyn User Subroutine Modules RIGID_IXX Initial moment of inertia about XX RIGID_IYY Initial moment of inertia about YY RIGID_IZZ Initial moment of inertia about ZZ RIGID_IXY Initial moment of inertia about XY R
119. ing 5 13 Crushable Foam Isotropic To access local data USE matdef USE str_isocrush INTEGER INT4 IF_LOAD_FROM_FILE NUM_POINTS IF_LOADED 0 REAL REAL8 TTMAX YIELD CRUSH REAL REAL8 DIMENSION POINTER R LNVOL R STRESS IF LOAD FROM FILE Flag to get compaction data from file NUM POINTS Number of compaction data points IF LOADED Flag to indicate if compaction data is in memory YIELD CRUSH Current crush strength TTMAX Tension cutoff stress R LNVOL Compaction curve volumetric strain R STRESS Compaction curve stress 5 14 Failure Model Variables Variables from the following types of failure models can be accessed 5 14 1 Hydro PMIN Failure Model To access local data Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 49 Autodyn User Subroutine Modules USE matdef USE fai_hydro Hydro tensile limit Flag to indicate if reheal is on Crack softening Gf 5 14 2 Directional Failure Model To access local data USE matdef USE fai orthodam Failure stress components Failure strain components Material axis option switch Rotation angle X origin Y origin Crack softening Gf 5 14 3 Cumulative Failure Model To access local data USE matdef USE fai cumdam Plastic strain at which damage starts to accumulate
120. ion is exceeded an increment of effective plastic strain is computed as follows A p Bh oy Ceff 3G The effective plastic strain is the integrated value of these increments during the calculation p p Copp J Ae eget The effective plastic strain rate is given by P 4eb amp eff where At is the current timestep At and the effective strain is given by Eeff J A geet T 2 2 2 AC uud wot 42 2 where Ze ge Zt 3 Exc Eyy te zt Exy FE yzt 8 zx where ej is the total strain tensor in the ij direction which includes elastic and plastic components When using the Euler and Euler Godunov processors a given cell may contain more than one material In such a case there is not a single value for such variables as compression and energy In order to obtain these multi material variables one has to reference the multiple material arrays For Autodyn 2D a mass weighted value for compression internal energy temperature and alpha is available in the standard array locations for example XMU EN TEMP and ALPHA In Autodyn 3D the multi material access method is used for all processors including Lag ALE and Shells Refer to the User Subroutine tutorial for further details and examples 84 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Unstructured Solvers E When using the Lagrange ALE Shell B
121. iple Material Data All IJK Solvers CALL PUT ELEM VAR index elem index layer CALL PUT NODE VAR index node index material This will place all the data set for user variables 1 to 20 in the array RVL and IVL back into permanent main storage for this element or node respectively 3 5 3 Notes About Autodyn Variables Do not change variables other than user variables 1 through to 20 because these changes will not be stored to underlying data structures when PUT ELEM VAR PUT NODE VAR are called Variables passed into the material modeling subroutines as arguments can be changed dCalls to GET ELEM VAR GET NODE VAR and PUT ELEM VAR PUT NODE VAR should not be used in the mater ial user subroutines for materials used to fill ANP and NBS tetrahedra with the exception of the user erosion subroutine in mdero user 1 f90 An example of using these calls in mdero user 1 f90 for NBS tetrahedra is given in Access to Nodal Variables for NBS Tetrahedral Elements p 100 If GET ELEM VAR is called for an element other than the one currently being processed in the solver or for a shell sublayer that differs from the current one being processed it will not be possible to tell whether the values in RVL for that element are from the current or the previous computational cycle The above methods for retrieving and updating unstructured element or node data require the global index elemor index node as input For material modeling user subroutines the
122. iscosity DIS ENERGY ADE Particle Specific distortional energy DEN Particle Density TEMP Particle Temperature CTP Material temperat ure EFF PL STN EPS Particle Effective plastic strain E P S RATE EPSDOT Particle Effective plastic strain rate EFFECT STN AFS Cell Cell Seg Cell Particle Effective strain C ment SOUNDSPEED SSPD Cell Cell Seg Cell Cell Particle Local sound speed ment DAMAGE DAM Cell Cell Seg Cell Particle Damage B ment DIVERGENCE DIV Cell Cell Cell Particle Divergence ALPHA ALPHA Cell Cell Cell Cell Particle Material model A variable D ALPHA CAL Cell Cell Material Alpha D P STRESS 1 T11 Cell Particle Total principal stress 1 P STRESS 2 T22 Cell Particle Total principal stress 2 STRESS 12 T12 Cell Particle Total principal shear stress 12 STRESS TXX TXX Cell Cell Cell Particle Total stress tensor XX component STRESS TYY TYY Cell Cell Cell Particle Total stress tensor YY component STRESS TXY TXY Cell Cell Cell Particle Total stress tensor XY component STRESS TTT TTT Cell Cell Cell Particle Total stress tensor TT component MIS STRESS TVM Cell Cell Cell Particle Von Mises stress YLD STRESS YIELD Cell Cell Cell Particle Current yield stress EXXDOT EXXC Cell Cell Cell Particle Total strain rate XX component 70 Release 15 0 SAS IP Inc All
123. ition specified as user for each associated boundary cell each cycle Custom tabulated saturation curve for two phase EOS 3 called when two phase EOS model is specified as user each cell each cycle Custom initial conditions 6 always called when performing a fill initialization during problem Create Modify No other user spe cification required Custom velocity boundary condi tion EXZONE Custom nodal co ordinates 4 called when velocity boundary condition specified as user for each associated boundary cell each cycle 7 called each time EXZONE menu selection is made Note In situations where the extra subroutine is always called with no user specification required the default dummy subroutines are programmed to have no effect Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 17 Writing Your Own User Subroutines 3 9 Autodyn Utility Functions Subroutines Autodyn utility routines perform a variety of functions that can be used in user subroutines We have already seen one in the previous section where the function IJKSET3 was used to determine the index of the node element I J K in the current Part Below are additional routines that may be of use FUNCTION IJKSET3 3D only Usage IKSET3 IJ K Purpose Gets the IJK index of node zone I 7 K relative
124. itions cccccccccccesssssencceececesseeesnneceeeeeeeeseessnaeeeeeeeens 51 5 16 MDGRID3 Autodyn 3D Grid Variable Definitions cccccccccesssssnneccceceeeseesnnneeeeeeeseseeessnneeeeeeens 53 5 17 MDPP Parallel Calculation Variables cccccccccssssccccesseccecuvssccssseeccesseecsesuescsssueecsesueeeseesueneseess 59 5 18 MDSOLV Unstructured Entity Types seus am re o ER Re bp d Ci gre ET Ee d etta Fou ER UR 60 5 19 POLGON Polygon Variable Definitions seoeses cte ossis eni koci rete tae gcn eap pco er iren dedo d 61 5 20 RUNDEF Run Variable Definitions cccccccecccccsssccceeeseccsceeeccesuescsesseecessuesecessuesessssueecsesuenssess 62 5 21 SUBDEF Global Part Variable Definitions ccce nenne ener nennen 63 5 22 WRAPUP Execution Termination Variables eee eene enne enn rhn enn rne sen nnan 66 5 23 OBJECT SPH Object Definitions iier ter e dee RR E cian OR Pee as ERR PE Re e ae 66 6 Autodyn Variable Listings ai cord o Ro MAT cler t ERRE N r gna FR RARI e pA ERO Pag bd tup am cela CR Hd 69 6 1 Autodyn 2D Structured IJK Solvers sssssssssseseeeeeeeeeee nnne n nnne eene 69 6 2 Autodyn 3D Structured IJK Solvers cccccccccccessssssnnceceeceeseeeesneeceeceeeeseessnnaeeeeeeeeseeeesnneeeeeeeeeeeees 74 EM Lot p Lr T 83 6 4 Unstructured SONETS rniii riore tee net ttes ote cei SERE ee cune Tei Eee eras eta ge e
125. l USE memory USE microz USE mltmat USE prodef USE kindef IMPLICIT NONE SAVE CHARACTER LEN 1 DIMENSION LIMSUB LIMVAR TARGET IDRVAR CHARACTER LEN 1 DIMENSION LIMSUB LIMIVR TARGET IDIVAR CHARACTER LEN 1 DIMENSION LIMSUB TARGET IZONE TMP TYPE MULTI MATERIAL POINTERS TYPE MULTI ARRAY DIMENSION POINTER MTS END TYPE MULTI MATERIAL POINTERS TYPE MULTI MATERIAL POINTERS DIMENSION LIMSUB MTGRID TYPE MULTI ARRAY DIMENSION POINTER MTSUB TYPE MICROZONE POINTERS DIMENSION LIMSUB MCGRID Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 5 Autodyn User Subroutine Modules TYPE MICRO_ARRAY POINTER MCCEL POINTER ARRAY TO ALL STANDARD AND TEMPORARY SUBGRID SMALL INTEGER VARIABLES TYPE SMALL INTEGER ARRAY POINTER DIMENSION LIMSUB LIMIVR 3 NPACK NTEGER PARAMETER KMT 1 KMN 2 KMS 3 KBX 4 KBY 5 NTEGER PARAMETER KBI 6 KBJ 7 KAL 8 KJN 9 KOV 10 NTEGER PARAMETER KIF 11 KNW 12 KIC 13 K01 14 K02 15 NTEGER PARAMETER K03 16 K04 17 K05 18 K06 19 KO7 20 NTEGER PARAMETER K08 21 K09 22 K10 23 NTEGER INT1 DIMENSION POINTER NPKMT NPKMN NPKMS NPKBX NTEGER INT1 DIMENSION POINTER NPKBY NPKBI NPKBJ NPKAL NTEGER IN
126. l for each cycle 3 called when erosion model specified as user each cell each cycle EXBULK Custom bulk 5 always called for linear polyno modulus for a lin mial and P a EOS each cell each ear polynomial cycle No other user specification and P o EOS required Note For shell elements called once for each sublayer for each cell for each cycle EXCOMP Custom porous 3 called when compaction curve compaction curve specified with P a EOS is user each P a equation of cell each cycle state EXCRCK Custom tensile 3 always called when crack crack softening softening specified Gg0 0 each rate cell each cycle No other user spe cification required EXDAM Custom damage 3 always called for brittle damage parameter and Johnson Holmquist failure models each cell each cycle No other user specification required EXEDIT Custom edits 2 called at the end of cycle as specified under Global Edit User EXFLOW Custom Euler flow 4 always called for flow in and boundary flow out with reverse boundary conditions for each associated boundary cell each cycle No other user specification required EXLOAD Loading addition 1 always called when Load is se al non standard data from SAVE files lected after standard loading completed No other user specifica tion required EXORTHO AXES Custom initial or thotropic material axes 6 always called when performing ini
127. lared text strings Purpose Displays a message in the message window Example CALL USR ERROR Warning Inconsistent strength model parameters 3 10 Terminating Execution from a User Subroutine Sometimes you may wish to terminate execution of a calculation if an error is detected in a user sub routine The easiest way to do this is to simply put a STOP statement in the user subroutine This method will immediately terminate the program and return you to the operating system However if you do this you may lose information contained in output buffers A better way to terminate execution is to call subroutine ADQUIT described in the previous section This will return you to the operating system in an orderly manner If want to stop executing a problem without quitting Autodyn you can do this by setting the wrapup switch NSWRAP equal to 99 A non zero value of NSWRAP found in module WRAPUP will cause Autodyn to stop execution at the end of the current cycle and return the user to the main menu If NSWRAP is set equal to 99 the message Problem terminated by user subroutine is displayed upon wrapup Since the calculation will continue to the end of the cycle it is necessary to set the return parameters of your user subroutine to reasonable values so that they can be used if ne cessary without consequence for the current cycle 3 11 How to Determine the Part Number from the Part Name Sometimes it may be desirable to kn
128. lass damping ment ment force 2 HQB 3 HQB3 Ele Ele Hourglass damping ment ment force 12 F COVER I FCOVRI Cell l face cover fraction F COVER J FCOVRJ Cell J face cover frac tion F COVER K FCOVRK Cell K face cover frac tion F COVER V FCOVRV Cell Cell cover volume RBLEND RBLEND Cell FCT blend fraction DIL PRESS PDIL Cell Cell Particle JH2 pressure due to bulking Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 80 of ANSYS Inc and its subsidiaries and affiliates Autodyn 3D Structured IJK Solvers Autodyn Internal Description Output Array Name DAM ENERGY EDIL Particle JH2 distortional en ergy due to dam age EPSPRE EPSPRE Particle RHT pre softening plastic strain FRATE FRATE Particle RHT strain rate en hancement RTHIRD RTHIRD Particle RHT lode angle FCAP FCAP Particle RHT elastic cap factor EPSDO EPSDO Particle RHT strain rate at previous cycle FAIL STRES TFAIL Particle Crack softening failure stress SOFT SLOPE HNORM Particle Crack softening slope PCOR11 PCOR11 Cell Particle AMMHIS pressure correction PCOR22 PCOR22 Cell Particle AMMHIS pressure correction PCOR33 PCOR33 Cell Particle AMMHIS pressure correction VTXX VTXX Cell Particle Viscoelastic stress VTYY VTYY Cell Particle Viscoelastic stress VTZZ VTZZ Cell Particle Viscoelastic stress
129. lse Total mass at t n Total volume at t n Total internal energy at t n Total kinetic energy at t n Total distortional energy at t n Total X momentum at t n Total Y momentum at t n Total mass at t n 1 Total volume at t n 1 Total internal energy at t n 1 Total kinetic energy at t n 1 Total distortional energy at t n 1 Total X momentum at t n 1 Total Y momentum at t n 1 Part masses at t n 1 Part volume at t n 1 Part distortional energy at t n 1 Part masses at t n Part volume at t n Part distortional energy at t n Part internal energy at t n 1 Part kinetic energy at t n 1 Part X momentum at t n 1 Part Y momentum at t n 1 Part internal energy at t n SUBKEB Part kinetic energy at t n SUBXMB Part X momentum at t n SUBYMB Part Y momentum at t n NUMJON Joined Part switch JONSUB Joined Part array TOLJON Joined Part tolerance Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 65 Autodyn User Subroutine Modules 5 22 WRAPUP Execution Termination Variables MODULE wrapup USE kindef IMPLICIT NONE SAVE INTEGER INT4 INTEGER INT4 REAL REAL8 NCYLIM NSWRAP NCYREF IDEGEN JDEGEN KDEGEN MDEGEN TIMLIM ENFRAC END MODULE wrapup Cycle limit for
130. matdef USE str_jncook Hardening constant Hardening exponent Strain rate constant Thermal softening exponent Melting temperature 5 12 3 Zerilli Armstrong Strength Model To access local data USE matdef USE str_zerarm 5 12 4 Steinberg Guinan Strength Model To access local data USE matdef USE str_steinb Maximum yield stress Hardening constant Hardening exponent Derivative dG dP Derivative dG dT Derivative dY dP 5 12 5 Cowper Symonds Strength Model To access local data USE matdef USE str cowper YIELDO Initial yield stress CS BCONST Strain hardening constant CS NCONST Strain hardening exponent CS DCONST Strain rate hardening constant CS QCONST Strain rate hardening exponent Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 47 Autodyn User Subroutine Modules 5 12 6 Piecewise Linear Strength Model To access local data USE matdef USE str_pcwise EPSTAB n Effective plastic strain tabular values 1 4 YLDTAB n Yield stress tabular values 1 4 Strain rate constant Thermal softening exponent 5 12 7 Johnson Holmquist Strength Model Melting temperature To access local data USE matdef USE str jh2 Hugoniot Elastic Limit Intact strength constant A Intact strength exponent N Strain
131. nc and its subsidiaries and affiliates 67 Autodyn User Subroutine Modules Material Set Variables MATSET LIMOBJ Material set for object MAXSET Number of material sets MATOBJ LIMSET UXNOBJ LIMSET Material number for material assigned to set Initial x velocity for a set URNOBJ LIMSET RHOOBJ LIMSET ENOBJ LIMSET Initial internal energy assigned to material set Initial r velocity for a set UYNOBJ LIMSET Initial y velocity for a set Initial density assigned to material set Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 68 of ANSYS Inc and its subsidiaries and affiliates Chapter 6 Autodyn Variable Listings The Autodyn variables for structured 2D and 3D are listed below The external output name is first given This is the name shown on plots printout and when interactively examining values on the screen The next column is the array name used internally These internal names are to be used when writing user subroutines Grid variables are either associated with a node for example X coordinate or a cell center for example Pressure or with a particle SPH only These are indicated as Node Cell and Particle respectively Depending on the processor solver certain variables are not defined This is in dicated by a blank entry in the table The listings are provided for both versions 4 F
132. nced through their array name and index for example UXN IJK For other types the user is advised to use the Autodyn utility functions to obtain variables The table below provides a description of when the major user subroutines are called Table 3 2 User Subroutine Calling Sequence Descriptions Name Description Calling sequence type SOLVE EOS USER 1 Custom equation 3 called when EOS specified as of state user each cell each cycle SOLVE STR USER 1 Custom strength 5 called for strength models spe model cified as user each cell each cycle Also called for all other strength models except None after stand ard calculation of yield stress to allow for further modification of yield stress Note For shell ele ments called once for each sublay er for each cell for each cycle SOLVE FAI USER 1 Custom failure cri 5 called when failure model spe teria cified as user each cell each cycle Also called for all other failure Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 15 Writing Your Own User Subroutines Description Calling sequence type SOLVE_ERO_USER_1 Custom erosion criteria models except None after stand ard checks for failure to allow for further modification of failure criter ia Note For shell elements called once for each sublayer for each cel
133. ormation 72 of ANSYS Inc and its subsidiaries and affiliates Autodyn 2D Structured IJK Solvers Internal Array Euler Shell Description PCOR11 EPSDO PCOR11 Particle Particle RHT strain rate at previous cycle AMMHIS pressure correction PCOR22 PCOR22 Particle AMMHIS pressure correction PCOR33 PCOR33 Particle AMMHIS pressure correction MASS FACT FMASS Particle SPH joined face mass VTXX VTXX Particle Viscoelastic stress VTYY VTYY Particle Viscoelastic stress VTXY IGTIME VTXY IGTIME Particle Particle Viscoelastic stress Slow burn ignition time SBRCRT SBRCRT Cell Particle Slow burn reaction ratio INITIAL X XNO Node Node Particle Original X space coordinate INITIAL Y YNO Node Node Particle Original Y space coordinate GAS PRESS PGAS Cell Cell Cell Cell Particle Slow burn gass pressure FILL DENS FILDEN Cell Cell Cell Cell Particle Slow burn fill dens ity VAR 1 VARO1 X X X X X X User defined vari able 1 VAR 2 VARO2 X X X X X X User defined vari able 2 VAR 3 VARO3 X X X X X X User defined vari able 3 VAR 4 VARO4 X X X X X X User defined vari able 4 VAR 5 VARO5 X X X X X X User defined vari able 5 VAR 6 VARO6 X X X X X X User defined vari able 6 VAR 7 VARO7 X X X X X X User defined vari able 7 VAR 8 VARO8 X X X X X X User defined vari
134. ortran 90 and versions 3 Fortran 77 6 1 Autodyn 2D Structured IJK Solvers Autodyn Internal Lag Euler Shell Godun FCT SPH Description Note Output Array ALE ov Name X XN Node Node Node Node Node Particle X space coordinate Y YN Node Node Node Node Node Particle Y space coordinate X VELOCITY UXN Node Cell Node Cell Cell Particle X component of velocity Y VELOCITY UYN Node Cell Node Cell Cell Particle Y component of velocity X FORCE FX Node Node Particle X component of force Y FORCE FY Node Node Particle Y component of force NODE MASS PMASS Node Node Nodal mass I P NDEX RINTER Node Node Interactive point index VOLUME VOLN Cell Cell Seg Cell Particle Volume ment CELL MASS CMASS Cell Cell Seg Cell Cell Particle Cell mass ment MASS CMS Cell Cell Material mass in D cell COMPRESS XMU Cell Cell Cell Cell Particle Compression D COMPRESS CMU Cell Cell Material compres D sion INT ENERGY EN Cell Cell Cell Cell Particle Internal energy D INT ENERGY CEN Cell Cell Material internal D energy Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 69 Autodyn Variable Listings Autodyn Output Name Internal Array Euler Shell Description PRESSURE PSEUDO V Q PN Q Particle Particle Pressure Artificial v
135. ow the Part number for a particular Part Part numbers are assigned in their order of definition starting with one Structured and Unstructured Parts are contained and stored in different constructs Structured Parts If you want the Part number associated with a specific Part name the following coding will obtain that number NSB USE SUBDEF INTEGER INT4 NS NSB NSB 0 DO NS 1 NUMSUB IF NAMSUB NS Part name CYCLE NSB NS EXIT END DO ERROR PART NOT FOUND IF NSB 0 CALL USR ERROR ERROR PART NOT FOUND Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 23 Writing Your Own User Subroutines If you are writing a user subroutine called within the computational cycle types 3 and 5 the current Part number NSUB will already be set module subdef You can then simply test the Part names for example NAMSUB NSUB to determine if the Part is the one you wish to perform some action on Unstructured Parts USE mdpart INTEGER INT4 NPART NPART_WANTED NPART_WANTED 0 DO NPART 1 NUM_PARTS IF PARTS NPART SPSNAME Part name CYCLE NPART_WANTED NPART END DO ERROR PART NOT FOUND IF NPART WANTED 0 CALL USR ERROR ERROR PART NOT FOUND 3 12 Variables Available through F90 Modules The primary modules of interest for writing user subroutine
136. owing actions are taken MODE 0 gets zonal variable NV calls GV MODE gt 0 gets multimaterial variable NV for MAT MODE MODE O gets volume weighted average over all materials for multimaterial variable NV FUNCTION NPK Usage NPK NV UK NPK3 NV IJK Purpose Gets the value of integer Part variable NV for the node IJK relative to current Part See module mdgrid for list of index values for NV To be used instead of GV when the variable is an integer and not a real number FUNCTION NPKS Usage NPKS NV IJKS NPKS3 NV IJKS Purpose Gets the value of integer Part variable NV for the node IJKS relative to all Parts See module mdgrid for list of values for NV To be used instead of GVS when the variable is an integer and not a real number SUBROUTINE PUTNPKS Usage CALL PUTNPKS NV UKS NVALUE CALL PUTNPKS3 NV IJKS NVALUE Purpose Puts stores the integer NVALUE of Part variable NV for the node zone rJKS relative to all Parts in the dynamic storage arrays To be used instead of PUTGVS when the variable is an integer and not a real number SUBROUTINE GET ELEM VAR Usage CALL GET ELEM VAR INDEX ELEM INDEX LAYER Purpose INDEX ELEM is the current global element number normally available via ELEM NOW ZNDEX LAYER is the current element layer for the current element For solid elements this number is ignored and can be set to either 0 or 1 Copies the data from main storage into local vector RVL real dat
137. rate constant C Fracture strength constant B Fracture strength exponent M Maximum fracture strength ratio 5 12 8 RHT Concrete Strength Model To access local data USE matdef USE str rht SFC Compressive Strength fc STOVERC Tensile strength ft fc SSOVERC Shear strength fs fc SBFAIL Intact failure surface constant A SNFAIL Intact failure surface exponent N SQ2N Tensile Compressive meridian ratio Q SBQ Brittle to ductile transition SPREFACT G elas elas plas STENSRAT Elastic strength ft SCOMPRAT Elastic strength fc SBFRIC Fracture strength constant B SNFRIC Fracture strength exponent M 48 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Failure Model Variables SRALPHA Compressive strain rate exponent Alpha SRDELTA Tensile strain rate exponent Delta SFMAXX Maximum fracture strength ratio 5 12 9 Orthotropic Yield Strength Model To access local data USE matdef USE str_orthyld Yield surface constant a11 Yield surface constant a22 Yield surface constant a33 Yield surface constant a12 Yield surface constant a23 Yield surface constant a13 Yield surface constant a44 Yield surface constant a55 Yield surface constant a66 Table of maximum stress harden
138. real8 REAL REAL8 PARAMETER EPSLN11 1 0E 11 real8 REAL REAL8 PARAMETER EPSLN12 1 0E 12 real8 REAL REAL8 PARAMETER EPSLN13 1 0E 13 real8 REAL REAL8 PARAMETER EPSLN14 1 0E 14 real8 REAL REAL8 PARAMETER EPSLN15 1 0E 15 real8 REAL REAL8 PARAMETER EPSLN16 1 0E 16 real8 REAL REAL8 PARAMETER EPSLN17 1 0E 17 real8 REAL REAL8 PARAMETER EPSLN18 1 0E 18 real8 REAL REAL8 PARAMETER EPSLN19 1 0E 19 real8 REAL REAL8 PARAMETER EPSLN20 1 0E 20 real8 REAL REAL8 PARAMETER ZERO 0 0 real8 REAL REAL8 PARAMETER ONE 1 0 real8 REAL REAL8 PARAMETER TWO 2 0 real8 REAL REAL8 PARAMETER THREE 3 0 real8 REAL REAL8 PARAMETER FOUR 4 0 real8 REAL REAL8 PARAMETER FIVE 5 0 real8 REAL REAL8 PARAMETER SIX 6 0 real8 REAL REAL8 PARAMETER SEVEN 7 0 real8 REAL REAL8 PARAMETER EIGHT 8 0 real8 REAL REAL8 PARAMETER NINE 9 0 real8 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 33 Autodyn User Subroutine Modules REAL REAL8 PARAMETER TEN 10 0_real8 REAL REAL8 PARAMETER TWELVE 12 0_real8 REAL REAL8 PARAMETER SIXTEEN 16 0_real8 REAL REAL8 PARAMETER NINETY NINE TEN REAL REAL8 PARAMETER HUNDRED TEN TEN REAL REAL8 PARAMETER ONE80 TWO NINE TEN RE
139. rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Autodyn 2D Structured IJK Solvers Internal Array Euler Shell Godun FCT ov Description EXYDOT EYYD Particle Particle Total strain rate YY component Total strain rate XY component P STRAIN 1 Particle Total principal strain 1 P STRAIN 2 Particle Total principal strain 2 P STRAIN 3 Particle Total principal strain 3 STRAIN 12 Particle Total principal shear strain 12 P ST ANG Particle Angle of principal stress VOID FRAC Volume fraction of void COVERED V FCOVRV Cell Volume cover frac tion COVERED I FCOVRI Cell l face cover fraction COVERED J FCOVRJ Cell J face cover frac tion DPDX DPDX Cell Pressure slope in X direction DPDY DPDY Cell Pressure slope in Y direction DRDX DRDX Cell Density slope in X direction DRDY DRDY Cell Density slope in Y direction DUXDX DUXDX Cell X velocity slope in X direction DUXDY DUXDY Cell X velocity slope in Y direction DUYDX DUYDX Cell Y velocity slope in X direction DUYDY DUYDY Cell Y velocity slope in Y direction HOOP STN STN1 Seg Hoop strain ment LONG STN STN2 Seg Longitudinal strain ment Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of
140. rticle Total strain rate YY component EZZDOT EZZD Cell Cell Particle Total strain rate ZZ component EXYDOT EXYD Cell Cell Particle Total strain rate XY component EYZDOT EYZD Cell Cell Particle Total strain rate YZ component EZXDOT EZXD Cell Cell Particle Total strain rate ZX component ANG X VEL WXN Node Node X angular velocity ANG Y VEL WYN Node Node Y angular velocity ANG Z VEL WZN Node Node Z angular velocity INERTIA1 RI11 Node Node Inertia about local 11 axis INERTIA2 RI22 Node Node Inertia about local 22 axis INERTIA3 RI33 Node Cell Node Inertia about local 33 axis VOID FRAC VOID Cell Volume fraction of void Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information 76 of ANSYS Inc and its subsidiaries and affiliates Autodyn 3D Structured IJK Solvers Internal Description Pressure slope in X direction Pressure slope in Y direction Pressure slope in Z direction Density slope in X direction Density slope in Y direction Density slope in Z direction X velocity slope in X direction X velocity slope in Y direction DUXDZ DUXDZ Cell X velocity slope in Z direction DUYDX DUYDX Cell Y velocity slope in X direction DUYDY DUYDY Cell Y velocity slope in Y direction DUYDZ DUYDZ Cell Y velocity slope in Z direction DUZDX DUZDX Cell Z velocity slope in
141. rved Contains proprietary and confidential information 52 of ANSYS Inc and its subsidiaries and affiliates MDGRID3 Autodyn 3D Grid Variable Definitions NTEGER PARAMETER NVARO3 76 NVARO4 77 NVAROS 78 NTEGER PARAMETER NVARO6 79 NVARO7 80 NVARO8 81 NTEGER PARAMETER NVARO9 82 NVAR10 83 NVAR11 84 NTEGER PARAMETER NVAR12 85 NVAR13 86 NVAR14 87 NTEGER PARAMETER NVAR15 88 NVAR16 89 NVAR17 90 NTEGER PARAMETER NVAR18 91 NVAR19 92 NVAR20 93 NTEGER PARAMETER NEPSPRE 94 NFRATE 95 NRTHIRD 96 NTEGER PARAMETER NFCAP 97 NEPSDO 98 NPCOR11 99 NTEGER PARAMETER NPCOR22 100 NPCOR33 101 NMASFAC 102 NTEGER PARAMETER NVTXX 103 NVTYY 104 NVIXY 105 NTEGER PARAMETER NIGTIME 106 NSBRCRT 107 NXNO 108 NTEGER PARAMETER NYNO 109 NPGAS 110 NFILDEN 11 NTEGER PARAMETER NMOTT 112 NTEGER PARAMETER NTEMPO1 113 NTEMP02 NTEMPO1 1 NTEMPO03 NTEMPO142 NTEGER PARAMETER NTEMPO04 NTEMP01 3 NTEMPO5 NTEMP01 4 NTEMPO6 NTEMPO1 5 NTEGER PARAMETER NTEMPO7 NTEMP01 6 NTEMPO8 NTEMPO0147 NTEMPO9 NTEMPO1 8 NTEGER PARAMETER NTEMP10 NTEMP01 9 NTEMP11 NTEMP01 10 NTEMP12 NTEMPO1 11 NTEGER PARAMETER NTEMP13 NTEMP01 12 NTEMP14 NTEMPO1 13 NTEMP15 NTEMP01 14 NTEGER PARAMETER NTEMP16 NTEMP01 15 NTEMP17 NTEMPO1 16 NTEMP18 NTEMPO1 17 NTEGER PARAMETER
142. s are provided mod files for 2D and 3D The descriptions of the variables in the modules most likely to be utilized in user subroutines are given in Autodyn User Subroutine Modules p 29 for Autodyn 2D and Autodyn 3D Autodyn Variable List ings p 69 provides a further description of the grid variables 24 Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Chapter 4 Compiling and Running Your User Subroutines The procedure for linking your own user subroutines into Autodyn varies according to the system on which you are running The general procedure is to edit the existing dummy user subroutines modifying the appropriate subroutine to implement your modifications By following the instructions that follow for your platform a customized Autodyn version can be created 4 1 Compiling Debugging and Running your Customized Autodyn Ver sion on Microsoft Windows We recommend that you use the supplied Microsoft Visual Studio development environment solution file ad_usrsub s1n for compiling debugging and linking user subroutines with Autodyn This solution file and other user subroutine files will be created upon selection of Options Create User Subroutine Project The location of this user subroutine folder can be chosen freely by the user Note Due to a system limitation the icons for some user interface
143. tialization No other user specific ation required EXPLRN Custom plastic re 5 each cell each cycle No other turn algorithm user specification required EXPOR Custom variable 4 always called for each Euler polygon porosity Lagrange polygon each cycle No other user specification required Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates Timing of Calls to User Subroutines Description Calling sequence type Saving additional non standard data to SAVE files Custom shear modulus 2 called for every Save through execution of Save command or specification of Save Edits No other user specification required 5 always called each cycle for every non hydro strength model cell all materials No other user specification required Note For shell elements called once for each sublayer for each cell for each cycle Custom energy deposition 5 always called each cycle for every cell all materials No other user specification required Custom stiffness matrix orthotrop ic elastic with fail ure 3 called when orthotropic EOS and a strength model specified each cell each cycle Note For shell elements called once for each sublayer for each cell for each cycle Custom stress boundary condi tion 4 called when stress boundary cond
144. tine We will look at each of these items in more detail 3 1 Compilers Required to Work with User Subroutines The following compilers are required to work with user subroutines Operating System C Fortran Windows XP Pro 32 bit Microsoft Visual Studio Intel Fortran 12 1 C NET 2010 Windows Vista 32 bit Windows 7 32 bit Windows XP Pro 64 bit Microsoft Visual Studio Intel Fortran 12 1 C NET 2010 Windows Vista 64 bit Windows 7 64 bit Red Hat Enterprise Linux Intel Fortran 12 1 5 and 6 Update5 x86 SUSE Linux Enterprise Intel Fortran 12 1 versions 10 and 11 x86 3 2 User Subroutine Files The following files are included in your distribution to facilitate the development and compilation of user subroutines ANSYS Incw150NaisoNAUTODYN platform Msrc Release 15 0 SAS IP Inc All rights reserved Contains proprietary and confidential information of ANSYS Inc and its subsidiaries and affiliates 9 Writing Your Own User Subroutines 2d usrsub2 f90 Autodyn 2D specific user subroutines 3d usrsub3 f90 Autodyn 3D specific user subroutines material mdeos_user_1 f90 User equation of state mdstr_user_1 f90 User strength model mdfai_user_1 f90 User failure model mdero_user_1 f90 User erosion model Additionally the module file srcNmaterialsNmdusersub call f90 has been supplied The module in this file should not be modified On the Windows operating systems th
145. tine Tutorial problem Ident USER STRENGTH EXAMPLE List the file included with your distri bution for the latest version of this subroutine Ve ck ckeck ck ck ck ck ok ck ck ckck ck ckck ck ck ck ck ck cock ckck ck ck ck ckckckck ck ck ck ckockckckckckockckckckckckckockckckckckokckokckckokckokckockckckokckokck THIS MODULE IS A CONTAINER FOR THE INITIALISATION AND SOLUTION OF A USER STRENGTH MODEL THE FOLLOWING ROUTINES ARE INCLUDED MODULE STR USER 1 DEFINE VARIABLES THAT ARE COMMON BETWEEN THE ROUTINES BELOW SUBROUTINE INIT STR USER DEFINE THE INPUT PARAMETERS FOR THE USER STRENGTH MODEL SUBROUTINE CHECK STR USER 1 CHECK PARAMETERS ARE VALID FOR THE USER STRENGTH MODEL SUBROUTINE SET STR USER 1 SET SHORTCUTS TO PARAMETERS FOR THE USER STRENGTH MODEL SUBROUTINE SOLVE STR USER 1 SOLVE THE USER STRENGTH MODEL BEFORE EACH ROUTINE IS CALLED THE FOLLOWING POINTERS ARE SET UP MTL POINTER TO THE CURRENT MATERIAL EQ POINTER TO THE CURRENT FLAG EQUATION MATERIAL OPTION 1 ckok ok ck kk ck ck ck ck ok ck ck ck ck ck ckck kk ck ck ck ckckckck ck ck ck ckockckckckckockckckckckckckockckckckckockckockckckockckokckokckckokckokckckckckokckokck MODULE STR USER 1 USE kindef IMPLICIT NONE SAVE SPECIFY COMMON VARIABLES TO BE ACCESSED BY ROUITNES BELOW HERE INTEGER INT4 REAL REAL8 REAL REAL8 DIMENSION 3 EP YS END MODULE STR_USER_1 Release 15 0 SAS IP Inc
146. ts subsidiaries and affiliates How to Invoke User Subroutines A Problem terminated user subroutine missing The sections that follow describe how to write user subroutines to allow execution of the example above and others Subroutine MDSTR USER 1 p 87 contains an example user subroutine MD STR USER 1 f90 that implements the simple piecewise linear variation of yield stress against effective plastic strain as shown below 0 012 0 010 1 0 008 1 Yield Stress Mbar o S o 0 002 0 000 T T T T 0 000 0 050 0 100 0 150 0 200 0 250 0 300 0 350 0 400 Effective Plastic Strain Following implementation of the subroutine shown in Subroutine MDSTR_USER_1 p 87 you can again start Autodyn and modify the material TANTALUM The material menu for the Strength model data will then appear as follows Note that the user defined parameters set in the user subroutine now appear in the material parameter list strength User Strength 1 Shear Modulus v 0 692000 Mbar EPS 1 0 010000 none EPS 2 0 050000 none EPS 3 0 200000 none YIELD 1 0 005000 Mbar YIELD 2 0 007000 Mbar YIELD 3 0 010000 Mbar Enter the material data shown above and run the analysis A contour plot of effective plastic strain at the wrap up cycle of 600 and a gauge point history plot of effective plastic strain are shown below Release 15 0 SAS IP Inc All rights reserved Contains proprietary
147. uler FCT Multi Material Euler variables in the model are accessed by pointers to dynamically allocated arrays To assist in the retrieving and storing of grid data a number of Autodyn functions are provided Examples are also given in Subroutine EXEDIT 2D p 94 and Subroutine EXEDIT3 3D p 96 for Autodyn 2D and 3D respectively Grid variable arrays and pointers are defined in module mdgrid for 2D and mdgrid3 for 3D The listings for Autodyn 2D and Autodyn 3D give all grid variables and their associated pointer names Autodyn Variable Listings p 69 provides a definition of these variables The grid arrays and pointer names are used to reference all grid variables either by direct reference to arrays through use of the supplied Autodyn functions By way of illustration if we want to access the x velocity at a particular I J K in the currently processed Part in Autodyn 3D we would include the mdgrid3 module in our subroutine USE mdgrid3 For node IJ K of the current Part we can obtain the index IJK for this node by including the statement IJK IJKSET3 I J K Note For a shell Part set I 1 For a beam Part set I 1 and J 1 For an SPH Part set 21 and K 1 For 2D use IJK IJSET I J instead Then we can obtain the required velocity XVEL either directly through the array reference or by using a function Direct XVEL UXN IJK Function XVEL GV3 NUXN IJK Release 15 0 SAS
148. v t y 4 w he IW E Fluid Dynamics Structural Mechanics Electromagnetics Systems and Multiphysics a Autodyn User s Subroutines Tutorial ANSYS Inc Release 15 0 Southpointe November 2013 275 Technology Drive Canonsburg PA 15317 ANSYS Inc is ansysinfo ansys com certified to ISO http www ansys com 9001 2008 T 724 746 3304 F 724 514 9494 Copyright and Trademark Information 2013 SAS IP Inc All rights reserved Unauthorized use distribution or duplication is prohibited ANSYS ANSYS Workbench Ansoft AUTODYN EKM Engineering Knowledge Manager CFX FLUENT HFSS and any and all ANSYS Inc brand product service and feature names logos and slogans are registered trademarks or trademarks of ANSYS Inc or its subsidiaries in the United States or other countries ICEM CFD is a trademark used by ANSYS Inc under license CFX is a trademark of Sony Corporation in Japan All other brand product service and feature names or trademarks are the property of their respective owners Disclaimer Notice THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS INC ITS SUBSIDIARIES OR LICENSORS The software products and documentation are furnished by ANSYS Inc its subsidiaries or affiliates under a software license agreement that contains provisions concerning non disclosure copying length and nature of use complianc
Download Pdf Manuals
Related Search
Related Contents
Sync DY10 Panasonic TH-42PH30ER plasma panel Insupad English user manual Copyright © All rights reserved.
Failed to retrieve file