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

Go to the source code of this file.

Functions/Subroutines

subroutine modaldampings (inpc, textpart, nmethod, xmodal, istep, istat, n, iline, ipol, inl, ipoinp, inp, ipoinpc)
 

Function/Subroutine Documentation

◆ modaldampings()

subroutine modaldampings ( character*1, dimension(*)  inpc,
character*132, dimension(16)  textpart,
integer  nmethod,
real*8, dimension(*)  xmodal,
integer  istep,
integer  istat,
integer  n,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
integer, dimension(0:*)  ipoinpc 
)
21 !
22 ! reading the input deck: *MODAL DAMPING
23 !
24  implicit none
25 !
26  logical rayleigh
27 !
28  character*1 inpc(*)
29  character*132 textpart(16)
30 !
31  integer nmethod,istep,istat,n,key,iline,ipol,inl,ipoinp(2,*),
32  & inp(3,*),ipoinpc(0:*),i,lowfrequ,highfrequ,k
33 !
34  real*8 xmodal(*),zeta
35 !
36  if(istep.lt.1) then
37  write(*,*) '*ERROR in modaldampings: *MODAL DAMPING can only'
38  write(*,*) ' be used within a STEP'
39  call exit(201)
40  endif
41 !
42  rayleigh=.false.
43  do i=2,n
44  if(textpart(i)(1:8).eq.'RAYLEIGH') then
45  rayleigh=.true.
46  else
47  write(*,*)
48  & '*WARNING in modaldampings: parameter not recognized:'
49  write(*,*) ' ',
50  & textpart(i)(1:index(textpart(i),' ')-1)
51  call inputwarning(inpc,ipoinpc,iline,
52  &"*MODAL DAMPING%")
53  endif
54  enddo
55  if(rayleigh) then
56  xmodal(11)=-0.5
57  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
58  & ipoinp,inp,ipoinpc)
59  if((istat.lt.0).or.(key.eq.1)) then
60  write(*,*) '*ERROR in modaldampings: definition
61  & not complete'
62  write(*,*) ' '
63  call inputerror(inpc,ipoinpc,iline,
64  &"*MODAL DAMPING%")
65  call exit(201)
66  endif
67  read(textpart(3)(1:20),'(f20.0)',iostat=istat) xmodal(1)
68  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
69  &"*MODAL DAMPING%")
70  read(textpart(4)(1:20),'(f20.0)',iostat=istat) xmodal(2)
71  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
72  &"*MODAL DAMPING%")
73 !
74  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
75  & ipoinp,inp,ipoinpc)
76 !
77  else
78  do
79  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
80  & ipoinp,inp,ipoinpc)
81  if((istat.lt.0).or.(key.eq.1)) exit
82 !
83  read(textpart(1)(1:10),'(i10)',iostat=istat) lowfrequ
84  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
85  &"*MODAL DAMPING%")
86  read(textpart(2)(1:10),'(i10)',iostat=istat) highfrequ
87  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
88  &"*MODAL DAMPING%")
89  read(textpart(3)(1:20),'(f20.0)',iostat=istat) zeta
90  if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
91  &"*MODAL DAMPING%")
92 !
93  if(highfrequ<lowfrequ) highfrequ=lowfrequ
94  do k=lowfrequ,highfrequ
95  xmodal(11+k)=zeta
96  enddo
97  enddo
98  endif
99  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)