We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Import External Mesh File to APDL Scripting

    • a5833959
      Subscriber
      Hi all,
      I am currently learning APDL scripting, and in this video (https://www.youtube.com/watch?v=OZNi8M0fmzI) he mentioned that we can import and work with meshes that are generated by other processors such as Workbench Mechanical and I am curious about how to import mesh file into APDL?
      I tried to read Ansys Help Mechanical APDL-Modeling and Meshing guide, but didn't know which part should I go to?

      Thank you in advance for any help!
    • mrife
      Ansys Employee
      Hi @x5833959 First thanks for watching that video lesson - it's me in the video! In Mechanical APDL we can use the /INPUT command to read in externally generated mesh files if they are in MAPDL format. In this case "format" really means a file of APDL commands. While there is one set of APDL commands, we group them into the "CDB" and all the others. For example the APDL command N to define a node must be used once per node defined. Whereas the CDB version there is a NBLOCK command issued once, then all the node numbers and x/y/z locations follow. If you had a model with 1000 nodes the input file would need to include either 1000 instances of the N command or 1 instance of the NBLOCK command. As you can imagine reading in 1 command is faster than reading 1000 commands to do the same thing.
      So, most programs like WB Mechanical will write out a CDB style input file. You can manually write on out in WB Mechanical by selecting the Solution tree object; then in the upper right there is an option to write the input file.
      In MAPDL you can use the CDREAD command to read in the CDB file. In the MAPDL GUI it's in Main Menu -> Pre Processing -> Archive Model -> Read.
      Otherwise you can use the /INPUT command to read in the input file [MAPDL Utility Menu -> File -> Read Input From].
      The CDB format can include IGES of the CAD associated with the mesh. Most of the time this does not exist as most FEA pre-processors write out just the FEM information. So you can use /INPUT to read in the CDB file too (if it does not contain CAD data).
      If the file extension is cdb then use the archive read function. If it is something like dat or inp use the /INPUT.
      Good Luck!
      Mike
Viewing 1 reply thread
  • The topic ‘Import External Mesh File to APDL Scripting’ is closed to new replies.