JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite...

21
JN Reddy The Finite Element Method Read: Chapter 6 2D Nonlinear Finite Element Analysis CONTENTS Weak Form development Finite element model Computation of tangent coefficients Review of numerical integration Computer implementation Summary JN Reddy - 1 Lecture Notes on NONLINEAR FEM

Transcript of JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite...

Page 1: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

The Finite Element Method

Read: Chapter 6

2D Nonlinear Finite Element Analysis

CONTENTS

• Weak Form development• Finite element model• Computation of tangent

coefficients• Review of numerical integration• Computer implementation• Summary

JN Reddy - 1 Lecture Notes on NONLINEAR FEM

Page 2: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy Nonlinear Problems (2-D): 2

Finite Element Formulation of a Model 2D Nonlinear Equation

Model Equation

Weak Form

Primary and Secondary Variables

11 22

11 11 , , 22 22 , ,

0 (1)

( , , , , ), ( , , , , )x y x y

u ua a f

x x y y

a a x y u u u a a x y u u u

11 220 (2)e

e

i h i hi i n

w u w ua a w f dx w q ds

x x y y

11 22PV: SV: h hh n x y

u uu q a n a n

x y

JN Reddy - 2 Lecture Notes on NONLINEAR FEM

Page 3: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy Nonlinear Problems (2-D): 3

FINITE ELEMENT FORMULATION …(continued)

Finite Element Model

11 221

1 1

11 22

0

( ) ( )

e

e

e

e

e

e

nj ji i

jj

i i n

n ne e e e e e eij j i i ij j i

j j

j je i iij

ei i i n

u a a dxdyx x y y

f dxdy q ds

K u f Q K u F

K a u a u dxdyx x y y

F f dxdy q d

s

The coefficient matrix [K] is a function

of the nodal values of u

1

( , ) ( , ) ( , )n

e e eh j j

j

u x y u x y u x y

Finite Element Approximation

x

y

Γ

Γ

Ω e

e

Ω

• eu2

Degrees of freedom

12

34

eu1

JN Reddy - 3 Lecture Notes on NONLINEAR FEM

Page 4: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN ReddyNonlinear Problems (2-D): 4

COMPUTATION OF TANGENT COEFFICIENTS

1

1 1

or [ ( )]n

e e e e e e e ei ij j i

j

e en nip p ipe e e e ei

ij p ip p ijj j j jp p

R K u F R K u u F

K u KRT u K u K

u u u u

0 1 0 1

11 11 11 22 22 22

11 22

1

1 1 1 1 111 2211 11 11 , 22 22 ,

1

1

Suppose that and . Then

e

np pe e e i i

ij ij pj jp

n

p p j jj j j j jp

e eij ij

a a a u a a a u

a aT K u dxdy

u x x u y y

a au ua a u a a a

u u u u u

T K a

1 11 22

e

i ij

u ua dxdy

x x y y

JN Reddy - 4 Lecture Notes on NONLINEAR FEM

Page 5: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

NUMERICAL EVALUATION OF INTEGRAL COEFFICIENTS

• Transformation of the integrals posed on arbitrary-shaped element to the master element domain so that evaluationof the integrals is made easy.

• The Gauss integration rule that evaluates an integral expression as a linear sum of the integrand evaluated at certain points (Gauss points) and weights (Gauss weights)is used.

x

y

Γ

Γ

Ω e

e

Ω

• eu2i

Degrees of freedom

12

34

eu1

1

( , ) ( , ) ( , )n

e e eh j j

j

u x y u x y u x y

1

( ( , ), ( , ))

( , )

eh

ne ej j

j

u x y

u

Numer Integration: 5

JN Reddy - 5 Lecture Notes on NONLINEAR FEM

Page 6: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

ξ

η

ξ = 1

η = 1

x

y

1Ω 2Ω 3ΩΩ

ξ

η

