Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Engineering Analysis of Smart Materials and Structures

MECH 6341, Summer Semester 2023


Prof. Hang Xu

Lecture 6: Review of FEA procedure and ANSYS


Assigned: 20‐07‐2023

Goal: a) review the typical procedure of FEA and use ANSYS to b) create a square lattice, apply load and
boundary conditions, solve it, and write required outputs in a file

Description: In this Tutorial, we first review the typical procedure of FEA, and then we learn some basic
functions of ANSYS to create a simple geometry, mesh the geometry, assign material properties, apply
boundary conditions and load, and finally solve the problem and save the results in output files.

Typical FEA procedure:


FEA procedure is composed of three main parts: a) Preprocessing, b) Process, and c) Post‐processing

USER Pre-processing Build a FE model

Process
Conduct numerical
COMPUTER
analysis

USER Post-processing See results

Fig 1. Typical FEA procedure

In the pre‐processing part, the engineer must provide the following information:

1
(1) Select analysis type • Structural static analysis
• Modal analysis
• Transient dynamic analysis
(2) Create Geometry • Buckling analysis
• Contact
• Steady-state thermal analysis
• Transient thermal analysis
(3) Select element type
2-D Linear Truss
3-D Quadratic Beam
Shell
Plate
(4) Assign material properties
Solid
E    

(5) Mesh the geometry

(6) Apply boundary conditions and loads

Fig 2. Pre‐processing procedure for FEA

In the process and post‐processing, the boundary value problem is solved, and the results are obtained.
(7) Process
Solve the boundary value
problem
(8) Post-processing
See the results

• Displacement
• Stress
• Strain
• Natural frequency
• Temperature
• Time history

Fig 3. Process and post‐processing

2
ANSYS Tutorial:
In this section, we review some basic ANSYS functions by solving a simple problem.

Problem Description:
Here, we select the RVE of a square lattice and apply a uniform uniaxial traction, as shown in figure 5.
Uniform stress of 1 MPa is applied at right hand side of RVE, and the two corners on the left side are
fixed. Steel with elastic modulus of 200 GPa and poison ratio of 0.3 is selected as the material. The goal
is the following
1) Create the geometry of RVE
2) Select the suitable element for the analysis
3) Assign material properties to the geometry
4) Mesh the geometry
5) Apply boundary conditions and loads
6) Solve the problem
7) Save some geometrical information, such as nodal location and element node table, in txt files
8) Save von Mises stress of each element in a txt file
9) Get APDL code

Fig 4. Square lattice with selected RVE

3
Fig 5. Load and boundary condition on the RVE

ANSYS Interface:

4
Create the RVE geometry:
In ANSYS, we start with creating Key Points (KP). Then by connecting KPs, we can create lines, and then
areas and volume.

a) Create KPs

For the square unit cell with a square hole, we first create 4 KPs for the boundary of the outer square,
and 4 KPs for the hole. The positions of KPs are as follow:

KP x Y
1 0 0
2 1 0
3 1 1
4 0 1
5 0.25 0.25
6 0.75 0.25
7 0.75 0.75
8 0.25 0.75

Note: ANSYS is unit less; therefore, all dimensions and units should be defined by the user. For example,
if you prefer to work with N and mm, all dimensions should be based on mm. stress and material
properties should be also defined based on N/mm2.

5
Going to the following option in ANSYS, we can create KPs one by one.

6
b) Create Lines:

By connecting KPs, we create lines for the square lattice boundaries.

7
c) Create Areas

We create 2 areas and then delete the small one from the bigger one to create the hole.

8
Use Boolean operation in ANSYS to delete the small one from the bigger one:

9
Select the suitable element for the analysis

For 2D case, we select a quadratic 2D element. This element has 8 nodes, 4 at the corners and 4 in the
middle of each line. This element has better accuracy compared to linear element, which only has 4
nodes at the corners.

10
Assign material properties to the geometry

Assign EX=200000 N/mm2, and PRXY=0.3

11
Mesh the geometry:

There are many way to mesh the geometry. The simplest method is to assign a mesh size and mesh the
geometry with the selected size. Here, I select mesh size of 0.1 mm.

12
13
Apply boundary conditions and loads
Here, I constrain only 2 nodes at the corners of the left hand side of RVE. UX and UY degree of freedom
of the bottom left corner are constrained. For the second node, UX of the upper left corner is fixed.

14
For the loading condition, we apply 1 N/mm2 at the right hand side of RVE. For this purpose, we can
apply pressure with a negative value to simulate tension with uniform stress.

15
16
Solve the problem

Plot von Mises stress distribution

17
Write data in txt files
Nodal location
Here, I write the x location of each node of the mesh in a text file. Similar procedure can be applied for
other y and z location. First we need to create an array in ANSYS, and we assign the location of each
node to each component.

18
19
Check the array

20
Write data in txt file

21
Write element node table in txt file

This table shows node numbers of each element. For example, for 2D element considered here, each
element has 8 nodes. To get node numbers associated to each element, we can use the following
procedure. Here, I only get the first node number for each element.

22
23
Write von Mises stress of each element in a txt file

For element solution, we need to define element table first. Then from the table, we select the result.

Then we create an array to fill with the element table we just created

24
25
Write von Mises stress of each element in a txt file

We follow similar procedure used for the nodal location

26
Get APDL code:

/PREP7
ET,1,PLANE183
!*
K,1,0,0,,
K,2,1,0,,
K, ,1,1,,
K, ,0,1,,
K, ,0.25,0.25,,
K, ,0.75,0.25,,
K, ,0.75,0.75,,
K, ,0.25,0.75,,
LSTR, 1, 2
LSTR, 2, 3
LSTR, 3, 4
LSTR, 4, 1
LSTR, 5, 6
LSTR, 6, 7
LSTR, 7, 8
LSTR, 8, 5
AL,1,2,3,4
AL,5,6,7,8
ASBA, 1, 2

27
!*
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,EX,1,,200000
MPDATA,PRXY,1,,0.3
AESIZE,3,0.1,
MSHKEY,0
ASEL, , , , 3
AMESH,3
FINISH
/SOL
D, 1, , , , , ,UX,UY, , , ,
D,42, , , , , ,UX, , , , ,
SFL,2,PRES,‐1,
/STATUS,SOLU
SOLVE
FINISH
/POST1
!*
/EFACET,1
PLNSOL, S,EQV, 0,1.0
*VGET,xloc,NODE, ,LOC,X, , ,2
*CREATE,ansuitmp
*CFOPEN,'xloc','txt',' '
*VWRITE,xloc(1,1), , , , , , , , ,
(f20.10)
*CFCLOS
*END
/INPUT,ansuitmp
*VGET,node1,ELEM, ,NODE,1, , ,2
*CREATE,ansuitmp
*CFOPEN,'node1','txt',' '
*VWRITE,node1(1,1), , , , , , , , ,
(f10.1)
*CFCLOS
*END
/INPUT,ansuitmp
!*
AVPRIN,0, ,
ETABLE,vonmis,S,EQV
!*
*VGET,vonmis,ELEM, ,ETAB,VONMIS, , ,2

28
*CREATE,ansuitmp
*CFOPEN,'vonmis','txt',' '
*VWRITE,vonmis(1,1), , , , , , , , ,
(f20.10)
*CFCLOS
*END
/INPUT,ansuitmp
!*
FINISH
! /EXIT,NOSAV

Exercise:
1) Save y location of each node in a txt file
2) Save all node numbers of element in txt files
3) Save the area of each element in a txt file

29

You might also like