FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
material.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!-------------------------------------------------------------------------------
7 use hecmw_util
8 use m_table
10 implicit none
11
12 ! Following algorithm type
13 integer(kind=kint), parameter :: infinitesimal = 0
14 integer(kind=kint), parameter :: totallag = 1
15 integer(kind=kint), parameter :: updatelag = 2
16
17 ! Following material types. All material type number consists with integer of six digits.
18 ! First digit: Indicates physical type
19 ! 1: mechanical deformation analysis
20 ! 2: heat conduct analysis
21 ! ......
22 ! Second digit:
23 ! Mechanical analysis
24 ! 1: Elastic
25 ! 2: Elastoplastic
26 ! 3: Hyperelastic
27 ! 4: Viscoelastic
28 ! 5: Viscoplastic
29 ! Heat conductiovity
30 ! ......
31 ! Third digit:
32 ! For elastic or elastoplastic deformation, elastic
33 ! 0: isotropic ie. 110000
34 ! 1: with transever anisotropity 111000
35 ! For hyperelastic deformation
36 ! 0: Neo-Hooke 130000
37 ! 1: Mooney-Rivlin 131000
38 ! 2: Arruda-Boyce 132000
39 ! Fourth digit
40 ! For elastoplastic problem,yield function
41 ! 0: isotropic (Mises)
42 ! 1: Mohr-Coulomb
43 ! 2: Drucker-Prager
44 ! Fifth digit:
45 ! For elastoplastic deformation, hardening law
46 ! 0: Linear hardening i.e. 120000
47 ! 1: Multilinear hardening 120010
48 ! 2: Swift
49 ! 3: Ramberg-Osgood
50 ! 4: linear kinematic
51 ! 5: combined (linear kinematic + linear isotropic)
52 ! Six digit:
53 ! For visco-elastoplastic deformation, visco law
54 ! 0: Norton i.e. 150000
55 ! 1: Striab 150001
56 integer(kind=kint), parameter :: usermaterial = 100000
57
58 integer(kind=kint), parameter :: elastic = 110000
59 integer(kind=kint), parameter :: mn_orthoelastic = 111000
60 integer(kind=kint), parameter :: userelastic = 112000
61
62 integer(kind=kint), parameter :: eplastic = 120000
63
64 integer(kind=kint), parameter :: neohooke = 130000
65 integer(kind=kint), parameter :: mooneyrivlin = 131000
66 integer(kind=kint), parameter :: arrudaboyce = 132000
67 integer(kind=kint), parameter :: userhyperelastic = 133000
68 integer(kind=kint), parameter :: mooneyrivlin_aniso = 134000
69
70 integer(kind=kint), parameter :: viscoelastic = 140000
71 integer(kind=kint), parameter :: norton = 150000
72
73 integer(kind=kint), parameter :: incomp_newtonian = 160000
74
75 ! Following section type
76 integer(kind=kint), parameter :: d3 = -1
77 integer(kind=kint), parameter :: planestress = 1
78 integer(kind=kint), parameter :: planestrain = 0
79 integer(kind=kint), parameter :: axissymetric = 2
80 integer(kind=kint), parameter :: shell = 3
81
82 ! Material constants are saved in an array of size 100 and their physical meaning
83 ! are conrresponds to their position in the array
84 integer(kind=kint), parameter :: m_youngs = 1
85 integer(kind=kint), parameter :: m_poisson = 2
86 integer(kind=kint), parameter :: m_density = 3
87 integer(kind=kint), parameter :: m_thick = 4
88
89 ! following plastic constitutive parameter
90 integer(kind=kint), parameter :: m_plconst1 = 5
91 integer(kind=kint), parameter :: m_plconst2 = 6
92 integer(kind=kint), parameter :: m_plconst3 = 7
93 integer(kind=kint), parameter :: m_plconst4 = 8
94 integer(kind=kint), parameter :: m_plconst5 = 9
95 integer(kind=kint), parameter :: m_kinehard = 10
96
97 integer(kind=kint), parameter :: m_exapnsion = 20
98
99 integer(kind=kint), parameter :: m_alpha_over_mu = 21
100
101 integer(kind=kint), parameter :: m_beam_radius = 22
102 integer(kind=kint), parameter :: m_beam_angle1 = 23
103 integer(kind=kint), parameter :: m_beam_angle2 = 24
104 integer(kind=kint), parameter :: m_beam_angle3 = 25
105 integer(kind=kint), parameter :: m_beam_angle4 = 26
106 integer(kind=kint), parameter :: m_beam_angle5 = 27
107 integer(kind=kint), parameter :: m_beam_angle6 = 28
108
109 integer(kind=kint), parameter :: m_viscocity = 29
110
111 ! additional plastic constitutive parameter
112 integer(kind=kint), parameter :: m_plconst6 = 30
113 integer(kind=kint), parameter :: m_plconst7 = 31
114 integer(kind=kint), parameter :: m_plconst8 = 32
115 integer(kind=kint), parameter :: m_plconst9 = 33
116 integer(kind=kint), parameter :: m_plconst10 = 34
117
118 ! Dictionary constants
119 character(len=DICT_KEY_LENGTH) :: mc_isoelastic= 'ISOELASTIC' ! youngs modulus, poisson's ratio
120 character(len=DICT_KEY_LENGTH) :: mc_orthoelastic= 'ORTHOELASTIC' ! ortho elastic modulus
121 character(len=DICT_KEY_LENGTH) :: mc_yield = 'YIELD' ! plastic strain, yield stress
122 character(len=DICT_KEY_LENGTH) :: mc_themoexp = 'THEMOEXP' ! thermo expansion coefficient
123 character(len=DICT_KEY_LENGTH) :: mc_orthoexp = 'ORTHOEXP' ! thermo expansion coefficient
124 character(len=DICT_KEY_LENGTH) :: mc_viscoelastic = 'VISCOELASTIC' ! Prony coeff only curr.
125 character(len=DICT_KEY_LENGTH) :: mc_norton = 'NORTON' ! NOrton's creep law
126 character(len=DICT_KEY_LENGTH) :: mc_incomp_newtonian = 'INCOMP_FLUID' ! viscocity
127
129 integer(kind=kint) :: ortho
130 real(kind=kreal) :: ee
131 real(kind=kreal) :: pp
132 real(kind=kreal) :: ee2
133 real(kind=kreal) :: g12
134 real(kind=kreal) :: g23
135 real(kind=kreal) :: g31
136 real(kind=kreal) :: angle
137 real(kind=kreal) :: rho
138 real(kind=kreal) :: aplha
139 real(kind=kreal) :: alpha_over_mu
140 real(kind=kreal) :: weight
141 end type tshellmat
142
145 integer(kind=kint) :: nlgeom_flag
146 integer(kind=kint) :: mtype
147 integer(kind=kint) :: nfstatus
148 character(len=30) :: name
149 real(kind=kreal) :: variables(200)
150 type(tshellmat), pointer :: shell_var(:)
151 integer(kind=kint) :: totallyr
152 integer(kind=kint) :: cdsys_id
153 integer(kind=kint) :: n_table
154 real(kind=kreal), pointer :: table(:)=>null()
155 type(dict_struct), pointer :: dict
156 end type tmaterial
157
158 type(tmaterial), allocatable :: materials(:)
159
160contains
161
163 subroutine initmaterial( material )
164 type( tmaterial ), intent(inout) :: material
165 material%mtype = -1 ! not defined yet
166 material%nfstatus = 0 ! Default: no status
167 material%nlgeom_flag = infinitesimal ! Default: INFINITESIMAL ANALYSIS
168 material%variables = 0.d0 ! not defined yet
169 material%totallyr = 0 ! not defined yet
170
171 call dict_create( material%dict, 'INIT', dict_null )
172 end subroutine
173
175 subroutine finalizematerial( material )
176 type( tmaterial ), intent(inout) :: material
177 if( associated(material%table) ) deallocate( material%table )
178 if( associated(material%dict) ) call dict_destroy( material%dict )
179 end subroutine finalizematerial
180
182 subroutine initializematls( nm )
183 integer, intent(in) :: nm
184 integer :: i
185 if( allocated(materials) ) deallocate( materials )
186 allocate( materials( nm ) )
187 do i=1,nm
188 call initmaterial( materials(i) )
189 enddo
190 end subroutine
191
193 subroutine finalizematls()
194 integer :: i
195 if( allocated( materials ) ) then
196 do i=1,size(materials)
197 call finalizematerial( materials(i) )
198 enddo
199 deallocate( materials )
200 endif
201 end subroutine
202
204 subroutine modifymatl( n,m,v)
205 integer, intent(in) :: n
206 integer, intent(in) :: m
207 real(kind=kreal), intent(in) :: v
208
209 if( n>size(materials) .OR. m>100 ) return
210 materials(n)%variables(m) = v
211 end subroutine
212
214 subroutine printmaterial( nfile, material )
215 integer, intent(in) :: nfile
216 type( tmaterial ), intent(in) :: material
217 integer :: i, nt
218 write( nfile, *) "Material type:",material%mtype,material%nlgeom_flag
219 do i=1,100
220 if( material%variables(i) /= 0.d0 ) write( nfile, *) i,material%variables(i)
221 enddo
222 if( associated( material%table ) ) then
223 nt = size(material%table)
224 write( nfile,* ) "--table--"
225 do i=1,nt
226 write(nfile,*) i,material%table(i)
227 enddo
228 endif
229 call print_tabledata( material%dict, nfile )
230 end subroutine
231
233 integer function fetchdigit( npos, cnum )
234 integer, intent(in) :: npos
235 integer, intent(in) :: cnum
236 integer :: i, idum,cdum,dd
237 fetchdigit = -1
238 cdum = cnum
239 if( npos<=0 .or. npos>6) return
240 if( cnum<100000 .or. cnum>999999 ) return
241 dd = 100000
242 do i=1,npos-1
243 idum = cdum/dd
244 cdum = cdum-idum*dd
245 dd = dd/10
246 enddo
247 fetchdigit = cdum/10**(6-npos)
248 end function
249
251 subroutine setdigit( npos, ival, mtype )
252 integer, intent(in) :: npos
253 integer, intent(in) :: ival
254 integer, intent(inout) :: mtype
255 integer :: i, idum,cdum, cdum1, dd
256 cdum = mtype
257 if( npos<=0 .or. npos>6 ) return
258 if( ival<0 .or. ival>9 ) return
259 dd =100000
260 cdum1 = 0
261 do i=1,npos-1
262 idum = cdum/dd
263 cdum1 = cdum1+ idum*dd
264 cdum = cdum-idum*dd
265 dd=dd/10
266 enddo
267 cdum1 = cdum1 + ival*dd
268 idum = cdum/dd
269 cdum = cdum-idum*dd
270 dd=dd/10
271 do i=npos+1,6
272 idum = cdum/dd
273 cdum1 = cdum1+ idum*dd
274 cdum = cdum-idum*dd
275 dd=dd/10
276 enddo
277 mtype = cdum1
278 end subroutine
279
281 integer function getelastictype( mtype )
282 integer, intent(in) :: mtype
283 integer :: itype
284 getelastictype = -1
285 itype = fetchdigit( 1, mtype )
286 if( itype/=1 ) return ! not defomration problem
287 itype = fetchdigit( 2, mtype )
288 if( itype/=1 .and. itype/=2 ) return ! not defomration problem
289 getelastictype = fetchdigit( 3, mtype )
290 end function
291
293 integer function getyieldfunction( mtype )
294 integer, intent(in) :: mtype
295 integer :: itype
297 itype = fetchdigit( 1, mtype )
298 if( itype/=1 ) return ! not defomration problem
299 itype = fetchdigit( 2, mtype )
300 if( itype/=2 ) return ! not elstoplastic problem
301 getyieldfunction = fetchdigit( 4, mtype )
302 end function
303
305 integer function gethardentype( mtype )
306 integer, intent(in) :: mtype
307 integer :: itype
308 gethardentype = -1
309 itype = fetchdigit( 1, mtype )
310 if( itype/=1 ) return ! not defomration problem
311 itype = fetchdigit( 2, mtype )
312 if( itype/=2 ) return ! not elstoplastic problem
313 gethardentype = fetchdigit( 5, mtype )
314 end function
315
317 logical function iskinematicharden( mtype )
318 integer, intent(in) :: mtype
319 integer :: itype
320 iskinematicharden = .false.
321 itype = fetchdigit( 5, mtype )
322 if( itype==4 .or. itype==5 ) iskinematicharden = .true.
323 end function
324
326 logical function iselastic( mtype )
327 integer, intent(in) :: mtype
328 integer :: itype
329 iselastic = .false.
330 itype = fetchdigit( 2, mtype )
331 if( itype==1 ) iselastic = .true.
332 end function
333
335 logical function iselastoplastic( mtype )
336 integer, intent(in) :: mtype
337 integer :: itype
338 iselastoplastic = .false.
339 itype = fetchdigit( 2, mtype )
340 if( itype==2 ) iselastoplastic = .true.
341 end function
342
344 logical function ishyperelastic( mtype )
345 integer, intent(in) :: mtype
346 integer :: itype
347 ishyperelastic = .false.
348 itype = fetchdigit( 2, mtype )
349 if( itype==3 ) ishyperelastic = .true.
350 end function
351
353 logical function isviscoelastic( mtype )
354 integer, intent(in) :: mtype
355 integer :: itype
356 isviscoelastic = .false.
357 itype = fetchdigit( 2, mtype )
358 if( itype==4 ) isviscoelastic = .true.
359 end function
360
362 subroutine ep2e( mtype )
363 integer, intent(inout) :: mtype
364 if( .not. iselastoplastic( mtype ) ) return
365 call setdigit( 2, 1, mtype )
366 end subroutine
367
368end module
369
370
371
I/O and Utility.
Definition: hecmw_util_f.F90:7
This module provides data structure table which would be dictionaried afterwards.
Definition: ttable.f90:7
type(ttable), parameter dict_null
Definition: ttable.f90:30
This module summarizes all infomation of material properties.
Definition: material.f90:6
integer(kind=kint), parameter m_youngs
Definition: material.f90:84
integer function getyieldfunction(mtype)
Get type of yield function.
Definition: material.f90:294
integer(kind=kint), parameter m_plconst5
Definition: material.f90:94
character(len=dict_key_length) mc_incomp_newtonian
Definition: material.f90:126
integer(kind=kint), parameter m_plconst6
Definition: material.f90:112
integer(kind=kint), parameter mooneyrivlin
Definition: material.f90:65
integer(kind=kint), parameter m_beam_radius
Definition: material.f90:101
integer(kind=kint), parameter mooneyrivlin_aniso
Definition: material.f90:68
subroutine printmaterial(nfile, material)
Print out the material properties.
Definition: material.f90:215
integer(kind=kint), parameter planestress
Definition: material.f90:77
character(len=dict_key_length) mc_viscoelastic
Definition: material.f90:124
integer(kind=kint), parameter m_plconst4
Definition: material.f90:93
integer(kind=kint), parameter viscoelastic
Definition: material.f90:70
integer(kind=kint), parameter m_exapnsion
Definition: material.f90:97
integer function getelastictype(mtype)
Get elastic type.
Definition: material.f90:282
subroutine modifymatl(n, m, v)
Set value of variable(m) of material n to v.
Definition: material.f90:205
integer(kind=kint), parameter m_plconst1
Definition: material.f90:90
logical function ishyperelastic(mtype)
If it is a hyperelastic material?
Definition: material.f90:345
integer function gethardentype(mtype)
Get type of hardening.
Definition: material.f90:306
character(len=dict_key_length) mc_themoexp
Definition: material.f90:122
character(len=dict_key_length) mc_norton
Definition: material.f90:125
integer(kind=kint), parameter d3
Definition: material.f90:76
integer(kind=kint), parameter planestrain
Definition: material.f90:78
type(tmaterial), dimension(:), allocatable materials
Definition: material.f90:158
integer(kind=kint), parameter m_beam_angle6
Definition: material.f90:107
integer(kind=kint), parameter m_plconst10
Definition: material.f90:116
integer(kind=kint), parameter elastic
Definition: material.f90:58
integer(kind=kint), parameter m_plconst2
Definition: material.f90:91
integer(kind=kint), parameter arrudaboyce
Definition: material.f90:66
integer(kind=kint), parameter shell
Definition: material.f90:80
integer(kind=kint), parameter mn_orthoelastic
Definition: material.f90:59
integer(kind=kint), parameter incomp_newtonian
Definition: material.f90:73
integer(kind=kint), parameter m_beam_angle3
Definition: material.f90:104
integer(kind=kint), parameter totallag
Definition: material.f90:14
integer(kind=kint), parameter m_density
Definition: material.f90:86
subroutine initializematls(nm)
Initializer.
Definition: material.f90:183
integer(kind=kint), parameter m_beam_angle4
Definition: material.f90:105
integer(kind=kint), parameter m_kinehard
Definition: material.f90:95
subroutine setdigit(npos, ival, mtype)
Modify material type.
Definition: material.f90:252
integer(kind=kint), parameter norton
Definition: material.f90:71
integer(kind=kint), parameter m_plconst9
Definition: material.f90:115
integer(kind=kint), parameter m_poisson
Definition: material.f90:85
subroutine finalizematerial(material)
Finalizer.
Definition: material.f90:176
integer(kind=kint), parameter m_plconst8
Definition: material.f90:114
integer(kind=kint), parameter axissymetric
Definition: material.f90:79
integer(kind=kint), parameter m_beam_angle1
Definition: material.f90:102
character(len=dict_key_length) mc_orthoexp
Definition: material.f90:123
integer(kind=kint), parameter infinitesimal
Definition: material.f90:13
character(len=dict_key_length) mc_yield
Definition: material.f90:121
integer(kind=kint), parameter userelastic
Definition: material.f90:60
integer(kind=kint), parameter m_viscocity
Definition: material.f90:109
integer(kind=kint), parameter neohooke
Definition: material.f90:64
integer(kind=kint), parameter m_plconst7
Definition: material.f90:113
subroutine finalizematls()
Finalizer.
Definition: material.f90:194
integer(kind=kint), parameter m_thick
Definition: material.f90:87
logical function iskinematicharden(mtype)
If it is a kinematic hardening material?
Definition: material.f90:318
integer(kind=kint), parameter usermaterial
Definition: material.f90:56
integer function fetchdigit(npos, cnum)
Fetch material type.
Definition: material.f90:234
integer(kind=kint), parameter m_beam_angle5
Definition: material.f90:106
character(len=dict_key_length) mc_isoelastic
Definition: material.f90:119
integer(kind=kint), parameter m_beam_angle2
Definition: material.f90:103
logical function iselastic(mtype)
If it is an elastic material?
Definition: material.f90:327
integer(kind=kint), parameter userhyperelastic
Definition: material.f90:67
integer(kind=kint), parameter m_plconst3
Definition: material.f90:92
character(len=dict_key_length) mc_orthoelastic
Definition: material.f90:120
integer(kind=kint), parameter updatelag
Definition: material.f90:15
subroutine ep2e(mtype)
Set material type of elastoplastic to elastic.
Definition: material.f90:363
integer(kind=kint), parameter m_alpha_over_mu
Definition: material.f90:99
logical function isviscoelastic(mtype)
If it is an viscoelastic material?
Definition: material.f90:354
subroutine initmaterial(material)
Initializer.
Definition: material.f90:164
logical function iselastoplastic(mtype)
If it is an elastoplastic material?
Definition: material.f90:336
integer(kind=kint), parameter eplastic
Definition: material.f90:62
This module provides data structure of dictionaried table list.
Definition: ttable.f90:140
subroutine print_tabledata(dict, fname)
Print our the contents of a dictionary.
Definition: ttable.f90:395
Stucture to management all material relates data.
Definition: material.f90:144