Introductory UtoTrial For APDL-Mode - GitHub Pages

Transcription

Introductory Tutorial for APDL-ModeA GNU Emacs programming mode for the APDL language,version 20.6.0H. Dieter Wilhelm1Time-stamp:1dieter@duenenhof-wilhelm.de 2021-09-09 Do 1 / 25

Introducing APDL-Mode an APDL EnvironmentThis project supports your APDL work ows with the FEA suiteAnsys.It provides an editor mode for GNU Emacs for investigating andcoding APDL. The mode o ers also managing and communicationcapabilities for various Ansys processes, like interactive codedebugging with the solver or inquiring the license manager status,etc. Some features are quite sophisticated but its documentation isaccessible for Ansys users with little APDL and Emacs experience.GNU-Emacs is a modern, powerful and extensible - yet free - editor.High quality software available for every operating system whereAnsys is running.2 / 25

Install GNU-Emacs and APDL-ModeThere are no costs and restrictions even in commercial application.Please install GNU Emacs then APDL-Mode from Melpa ordownload an archive from the APDL-Mode's releases page.Install APDL-Mode in Emacs: Please type: M-xpackage-install-file RET and select the downloaded tararchive.3 / 25

Open an Emacs Bu er under APDL-ModeStart the editor and open doc/example.mac or any other APDL le(with the extensions mac, ans, inp, dat or anf, otherwise type M-xapdl and RET ).In the following M-x or C-c means typing ALT or CTRL keytogether with the x' or c' key.4 / 25

Explore the APDL-Mode MenusBrowsing the APDL help with C-c C-b is much faster thansearching with the Ansys Help Viewer or online.5 / 25

Easily Inspect WorkBench Solver Files (doc/example.dat)APDL-Mode hides the normally uninteresting but usually very largenumber blocks. On the right hand side is the unhidden content. IfAPDL-Mode is not yet con gured for .dat les please type:M-x apdl-mode6 / 25

Check Your Cursor Position in the Argument ListFor commands with a large number of arguments it is cumbersometo count the arguments, M-h facilitates this for you and visualisesdynamically at which argument position the cursor is.7 / 25

Select and Insert Templates from the Menu into Your CodeScreenshot with the Ansys Classics GUI on the left and Emacs onthe right on Win648 / 25

Preview the Extensible APDL Code TemplatesBefore inserting an entire template you are able to inspect itscontent in a preview window (C-c C-s) and might just copy themost relevant snippets, please see below and next slide.9 / 25

Select an Interesting Template from a Completion WindowType C-c C-s to choose a template name, use the TAB key tocomplete or to open the completion window of available items.10 / 25

Check Auto-Insertion and Outline Your Code (Tree View)Create a new APDL le with the su x .mac and let Emacsauto-insert a skeleton with outline' headings. Collapse and cyclethrough "tree views" with SHIFT TAB (Emacs 28).11 / 25

Utilise completions of all ( 2000) APDL symbolsMove the cursor behind a character - here c' - or word fragmentand type ESC TAB or C-M-i for completing up to dateAPDL command-, element- and function names.12 / 25

Open a Summary Window of Your APDL VariablesType C-c C-v to receive a summary window of all your variablede nitions. With an argument (C-u C-c C-v) you will get thecurrent value of your variable at the cursor (Linux only, right).13 / 25

Structure Your Variable AssignmentsMove the cursor to a variable de nition paragraph or mark, here inyellow, some de nitions and type C-c C-a to align them.14 / 25

Use the Emacs Integrated, Programmable RPN CalculatorType C-x * * to open the calculator, type y for pasting resultsdirectly into the APDL le. And q to quit the Calc' windows.15 / 25

Display the License Status and Preview ImagesIn Emacs' lower-half you see the license status (C-c C-l). Alldescribed features can be executed through the APDL-Mode menuor with keyboard shortcuts.16 / 25

Debug Your Code Interactively with the Solver (GNU-Linux)You can run the Ansys solver under Emacs and send code linesfrom above APDL window with C-c C-j (C-c C-c for whole regions)directly to this process. Below you see the interactive solver outputand on the left hand side the corresponding Ansys images.17 / 25

Arrange the APDL-Mode Windows to Your NeedsThe image shows an Emacs 23.2 frame (in reversed colour modeand compiled with the GTK toolkit under GNU-Linux) with aripped o APDL-Mode menu eld18 / 25

Con gure User Options and System Dependent AspectsPlease check the mode settings with Emacs' customisation system(no programming necessary) use the menu andmodify settings with Emacs'customisation systemor check the well commentedle apdl-con g.el19 / 25

Get to Know Emacs and Its Excellent DocumentationNewcomers to Emacs should take the guided online tour to get abackground of its capabilities and re up the interactive tutorial(C-h t) which is translated to various languages.20 / 25

Use the APDL-Mode Built-in HelpPlease type C-c C-h for the mode manual (there is also a briefintroduction of basic Emacs concepts) and C-h m, especially forAPDL-Mode's keybindings.21 / 25

You Might Read Further APDL-Mode DocumentationLicensing and costs: This is free and open software, there are nocosts and e ectively no restrictions for you usingEmacs and APDL-Mode - even - commerically. Bothare under the GPL, the Gnu Puplic License copied inthe LICENSE.org le.Con guration: More detailed instructions might be necessary if youare not using default Ansys installations. Please havea look in the INSTALLATION.org le. The onlinedocumentation is at APDL-Modes's documentationsite.Hands-on tutorial and reference: You will nd these in-depthdocumentation included in the mode's archives onGitHub's releases page or read online.News and project history: They are placed in the mode'saccompanying NEWS.org le22 / 25

Search for Help, Report Bugs and IssuesBesides the documentation, have a look in the GitHub's issues siteor send an email to the maintainer. Please use the APDL-Mode bugreport functionality, which might provide helpful status information.23 / 25

Use APDL-Mode Appropriate to Your NeedsThe relevance of APDL remains: WorkBench' and AIM'operate exclusively the Ansys solver with it! For a trueunderstanding the study of APDL is prerequisite. Furthermore,code APDL only for repetitive tasks or WB/AIM snippets.Basic APDL ViewerNavigating in WB solver input les, discerning relevant informationthrough highlighting, quickly analysing APDL commands with thebuilt-in help or pin-pointing the reference help in a browser.Earnest APDL EditorSpeci c shortcut keybindings, outlining, code templates,completions, auto-indentation, abbreviations, auto-insertion.Advanced APDL EnvironmentSolver communication/feedback - hybrid between coding anddebugging (GNU-Linux only), retrieving license states, error leviewing, abort le handling, extending APDL templates, . . .24 / 25

Last Slide of the APDL-Mode TutorialHint for the curious:25 / 25

Introductory Tutorial for APDL-Mode - A GNU Emacs programming mode for the APDL language, version 20.6.0 Author: H. Dieter Wilhelm Subject: APDL-Mode for GNU Emacs, an introductory Tutorial GNU Emacs Editor support for working with Ansys FEA. Keywords: Emacs Ansys FEA APDL Created Date: 9/9/2021 5:53:31 PM