FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
creep.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 module mcreep
7  use hecmw_util
8  use mmaterial
10 
11  implicit none
12 
13 contains
14 
17  subroutine iso_creep(matl, sectType, stress, strain, extval,plstrain, &
18  dtime,ttime,stiffness, temp, hdflag)
19  type( tmaterial ), intent(in) :: matl
20  integer, intent(in) :: sectType
21  real(kind=kreal), intent(in) :: stress(6)
22  real(kind=kreal), intent(in) :: strain(6)
23  real(kind=kreal), intent(in) :: extval(:)
24  real(kind=kreal), intent(in) :: plstrain
25  real(kind=kreal), intent(in) :: ttime
26  real(kind=kreal), intent(in) :: dtime
27  real(kind=kreal), intent(out) :: stiffness(6,6)
28  real(kind=kreal), intent(in) :: temp
29  integer(kind=kint), intent(in), optional :: hdflag
30 
31  integer :: i, j, hdflag_in
32  logical :: ierr
33  real(kind=kreal) :: ina(1), outa(3)
34  real(kind=kreal) :: xxn, aa
35 
36  real(kind=kreal) :: c3,e,un,g,stri(6),p,dstri,c4,c5,f,df, eqvs
37 
38  hdflag_in = 0
39  if( present(hdflag) ) hdflag_in = hdflag
40 
41  aa = 0.0d0
42  xxn = 0.0d0
43  !
44  ! elastic
45  !
46  ina(1) = temp
47  call calelasticmatrix( matl, secttype, stiffness, temp, hdflag=hdflag_in )
48 
49  if( dtime==0.d0 .or. all(stress==0.d0) ) return
50  if( hdflag_in == 2 ) return
51  !
52  ! elastic constants
53  !
54  ina(1) = temp
55  call fetch_tabledata( mc_isoelastic, matl%dict, outa(1:2), ierr, ina )
56 
57  if( ierr ) then
58  stop "error in isotropic elasticity definition"
59  else
60  e=outa(1)
61  un=outa(2)
62  endif
63 
64  ! Norton
65  if( matl%mtype==norton ) then ! those with no yield surface
66  ina(1) = temp
67  call fetch_tabledata( mc_norton, matl%dict, outa, ierr, ina )
68  xxn=outa(2)
69  aa=outa(1)*((ttime+dtime)**(outa(3)+1.d0)-ttime**(outa(3)+1.d0))/(outa(3)+1.d0)
70  endif
71 
72  g=0.5d0*e/(1.d0+un)
73  !
74  ! creep
75  !
76  stri(:)=stress(:)
77  p=-(stri(1)+stri(2)+stri(3))/3.d0
78  do i=1,3
79  stri(i)=stri(i)+p
80  enddo
81  !
82  dstri=dsqrt(1.5d0*(stri(1)*stri(1)+stri(2)*stri(2)+stri(3)*stri(3)+ &
83  2.d0*(stri(4)*stri(4)+stri(5)*stri(5)+stri(6)*stri(6))) )
84  !
85  ! unit trial vector
86  !
87  stri(:)=stri(:)/dstri
88 
89  eqvs = dstri
90  if( eqvs<1.d-10 ) eqvs=1.d-10
91  f=aa*eqvs**xxn
92  df=xxn*f/eqvs
93  !
94  ! stiffness matrix
95  !
96  c3=6.d0*g*g
97  c4=c3*plstrain/(dstri+3.d0*g*plstrain)
98  c3=c4-c3*df/(3.d0*g*df+1.d0)
99  c5=c4/3.d0
100 
101  do i=1,6
102  do j=1,6
103  stiffness(i,j) = stiffness(i,j) +c3*stri(i)*stri(j)
104  enddo
105  enddo
106  do i=1,3
107  stiffness(i,i) = stiffness(i,i) - c4
108  do j=1,3
109  stiffness(i,j) = stiffness(i,j) +c5
110  enddo
111  enddo
112  do i=4,6
113  stiffness(i,i) = stiffness(i,i) - c4/2.d0
114  enddo
115 
116  end subroutine
117 
120  subroutine update_iso_creep(matl, sectType, strain, stress, extval, plstrain, &
121  dtime, ttime, temp, hdflag)
122  type( tmaterial ), intent(in) :: matl
123  integer, intent(in) :: secttype
124  real(kind=kreal), intent(in) :: strain(6)
125  real(kind=kreal), intent(inout) :: stress(6)
126  real(kind=kreal), intent(inout) :: extval(:)
127  real(kind=kreal), intent(out) :: plstrain
128  real(kind=kreal), intent(in) :: ttime
129  real(kind=kreal), intent(in) :: dtime
130  real(kind=kreal), intent(in) :: temp
131  integer(kind=kint), intent(in), optional :: hdflag
132 
133  integer :: i, hdflag_in
134  logical :: ierr
135  real(kind=kreal) :: ina(1), outa(3)
136  real(kind=kreal) :: xxn, aa
137 
138  real(kind=kreal) :: e,un,g,dg,ddg,stri(6),p,dstri,f,df, eqvs
139 
140  hdflag_in = 0
141  if( present(hdflag) ) hdflag_in = hdflag
142 
143  aa = 0.0d0
144  xxn = 0.0d0
145 
146  if( dtime==0.d0 ) return
147  if( hdflag_in == 2 ) return
148  !
149  ! elastic constants
150  !
151  ina(1) = temp
152  call fetch_tabledata( mc_isoelastic, matl%dict, outa(1:2), ierr, ina )
153  if( ierr ) then
154  stop "error in isotropic elasticity definition"
155  else
156  e=outa(1)
157  un=outa(2)
158  endif
159 
160  ! Norton
161  if( matl%mtype==norton ) then ! those with no yield surface
162  ina(1) = temp
163  call fetch_tabledata( mc_norton, matl%dict, outa, ierr, ina )
164  if( ierr ) then
165  stop "error in isotropic elasticity definition"
166  else
167  xxn=outa(2)
168  aa=outa(1)*((ttime+dtime)**(outa(3)+1.d0)-ttime**(outa(3)+1.d0))/(outa(3)+1.d0)
169  endif
170  endif
171 
172  g=0.5d0*e/(1.d0+un)
173 
174  !
175  ! creep
176  !
177  stri(:)=stress(:)
178  p=-(stri(1)+stri(2)+stri(3))/3.d0
179  do i=1,3
180  stri(i)=stri(i)+p
181  enddo
182  !
183  dstri=dsqrt(1.5d0*(stri(1)*stri(1)+stri(2)*stri(2)+stri(3)*stri(3)+ &
184  2.d0*(stri(4)*stri(4)+stri(5)*stri(5)+stri(6)*stri(6))) )
185  !
186  ! determination of the consistency parameter
187  !
188  dg=0.d0
189  do
190  if( matl%mtype==norton ) then
191  eqvs = dstri-3.d0*g*dg
192  f=aa*eqvs**xxn
193  df=xxn*f/eqvs
194  ddg = (f-dg)/(3.d0*g*df+1.d0)
195  dg = dg+ddg
196  if((ddg<dg*1.d-6).or.(ddg<1.d-12)) exit
197  endif
198  enddo
199 
200  stri(:) = stri(:)-3.d0*g*dg*stri(:)/dstri
201  stress(1:3) = stri(1:3)-p
202  stress(4:6) = stri(4:6)
203 
204  !
205  ! state variables
206  !
207  plstrain= dg
208  extval(1)=eqvs
209 
210  end subroutine
211 
213  subroutine updateviscostate( gauss )
215  type(tgaussstatus), intent(inout) :: gauss ! status of curr gauss point
216 
217  gauss%fstatus(2) = gauss%fstatus(2)+gauss%plstrain
218  end subroutine
219 
220 end module
mcreep::updateviscostate
subroutine updateviscostate(gauss)
Update viscoplastic state.
Definition: creep.f90:214
mcreep::update_iso_creep
subroutine update_iso_creep(matl, sectType, strain, stress, extval, plstrain, dtime, ttime, temp, hdflag)
This subroutine calculates stresses and creep status for an elastically isotropic material with isotr...
Definition: creep.f90:122
mmaterial::mc_isoelastic
character(len=dict_key_length) mc_isoelastic
Definition: material.f90:140
mmechgauss
This modules defines a structure to record history dependent parameter in static analysis.
Definition: mechgauss.f90:6
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_util::kreal
integer(kind=4), parameter kreal
Definition: hecmw_util_f.F90:16
m_elasticlinear
This module provides functions for elastic material.
Definition: ElasticLinear.f90:6
mmechgauss::tgaussstatus
All data should be recorded in every quadrature points.
Definition: mechgauss.f90:13
mmaterial::tmaterial
Structure to manage all material related data.
Definition: material.f90:167
mcreep
This module provides functions for creep calculation.
Definition: creep.f90:6
mmaterial
This module summarizes all information of material properties.
Definition: material.f90:6
m_elasticlinear::calelasticmatrix
subroutine calelasticmatrix(matl, sectType, D, temp, hdflag)
Calculate isotropic elastic matrix.
Definition: ElasticLinear.f90:16
mmaterial::norton
integer(kind=kint), parameter norton
Definition: material.f90:78
mcreep::iso_creep
subroutine iso_creep(matl, sectType, stress, strain, extval, plstrain, dtime, ttime, stiffness, temp, hdflag)
This subroutine calculates stiffness for elastically isotropic materials with isotropic creep.
Definition: creep.f90:19
mmaterial::mc_norton
character(len=dict_key_length) mc_norton
Definition: material.f90:146