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

Go to the source code of this file.

Functions/Subroutines

subroutine materialdata_tg (imat, ntmat_, t1l, shcon, nshcon, sph, r, dvi, rhcon, nrhcon, rho)
 

Function/Subroutine Documentation

◆ materialdata_tg()

subroutine materialdata_tg ( integer, intent(in)  imat,
integer, intent(in)  ntmat_,
real*8, intent(in)  t1l,
real*8, dimension(0:3,ntmat_,*), intent(in)  shcon,
integer, dimension(*), intent(in)  nshcon,
real*8, intent(inout)  sph,
real*8, intent(inout)  r,
real*8, intent(inout)  dvi,
real*8, dimension(0:1,ntmat_,*), intent(in)  rhcon,
integer, dimension(*), intent(in)  nrhcon,
real*8, intent(inout)  rho 
)
20 !
21  implicit none
22 !
23 ! determines the following gas properties: the density,
24 ! the specific heat, the dynamic viscosity and the specific gas constant
25 !
26  integer imat,ntmat_,id,nshcon(*),two,four,nrhcon(*)
27 !
28  real*8 t1l,shcon(0:3,ntmat_,*),sph,r,dvi,rhcon(0:1,ntmat_,*),
29  & rho
30 !
31  intent(in) imat,ntmat_,t1l,shcon,nshcon,
32  & rhcon,nrhcon
33 !
34  intent(inout) r,dvi,sph,rho
35 !
36  two=2
37  four=4
38 !
39 ! calculating the density (needed for liquids)
40 !
41  call ident2(rhcon(0,1,imat),t1l,nrhcon(imat),two,id)
42  if(nrhcon(imat).eq.0) then
43  rho=0.d0
44  continue
45  elseif(nrhcon(imat).eq.1) then
46  rho=rhcon(1,1,imat)
47  elseif(id.eq.0) then
48  rho=rhcon(1,1,imat)
49  elseif(id.eq.nrhcon(imat)) then
50  rho=rhcon(1,id,imat)
51  else
52  rho=rhcon(1,id,imat)+
53  & (rhcon(1,id+1,imat)-rhcon(1,id,imat))*
54  & (t1l-rhcon(0,id,imat))/
55  & (rhcon(0,id+1,imat)-rhcon(0,id,imat))
56  endif
57 !
58 ! calculating the specific heat and the dynamic viscosity
59 !
60  call ident2(shcon(0,1,imat),t1l,nshcon(imat),four,id)
61  if(nshcon(imat).eq.0) then
62  continue
63  elseif(nshcon(imat).eq.1) then
64  sph=shcon(1,1,imat)
65  dvi=shcon(2,1,imat)
66  elseif(id.eq.0) then
67  sph=shcon(1,1,imat)
68  dvi=shcon(2,1,imat)
69  elseif(id.eq.nshcon(imat)) then
70  sph=shcon(1,id,imat)
71  dvi=shcon(2,id,imat)
72  else
73  sph=shcon(1,id,imat)+
74  & (shcon(1,id+1,imat)-shcon(1,id,imat))*
75  & (t1l-shcon(0,id,imat))/
76  & (shcon(0,id+1,imat)-shcon(0,id,imat))
77  dvi=shcon(2,id,imat)+
78  & (shcon(2,id+1,imat)-shcon(2,id,imat))*
79  & (t1l-shcon(0,id,imat))/
80  & (shcon(0,id+1,imat)-shcon(0,id,imat))
81  endif
82 !
83 ! specific gas constant
84 !
85  r=shcon(3,1,imat)
86 !
87  return
subroutine ident2(x, px, n, ninc, id)
Definition: ident2.f:27
Hosted by OpenAircraft.com, (Michigan UAV, LLC)