Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -105,10 +105,10 @@ program en234fea
! open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)

! Homework 7, stretch a hyperelastic bar, check stiffness.
infil = './input_files/Hyperelastic_bar_stretch.in'
open (unit = IOR, file = infil, status = 'old', ERR=500)
outfil = './Output_files/hyperelastic_bar_stretch.out'
open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)
! infil = './input_files/Hyperelastic_bar_stretch.in'
! open (unit = IOR, file = infil, status = 'old', ERR=500)
! outfil = './Output_files/hyperelastic_bar_stretch.out'
! open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)
!!
!! Homework 7, stretch and rotate a hyperelastic bar
! infil = './input_files/Hyperelastic_stretch_rotate.in'
@@ -117,10 +117,10 @@ program en234fea
! open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)
!
! Homework 7, stretch a hyperelastic plate with a central hole
! infil = './input_files/Holeplate_hyperelastic.in'
! open (unit = IOR, file = infil, status = 'old', ERR=500)
! outfil = './Output_files/Holeplate_hyperelastic.out'
! open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)
infil = './input_files/Holeplate_hyperelastic.in'
open (unit = IOR, file = infil, status = 'old', ERR=500)
outfil = './Output_files/Holeplate_hyperelastic.out'
open (UNIT = IOW, FILE = outfil, STATUS = 'unknown', ERR=500)


!! Homework 8, solve the 2D Cahn-Hilliard equation
@@ -121,6 +121,7 @@ subroutine el_hyperelast_3d(lmn, element_identifier, n_nodes, node_property_list
F(1,1) = F(1,1)+1.d0
F(2,2) = F(2,2)+1.d0
F(3,3) = F(3,3)+1.d0
Finv = 0.d0
call invert_small(F, Finv, J) ! determinant and inverse
! calculate left C-G tensor
BC = 0.d0
@@ -462,6 +463,8 @@ subroutine fieldvars_hyperelast_3d(lmn, element_identifier, n_nodes, node_proper

call initialize_integration_points(n_points, n_nodes, xi, w)

nodal_fieldvariables = 0.d0

mu1 = element_properties(1)
K1 = element_properties(2)

@@ -519,7 +522,6 @@ subroutine fieldvars_hyperelast_3d(lmn, element_identifier, n_nodes, node_proper
stressk = 0.d0
stressk(1:3) = (mu1/((J**2)**(1.d0/3.d0)))*(BCv(1:3)-Bkk/3.d0)+J*K1*(J-1.d0)
stressk(4:6) = (mu1/((J**2)**(1.d0/3.d0)))*BCv(4:6)

p = sum(stressk(1:3))/3.d0
sdev = stressk
sdev(1:3) = sdev(1:3)-p