Repository navigation
Expand file tree
/
Copy pathstrain.for
More file actions
68 lines (48 loc) · 1.94 KB
/
Copy pathstrain.for
File metadata and controls
68 lines (48 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Module strain_mod
! Module for all strain-related calculations
Contains
Subroutine Strains(F, m, DT, ndir, eps)
! The purpose of this subroutine is to calculate the strains (eps, plas12, inel12)
! for the given deformation gradient and temperature.
!
! If a nonzero value for R_phi0 is provided, the strains are given in the fiber reference frame
Use matProp_Mod
Use forlog_Mod
! Arguments
Type(matProps), intent(IN) :: m
Double Precision, intent(IN) :: F(3,3) ! Deformation gradient
Double Precision, intent(IN) :: DT ! Temperature change
Integer, intent(IN) :: ndir
Double Precision, intent(OUT) :: eps(ndir,ndir) ! GL stain tensor, without plasticity
! Locals
Parameter (zero=0.d0)
! -------------------------------------------------------------------- !
! Initialize strain tensor
eps = zero
! Calculate the total Green-Lagrange strain from the deformation gradient tensor
eps = GLStrain(F,ndir)
! Find the mechanical strain by subtracting the thermal strain from the total strain
If (DT /= zero) Then
eps(1,1) = eps(1,1) - m%cte(1)*DT
eps(2,2) = eps(2,2) - m%cte(2)*DT
eps(3,3) = eps(3,3) - m%cte(3)*DT
End If
Return
End Subroutine Strains
Pure Function GLStrain(F, ndir)
! Computes the Green-Lagrange strain from the deformation gradient
! Input
Double Precision, intent(IN) :: F(3,3)
Integer, intent(IN) :: ndir
! Output
Double Precision :: GLStrain(ndir,ndir)
! Locals
Double Precision :: eye(ndir,ndir) ! Identity
Double Precision, parameter :: zero=0.d0, one=1.d0, half=0.5d0
! -------------------------------------------------------------------- !
! Initialize identity matrix
eye = zero; Do I = 1,3; eye(I,I) = one; End Do
GLStrain = (MATMUL(TRANSPOSE(F), F) - eye)*half
Return
End Function GLStrain
End Module strain_mod