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

Go to the source code of this file.

Functions/Subroutines

subroutine gapheatgenerations (inpc, textpart, elcon, nelcon, imat, ntmat_, ncmat_, irstrt, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc, nstate_)
 

Function/Subroutine Documentation

◆ gapheatgenerations()

subroutine gapheatgenerations ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer, dimension(2,*)  nelcon,
integer  imat,
integer  ntmat_,
integer  ncmat_,
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,
integer  nstate_ 
)
22 !
23 ! reading the input deck: *GAP HEAT GENERATION
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nelcon(2,*),imat,ntmat_,istep,istat,ipoinpc(0:*),
31  & n,key,i,ncmat_,irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*),
32  & nstate_
33 !
34  real*8 elcon(0:ncmat_,ntmat_,*)
35 !
36  if((istep.gt.0).and.(irstrt.ge.0)) then
37  write(*,*) '*ERROR reading *GAP HEAT GENERATION:'
38  write(*,*) ' *GAP HEAT GENERATION should be placed'
39  write(*,*) ' before all step definitions'
40  call exit(201)
41  endif
42 !
43  if(imat.eq.0) then
44  write(*,*) '*ERROR reading *GAP HEAT GENERATION:'
45  write(*,*) ' *GAP HEAT GENERATION should be preceded'
46  write(*,*) ' by a *SURFACE INTERACTION card'
47  call exit(201)
48  endif
49 !
50  nstate_=max(nstate_,9)
51 !
52  if(nelcon(1,imat).ne.-51) nelcon(1,imat)=max(nelcon(1,imat),11)
53  nelcon(2,imat)=1
54 !
55 ! no temperature dependence allowed; last line is decisive
56 !
57  do
58  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
59  & ipoinp,inp,ipoinpc)
60  if((istat.lt.0).or.(key.eq.1)) return
61  do i=1,3
62  read(textpart(i)(1:20),'(f20.0)',iostat=istat)
63  & elcon(8+i,1,imat)
64  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
65  &"*GAP HEAT GENERATION%")
66  enddo
67  if(elcon(9,1,imat).le.0.d0) then
68  write(*,*)
69  & '*ERROR reading *GAP HEAT GENERATION: fraction of'
70  write(*,*) ' dissipated energy converted into heat'
71  write(*,*) ' must be strictly positive'
72  call inputerror(inpc,ipoinpc,iline,
73  &"*GAP HEAT GENERATION%")
74  call exit(201)
75  endif
76  if((elcon(10,1,imat).lt.0.d0).or.
77  & (elcon(10,1,imat).gt.1.d0)) then
78  write(*,*)
79  & '*ERROR reading *GAP HEAT GENERATION: weighting factor'
80  write(*,*) ' for the distribution of heat between'
81  write(*,*) ' the slave and master surface must '
82  write(*,*) ' be contained in [0,1]'
83  call inputerror(inpc,ipoinpc,iline,
84  &"*GAP HEAT GENERATION%")
85  call exit(201)
86  endif
87  elcon(0,1,imat)=0.d0
88  enddo
89 !
90  return
#define max(a, b)
Definition: cascade.c:32
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)