Você está na página 1de 9

COMPUTATIONAL

STRUCTURAL ANALYSIS
Assignment - 1

Abstract
Explicit FEM Program for stress and strain analysis of 3 bar element

SUBRAMANIAM SREENATH
ID – 28J18103
M1 STUDENT, SHIP DESIGN SUBAREA LAB
NAOE, OSAKA UNIVERSITY
Computational Structural Analysis – Assignment 1

Problem definition

Write a program for the stress and strain analysis of a 3-bar element using Explicit FEM.

Assumptions

Length of each element = L = 1m.

Cross Section Area A = 0.01m2

Density ρ = 8050 kg/m3

Young’s Modulus = 2 x 1011 N/m2

Node 4 is assumed to be fixed (boundary condition)

Node 1,2,3 is assumed to have only translation (boundary condition)

Constant force at node 1, F = 1000 N

Computation Flow for explicit FEM

Compute net node Compute node Compute node


Compute node mass
forces accelerations velocity, displacement
{M}
{F} {a} {V}, {du}, {u}

Update Internal Forces


Calculate Strain {d𝜀𝜀} Calculate Stress {𝜎𝜎}
{Fint}

t+dt

Page | 1 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

Calculations

𝜌𝜌 ∗ 𝐴𝐴 ∗ 𝐿𝐿 𝜌𝜌 ∗ 𝐴𝐴 ∗ 𝐿𝐿
𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 𝑀𝑀1 = , 𝑀𝑀2 = 𝜌𝜌 ∗ 𝐴𝐴 ∗ 𝐿𝐿, 𝑀𝑀3 = 𝜌𝜌 ∗ 𝐴𝐴 ∗ 𝐿𝐿, 𝑀𝑀4 =
2 2

𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹(𝑡𝑡) = 𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹(𝑡𝑡) − 𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹(𝑡𝑡)


𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹(𝑡𝑡)
𝑎𝑎(𝑡𝑡) = , 𝑤𝑤ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝑀𝑀 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑜𝑜𝑜𝑜 𝑡𝑡ℎ𝑒𝑒 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛.
𝑀𝑀
𝑣𝑣(𝑡𝑡 + 𝑑𝑑𝑑𝑑) = 𝑣𝑣(𝑡𝑡) + 𝑎𝑎(𝑡𝑡) ∗ 𝑑𝑑𝑑𝑑
∆𝑢𝑢(𝑡𝑡 + 𝑑𝑑𝑑𝑑) = 𝑣𝑣(𝑡𝑡) ∗ 𝑑𝑑𝑑𝑑
𝑢𝑢(𝑡𝑡 + 𝑑𝑑𝑑𝑑) = 𝑢𝑢(𝑡𝑡) + ∆𝑢𝑢(𝑡𝑡 + 𝑑𝑑𝑑𝑑)

−1 1
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝜀𝜀 = 𝑢𝑢1 + 𝑢𝑢2 , 𝑤𝑤ℎ𝑒𝑒𝑒𝑒𝑒𝑒 𝐿𝐿 = 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙ℎ 𝑜𝑜𝑜𝑜 𝑡𝑡ℎ𝑒𝑒 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
𝐿𝐿 𝐿𝐿
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆, 𝜎𝜎 = 𝐸𝐸𝐸𝐸

𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹1 = −𝜎𝜎1 ∗ 𝐴𝐴
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹2 = 𝜎𝜎1 ∗ 𝐴𝐴 − 𝜎𝜎2 ∗ 𝐴𝐴
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹3 = 𝜎𝜎2 ∗ 𝐴𝐴 − 𝜎𝜎3 ∗ 𝐴𝐴
𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹4 = 𝜎𝜎3 ∗ 𝐴𝐴
𝑇𝑇ℎ𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑎𝑎𝑎𝑎𝑎𝑎 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑎𝑎𝑎𝑎𝑎𝑎 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎𝑎𝑎 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡

P.T.O

Page | 2 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

Program written in Fortran


