实例介绍
ANSYS AUTODYN二次开发官方手册,要尝试二次开发基本必备这个。
Table of contents User Subroutine tutorial introduction wwwwwwwwwmw T 2. How to invoke user subroutines 3. Writing Your Own User Subroutines 9 3.1. Compilers Required to Work with User Subroutines ........................9 3.2. User Subroutine files ·。音自。音音非音音 3.3 Formal Parameters ··········*····*······· 10 3. 4. Autodyn Modules(Non-Parameter Data).................. 10 3.5. Autodyn Variables ···*·· 3.5.1. K Solvers .11 3.5.2. Unstructured Solvers/Elements ............................................12 3.5.3. Notes about autodyn variables. ..................................................................13 36. Accessing Multiple Material Data- All UK Solvers……………,…,,…,,………….13 3. 7. Material Modeling User Subroutines.......... 看· 音·非音··音 ,14 3.8. Timing of calls to User Subroutines∴… 15 3.9. Autodyn Utility Functions/Subroutines 3.10. Terminating Execution from a User Subroutine……,…,…,…,…,…,…,,…,…,…,…,23 3. 11. How to determine the part number from the part name 3.12. Variables Available through F9 O Modules…….,….,….,…,…,,…,…,…,…,……,……,,24 4. Compiling and Running Your User Subroutines 25 4.1. Compiling, Debugging and Running your Customized Autodyn Version on Microsoft Windows 鲁看· 25 4.2. Linking your own User Subroutines on Linux Platforms 26 5.AutodynUserSubroutineModules…..,.,.,,…,,,29 5.1. BNDDEF, Boundary Definitions .29 5.2. CYCVAR, Cycle variables…....,.,.,.,,,,,….,,,…………,…………,29 5.3. FILDEF, File Definitions ............................................................................30 5.4. GLOOPT, Global Options............... .··4· 31 5.5.刂KNOW, Cell Indices ··········:·········.··:··.·:······ ,32 5.6. JETDEF, Jetting variables 32 57 KINDEE Constant variable definitions ,w..wwwwwwooww 33 5.8. LOCELM, Element Quantities 34 5.9. MATDEF Material definitions ,35 5.10. MATERIAL, Local material data ,.w.. 38 5.11. Equation of State(EOS)Variables 41 5.11.1 Linear eos 41 5.112 Polynomial EOS………… ·。,非··非非。非。非非D非非非·。非非·非非·着。普非非 。非着非 垂非非非·非·非·非。章非·非。非非非非 41 5.113 ldeal Gas eos 41 5.11. 4 Shock eos ······ 5.11.5.WL EOS 5.11.6.Tillotsoneosww.www.wwwwwwwwww....,42 5.117 PUFF EOS 43 5.11 8. Porous eos . 5.1.9. Orthotropic EOS…….………,…,……,…,……,………,………………………………43 5. 11.10. TWo-Phase eOS ·········:··························:·····:·····:····:·:················:·:.······ 5.11.11. Lee-Tarver eos . 5.11.12.P-αEOS…,………………45 5.113.RijgⅰdEOS………...….. 曲春。,着。·非。音非·非非非 ·····中·中·····4··:···4····· 45 5.12. Strength Model variables 5.12.1. Drucker-Prager Strength Model 5.12. 2 Johnson-Cook Strength Model 5.12.3. Zerilli-Armstrong Strength Model 47 Release 15.0-OSAS /P Inc A rights reserved -Contains proprietary and confidential information of ansys inc and its subsidiaries and affiliates User Subroutines tutorial 5.124.StenbergGunanStrengthModel….......…...47 5.12.5. Cowper Symonds Strength Model 47 5.12.6. Piecewise Linear Strength M。del… ·普非音音看·非非鲁·非非申音非·t非·自非非音自非鲁非·非··非·非音普音自非··非鲁自非自非申·非非非番鲁 48 5.12.7. Johnson- Holmquist Strength Model………,……,…,…,…,……,…,…,…,…,……,…………48 5.12.8. RHT Concrete Strength Model............................ 48 5.12.9. Orthotropic Yield Strength Model…… 49 5.13. Crushable Foam(Isotropic) 。音非。。自自非 49 5.14. Failure model variables. 5.14.1.Hydro(PMIN) Failure Model 49 5.14.2 Directional failure model 50 5.143 Cumulative Failure model 50 5.14.4. Johnson-Holmquist Damage model................................50 5.14.5. RHT Damage Model 50 5.14.6. Orthotropic Softening Model 5.15. MDGRID, Autodyn-2D Grid Variable Definitions 51 5.16. MDGRID3, Autodyn-3 D Grid Variable definitions……....,,,…………………53 5.17. MDPP Parallel Calculation variables 59 5. 18. MDSOLV, Unstructured Entity Types 中··.·:···:·.·:.·:··申 ,60 5.19. POLGON, Polygon Variable Definitions………….….…….……….……...61 5.20. RUNDEF Run Variable definitions. 5.21. SUBDEF, Global Part Variable Definitions .........,..... 63 5.22.WrapupExecutionterminationvariablesw.w..wwwwwww.www.ow..66 5.23. OBJECT, SPH Object Definitions…………....…..… 自垂 ∴66 6. Autodyn Variable Listings 69 6.1. Autodyn-2D- Structured (UK) Solvers..... Q 6.2. Autodyn-3D-Structured(UK) Solvers.... 74 6.3. Notes…. ·····················:········:···:····4······ 83 64 Unstructured Solvers 85 7. User Subroutine Examples...... 非非·非非非·番非自非。4非申非非非非非非自非·非非非非··非非非非非非·,。··非非非鲁非音,非··非非D自非非自垂非非·非非非非非非非自·.·非非音 87 7. 1. Subroutine most user 1 87 7.2. Subroutine exel.………92 73 Subroutine eXale 94 垂看 7. 4. Subroutine 7.5. Subroutine eXedit3-3D∴……………………………………96 7.6.Unstructuredelementdataaccess,.....wwww.g.gwoow.97 7.6.1. Direct Access through User Element Number 省·,非·非非着非 97 7.6.2. Access to all elements in a part 98 7.6.3. Access to All Elements in a Component 音t非非音 ∴98 7.6.4. Access to All Elements in a Group...... 99 7.6.5. Access to nodal variables for nbs tetrahedral elements……,……100 77 Subroutine eXfor3 ·4.··++= 104 Release 15.@ SAS /P, Inc. All rights reserved -Contains proprietary and confidential information of Ansys 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) MDFAL USER T 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 damage 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 EXACO 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-OSAS /P Inc A rights reserved -Contains proprietary and confidential information of ansys inc and its subsidiaries and affiliates User Subroutine Tutorial Introduction EXLOAD Loading additional, non -standard data from save files EXPOR Custom variable polygon porosity EXSAVE 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.@ SAS /P, 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 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: c Autodyn(Double Precision) Eile Import Setup Erecution Yiew Options Help 山l日图则5|四圆國回到国回图 View2 Plots ANSYS plots Select Part Cyde:o Material Location TANTALUM History hides View slides Select plot type for selected part(s) Setup ill type Additional components 同 aterials gRid Vectors o Material Location Boundaries Init. co o Matera Status COntour DEtonation None □ roded nodes Dars Contour varable Unused regions □Axes PRESSURE Polygons G seam secons hel tidiness o爬e lEgend nteract Mat drection 2 Marker Mirror Shel normals user_strength_example Atonal an plane x-o Node/Element >Cycle D n plane y=0 J scse n alne ?=0 aPart Hghight Time 0.000E +000 Hs rOtate g Material locator.Units cm,g,Hs Axial symmetry USER SUBROUTINE TUTORLAL EXAMPLE NO. 1 Extrude. 000000 Loading complete M ter var Run 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-OSAS /P Inc A rights reserved -Contains proprietary and confidential information of ansys inc and its subsidiaries and affiliates How to Invoke user subroutines ANSYS AUTODYN Materials in model(click for shortcut TANTALUM Material Name- TANTALUM Equation of state Linear Reference density 1.66600E+01(gcm3) Bulk Modulus 1.96300E+00(Mbar) Reference Temperature 0.00000E+00(K) Specific Heat 000000E+00 erg/gK) Thermal Conductivity 0.00000E+00 (Terg/cmKus) Strength von Mises Shear Modulus 692000E01(Mbar) Yield stress 900000E03(Mbar) Failure None Erosion None Material Cutoffs Maximum Expansion 1.00000E01one) Minimum Density Factor 1.00000E04(none) Minimum Density Factor (SPH) 200000E01(nne) Maximum Density Factor (SPH) 1.00000E+20(ne) 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.@ SAS /P, Inc. All rights reserved -Contains proprietary and confidential information of Ansys inc. and its subsidiaries and affiliates AD Material Data Input- TANTALUM Name V TANTALUM Reference Density y16.6000 (g/m3) EOS Linear ? Bulk Modulus 1.963000 (bar) Reference Temperature 0.000000 的0 Specific Heat 0.000000 ( Terg/gk) Thermal Conductivity 0.000000 (Terg/amKus -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) 0.000000 (Mbar) SCO 0.000000 (Mbar) SC(8) 0.000000 (Mbar) sc(9) 0.000000 (Mbar) SC(10) 0.000000 (Mbar) sc(1) 0.000000 (Mbar) +]Failure None You can now input the variables Shear Modulus (SC(1), and sc(2) through sc(11), to be used in the ID 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 you save the example database as example usersub 1 and click Run, you see the error dialog Release 15.0-OSAS /P Inc A rights reserved -Contains proprietary and confidential information of ansys inc and its subsidiaries and affiliates How to Invoke User Subroutines Error Problem terminated. user subroutine missing OK 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 0012 0.010 0.008 s0006 0002 0.000 00000.0500.1000.1500.2000.2500.3000.3500.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 曰 Streng eseh1· Shear Modulus 0.692000 (Mbar) EPS #1 0.010000 (none) EPS #2 0.050000 EPS #3 0.200000 none YIELD #1 0.005000 (bar) 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.@ SAS /P, Inc. All rights reserved -Contains proprietary and confidential information of Ansys inc. and its subsidiaries and affiliates 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论