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

Go to the source code of this file.

Functions/Subroutines

subroutine temploadmodal (amta, namta, nam, ampli, time, ttime, dtime, xbounold, xboun, xbounact, iamboun, nboun, nodeboun, ndirboun, amname)
 

Function/Subroutine Documentation

◆ temploadmodal()

subroutine temploadmodal ( real*8, dimension(2,*)  amta,
integer, dimension(3,*)  namta,
integer  nam,
real*8, dimension(*)  ampli,
real*8  time,
real*8  ttime,
real*8  dtime,
real*8, dimension(*)  xbounold,
real*8, dimension(*)  xboun,
real*8, dimension(*)  xbounact,
integer, dimension(*)  iamboun,
integer  nboun,
integer, dimension(*)  nodeboun,
integer, dimension(*)  ndirboun,
character*80, dimension(*)  amname 
)
22 !
23 ! calculates the SPC boundary conditions at a given time for
24 ! a modal dynamic procedure; used to calculate the velocity and
25 ! acceleration by use of finite differences
26 !
27  implicit none
28 !
29  character*80 amname(*)
30 !
31  integer nam,i,istart,iend,id,namta(3,*),
32  & iamboun(*),nboun,iambouni,nodeboun(*),ndirboun(*)
33 !
34  real*8 amta(2,*),ampli(*),time,
35  & xbounold(*),xboun(*),xbounact(*),ttime,dtime,reftime
36 !
37 ! if an amplitude is active, the loading is scaled according to
38 ! the actual time. If no amplitude is active, then the load is
39 ! applied as a step loading
40 !
41 ! calculating all amplitude values for the current time
42 !
43  do i=1,nam
44  if(namta(3,i).lt.0) then
45  reftime=ttime+time
46  else
47  reftime=time
48  endif
49  if(abs(namta(3,i)).ne.i) then
50  reftime=reftime-amta(1,namta(1,i))
51  istart=namta(1,abs(namta(3,i)))
52  iend=namta(2,abs(namta(3,i)))
53  if(istart.eq.0) then
54  call uamplitude(reftime,amname(namta(3,i)),ampli(i))
55  cycle
56  endif
57  else
58  istart=namta(1,i)
59  iend=namta(2,i)
60  if(istart.eq.0) then
61  call uamplitude(reftime,amname(i),ampli(i))
62  cycle
63  endif
64  endif
65  call identamta(amta,reftime,istart,iend,id)
66  if(id.lt.istart) then
67  ampli(i)=amta(2,istart)
68  elseif(id.eq.iend) then
69  ampli(i)=amta(2,iend)
70  else
71  ampli(i)=amta(2,id)+(amta(2,id+1)-amta(2,id))
72  & *(reftime-amta(1,id))/(amta(1,id+1)-amta(1,id))
73  endif
74  enddo
75 !
76 ! scaling the boundary conditions
77 !
78  do i=1,nboun
79  if(nam.gt.0) then
80  iambouni=iamboun(i)
81  else
82  iambouni=0
83  endif
84  if(iambouni.gt.0) then
85  xbounact(i)=xboun(i)*ampli(iambouni)
86  else
87  xbounact(i)=xboun(i)
88  endif
89  enddo
90 !
91  return
subroutine uamplitude(time, name, amplitude)
Definition: uamplitude.f:20
subroutine identamta(amta, reftime, istart, iend, id)
Definition: identamta.f:26
Hosted by OpenAircraft.com, (Michigan UAV, LLC)