FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
fstr_get_prop.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 contains
8  !C
9  !C***
10  !C*** GET_PROP for FSTR solver
11  !C***
12  !C
13  subroutine fstr_get_prop(hecMESH,shell_var,isect,ee,pp,rho,alpha,thick,n_totlyr,alpha_over_mu, &
14  beam_radius,beam_angle1,beam_angle2,beam_angle3, &
15  beam_angle4,beam_angle5,beam_angle6)
16  use m_fstr
17  use mmaterial
18 
19  implicit none
20  type (hecmwST_local_mesh) :: hecMESH
21  type (tshellmat), pointer :: shell_var(:)
22  integer(kind=kint) :: n_item, n_subitem, ihead, isect, mid, mpos
23  integer(kind=kint) :: shell_ortho, n_totlyr, section_type
24  real(kind=kreal) :: ee, pp, rho, alpha, thick, alpha_over_mu
25  real(kind=kreal) :: beam_radius,beam_angle1,beam_angle2,beam_angle3,beam_angle4,beam_angle5,beam_angle6
26 
27  n_totlyr = 1
28  shell_ortho = -1
29 
30  !*EHM June 24 04
31  !Get thickness
32  n_item = hecmesh%section%sect_R_index(isect)-hecmesh%section%sect_R_index(isect-1)
33  ihead = hecmesh%section%sect_R_index(isect-1)
34 
35  !do i = 1,n_item
36  thick = hecmesh%section%sect_R_item(ihead+1)
37  section_type = hecmesh%section%sect_type(isect)
38 
39  !IF(thick.LE.0.0) STOP "Zero thickness <= 0 is illegal"
40  !Print *,'cval:',cval
41  !PAUSE
42  !end do
43  !C** material ID
44  mid=hecmesh%section%sect_mat_ID_item(isect)
45 
46  !C** Number of Item
47  n_item=hecmesh%material%mat_ITEM_index(mid)-hecmesh%material%mat_ITEM_index(mid-1)
48 
49  !C** Head position
50  ihead=hecmesh%material%mat_ITEM_index(mid-1)
51  !C Get ITEM of Material (Young's Modulus & Possion's Ratio
52  pp=0.0
53  alpha_over_mu = 0.0
54  beam_radius = 0.0
55  beam_angle1 = 0.0
56  beam_angle2 = 0.0
57  beam_angle3 = 0.0
58  beam_angle4 = 0.0
59  beam_angle5 = 0.0
60  beam_angle6 = 0.0
61  if( n_item .lt. 1 ) then
62  write(imsg,*) 'n_item=',n_item
63  write(imsg,*) '###Error 1'
64  stop
65  endif
66 
67 
68  if ( n_item.ge.1 ) then
69  !C** Number of Sub Item
70  n_subitem = hecmesh%material%mat_subITEM_index(ihead+1) &
71  - hecmesh%material%mat_subITEM_index(ihead)
72  !C** Head position
73  mpos=hecmesh%material%mat_subITEM_index(ihead)
74  !C Get SUBITEM of Material
75  alpha_over_mu=1.0d-3
76 
77  if (section_type == 2)then
78  call fstr_get_prop_shell(hecmesh,shell_var,mid,n_subitem,ee,pp,rho,alpha,thick,alpha_over_mu, &
79  n_totlyr,shell_ortho,mpos)
80  else
81  if( n_subitem .lt. 1 ) then
82  write(imsg,*) '###Error 2'
83  stop
84  endif
85  if ( n_subitem.ge.1 ) then
86  ee=hecmesh%material%mat_val(mpos+1)
87  endif
88  if ( n_subitem.ge.2 ) then
89  pp=hecmesh%material%mat_val(mpos+2)
90  endif
91  if ( n_subitem.ge.9 ) then
92  beam_radius = hecmesh%material%mat_val(mpos+3)
93  beam_angle1 = hecmesh%material%mat_val(mpos+4)
94  beam_angle2 = hecmesh%material%mat_val(mpos+5)
95  beam_angle3 = hecmesh%material%mat_val(mpos+6)
96  beam_angle4 = hecmesh%material%mat_val(mpos+7)
97  beam_angle5 = hecmesh%material%mat_val(mpos+8)
98  beam_angle6 = hecmesh%material%mat_val(mpos+9)
99  endif
100  endif
101  endif
102  !C Get ITEM of Material (Density)
103  rho=0.0
104  if ( n_item.ge.2 ) then
105  !C** Number of Sub Item
106  n_subitem=hecmesh%material%mat_subITEM_index(ihead+2) &
107  -hecmesh%material%mat_subITEM_index(ihead+1)
108  !C** Head position
109  mpos=hecmesh%material%mat_subITEM_index(ihead+1)
110  !C Get SUBITEM of Material
111  if( n_subitem .lt. 1 ) then
112  write(imsg,*) '###Error 3'
113  stop
114  endif
115  if ( n_subitem.ge.1 ) then
116  rho=hecmesh%material%mat_val(mpos+1)
117  endif
118  if ( n_subitem.ge.2 ) then
119  alpha_over_mu=hecmesh%material%mat_val(mpos+2)
120  endif
121  endif
122  !C Get ITEM of Material (Thermal Expansion)
123  alpha=0.0
124  if ( n_item.ge.3 ) then
125  !C** Number of Sub Item
126  n_subitem=hecmesh%material%mat_subITEM_index(ihead+3) &
127  -hecmesh%material%mat_subITEM_index(ihead+2)
128  !C** Head position
129  mpos=hecmesh%material%mat_subITEM_index(ihead+2)
130  !C Get SUBITEM of Material
131  if( n_subitem .lt. 1 ) then
132  write(imsg,*) '###Error 4'
133  stop
134  endif
135  if ( n_subitem.ge.1 ) then
136  alpha=hecmesh%material%mat_val(mpos+1)
137  endif
138  endif
139 
140  end subroutine fstr_get_prop
141 
142  subroutine fstr_get_prop_shell(hecMESH,shell_var,mid,n_subitem,ee,pp,rho,alpha,thick,alpha_over_mu, &
143  n_totlyr,shell_ortho,mpos)
144  use m_fstr
145  implicit none
146  type (hecmwST_local_mesh) :: hecMESH
147  type (tshellmat),pointer :: shell_var(:)
148  real(kind=kreal) :: ee, pp, rho, alpha, thick, alpha_over_mu, tmp
149  integer(kind=kint) :: mid, count, i, j, flag
150  integer(kind=kint) :: shell_ortho, n_totlyr
151  integer(kind=kint) :: n_subitem, mpos
152 
153  if( n_subitem .lt. 1 ) then
154  write(imsg,*) '###Error 2'
155  stop
156  elseif( n_subitem == 2) then
157  n_totlyr = 1
158  shell_ortho = 0
159  ee = hecmesh%material%mat_val(mpos+1)
160  pp = hecmesh%material%mat_val(mpos+2)
161 
162  allocate(shell_var(1))
163  shell_var(1)%ortho = 0
164  shell_var(1)%ee = ee
165  shell_var(1)%pp = pp
166  shell_var(1)%weight= 1.0d0
167 
168  elseif( n_subitem == 3) then
169  n_totlyr = 1
170  shell_ortho = 0
171  ee = hecmesh%material%mat_val(mpos+1)
172  pp = hecmesh%material%mat_val(mpos+2)
173  thick=hecmesh%material%mat_val(mpos+3)
174 
175  allocate(shell_var(1))
176  shell_var(1)%ortho = 0
177  shell_var(1)%ee = ee
178  shell_var(1)%pp = pp
179  shell_var(1)%weight= 1.0d0
180 
181  write(imsg,*) '###NOTICE : shell thickness is updated'
182 
183  elseif( n_subitem >= 4) then
184  n_totlyr=0
185 
186  i=1
187  flag=int(hecmesh%material%mat_val(mpos+i))
188  if(flag == 0)then
189  if(mod(n_subitem-1, 3) == 0)then
190  n_totlyr=(n_subitem-1)/3
191  else
192  write(imsg,*) '###Error: Shell property invalid'
193  write(*,*) '###Error: Shell property invalid'
194  stop
195  endif
196  elseif(flag == 1)then
197  if(mod(n_subitem-1, 8) == 0)then
198  n_totlyr=(n_subitem-1)/8
199  else
200  write(imsg,*) '###Error: Shell property invalid'
201  write(*,*) '###Error: Shell property invalid'
202  stop
203  endif
204  else
205  write(imsg,*) '###Error: Shell property invalid'
206  write(*,*) '###Error: Shell property invalid'
207  stop
208  endif
209 
210  allocate(shell_var(n_totlyr))
211  count=1
212  i=2
213  do j=1,n_totlyr
214  !search material
215  if(flag==0)then
216  shell_var(count)%ortho = dble(flag)
217  shell_var(count)%ee = hecmesh%material%mat_val(mpos+i )
218  shell_var(count)%pp = hecmesh%material%mat_val(mpos+i+1)
219  shell_var(count)%weight= hecmesh%material%mat_val(mpos+i+2)
220  i=i+3
221  elseif(flag==1)then
222  shell_var(count)%ortho = dble(flag)
223  shell_var(count)%ee = hecmesh%material%mat_val(mpos+i )
224  shell_var(count)%pp = hecmesh%material%mat_val(mpos+i+1)
225  shell_var(count)%ee2 = hecmesh%material%mat_val(mpos+i+2)
226  shell_var(count)%g12 = hecmesh%material%mat_val(mpos+i+3)
227  shell_var(count)%g23 = hecmesh%material%mat_val(mpos+i+4)
228  shell_var(count)%g31 = hecmesh%material%mat_val(mpos+i+5)
229  shell_var(count)%angle = hecmesh%material%mat_val(mpos+i+6)
230  shell_var(count)%weight= hecmesh%material%mat_val(mpos+i+7)
231  i=i+8
232  else
233  write(imsg,*) '###Error: Shell property invalid'
234  stop
235  endif
236  count=count+1
237  enddo
238 
239  !check weight
240  tmp = 0.0d0
241  do i=1,n_totlyr
242  tmp = tmp + shell_var(i)%weight
243  enddo
244  do i=1,n_totlyr
245  shell_var(i)%weight = shell_var(i)%weight / tmp
246  enddo
247  if(tmp == 1.0d0)then
248  write(imsg,"(a)")"### NOTICCE: Total thickness is not equal to the sum of laminated layers' thickness"
249  endif
250  endif
251 
252  end subroutine fstr_get_prop_shell
253 end module m_static_get_prop
m_static_get_prop::fstr_get_prop_shell
subroutine fstr_get_prop_shell(hecMESH, shell_var, mid, n_subitem, ee, pp, rho, alpha, thick, alpha_over_mu, n_totlyr, shell_ortho, mpos)
Definition: fstr_get_prop.f90:144
m_fstr
This module defines common data and basic structures for analysis.
Definition: m_fstr.f90:15
m_static_get_prop::fstr_get_prop
subroutine fstr_get_prop(hecMESH, shell_var, isect, ee, pp, rho, alpha, thick, n_totlyr, alpha_over_mu, beam_radius, beam_angle1, beam_angle2, beam_angle3, beam_angle4, beam_angle5, beam_angle6)
Definition: fstr_get_prop.f90:16
mmaterial
This module summarizes all information of material properties.
Definition: material.f90:6
m_static_get_prop
This module provides a function to fetch material properties from hecmw.
Definition: fstr_get_prop.f90:6
m_fstr::imsg
integer(kind=kint), parameter imsg
Definition: m_fstr.f90:110