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

## 项目代码

lyk6756/abq2mat_j-integral - GitHub

## 使用步骤

### 步骤一：在Abaqus中建立模型

*FILE FORMAT, ASCII
*NODE FILE
U


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


*FIELD, USER
All,


## 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

## 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.