许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  ANSYS二次开发:后处理使用APDL命令流解析结果文件

ANSYS二次开发:后处理使用APDL命令流解析结果文件

阅读数 7
点赞 0
article_banner

🍺相关文章汇总如下🍺:

  1. 🎈ANSYS二次开发:APDL开发入门准备🎈
  2. https://blog.csdn.net/hhy321/article/details/122868974
  3. 🎈ANSYS二次开发:后处理使用APDL命令流解析结果文件🎈
  4. https://blog.csdn.net/hhy321/article/details/122934017
  5. 🎈ANSYS二次开发:Python解析ANSYS结果文件(PyAnsys库)🎈
  6. https://blog.csdn.net/hhy321/article/details/122898478
  7. 🎈ANSYS二次开发:Python和ANSYS进行交互操作(PyAnsys库,PyDPF)🎈
  8. https://blog.csdn.net/hhy321/article/details/124902158
  9. 🎈ANSYS二次开发:Python解析ANSYS FLUENT结果文件🎈
  10. https://blog.csdn.net/hhy321/article/details/126806049


前言

  • ANYS提供两种工作方式,GUI图形用户界面(GraphicalUser Interface又称图形用户接口)操作和命令流。
  • ANYS命令流方式,融合GUI方式、APDL、UPFs、UIDL、MAC,甚至TCL/TK于一个文本文件中,可通过/input命令(或UtilityMenu>File>Read Input From)读入并执行,也可通过拷贝该文件的内容粘贴到命令行中执行。一般命令流通常由ANSYS命令和APDL功能语句组成。
  • APDL的全称是ANSYS Parametric Design Language,也被叫做ANSYS参数化设计语言。APDL是用来自动完成某些功能或建模的类似于FORTRAN的解释性语言,提供一般程序语言的功能。它包含三个方面的内容:工具条、参量和宏命令。
  • APDL的运用主要体现在用户可以利用程序设计语言将ANSYS命令组织起来,编写出参数化的用户程序,从而实现有限元分析的全过程,即建立参数化的CAD模型、参数化的网格划分与控制、参数化的材料定义、参数化的载荷和边界条件定义、参数化的分析控制和求解以及参数化的后处理。

在后处理中读取结果的步骤一般是:

  1. General Postproc -> Data and File Options,将RST结果文件读进去。
  2. 使用Read Results,可以先看last step,如果里面有很多步,按first step,next step看结果。
  3. 列出结果可以使用List Results。

1、启动软件

  • (1)通过鼠标点击计算机桌面上的软件图标,启动程序。
    在这里插入图片描述
  • (2)也可以在计算机的开始菜单中,找到“ANSYS 15.0”- “Mechanical APDL 15.0”,鼠标点击运行软件。
    在这里插入图片描述

2、加载结果文件

  • APDL界面操作如下:
    在这里插入图片描述
  • APDL命令代码如下:
finish
/post1
/cwd, d:/test
file, demo.rst
set, first
allsel
nsel, stat
eplot ! 或 gplot、nplot、 kplot
/view, 1, 1,1,1
/replot

3、查看结果数据的总体情况

  • APDL界面相关操作如下: 读取第一个载荷步: 读取某一个载荷步:
  • APDL命令相关代码如下:

(1) 弹出窗口 ,并列出基本信息,同时列出每个载荷步的标题。

set, list

(2)读取某个载荷步或某个子步的求解结果

