如何在workbench中使用command?
如何在ansys workbench中插入apdl?
如何在ansys workbench中使用复杂载荷?
答案在APDL,他可以实现函数化的载荷,如岁时间变化,随位置变化的载荷,或正选变动的往复载荷,都可以实现。请看本文案例.
【案例描述】
一个悬臂梁,长1米,截面尺寸为100mmx100mm,左端固定,顶面上施加分布力系。载荷从1MPa,2MPa,3MPa渐渐增加,求结构的最大位移。

【案例分析】
本案例可以直接在wb中用多载荷步来求解,这里说明如何使用插入APDL命令的方式实现。
【求解过程】
1. 打开ANSYS WORKBENCH14.5
2.创建结构静力学分析系统。

3.创建几何体。
双击geometry单元格,进入DM,选择mm单位。
创建长方体。

其尺寸设置是

退出DM.
4.划分网格。
双击MODEL,进入到MECHANICAL中,按照默认方式划分网格。

5.固定左端面。

6.添加APDL命令以分步加载。
下面使用APDL命令进行分步加载。
由于该命令最后要传递到经典界面中计算,而经典界面没有单位。为保持统一性,都用毫米单位。
(1)设置单位

(2)创建命名集。
由于在命令中要引用顶面这个面,为了能够正确引用,先需要给它一个名称,这需要使用命名集来完成。

选择上述顶面,创建命名集。在弹出的对话框中设置名字:topface

则树形大纲中出现了该命名集。

有了命名集,在后面就可以使用该名字了。
(3)插入APDL命令。
在数形大纲中先选择A5,再从工具栏中选择命令按钮

则图形窗口变成了一个文本编辑器,此处可以输入命令。

该文本窗口内说了很多话,主要内容包含两点:
第一,这些命令会在SOLVE命令刚执行前执行。
第二,注意这里用的单位是mm.
现在我们向该文本窗口输入下列命令。

这段ADPL命令流的含义是:
首先退出前面的某个处理器(finish)
然后进入到求解器中(/solve),在1,2,3,个时间步,依次在顶面上施加1,2,3mpa的载荷(sf),并将该载荷步写入到载荷步文件中(lswrite),然后先后求解这三个载荷步(lssolve)。
最后退出求解器(finish)
在上述命令流中,对于顶面加载时,用到了前面定义的命名集的名字。

意味着要对顶面加载。
7.仿真以查看结果。
仿真并查看形变

可见,最大形变已经达到22mm,这已经是大形变了。
应力结果

最大应力达到近900Mpa,显然,这个应力较大,超过了一般钢材所能够承受的限度。
所以,如果这是一个实际案例的话,那么需要进一步考虑材料非线性和几何非线性进行分析。
所以在进行有限元分析的时候,以后可以在ansys workbench环境灵活插入APDL来扩展workbench的功能,毕竟有些功能workbench目前还是做不到的。