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

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

◆ contactdampings()

subroutine contactdampings ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer, dimension(2,*)  nelcon,
integer  nmat,
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  imat 
)
22 !
23 ! reading the input deck: *CONTACT DAMPING
24 !
25  implicit none
26 !
27  character*1 inpc(*)
28  character*132 textpart(16)
29 !
30  integer nelcon(2,*),nmat,ntmat_,istep,istat,ipoinpc(0:*),
31  & n,key,i,ncmat_,irstrt,iline,ipol,inl,ipoinp(2,*),inp(3,*),
32  & imat
33 !
34  real*8 elcon(0:ncmat_,ntmat_,*)
35 !
36  if((istep.gt.0).and.(irstrt.ge.0)) then
37  write(*,*) '*ERROR in contactdampings:'
38  write(*,*) ' *CONTACT DAMPING 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 in contactdampings:'
45  write(*,*) ' *CONTACT DAMPING should be preceded'
46  write(*,*) ' by a *SURFACE INTERACTION card'
47  call exit(201)
48  endif
49 !
50 ! default: no tangential damping
51 !
52  elcon(8,1,imat)=0.d0
53 !
54  do i=2,n
55  if(textpart(i)(1:16).eq.'TANGENTFRACTION=') then
56  read(textpart(i)(17:36),'(f20.0)',iostat=istat)
57  & elcon(8,1,imat)
58  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
59  &"*CONTACT DAMPING%")
60  else
61  write(*,*)
62  & '*WARNING reading *CONTACT DAMPING: parameter not recognized:'
63  write(*,*) ' ',
64  & textpart(i)(1:index(textpart(i),' ')-1)
65  call inputwarning(inpc,ipoinpc,iline,
66  &"*CONTACT DAMPING%")
67  endif
68  enddo
69 !
70  nelcon(1,imat)=max(nelcon(1,imat),8)
71  nelcon(2,imat)=1
72 !
73 ! no temperature dependence allowed; last line is decisive
74 !
75  do
76  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
77  & ipoinp,inp,ipoinpc)
78  if((istat.lt.0).or.(key.eq.1)) return
79  read(textpart(1)(1:20),'(f20.0)',iostat=istat)
80  & elcon(5,1,imat)
81  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline)
82  elcon(0,1,imat)=0.d0
83  enddo
84 !
85  return
#define max(a, b)
Definition: cascade.c:32
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)