【项目】将Abaqus结果数据导入Matlab并计算J积分

 

简介该项目将Abaqus输入和结果文件读取到Matlab中,然后针对特定的二维算例计算J积分。两个算例分别计算了均匀板(HOMI)和功能梯度材料板(FGMII)的混合裂纹。算例的详细信息可参考如下文献,亦可在papers文件夹中找到。项目代码lyk6756/abq2mat_j-integral - GitHub参考文献 Abanto-Bueno, J., Lambros, J. An Ex...

简介

该项目将Abaqus输入和结果文件读取到Matlab中,然后针对特定的二维算例计算J积分。两个算例分别计算了均匀板(HOMI)和功能梯度材料板(FGMII)的混合裂纹。算例的详细信息可参考如下文献,亦可在papers文件夹中找到。

项目代码

lyk6756/abq2mat_j-integral - GitHub

参考文献

使用步骤

步骤一:在Abaqus中建立模型

在文件夹1.model中,运行Abaqus脚本myPlate_cps8_model.py来建立有限元模型,并生成Abaqus输入文件(.inp)。

在提交作业前,修改输入文件的历史输出部分指令,加入如下代码来生成包含位移等信息的结果文件(.fil

*FILE FORMAT, ASCII
*NODE FILE
 U

如果计算的是非均匀材料板(Example2.FGMII),脚本会创建用户自定义材料,在提交作业时需要链接USDFLD用户子程序文件(myUSDFLD_FGMII.for)。此外,为了使得Abaqus能够计算非均匀材料的裂尖信息,需要在输入文件的材料定义部分添加如下代码:

*INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1
All, 100

并在分析步中添加如下代码:

*FIELD, USER
All,

步骤二:Abaqus至Matlab

将文件夹1.model中生成的输入文件(.inp)和结果文件(.fil)拷贝至文件夹2.abq2mat中。在文件夹2.abq2mat中,运行Matlab脚本main_getdata.m来获取模型信息。得到的模型信息将储存为Matlab数据文件(.mat)。

注意脚本main_getdata.m中采用了小工具abaqusMesh2Matlab来读取Abaqus输入文件(.inp),采用了小工具Abaqus2Matlab V2.01来读取Abaqus结果文件(.fil)。运行main_getdata.m前应首先安装这两个小工具。相关安装文件可在gadgets文件夹中找到。

步骤三:在Matlab中计算J积分

将文件夹2.abq2mat中生成的Matlab数据文件(.mat)拷贝至文件夹3.J-int中。在文件夹3.J-int中,运行Matlab脚本main.m来计算J积分及应力强度因子。结果将会输出在屏幕上,并写入文件中(ResultsFromMat.csv)。

积分程序中的部分代码来自于jfchessa/femlab - GitHub


Introduction

This repository reads Abaqus input and result files to Matlab, then calculate the J-integral for specific 2D problems. Two examples calculate the mixed cracks of a homogeneous plate (HOMI) and functionally graded material plate (FGMII), respectively. The detailed information of the examples can be found in the following papers, which can also be found in the folder papers.

Project repository

lyk6756/abq2mat_j-integral - GitHub

References

Instructions

Step 1: Modelling in Abaqus

In the folder 1.model, run script myPlate_cps8_model.py in Abaqus/CAE to set up the FEM model and generate input job file (.inp).

Before submitting the job, modify the history output commands of the input file: add the following commands to generate a result file (.fil) containing displacement and other information:

*FILE FORMAT, ASCII
*NODE FILE
 U

If a non-homogenerous plate is modeled (Example2.FGMII), the script will creat user-defined materials. And user subroutine USDFLD (myUSDFLD_FGMII.for) should be linked when submitting the job. To compute the J-integral and SIFs for non-homogenerous materials in Abaqus, following keywords should be added to MATERIALS module of the input file:

*INITIAL CONDITIONS, TYPE=FIELD, VARIABLE=1
All, 100

Then, add following keywords in STEP module:

*FIELD, USER
All,

Step 2: Abaqus to Matlab

Copy the input file (.inp) and result file (.fil) generated in the folder 1.model to the folder 2.abq2mat. In the folder 2.abq2mat, run script main_getdata.m in Matlab to get the model information. The obtained model information will be stored as a Matlab data file (.mat).

Note that inscript main_getdata.m, gadget abaqusMesh2Matlab is used to read the Abaqus input file (.inp), and Abaqus2Matlab V2.01 to Abaqus result file (.fil). These two gadgets should be installed before running main_getdata.m. The relevant files can be found in the folder gadgets.

Step 3: J-integral in Matlab

Copy the Matlab data file (.mat) generated in the folder 2.abq2mat to the folder 3.J-int. In the folder 3.J-int, run the Matlab script main.m to calculate the J-integrals and stress intensity factors. The results will be output on the screen, and write into the file (ResultsFromMat.csv).

Part of the code in this program comes from jfchessa/femlab-GitHub.