!Explicit FEM Analysis for a 3 element bar
!Code written by Subramaniam Sreenath, Ship Design Sub-Area\NAOE, Osaka
University
!Date 19/10/2018, Version 1.1

program FEM_Analysis_Explicit

implicit none

!Units - S.I

!Constants
real*8, PARAMETER :: DT = 0.0001, A = 0.01, L = 1, RHO = 8050, YM = 2.0E+11

!Variables
real*8,dimension(4) :: n_mass
real*8,dimension(4) :: n_cord
real*8,dimension(500,4) :: f_e_node
real*8,dimension(500,4) :: f_int_node
real*8,dimension(500,4) :: f_net_node
real*8,dimension(500,4) :: a_node
real*8,dimension(500,4) :: v_node
real*8,dimension(500,4) :: du_node
real*8,dimension(500,4) :: u_node
real*8,dimension(500,3) :: strain
real*8,dimension(500,3) :: stress
real*8 :: dshape1, dshape2
real*8 :: time
real :: start, finish
integer :: i, t, el

open(unit=1, file = 'result.txt', status='new', IOSTAT=ios)


if(ios .ne. 0) then
open(unit=1, file = 'result.txt', status='old')
end if

open(unit=2, file = 'result2.txt', status='new', IOSTAT=ios)


if(ios .ne. 0) then
open(unit=2, file = 'result2.txt', status='old')
end if

write(2,*)"Time", "," , "f_net_node1" , "," , "f_net_node2" , "," , "f_net_node3"


, "," , &
"f_net_node4" , "," , "strain_el_1" , "," , "strain_el_2" , "," , "strain_el_3" ,
"," , "stress_el_1" , &

Page | 3 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

"," , "stress_el_2" , "," , "stress_el_3"

write(1,*)"Time" , "," , "a_node1" , "," , "a_node2" , ",", "a_node3" , "," , &


"a_node4" , "," , "v_node1" , "," , "v_node2" , "," , "v_node3" , "," , &
"v_node4" , "," , "u_node1" , "," , "u_node2" , "," , "u_node3", "," , "u_node4"

call cpu_time(start)

!Initialisation

f_e_node(2:500,1) = 1000 !the constant external force at node 1 is 1000N


t = 1
time = 0

!Node Mass Calculation


n_mass(1)=(rho*A*L)/2
n_mass(2)=(rho*A*L)
n_mass(3)=(rho*A*L)
n_mass(4)=(rho*A*L)/2

!Node Co-ordinates
n_cord(1) = 0
n_cord(2) = L
n_cord(3) = 2*L
n_cord(4) = 3*L

write(2,*)time, "," , f_net_node(t,1) , "," , f_net_node(t,2) , "," ,


f_net_node(t,3) , "," , &
f_net_node(t,4) , "," , strain(t,1) , "," , strain(t,2) , "," , strain(t,3) , ","
, stress(t,1) , &
"," , stress(t,2) , "," , stress(t,3)

write(1,*)time, "," , a_node(t,1) , "," , a_node(t,2) , "," , a_node(t,3) , "," ,


&
a_node(t,4) , "," , v_node(t,1) , "," , v_node(t,2) , "," , v_node(t,3) , "," ,
v_node(t,4) , &
"," , u_node(t,1) , "," , u_node(t,2), "," , u_node(t,3), "," , u_node(t,4)

!Calculation

do t=2, 500

time = time+DT
!Node force,acceleration,velocity,displacement calculationss
do i=1,4
f_net_node(t,i) = f_e_node(t,i)-f_int_node(t,i)
a_node(t,i) = f_net_node(t,i)/n_mass(i)
a_node(t,4) = 0 !boundary condition

Page | 4 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

v_node(t,i) = v_node(t-1,i)+a_node(t,i)*DT
du_node(t,i) = v_node(t,i)*DT
u_node(t,i) = u_node(t-1,i) + du_node(t,i)
n_cord(i)=n_cord(i)+u_node(t,i) !update the co-ordinates
end do

!Calculation of stress and strain in each of the 3 elements


