www.日韩av.com,亚洲不卡av一区二区三区,天堂av在线网,成人福利视频在线看

APDL實現ANSYS的結果或中間變量值打印輸出到txt文件

2017-05-26  by:CAE仿真在線  來源:互聯網

APDLAPDL實現ANSYS的結果或中間變量值打印輸出到文件



總結重點如下:

1、apdl運行過程中的數據(包括節點,位置,函數返回值,變量等)通過vwrite輸出到txt文件

2、使用命令相關命令:vwrite,mwrite,cfopen,cfclos,/output等


output本來是寫standard output的,即那個黑窗口,但也可以通過這個命令改為寫到文件,vwrite就是把變量數組寫到output

如果不想與標準輸出窗口那些內容相互混合,你可以通過cfopen,cfclos來建立獨立的文件,然后通過vwrite寫入


*VWRITE, Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9, Par10, Par11, Par12, Par13, Par14, Par15, Par16, Par17, Par18, Par19
Writes data to a file in a formatted sequence.
APDL: Array Parameters
MP ME ST PR PRN <> EM DY PP EME MFS
Argument Descriptions
Par1, Par2, Par3, . . . , Par19
You can write up to 19 parameters (or constants) at a time. Any Par values after a blank Par value are ignored. If you leave them all blank, one line will be written (to write a title or a blank line). If you input the keyword SEQU, a sequence of numbers (starting from 1) will be written for that item.

Notes
You use *VWRITE to write data to a file in a formatted sequence. Data items (Par1, Par2, etc.) may be array parameters, scalar parameters, character parameters (scalar or array), or constants. You must evaluate expressions and functions in the data item fields before using the *VWRITE command, since initially they will be evaluated to a constant and remain constant throughout the operation. Unless a file is defined with the *CFOPEN command, data is written to the standard output file. Data written to the standard output file may be diverted to a different file by first switching the current output file with the /OUTPUT command. You can also use the *MWRITE command to write data to a specified file. Both commands contain format descriptors on the line immediately following the command. The format descriptors can be in either Fortran or C format.

/OUTPUT, Fname, Ext, --, Loc
Redirects text output to a file or to the screen.


1 概述

ANSYS作為通用有限元仿真計算軟件應用非常普遍,其強大的參數化功能更是使得ANSYS的使用方便很多。在計算過程中,通常需要對計算結果進行統計,ANSYS計算的模型大多時候節點單元數目很多,結果數據也很多,因此在GUI界面的查詢操作不太方便,工作量太大,而且結果不好記錄。而且很多時候需要借助第三方軟件比如MATLAB等數據處理軟件對結果進行處理,此情況下需要ANSYS能夠將計算結果輸出到文件中,再通過對結果文件進行處理得到想要的結果。

APDL不僅在參數化建模、加載和求解有很大的發揮,在后處理時同樣有發揮。本次借助APDL編寫后處理命令流,將需要的計算結果以設置好的格式輸出為txt文件。

2 應用

將編寫好的前處理和求解APDL命令流在ANSYS里面運行,命令流文件如圖1所示,該段命令流為兩根梁的求解計算,如圖2所示。

APDL實現ANSYS的結果輸出

1 前處理與求解APDL命令流

APDL實現ANSYS的結果輸出
2 模型

首先將所有節點的坐標位置輸出,命令流如圖3所示。

APDL實現ANSYS的結果輸出
3 輸出節點位移APDL命令流

ANSYS還可以將結果保存為數組,如圖4所示,數組可以仿照圖3的循環部分輸出,數組中的數據可以繼續在ANSYS里面反復調用。

APDL實現ANSYS的結果輸出
4 輸出數組

同樣的,其他的結果參數也可以輸出。如圖5所示,為節點應力結果的輸出。

APDL實現ANSYS的結果輸出
5 APDL獲取其他的結果

基本思路是通過循環語句獲取所有節點的參量,保存成數組,也可以不保存,然后新建一個文件用于輸出節點的參量,主要的命令是*CREATE*GET


本文轉發自http://blog.sina.com.cn/s/blog_6465f2ed0102wzvz.html


開放分享:優質有限元技術文章,助你自學成才

相關標簽搜索:APDL實現ANSYS的結果或中間變量值打印輸出到txt文件 Ansys有限元培訓 Ansys workbench培訓 ansys視頻教程 ansys workbench教程 ansys APDL經典教程 ansys資料下載 ansys技術咨詢 ansys基礎知識 ansys代做 Fluent、CFX流體分析 HFSS電磁分析 Abaqus培訓 

編輯
在線報名:
  • 客服在線請直接聯系我們的客服,您也可以通過下面的方式進行在線報名,我們會及時給您回復電話,謝謝!
驗證碼

全國服務熱線

1358-032-9919

廣州公司:
廣州市環市中路306號金鷹大廈3800
電話:13580329919
          135-8032-9919
培訓QQ咨詢:點擊咨詢 點擊咨詢
項目QQ咨詢:點擊咨詢
email:kf@1cae.com




主站蜘蛛池模板: 大姚县| 夏河县| 嵩明县| 凌海市| 巩义市| 忻城县| 青川县| 武陟县| 平阴县| 喀喇沁旗| 奉节县| 无棣县| 方城县| 定边县| 灌阳县| 彝良县| 军事| 永年县| 万荣县| 横峰县| 寻乌县| 台前县| 富锦市| 临朐县| 揭东县| 成安县| 松原市| 玉龙| 景德镇市| 巴青县| 永康市| 郑州市| 镶黄旗| 宁波市| 金寨县| 长沙市| 成安县| 青海省| 师宗县| 宣汉县| 凤凰县|