ηξ ddJdydx =

)1(),1( ηη ,yy,xx ==

)1(),1( ,yy,xx ξξ ==)()(

y,xy,x

ηηξξ

==

)()(

ηξηξ,yy,xx

==

y

x

NUMERICAL INTEGRATION

1

1

ˆ( , ) ( )

ˆ( , ) ( )

me ej j

j

me ej j

j

x x ,

y y ,

Numer Integration: 6

JN Reddy - 6 Lecture Notes on NONLINEAR FEM

Page 7: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

11 22

ˆ

1 1ˆ

( , ) ( ( , ), ( , ))

ˆ( , ) ( , )

e

e

j je i iij

ij ij

NGP NGP

ij I J ij I JI J

K a a dxdyx x y y

F x y dxdy F x y J d d

F J d d W W F

NUMERICAL EVALUATION OF INTEGRALS

[ ]

i i i i i i

i ii i i i

x y x yx y x xJ

x yx yy yx y

Computer Implementation: 7

Using the chain-rule, we obtain

JN Reddy - 7 Lecture Notes on NONLINEAR FEM

Page 8: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

NUMERICAL INTEGRATION implementation point of view

1 1

1 1

1 11 2

2 2

1 2

ˆ ˆ

ˆ ˆ

ˆˆ ˆ

,ˆˆ ˆ

m mi ii ii i

m mi ii ii i

m

m

m m

x y x yJ

x yx yη η η η

x yx y

d

x yη η η

xdy J d d

1 *

i ii

i i i

x J J

y

Jacobian matrix

Global derivatives in terms of the local derivatives

Computer Implementation: 8

JN Reddy - 8 Lecture Notes on NONLINEAR FEM

Page 9: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

ELEMENT CALCULATIONS

11 22

* * * *11 11 12 11 12

ˆ

* * * *22 21 22 21 22

( , )

( , )

e

j je i iij

j ji i

j ji i

K a a dxdyx x y y

a J J J J

a J J J J

1 1

ˆ 1 1

1 1

ˆ ˆ( , ) ( , )

ˆ ( , )

e eij ij

NGPNGPeij I J I J

I J

J d d

F d d F d d

F WW

Computer Implementation: 9

JN Reddy - 9 Lecture Notes on NONLINEAR FEM

Page 10: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN ReddyComputational Issues: - 10

η

ξ

ξ = − 13 ξ = 1

3

η = 13

η = − 13

η= 0

η

ξ

ξ = − 35 ξ = 3

5

η = 35

η = − 35

ξ= 0

η= 0.861...

ξ= − 0.861...

ξ

ηξ= 0.861...

η= 0.339...

η= − 0.339...η= − 0.861...

GAUSS QUADRATURE

Domain of the masterelement

Domain of the physical element

Gauss points Gauss weights

ˆ

, 1

ˆ,

ˆ ,

( ) ( )

( )

e e

ij ij

N

I J ij I JI J

F x y dxdy F ξ,η dξ dη

W W F ξ η

JN Reddy - 10 Lecture Notes on NONLINEAR FEM

Page 11: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

Variables used in the program, FEM2DRead the input data description for FEM2D to know the meaning of all input variables; other variables are described below.

Computer Implementation: 11

COMPUTER IMPLEMENTATION (2D)

NPE - nodes per element, ELXY( , ) - Global coordinates of the th node of element , ( , )ELK( , ) - Element coefficient, ELF( ) - Element coefficient, ELU( ) - Element solution,

e ei i

eij

ei

ei

ni j i e x y

i j Ki fi u

( )tanTAN( , ) - Element coefficient,

0, 1, Coefficients in the definition of ( ) :( ) 0 1 * *

eiji j K

AX AX AU a xa x AX AX x AU u

−= + +

JN Reddy - 11 Lecture Notes on NONLINEAR FEM

Page 12: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy 2-D Problems: 12

A11 = A10 + A1X*X + A1Y*Y; A22 = A20 + A2X*X + A2Y*Y; A00=CONSTIEL = 1, Linear rectangular elementIEL= 2, Quadratic rectangular elementGLXY(I,1) – Global x coordinate of the Ith global nodeGLXY(I,2) – Global y coordinate of the Ith global nodeNEQ – Number of equations in the mesh

SFL( ) Element hape (or approximation) funtion, DSFL( , ) Derivative of the th shape function with respect to

the local (normalized) coordinates and

( 1) : , ( 2) :

GDSFL( , ) Derivative o

ei

i i

i si j i

j j

i j

−−

∂ ∂= =

∂ ∂− f the th shape function with respect

to the global coordinates and : andi i

i

x yx y ∂ ∂

∂ ∂

COMPUTER IMPLEMENTATION (2D)JN Reddy - 12 Lecture Notes on NONLINEAR FEM

Page 13: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

Variables used in the program, FEM2D (continued)

1 2

1 2

( ) , , , , ( , ) , ( , )

( , ) , ( , )

i ii

i i

SF i XI ETA DET J DSF i DSF i

GDSF i GDSF ix y

1 2( ) , ( ) , ( , ) , ( , ) , ( , )i i ij i iELU i u ELF i f ELK i j K ELXY i x ELXY i y

Computer Implementation: 13

( , ) 11 * (1, ) * (1, ) 22 * (2, ) * (2, )F i j A GDSF i GDSF j A GDSF i GDSF j

11 22

ˆ

1 1

11 22

( , )

( , )

( , )= ( , ) ( , )

e

j je i iij ij

NGP NGP

I J ij I JI J

j ji iij

K a a dxdy F J d dx x y y

W W J F

F a ax x y y

CONST

COMPUTER IMPLEMENTATION (continued)

JN Reddy - 13 Lecture Notes on NONLINEAR FEM

Page 14: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

Initialize global Kij, fi

Iter = iter + 1

DO 1 to n

Iter = 0

Impose boundary conditionsand solve the equations

CALL ELKF to calculate Kij(n)

and fi(n), and assemble to form global Kij and Fi

Transfer global information(material properties, geometry and solution)

to element

Yes Iter < itmax no

Error < ε yesno

STOP

Print Solution

Write a message

STOP

GENERAL LOGIC FOR THE NONLINEAR ANALYSIS

Logic in the MAIN program

JN Reddy - 14 Lecture Notes on NONLINEAR FEM

Page 15: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

COMPUTER IMPLEMENTATION for the nonlinear analysis

ITER=0160 ITER=ITER+1

IF(ITER.GT.ITMAX)THENWRITE(IT,1200)ITMAXSTOP

ENDIFC Initialize the global coefficient matrices and vectors

DO 180 I=1,NEQGLF(I)=0.0DO 180 J=1,NHBW

180 GLK(I,J)=0.0C Compute element matrices and assemble the matrices

DO 250 N=1,NEMDO 200 I=1,NPENI=NOD(N,I)IF(NONLN.GT.0)THEN

ELU(I)=GLU(NI)ENDIFELXY(I,1)=GLXY(NI,1)ELXY(I,2)=GLXY(NI,2)

200 CONTINUE……

250 CONTINUE

Logic in the MAIN program

Computer Implementation: 15

JN Reddy - 15 Lecture Notes on NONLINEAR FEM

Page 16: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

COMPUTER IMPLEMENTATION for the nonlinear analysis (continued)

C Save the previous iteration solution and update the current oneIF(NONLN.GT.0)THEN

DO 270 I=1,NEQGPU(I)=GLU(I)IF(NONLN.EQ.1)THEN

GLU(I)=GLF(I)ELSE

GLU(I)=GLU(I)+GLF(I)ENDIF

270 CONTINUEC Test for the convergence of the solution

IF(NONLN.GT.0)THENDNORM=0.0DINORM=0.0DO 280 I=1,NEQDNORM=DNORM+GLU(I)*GLU(I)IF(NONLN.EQ.1)THEN

DINORM=DINORM+(GLU(I)-GPU(I))**2ELSE

DINORM=DINORM+GLF(I)*GLF(I)ENDIF

280 CONTINUE

ERROR=DSQRT(DINORM/DNORM)

IF(ERROR.GT.EPS)GOTO 160

DO I=1,NEQ

GLF(I)=GLU(I)

ENDDO

WRITE(ITT,1100)ITER,ERROR

ENDIF

ENDIF

C Print the solution (i.e., nodal values of the primary variables)

Logic in the MAIN program

Computer Implementation: 16

JN Reddy - 16 Lecture Notes on NONLINEAR FEM

Page 17: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

SUBROUTINE ELMATRCS2D (NPE,NN,INTF,NONLN,ITYPE)IMPLICIT REAL*8(A-H,O-Z)COMMON/STF/ELF(9),ELK(9,9),ELXY(9,2),ELU(9) COMMON/PST/A10,A1X,A1Y,A20,A2X,A2Y,A00,F0,FX,FY,

* A1U,A1UX,A1UY,A2U,A2UX,A2UYCOMMON/SHP/SF(9),GDSF(2,9)DIMENSION GAUSPT(5,5),GAUSWT(5,5),TANG(9,9)COMMON/IO/IN,ITT

CDATA GAUSPT/5*0.0D0, -0.57735027D0, 0.57735027D0, 3*0.0D0,

2 -0.77459667D0, 0.0D0, 0.77459667D0, 2*0.0D0, -0.86113631D0,3 -0.33998104D0, 0.33998104D0, 0.86113631D0, 0.0D0, -0.90617984D0,4 -0.53846931D0,0.0D0,0.53846931D0,0.90617984D0/

CDATA GAUSWT/2.0D0, 4*0.0D0, 2*1.0D0, 3*0.0D0, 0.55555555D0,

2 0.88888888D0, 0.55555555D0, 2*0.0D0, 0.34785485D0,3 2*0.65214515D0, 0.34785485D0, 0.0D0, 0.23692688D0,4 0.47862867D0, 0.56888888D0, 0.47862867D0, 0.23692688D0/

Logic in the ELMATRCS2D subroutine

COMPUTER IMPLEMENTATIONfor the nonlinear analysis (continued)

Computer Implementation: 17

JN Reddy - 17 Lecture Notes on NONLINEAR FEM

Page 18: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

COMPUTER IMPLEMENTATIONfor the nonlinear analysis (continued)

Logic in the ELMATRCS2D subroutine (continued)

CC Initialize the arraysC

DO 100 I = 1,NPEELF(I) = 0.0

DO 100 J = 1,NPEIF(ITYPE.GT.1)THENTANG(I,J)=0.0ENDIF

100 ELK(I,J)= 0.0CC Do-loops on numerical C integration begin here.C Subroutine INTERPLN2DC is called hereC

DO 200 NI = 1,IPDFDO 200 NJ = 1,IPDF

XI = GAUSPT(NI,IPDF)ETA = GAUSPT(NJ,IPDF)CALL INTERPLN2D (NPE,XI,ETA,DET,ELXY)CNST = DET*GAUSWT(NI,IPDF)*GAUSWT(NJ,IPDF)X=0.0Y=0.0U=0.0UX=0.0UY=0.0DO 140 I=1,NPE

U=U+ELU(I)*SF(I)UX=UX+ELU(I)*GDSF(1,I)UY=UY+ELU(I)*GDSF(2,I)X=X+ELXY(I,1)*SF(I)

140 Y=Y+ELXY(I,2)*SF(I)

Computer Implementation: 18

JN Reddy - 18 Lecture Notes on NONLINEAR FEM

Page 19: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

COMPUTER IMPLEMENTATIONfor the nonlinear analysis (continued)

Logic in the ELMATRCS2D subroutine (continued)C Define the coefficients of theC differential equation

FXY=F0+FX*X+FY*YA11=A10+A1X*X+A1Y*YA22=A20+A2X*X+A2Y*YIF(NONLN.GT.0)THEN

A11=A11+A1U*U+A1UX*UX* +A1UY*UY

A22=A22+A2U*U+A2UX*UX* +A2UY*UY

ENDIFC Define the element source vector C and coefficient matrix

DO 180 I=1,NPE

ELF(I)=ELF(I)+FXY*SF(I)*CNST

DO 180 I=1,NPEELF(I)=ELF(I)+FXY*SF(I)*CNSTDO 160 J=1,NPES00=SF(I)*SF(J)*CNSTS11=GDSF(1,I)*GDSF(1,J)*CNSTS22=GDSF(2,I)*GDSF(2,J)*CNSTELK(I,J)=ELK(I,J)+A11*S11+A22*S22+A00*S00

C Define the part needed to add to [K] to define [T]IF(ITYPE.GT.1)THEN

S10=GDSF(1,I)*SF(J)*CNSTS20=GDSF(2,I)*SF(J)*CNSTS12=GDSF(1,I)*GDSF(2,J)*CNSTS21=GDSF(2,I)*GDSF(1,J)*CNSTTANG(I,J)=TANG(I,J)

* +UX*(A1U*S10+A1UX*S11+A1UY*S12)* +UY*(A2U*S20+A2UX*S21+A2UY*S22)

ENDIF160 CONTINUE180 CONTINUE200 CONTINUE

Computer Implementation: 19

JN Reddy - 19 Lecture Notes on NONLINEAR FEM

Page 20: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy

COMPUTER IMPLEMENTATIONfor the nonlinear analysis (continued)

Logic in the ELMATRCS2D subroutine (continued - end)

C Compute the residual vector and tangent matrix IF(ITYPE.GT.1)THEN

DO 220 I=1,NPEDO 220 J=1,NPE

220 ELF(I)=ELF(I)-ELK(I,J)*ELU(J)DO 240 I=1,NPEDO 240 J=1,NPE

240 ELK(I,J)=ELK(I,J)+TANG(I,J)ENDIF

C RETURNEND

r r r r rK U U F K U UTan[ ( )] [ ( )] eneipe ei

ij ij pe ej jp

KRK K u

u utan

1

Computer Implementation: 20

JN Reddy - 20 Lecture Notes on NONLINEAR FEM

Page 21: JN Reddy - 1 Lecture Notes on NONLINEAR FEM The Finite ...mechanics.tamu.edu/wp-content/uploads/2017/03/06_Nonlinear-2D.pdf · JN Reddy The Finite Element Method. Read: Chapter. 6.

JN Reddy 2-D Problems: 21

(1) Finite element formulation of a two-dimensional model nonlinear equation in a single variable

(2) Computation of tangent matrix coefficients(3) Numerical integration of matrix coefficients(4) Computer implementation of 2D problem

All other items (e.g., iterative methods for the solution of nonlinear equations, error check, and computer logic for nonlinear analysis) remain the same as in the 1-D problems discussed earlier.

SUMMARYJN Reddy - 21 Lecture Notes on NONLINEAR FEM