set,list,0 或者 set,list,1 读取结果文件,并列出每个载荷步的基本信息
set,list,2                      读取结果文件,并列出基本信息,同时列出每个载荷步的标题
set,first 从结果文件中读取第一个载荷步
set,last 从结果文件中读取最后一个载荷步
set, next 从结果文件中读取下一个载荷步
set, previous 从结果文件中读取前一个载荷步
set,near,,,time 从结果文件中读取最接近该时间的载荷步
set, next, 3 从结果文件中读取下一个载荷步的第三个子步`

4、绘制结果图

  • APDL相关界面操作如下:

        应用 PLDISP命令(Main Menu>General Postproc> Plot Results> Deformed Shape)来显示变形图。PLDISP 命令的 KUND 参数给用户可以在原始图上迭加变形图。


        绘制默认的变形图:
PLDISP, 0

在这里插入图片描述

   绘制节点的位移等值线图:
在这里插入图片描述

   绘制单元的位移等值线图:
在这里插入图片描述

   绘制位移的 矢量图  
在这里插入图片描述

   只绘制单元图:
在这里插入图片描述

   只绘制节点图:
在这里插入图片描述

  • APDL命令相关代码如下:
eplot ! 或 gplot、nplot、 kplot
/view, 1, 1,1,1
/replot

说明:

   gplot: 各元素综合显示

   kplot: 显示选择的关键点

   lplot:显示选择的线

   aplot:显示选择的面

   vplot:显示选择的体

   nplot:显示选择的节点

   eplot:显示选择的单元

plnsol,u,x
plnsol,u,y
plnsol,u,z
plnsol,u,sum

plesol,u,x
plesol,u,y
plesol,u,z
plesol,u,sum

plvect,u $ plvect,s

/contour,,18,-16,,500

5、输出动画

5.1 变形动画

  • APDL相关界面操作如下:
  • APDL命令相关代码如下:
set,first    
pldisp,0     
anmode,10,0.5e-1

5.2 等值面动画

对等值位移图的动画制作,utility meun-》plotctrls-》animate-》deformed results,输入帧数为10, 时间间隔 为0.5秒。

  • APDL相关界面操作如下:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

6、显示剖视图

在这里插入图片描述

6.1 Type of Plot(/TYPE)

  • Capped hidden 和 Capped z-buffered 都可以实现绘制剖面图。非剖视图默认是z-buffered。
    在这里插入图片描述

Display type. Defaults to ZBUF for raster mode displays or BASIC for vector mode displays:


ValueDescription
BASIC or 0Basic display (no hidden or section operations).
SECT or 1Section display (plane view). Use the /CPLANE command to define the cutting plane.
HIDC or 2Centroid hidden display (based on item centroid sort).
HIDD or 3Face hidden display (based on face centroid sort).
HIDP or 4Precise hidden display (like HIDD but with more precise checking). Because all facets are sorted, this mode can be extremely slow, especially for large models.
CAP or 5Capped hidden display (same as combined SECT and HIDD with model in front of section plane removed).
ZBUF or 6Z-buffered display (like HIDD but using software Z-buffering).
ZCAP or 7Capped Z-buffered display (same as combined SECT and ZBUF with model in front of section plane removed).
ZQSL or 8QSLICE Z-buffered display (same as SECT but the edge lines of the remaining 3-D model are shown).
HQSL or 9QSLICE precise hidden display (like ZQSL but using precise hidden).
/TYPE,1,6 ! Z-buffered display
/TYPE,1,5 ! Capped hidden display
/TYPE,1,7 ! Capped Z-buffered display

6.2 Cutting plane is(/CPLANE)

该命令仅仅用于截面和加盖显示。
在这里插入图片描述

   Specifies the cutting plane:


ValueDescription
0Cutting plane is normal to the viewing vector [/VIEW] and passes through the focus point [/FOCUS] (default).
1The working plane [WPLANE] is the cutting plane.
!0: Normal to view
/CPLANE, 0

!1: Working plane
/CPLANE, 1

6.3 Cutting plane is: Normal to View

转动 模型  ,就可以看到相应截面的结果图。这个截面始终平行面向用户屏幕。
在这里插入图片描述

! Normal to view
/CPLANE, 0

6.4 Cutting plane is: Working plane

需要自定义工作平面,来显示截图。通过菜单Utility Menu -> WorkPlane。
在这里插入图片描述

! Working plane
/CPLANE,1 ! Cutting plan



爱阅读的小沐技术探讨 / 代码分享 / 软件定制 / 阅读感悟


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空