do el=1,3
dshape1 = 1/(n_cord(el+1)-n_cord(el)) !Derivative of shape function
dshape2 = -1/(n_cord(el+1)-n_cord(el)) !Derivative of shape function
strain(t,el) = dshape1*u_node(t,el+1)+dshape2*u_node(t,el)
stress(t,el) = YM*strain(t,el)
end do

write(2,*)time, "," , f_net_node(t,1) , "," , f_net_node(t,2) , "," ,


f_net_node(t,3) , "," , &
f_net_node(t,4) , "," , strain(t,1) , "," , strain(t,2) , "," , strain(t,3) ,
"," , stress(t,1) ,&
"," , stress(t,2) , "," , stress(t,3)

write(1,*)time, "," , a_node(t,1) , "," , a_node(t,2) , "," , a_node(t,3) ,


"," , &
a_node(t,4) , "," , v_node(t,1) , "," , v_node(t,2) , "," , v_node(t,3) , ","
, v_node(t,4) , &
"," , u_node(t,1) , "," , u_node(t,2), "," , u_node(t,3), "," , u_node(t,4)

!update internal forces


f_int_node(t+1,1) = -stress(t,1)*A
f_int_node(t+1,2) = stress(t,1)*A - stress(t,2)*A
f_int_node(t+1,3) = stress(t,2)*A - stress(t,3)*A
f_int_node(t+1,4) = stress(t,3)*A

end do

call cpu_time(finish)
print '("Time = ",f6.3," seconds.")',finish-start

close(unit=1)
close(unit=2)
end program FEM_Analysis_Explicit

The program file and executable is attached in the mail.

P.T.O

Page | 5 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

Results
Strain vs Time Graph

Strain vs Time
0.0000006

0.0000004

0.0000002

0
1
11
21
31
41
51
61
71
81
91
101
111
121
131
141
151
161
171
181
191
201
211
221
231
241
251
261
271
281
291
301
311
321
331
341
351
361
371
381
391
401
411
421
431
441
451
461
471
481
491
-2E-07

-4E-07
Strain

-6E-07

-8E-07

-0.000001

-1.2E-06

-1.4E-06

-1.6E-06
Time (1 unit = 1 x 10-4 sec)
strain_el_1 strain_el_2 strain_el_3 Trend_Strain_el_1 Trend_strain_el_2 Trend_strain_el_3

From the graph we can see that the strain in each element is oscillating, this is due to the dynamic nature of the problem.
The average strain is found out by plotting a linear trendline in the graph.
It is observed that strain at nodes = −5 × 10−7 . The negative sign indicates the strain is compressive in nature.

Page | 6 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

Stress vs Time Graph

Stress vs Time
100000

50000

0
1
11
21
31
41
51
61
71
81
91
101
111
121
131
141
151
161
171
181
191
201
211
221
231
241
251
261
271
281
291
301
311
321
331
341
351
361
371
381
391
401
411
421
431
441
451
461
471
481
491
-50000
Stress

-100000

-150000

-200000

-250000

-300000
Time (1unit = 1x10-4)

stress_el_1 stress_el_2 stress_el_3 Trend_Stress_el_1 Trend_Stress_el_2 Trend_Stress_el_3

The stress vs time also has the oscillating values because strain is oscillating. The average stress in all the elements found
out by plotting the trendline comes out to be = −1 × 105 𝑁𝑁/𝑚𝑚2 . The negative sign indicating the compressive nature of the
stress.

Page | 7 Subramaniam Sreenath


Computational Structural Analysis – Assignment 1

Observations

One of the main observations while calculating the problem was the divergence of the solution
when the time step dt , was not selected properly.
𝐿𝐿
In general, 𝑑𝑑𝑑𝑑 < 𝐸𝐸
, which is the length of a member divided by the speed of sound in the medium.
�𝜌𝜌

For the current problem dt was assumed as 0.0001 which is less than the maximum value of 0.0002.
If a larger dt is assumed say 0.001, the solution will diverge.

Page | 8 Subramaniam Sreenath

Você também pode gostar