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

Go to the source code of this file.

Functions/Subroutines

subroutine gapconductances (inpc, textpart, nelcon, nmat, ntmat_, npmat_, plkcon, nplkcon, iperturb, irstrt, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ gapconductances()

subroutine gapconductances ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer, dimension(2,*)  nelcon,
integer  nmat,
integer  ntmat_,
integer  npmat_,
real*8, dimension(0:2*npmat_,ntmat_,*)  plkcon,
integer, dimension(0:ntmat_,*)  nplkcon,
integer, dimension(*)  iperturb,
integer  irstrt,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
22 !
23 ! reading the input deck: *GAP CONDUCTANCE
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nelcon(2,*),nmat,ntmat_,ntmat,npmat_,npmat,istep,
31  & n,key,i,nplkcon(0:ntmat_,*),
32  & iperturb(*),istat,
33  & irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*),ipoinpc(0:*)
34 !
35  real*8 plkcon(0:2*npmat_,ntmat_,*),
36  & temperature
37 !
38  ntmat=0
39  npmat=0
40 !
41  if((istep.gt.0).and.(irstrt.ge.0)) then
42  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
43  write(*,*) ' *GAP CONDUCTANCE should'
44  write(*,*) ' be placed before all step definitions'
45  call exit(201)
46  endif
47 !
48  if(nmat.eq.0) then
49  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
50  write(*,*) ' *GAP CONDUCTANCE should'
51  write(*,*) ' be preceded by a *SURFACE INTERACTION card'
52  call exit(201)
53  endif
54 !
55  if(nelcon(1,nmat).eq.0) then
56  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
57  write(*,*) ' *GAP CONDUCTANCE should'
58  write(*,*) ' be preceeded by a *SURFACE BEHAVIOR card'
59  call exit(201)
60  endif
61 !
62  iperturb(1)=2
63 c iperturb(2)=1
64  write(*,*) '*INFO reading *GAP CONDUCTANCE: nonlinear geometric'
65  write(*,*) ' effects are turned on'
66  write(*,*)
67 !
68  nelcon(1,nmat)=-51
69 !
70  do i=2,n
71  if(textpart(i)(1:4).eq.'USER') then
72  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
73  & ipoinp,inp,ipoinpc)
74  return
75  else
76  write(*,*)
77  & '*WARNING reading *GAP CONDUCTANCE:'
78  write(*,*) ' parameter not recognized:'
79  write(*,*) ' ',
80  & textpart(i)(1:index(textpart(i),' ')-1)
81  call inputwarning(inpc,ipoinpc,iline,
82  &"*GAP CONDUCTANCE%")
83  endif
84  enddo
85 !
86  do
87  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
88  & ipoinp,inp,ipoinpc)
89  if((istat.lt.0).or.(key.eq.1)) exit
90  read(textpart(3)(1:20),'(f20.0)',iostat=istat) temperature
91  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
92  &"*GAP CONDUCTANCE%")
93 !
94 ! first temperature
95 !
96  if(ntmat.eq.0) then
97  npmat=0
98  ntmat=ntmat+1
99  if(ntmat.gt.ntmat_) then
100  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
101  write(*,*) ' increase ntmat_'
102  call exit(201)
103  endif
104  nplkcon(0,nmat)=ntmat
105  plkcon(0,ntmat,nmat)=temperature
106 !
107 ! new temperature
108 !
109  elseif(plkcon(0,ntmat,nmat).ne.temperature) then
110  npmat=0
111  ntmat=ntmat+1
112  if(ntmat.gt.ntmat_) then
113  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
114  write(*,*) ' increase ntmat_'
115  call exit(201)
116  endif
117  nplkcon(0,nmat)=ntmat
118  plkcon(0,ntmat,nmat)=temperature
119  endif
120  do i=1,2
121  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
122  & plkcon(2*npmat+i,ntmat,nmat)
123  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
124  &"*GAP CONDUCTANCE%")
125  enddo
126  npmat=npmat+1
127  if(npmat.gt.npmat_) then
128  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
129  write(*,*) ' increase npmat_'
130  call exit(201)
131  endif
132  nplkcon(ntmat,nmat)=npmat
133  enddo
134 !
135  if(ntmat.eq.0) then
136  write(*,*) '*ERROR reading *GAP CONDUCTANCE:'
137  write(*,*) ' *GAP CONDUCTANCE card'
138  write(*,*) ' without data'
139  call exit(201)
140  endif
141 !
142  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)