CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
calcmatwavspeed.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine calcmatwavspeed (ne0, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, orab, ntmat_, ithermal, alzero, plicon, nplicon, plkcon, nplkcon, npmat_, mi, dtime, xstiff, ncmat_, vold, ielmat, t0, t1, matname, lakon, wavespeed, nmat, ipkon)
 

Function/Subroutine Documentation

◆ calcmatwavspeed()

subroutine calcmatwavspeed ( integer  ne0,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer, dimension(2,*)  nelcon,
real*8, dimension(0:1,ntmat_,*)  rhcon,
integer, dimension(*)  nrhcon,
real*8, dimension(0:6,ntmat_,*)  alcon,
integer, dimension(2,*)  nalcon,
real*8, dimension(7,*)  orab,
integer  ntmat_,
integer  ithermal,
real*8, dimension(*)  alzero,
real*8, dimension(0:2*npmat_,ntmat_,*)  plicon,
integer, dimension(0:ntmat_,*)  nplicon,
real*8, dimension(0:2*npmat_,ntmat_,*)  plkcon,
integer, dimension(0:ntmat_,*)  nplkcon,
integer  npmat_,
integer, dimension(*)  mi,
real*8  dtime,
real*8, dimension(27,mi(1),*)  xstiff,
integer  ncmat_,
real*8, dimension(0:mi(2),*)  vold,
integer, dimension(mi(3),*)  ielmat,
real*8, dimension(*)  t0,
real*8, dimension(*)  t1,
character*80, dimension(*)  matname,
character*8, dimension(*)  lakon,
real*8, dimension(*)  wavespeed,
integer  nmat,
integer, dimension(*)  ipkon 
)
24 !
25 ! **************
26 ! Calculates the propagation wave speed in a material, selecting
27 ! appropiate procedure between isotropic, single crystals, and
28 ! anisotropic materials. All other cases of orthotropy are treated
29 ! as anisotropic.
30 
31 ! Based on the procedure in:
32 ! C. Lane. The Development of a 2D Ultrasonic Array Inspection
33 ! for Single Crystal Turbine Blades.
34 ! Switzerland: Springer International Publishing, 2014.
35 !
36  implicit none
37 !
38  character*80 matname(*),amat
39  character*8 lakon(*),lakonl
40 !
41  integer i,i1,nelem,ne0,nelcon(2,*),nrhcon(*),nalcon(2,*),imat,
42  & ntmat_,ithermal,mattyp,ihyper,istiff,kode,mi(*),kk,
43  & nplicon(0:ntmat_,*),nplkcon(0:ntmat_,*),ncmat_,iorth,
44  & ielmat(mi(3),*),nope,iorien,ipkon(*),null,
45  & konl(26),nopered,npmat_,nmat
46 !
47  real*8 elas(21),wavespeed(*),rhcon(0:1,ntmat_,*) ,
48  & alcon(0:6,ntmat_,*),coords(3),orab(7,*),rho,alzero(*),
49  & t0l,t1l,elconloc(21),eth(6),plicon(0:2*npmat_,ntmat_,*),
50  & plkcon(0:2*npmat_,ntmat_,*),plconloc(802),dtime,
51  & xstiff(27,mi(1),*),elcon(0:ncmat_,ntmat_,*),
52  & t0(*),t1(*),shp(4,26),vold(0:mi(2),*),tt,
53  & e,un,um,al,wavspd
54 !
55  write(*,*)'++CMT: Calculating Material Wave Speeds...'
56  write(*,*)
57 !
58  null=0
59 !
60 ! initialization of wavespeed
61 !
62  do i=1,nmat
63  wavespeed(i)=-1.d0
64  enddo
65 !
66 ! ** DO per element
67 !
68  do nelem=1,ne0
69  if(ipkon(nelem).lt.0) cycle
70 !
71  lakonl=lakon(nelem)
72  imat=ielmat(1,nelem)
73  amat=matname(imat)
74  wavspd=wavespeed(imat)
75 !
76  if(lakonl(1:2).ne.'ES') then
77 !
78 ! orientation is not important for the wave speed
79 !
80  iorien=0
81 !
82  if(nelcon(1,imat).lt.0) then
83  ihyper=1
84  else
85  ihyper=0
86  endif
87 !
88 ! calculating the temperature in the integration
89 ! point
90 !
91  kk=1 ! Only 1 integration point is considered, CENTER
92  t0l=0.d0
93  t1l=0.d0
94  if(ithermal.eq.1) then
95  if(lakonl(4:5).eq.'8 ') then
96  do i1=1,nope
97  t0l=t0l+t0(konl(i1))/8.d0
98  t1l=t1l+t1(konl(i1))/8.d0
99  enddo
100  elseif(lakonl(4:6).eq.'20 ')then
101  nopered=20
102  call lintemp(t0,t1,konl,nopered,kk,t0l,t1l)
103  elseif(lakonl(4:6).eq.'10T') then
104  call linscal10(t0,konl,t0l,null,shp)
105  call linscal10(t1,konl,t1l,null,shp)
106  else
107  do i1=1,nope
108  t0l=t0l+shp(4,i1)*t0(konl(i1))
109  t1l=t1l+shp(4,i1)*t1(konl(i1))
110  enddo
111  endif
112  elseif(ithermal.ge.2) then
113  if(lakonl(4:5).eq.'8 ') then
114  do i1=1,nope
115  t0l=t0l+t0(konl(i1))/8.d0
116  t1l=t1l+vold(0,konl(i1))/8.d0
117  enddo
118  elseif(lakonl(4:6).eq.'20 ')then
119  nopered=20
120  call lintemp_th(t0,vold,konl,nopered,kk,t0l,t1l,mi)
121  elseif(lakonl(4:6).eq.'10T') then
122  call linscal10(t0,konl,t0l,null,shp)
123  call linscal10(vold,konl,t1l,mi(2),shp)
124  else
125  do i1=1,nope
126  t0l=t0l+shp(4,i1)*t0(konl(i1))
127  t1l=t1l+shp(4,i1)*vold(0,konl(i1))
128  enddo
129  endif
130  endif
131  tt=t1l-t0l
132 !
133  kode=nelcon(1,imat)
134 
135 ! material data and local stiffness matrix
136 !
137  istiff=1
138  call materialdata_me(elcon,nelcon,rhcon,nrhcon,alcon,nalcon,
139  & imat,amat,iorien,coords,orab,ntmat_,elas,rho,
140  & nelem,ithermal,alzero,mattyp,t0l,t1l,
141  & ihyper,istiff,elconloc,eth,kode,plicon,
142  & nplicon,plkcon,nplkcon,npmat_,
143  & plconloc,mi(1),dtime,kk,
144  & xstiff,ncmat_)
145 !
146  if(mattyp.eq.1) then
147  e=elas(1)
148  un=elas(2)
149  um=e/(1.d0+un)
150  al=un*um/(1.d0-2.d0*un)
151  um=um/2.d0
152  wavspd=max(wavspd,
153  & dsqrt((e*(1-un))/((1+un)*(1-2*un)*rho)))
154  elseif(mattyp.eq.2) then
155 !
156 ! single crystal
157 !
158  if(((elas(1).eq.elas(3)).and.(elas(1).eq.elas(6)).and.
159  & (elas(3).eq.elas(6))).and.
160  & ((elas(2).eq.elas(4)).and.(elas(2).eq.elas(5)).and.
161  & (elas(4).eq.elas(5))).and.
162  & ((elas(7).eq.elas(8)).and.(elas(7).eq.elas(9)).and.
163  & (elas(8).eq.elas(9)))) then
164  wavspd=max(wavspd,dsqrt((1/3.)*(elas(1)+2.0*elas(2)+
165  & 4.0*elas(7))/rho))
166  wavspd=max(wavspd,dsqrt((1/2.)*
167  & (elas(1)+elas(2)+2.0*elas(7))/rho))
168  wavspd=max(wavspd,dsqrt(elas(1)/rho))
169  else
170  iorth=1
171  call anisomaxwavspd(elas,rho,iorth,wavspd )
172  endif
173  elseif(mattyp.eq.3) then
174  iorth=0
175  call anisomaxwavspd(elas,rho,iorth,wavspd)
176  endif
177  wavespeed(imat)=wavspd
178  endif
179  enddo
180 !
181  do i=1,nmat
182  write(*,*) 'Wave Speed for mat. ',i,wavespeed(i)
183  enddo
184  write(*,*)
185 !
186  return
subroutine linscal10(scal, konl, scall, idim, shp)
Definition: linscal10.f:20
#define max(a, b)
Definition: cascade.c:32
subroutine anisomaxwavspd(elas, rho, iorth, wavspd)
Definition: anisomaxwavspd.f:20
subroutine lintemp_th(t0, vold, konl, nope, jj, t0l, t1l, mi)
Definition: lintemp_th.f:20
subroutine materialdata_me(elcon, nelcon, rhcon, nrhcon, alcon, nalcon, imat, amat, iorien, pgauss, orab, ntmat_, elas, rho, iel, ithermal, alzero, mattyp, t0l, t1l, ihyper, istiff, elconloc, eth, kode, plicon, nplicon, plkcon, nplkcon, npmat_, plconloc, mi, dtime, iint, xstiff, ncmat_)
Definition: materialdata_me.f:23
subroutine lintemp(t0, t1, konl, nope, jj, t0l, t1l)
Definition: lintemp.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)